Closed
Bug 930419
Opened 11 years ago
Closed 11 years ago
Overinvalidation of position:sticky on scrolling
Categories
(Core :: Layout: Positioned, defect)
Core
Layout: Positioned
Tracking
()
VERIFIED
FIXED
mozilla27
People
(Reporter: jrmuizel, Unassigned)
References
Details
(Keywords: perf)
Attachments
(1 file, 1 obsolete file)
1.79 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
STR:
Turn on paint flashing.
Scroll http://html5-demos.appspot.com/static/css/sticky.html
or http://people.mozilla.org/~jmuizelaar/tmp/sticky/
Reporter | ||
Comment 1•11 years ago
|
||
This makes position sticky have much worse performance than it should.
tracking-firefox27:
--- → ?
Comment 2•11 years ago
|
||
I get the same sort of constant-invalidation if I manually "sticky" to "relative", FWIW. (using "inspect element") So, this isn't sticky-specific. --> Adjusting bug summary.
(Note that we implement sticky as an extended form of relative positioning, so it makes sense that this badness affects both positioning schemes.)
Comment 3•11 years ago
|
||
Attachment #821627 -
Flags: review?(roc)
Comment 4•11 years ago
|
||
I don't see any bugs with position:relative (on this test case at least).
Comment 5•11 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #4)
> I don't see any bugs with position:relative (on this test case at least).
Sorry, you're right -- I don't either. Turns out the post-"position"-tweaking invalidation that I was seeing was from having the element selected via "inspect element" -- that 'inspect' selection apparently makes us invalidate the element eagerly as we scroll. That's probably a bug, but is unrelated to this bug.
Comment on attachment 821627 [details] [diff] [review]
Make position sticky frames an active scroll root
Review of attachment 821627 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/base/nsLayoutUtils.cpp
@@ +1169,4 @@
> nsIScrollableFrame* sf = do_QueryFrame(parent);
> + if (sf) {
> + if (sf->IsScrollingActive() && sf->GetScrolledFrame() == f)
> + {
{ on previous line
@@ +1174,5 @@
> + // then use that. Otherwise use the scroll frame.
> + if (stickyFrame) {
> + return stickyFrame;
> + } else {
> + return f;
Don't do else after return.
@@ +1177,5 @@
> + } else {
> + return f;
> + }
> + } else {
> + stickyFrame = nullptr;
This isn't right. The sticky frame is active if it has any active scrolling ancestor.
Comment 7•11 years ago
|
||
(I filed bug 930463 on the "inspect element" overinvalidation that I noted in comment 5 (and misdiagnosed in comment 2), BTW.)
Summary: Overinvalidation of position:sticky / position:relative on scrolling → Overinvalidation of position:sticky on scrolling
Comment 8•11 years ago
|
||
Attachment #821627 -
Attachment is obsolete: true
Attachment #821627 -
Flags: review?(roc)
Attachment #821649 -
Flags: review?(roc)
Attachment #821649 -
Flags: review?(roc) → review+
Comment 9•11 years ago
|
||
Comment 10•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Updated•11 years ago
|
status-firefox27:
--- → fixed
Comment 11•11 years ago
|
||
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:26.0) Gecko/20100101 Firefox/26.0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
Mozilla/5.0 (X11; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
Verified as fixed in latest Aurora 27.0a2 (buildID: 20131105004004).
You need to log in
before you can comment on or make changes to this bug.
Description
•