Closed
Bug 230651
Opened 21 years ago
Closed 21 years ago
don't create new rule processors when enabling/disabling a style sheet
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
People
(Reporter: bryner, Assigned: bryner)
Details
Attachments
(2 files)
3.58 KB,
patch
|
dbaron
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
1.20 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
We can eliminate the style set clearing its rule processors array (and
subsequent creation of new rule processors) for enabling/disabling style sheets
by calling ClearRuleCascades() from CSSStyleSheetImpl::SetEnabled().
Assignee | ||
Comment 1•21 years ago
|
||
Assignee | ||
Comment 2•21 years ago
|
||
Comment on attachment 138826 [details] [diff] [review]
patch
dbaron, can you r+sr?
Attachment #138826 -
Flags: superreview?(dbaron)
Attachment #138826 -
Flags: review?(dbaron)
![]() |
||
Comment 3•21 years ago
|
||
Actually, if |mInner && mInner->mComplete| there is no need to clear the
cascades -- incomplete sheets won't be affecting anyone's style anyway.
With this change, is there still good reason to move sheets in and out of the
style set as their enabled state changes? I guess with alternate sheets that's
still a win?
In what way do we move sheets in and out of the style set as their enabled state
changes?
Attachment #138826 -
Flags: superreview?(dbaron)
Attachment #138826 -
Flags: superreview?(bz-vacation)
Attachment #138826 -
Flags: review?(dbaron)
Attachment #138826 -
Flags: review+
![]() |
||
Comment 5•21 years ago
|
||
See nsDocument::SetStyleSheetApplicableState
(http://lxr.mozilla.org/seamonkey/source/content/base/src/nsDocument.cpp#1500)
Also see the checks done in nsDocument::AddStyleSheet,
sDocument::InsertStyleSheetAt, and nsDocument::UpdateStyleSheets to not put
sheets that are not applicable in style sets (all those used to be just disabled
checks back before we had a concept of "applicable").
![]() |
||
Comment 6•21 years ago
|
||
Comment on attachment 138826 [details] [diff] [review]
patch
sr=bzbarsky if the first paragraph of comment 3 is addressed.
Attachment #138826 -
Flags: superreview?(bz-vacation) → superreview+
Assignee | ||
Comment 7•21 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
![]() |
||
Comment 8•21 years ago
|
||
I just realized.. this changed the SetEnabled code, but not SetDisabled. That
needs to be changed too.
Reopening to make sure that happens.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 9•21 years ago
|
||
how about this
(note, i'm using explicit scope resolution to avoid the second function call
being virtual)
Assignee | ||
Updated•21 years ago
|
Attachment #139054 -
Flags: superreview?(bz-vacation)
Attachment #139054 -
Flags: review?(bz-vacation)
![]() |
||
Comment 10•21 years ago
|
||
Comment on attachment 139054 [details] [diff] [review]
er, yeah
Looks reasonable (though in my tree the functions are subtly different, but I
can merge).
Attachment #139054 -
Flags: superreview?(bz-vacation)
Attachment #139054 -
Flags: superreview+
Attachment #139054 -
Flags: review?(bz-vacation)
Attachment #139054 -
Flags: review+
Assignee | ||
Comment 11•21 years ago
|
||
Checked in.
Status: REOPENED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•