Closed
Bug 553359
Opened 14 years ago
Closed 14 years ago
Cache whether the PresContext is chrome or not
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
People
(Reporter: tnikkel, Assigned: tnikkel)
References
Details
Attachments
(1 file, 1 obsolete file)
5.87 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
For lazy frame construction we should cache on the prescontext if it is chrome or not because lazy frame construction calls IsChrome frequently.
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → tnikkel
Assignee | ||
Updated•14 years ago
|
Attachment #433372 -
Flags: review?(bzbarsky)
Comment 1•14 years ago
|
||
Comment on attachment 433372 [details] [diff] [review] patch You don't need the NS_HIDDEN gunk (hidden visibility is default now) and you can make IsChrome() inline since it just returns mIsChromeCacheValue. r=me with that.
Attachment #433372 -
Flags: review?(bzbarsky) → review+
Comment 2•14 years ago
|
||
Oh, and make call the new member mIsChrome?
Assignee | ||
Comment 3•14 years ago
|
||
Made those changes in my tree. Thanks.
Assignee | ||
Comment 4•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/b4fcd21cb6e5
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•14 years ago
|
||
Backed out because something in the push caused tsvg_opacity regression. http://hg.mozilla.org/mozilla-central/rev/a5009861bd1b http://hg.mozilla.org/mozilla-central/rev/820bf1a6374c
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 6•14 years ago
|
||
Landed again http://hg.mozilla.org/mozilla-central/rev/ae2093359899 but backed out because it looks like this was responsible for the tsvg_opacity regression. http://hg.mozilla.org/mozilla-central/rev/83bf27b04ddc http://hg.mozilla.org/mozilla-central/rev/e4e482050eba
Assignee | ||
Comment 7•14 years ago
|
||
I realized that if IsChrome is never called we are actually doing extra work getting the value of IsChrome the slow way when the container is set or the docshell type changes. So instead get the IsChrome value the first time we are asked for it, and cache the value, and keep around another bool that tells us if we have the real IsChrome value cached or not. I landed that and it seems to have fixed the tsvg_opacity regression. http://hg.mozilla.org/mozilla-central/rev/7d5962d3a808 Will request post-landing review and make any changes based on that review.
Assignee | ||
Comment 8•14 years ago
|
||
Attachment #433372 -
Attachment is obsolete: true
Attachment #438927 -
Flags: review?(bzbarsky)
Comment on attachment 438927 [details] [diff] [review] patch v2 InvalidateIsChromeCacheInternal should be inline (i.e., in nsPresContext.h). nsPresContext::SetContainer should then call InvalidateIsChromeCache (which should then inline to the same thing). You could probably use |mutable| to avoid having to un-|const|-ify the methods that you did, but it's probably not worth the bother. r=dbaron with that
Attachment #438927 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 10•14 years ago
|
||
Ah, I did not know about mutable. I will land those changes.
Assignee | ||
Comment 11•14 years ago
|
||
Landed those changes http://hg.mozilla.org/mozilla-central/rev/cc5c2ab5038a
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•