Closed
Bug 1000875
Opened 11 years ago
Closed 11 years ago
Opaque fixed background repainted when starting to scroll
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla32
Tracking | Status | |
---|---|---|
firefox32 | --- | disabled |
People
(Reporter: mstange, Assigned: mstange)
References
Details
Attachments
(6 files)
851 bytes,
text/html
|
Details | |
1016 bytes,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
2.60 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
2.10 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
1.59 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
2.52 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
Load the testcase and enable paint flashing. Then scroll down a little, scroll back all the way up, and repeat. Each time the scroll position changes between zero and non-zero, the background image is repainted.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8411797 -
Flags: review?(roc)
Assignee | ||
Comment 2•11 years ago
|
||
With a few improvements this test would have caught this bug.
The most important change here is testing document.documentElement instead of document.body. The addition of overflow:hidden doesn't really change anything because the mochitest runner runs the test in an iframe with scrolling="no", but at least it makes it explicit. And we actually can't have any scrollbars in this testcase because then we'd detect scrollbar painting and the test would fail.
Attachment #8411801 -
Flags: review?(roc)
Assignee | ||
Comment 3•11 years ago
|
||
Invalidation debugging doesn't print the reason for the invalidation in the testcase. This adds the annotation for one of the reasons.
Attachment #8411803 -
Flags: review?(roc)
Assignee | ||
Comment 5•11 years ago
|
||
And this patch actually fixes the bug.
We were moving the clip rect of the opaque region of the background image display item along with scrolling. This patch disables the clip in the same way that GetBoundsInternal does it - by special casing canvas frames and using the whole canvas area for them.
Attachment #8411805 -
Flags: review?(roc)
Comment 6•11 years ago
|
||
Commit pushed to master at https://github.com/mozilla/webmaker.org
https://github.com/mozilla/webmaker.org/commit/a0f3e67d2e8f19372b16945eaba83254a47b0cc4
Fix bug 1000875 - Style tweaks for badges
Updated•11 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 7•11 years ago
|
||
That robot has got the wrong bug number.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 8•11 years ago
|
||
Sorry about that guys
Comment on attachment 8411797 [details] [diff] [review]
part 1: Give nsDOMWindowUtils::CheckAndClearPaintedState the ability to check paints of canvas frames.
Review of attachment 8411797 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/nsDOMWindowUtils.cpp
@@ +3041,5 @@
> + // canvasframe invalidations by observing the documentElement.
> + for (;;) {
> + nsIFrame* parentFrame = frame->GetParent();
> + if (parentFrame && parentFrame->GetContent() == content) {
> + frame = parentFrame;
How about we call CheckAndClearPaintedState on every frame between the primary frame and the outermost frame for the element, and OR the results?
Attachment #8411797 -
Flags: review?(roc) → review-
Attachment #8411801 -
Flags: review?(roc) → review+
Attachment #8411803 -
Flags: review?(roc) → review+
Attachment #8411804 -
Flags: review?(roc) → review+
Assignee | ||
Comment 10•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) (PTO April 25 to May 3) from comment #9)
> Comment on attachment 8411797 [details] [diff] [review]
> part 1: Give nsDOMWindowUtils::CheckAndClearPaintedState the ability to
> check paints of canvas frames.
>
> Review of attachment 8411797 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/base/nsDOMWindowUtils.cpp
> @@ +3041,5 @@
> > + // canvasframe invalidations by observing the documentElement.
> > + for (;;) {
> > + nsIFrame* parentFrame = frame->GetParent();
> > + if (parentFrame && parentFrame->GetContent() == content) {
> > + frame = parentFrame;
>
> How about we call CheckAndClearPaintedState on every frame between the
> primary frame and the outermost frame for the element, and OR the results?
Sure, but I don't really understand why that would be better. nsFrame::CheckAndClearPaintedState already recurses over its children:
http://dxr.mozilla.org/mozilla-central/source/layout/generic/nsFrame.cpp#245-262
Are there cases where this may not traverse the primary frame of the element?
Attachment #8411805 -
Flags: review?(roc) → review+
Comment on attachment 8411797 [details] [diff] [review]
part 1: Give nsDOMWindowUtils::CheckAndClearPaintedState the ability to check paints of canvas frames.
Review of attachment 8411797 [details] [diff] [review]:
-----------------------------------------------------------------
right
Attachment #8411797 -
Flags: review- → review+
Assignee | ||
Comment 13•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8c893efb5eb7
https://hg.mozilla.org/integration/mozilla-inbound/rev/c668dc3e1826
https://hg.mozilla.org/integration/mozilla-inbound/rev/6607fab12f18
https://hg.mozilla.org/integration/mozilla-inbound/rev/baaaf70d2bca
https://hg.mozilla.org/integration/mozilla-inbound/rev/fd797f07d0db
Flags: needinfo?(roc)
Comment 14•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8c893efb5eb7
https://hg.mozilla.org/mozilla-central/rev/c668dc3e1826
https://hg.mozilla.org/mozilla-central/rev/6607fab12f18
https://hg.mozilla.org/mozilla-central/rev/baaaf70d2bca
https://hg.mozilla.org/mozilla-central/rev/fd797f07d0db
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Assignee | ||
Comment 15•11 years ago
|
||
Looks like this gave a healthy speedup on tscroll-ASAP, at least on Mac (~20%):
https://groups.google.com/d/topic/mozilla.dev.tree-management/NJXBytpD2UY/discussion
Comment 16•11 years ago
|
||
Linux too! Although much smaller.
Assignee | ||
Comment 17•10 years ago
|
||
Backed out on Beta for causing bug 1011166 (see the description in bug 1011166 comment 40):
https://hg.mozilla.org/releases/mozilla-beta/rev/11a5306111d0
This might trigger a few performance regression warnings on Beta.
status-firefox32:
--- → disabled
You need to log in
before you can comment on or make changes to this bug.
Description
•