XUL style attribute changes shouldn't reframe

VERIFIED FIXED in mozilla1.2alpha

Status

()

Core
CSS Parsing and Computation
P1
normal
VERIFIED FIXED
16 years ago
16 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

Trunk
mozilla1.2alpha
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [patch])

Attachments

(1 attachment)

(Assignee)

Description

16 years ago
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.
(Assignee)

Updated

16 years ago
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [patch]
Target Milestone: --- → mozilla1.2alpha
(Assignee)

Comment 2

16 years ago
Hmm.  That patch seems to cause some crashes.  I need to investigate, but it's
not ready for review...
(Assignee)

Comment 3

16 years ago
Created attachment 95424 [details] [diff] [review]
patch

This patch has the crash fixed -- I missed an NS_IF_ADDREF in nsXULElement.cpp.
(Assignee)

Comment 4

16 years ago
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.
(Assignee)

Comment 5

16 years ago
Oh, and, of course, it removes that code to cause a reframe... :-)

Comment 6

16 years ago
I assume the inline style rule will be updated properly across attribute changes...?
(Assignee)

Comment 7

16 years ago
I'm not completely sure what you're asking.  Attribute changes of the "style"
attribute?  What is it that wouldn't get updated?

Comment 8

16 years ago
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+
(Assignee)

Comment 10

16 years ago
Fix checked in, 2002-08-16 04:29 PDT.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 11

16 years ago
verified as per developers comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.