XUL style attribute changes currently cause a reframe. They should be handled the same way HTML ones are. I started work on this on bug 156719, but I'm transferring it here.
Relevant attachments from bug 156971: * patch: attachment 90909 [details] [diff] [review]: see bug 156971 comment 7, bug 156971 comment 11 * testcase: attachment 90872 [details]: see bug 156971 comment 10
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.2alpha
Hmm. That patch seems to cause some crashes. I need to investigate, but it's not ready for review...
Created attachment 95424 [details] [diff] [review] patch This patch has the crash fixed -- I missed an NS_IF_ADDREF in nsXULElement.cpp.
So, a quick summary of the patch: * it changes WalkInlineStyleRules to GetInlineStyleRule, which returns a single style rule. (Nothing has ever used multiple rules, so we don't need the ability to return multiple rules. If we ever do, we could make it an nsISupportsArray like I suspect it was before hyatt's landing) * it changes nsCSSFrameConstructor::AttributeChanged to use GetInlineStyleRule rather than coding every implementation thereof, over again, by hand. This eliminates a large MOZ_SVG section and consolidates an SVG section with an HTML section. This code now applies to XUL as well.
Oh, and, of course, it removes that code to cause a reframe... :-)
I assume the inline style rule will be updated properly across attribute changes...?
I'm not completely sure what you're asking. Attribute changes of the "style" attribute? What is it that wouldn't get updated?
I just didn't remember there ever being code to store an inline style rule as an nsISupports (like HTML does) in XUL. Maybe I'm just going senile. sr=hyatt
Comment on attachment 95424 [details] [diff] [review] patch mmm. code removal.... r=bzbarsky (and marking the sr=hyatt).
Fix checked in, 2002-08-16 04:29 PDT.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
verified as per developers comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.