Closed Bug 156971 Opened 23 years ago Closed 23 years ago

XUL style attribute changes shouldn't reframe

Categories

(Core :: CSS Parsing and Computation, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.2alpha

People

(Reporter: dbaron, Assigned: dbaron)

Details

(Whiteboard: [patch])

Attachments

(1 file)

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.
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [patch]
Target Milestone: --- → mozilla1.2alpha
Hmm. That patch seems to cause some crashes. I need to investigate, but it's not ready for review...
Attached patch patchSplinter Review
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).
Attachment #95424 - Flags: superreview+
Attachment #95424 - Flags: review+
Fix checked in, 2002-08-16 04:29 PDT.
Status: ASSIGNED → RESOLVED
Closed: 23 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.

Attachment

General

Created:
Updated:
Size: