Closed Bug 209733 Opened 21 years ago Closed 21 years ago

more efficient codepath for style changes on 'display: none' and descendant frames

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(1 file, 1 obsolete file)

Right now we use ReconstructFramesForContent in a few places to handle the case
of a content node that *might* now need a new frame but currently doesn't have
one (i.e., it's 'display:none' or a descendant of something that's
'display:none' -- and in the latter case it definitely doesn't need a new
frame).  This is inefficient, because it does a bunch of notifications that
aren't needed.  Furthermore, it leaves a stale style context in the undisplayed
map, which shouldn't cause a problem now because the only case where that causes
a problem is where we do ReconstructStyleData(PR_TRUE) in the pres shell. 
However, it's worth fixing for that too so that we don't keep the undisplayed
map up-to-date 99% of the time, which could cause problems later.

Patch coming, once I extract it from a pile of other changes.
Attached patch patch (obsolete) — Splinter Review
(It's worth mentioning that another reason I want to do this is to remove an
optimization currently in nsXULElement.cpp that passes NS_STYLE_HINT_NONE as
the AttributeChanged hint.)
Attachment #125878 - Flags: superreview?(bzbarsky)
Attachment #125878 - Flags: review?(bzbarsky)
Attached patch patchSplinter Review
The right patch this time, with the callers.
Attachment #125878 - Attachment is obsolete: true
Comment on attachment 125943 [details] [diff] [review]
patch

r+sr=me
Attachment #125943 - Flags: superreview+
Attachment #125943 - Flags: review+
Attachment #125878 - Flags: superreview?(bzbarsky)
Attachment #125878 - Flags: review?(bzbarsky)
Fix checked in, 2003-06-18 14:54 -0700.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: