Closed Bug 810470 Opened 12 years ago Closed 12 years ago

Refactor background image invalidation

Categories

(Core :: Layout, defect)

18 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19
Tracking Status
firefox18 --- fixed

People

(Reporter: roc, Assigned: roc)

References

Details

Attachments

(9 files)

26.41 KB, patch
mattwoodrow
: review+
Details | Diff | Splinter Review
32.48 KB, patch
mattwoodrow
: review+
Details | Diff | Splinter Review
6.99 KB, patch
mattwoodrow
: review+
Details | Diff | Splinter Review
10.22 KB, patch
mattwoodrow
: review+
Details | Diff | Splinter Review
2.81 KB, patch
mattwoodrow
: review+
Details | Diff | Splinter Review
27.97 KB, patch
mattwoodrow
: review+
Details | Diff | Splinter Review
5.50 KB, patch
mattwoodrow
: review+
Details | Diff | Splinter Review
6.57 KB, patch
mattwoodrow
: review+
Details | Diff | Splinter Review
3.30 KB, patch
mattwoodrow
: review+
Details | Diff | Splinter Review
By storing and comparing the background positioning area explicitly, we can simplify and optimize our background-image invalidation, especially for background-attachment:fixed images.
The most important patch of the series. BTW I don't plan to land these until after the next uplift, so prioritize accordingly.
Attachment #680315 - Flags: review?(matt.woodrow)
Attachment #680314 - Flags: review?(matt.woodrow) → review+
Attachment #680319 - Flags: review?(matt.woodrow) → review+
Attachment #680315 - Flags: review?(matt.woodrow) → review+
Comment on attachment 680316 [details] [diff] [review] Part 3: Remove code for invalidating background-attachment:fixed content when scrolling Review of attachment 680316 [details] [diff] [review]: ----------------------------------------------------------------- This patch makes me very happy.
Attachment #680316 - Flags: review?(matt.woodrow) → review+
Attachment #680318 - Flags: review?(matt.woodrow) → review+
Attachment #680321 - Flags: review?(matt.woodrow) → review+
Comment on attachment 680317 [details] [diff] [review] Part 4: Make only background-attachment:fixed backgrounds that have propagated to the viewport use a dedicated layer, and refactor how we do that Review of attachment 680317 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/base/nsDisplayList.cpp @@ -1528,5 @@ > - > - mIsFixed = bounds.Contains(scrollport); > - } > - } > - } I don't know much about this, why do we no longer need to check this? And how does this affect if we have a fixed background within a scrollable frame that isn't the window?
I've moved the check up into nsDisplayCanvasBackground::ShouldFixToViewport. The current check says that any background image item whose bounds (frame border-box) covers the entire viewport of their document should be layerized (when scrolling is active for the root scroll frame). The new code only runs on nsDisplayCanvasBackgrounds, which always satisfy this condition. So all we're really changing here is that we don't try to layerize non-canvas-backgrounds. I think this is right because on async-scrolling setups, a large background that currently covers the viewport could be scrolled away asynchronously and we'd keep it pinned to the viewport when we shouldn't.
Attachment #680317 - Flags: review?(matt.woodrow) → review+
Attachment #681649 - Flags: review?(matt.woodrow) → review+
Looks like this only ever ran through Linux on Try. Unfortunately, it caused an already intermittent reftest to start failing permanently on OSX. Backed out. https://hg.mozilla.org/integration/mozilla-inbound/rev/1c1981ecaba8 https://tbpl.mozilla.org/php/getParsedLog.php?id=17050658&tree=Mozilla-Inbound REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/talos-slave/test/build/reftest/tests/layout/reftests/printing/745025-1.html | image comparison (==), max difference: 1, number of differing pixels: 4512
OSX 10.6 specifically was seeing a couple additional failures consistently. https://tbpl.mozilla.org/php/getParsedLog.php?id=17052887&tree=Mozilla-Inbound REFTEST TEST-UNEXPECTED-FAIL | file:///Users/cltbld/talos-slave/test/build/reftest/tests/layout/reftests/forms/textarea-setvalue-framereconstruction-1.html | image comparison (==), max difference: 18, number of differing pixels: 53 REFTEST TEST-UNEXPECTED-FAIL | file:///Users/cltbld/talos-slave/test/build/reftest/tests/layout/reftests/printing/745025-1.html | image comparison (==), max difference: 1, number of differing pixels: 3809 REFTEST TEST-UNEXPECTED-FAIL | file:///Users/cltbld/talos-slave/test/build/reftest/tests/layout/reftests/scrolling/fixed-opacity-2.html | image comparison (==), max difference: 2, number of differing pixels: 12
Attachment #681885 - Flags: review?(matt.woodrow) → review+
Comment on attachment 680315 [details] [diff] [review] Part 2: Change nsDisplayBackground invalidation to store and compare the background positioning rect [Approval Request Comment] Bug caused by (feature/regressing bug #): DLBI User impact if declined: regression in bug 807934 (certain backgrounds don't repaint correctly when window is resized; possibly other related regressions) Testing completed (on m-c, etc.): just landed on m-c Risk to taking this patch (and alternatives if risky): Quite a few patches here, but mostly refactoring and deleting unused code. Some risk. Alternative hack-fixes (such as patch currently in 807934) probably have more risk though since they just paper around problems. Matt and I judge this patch set to be lower risk. String or UUID changes made by this patch: None
Attachment #680315 - Flags: approval-mozilla-aurora?
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #21) > [Approval Request Comment] > User impact if declined: regression in bug 807934 (certain backgrounds don't > repaint correctly when window is resized; possibly other related regressions) > Risk to taking this patch (and alternatives if risky): Quite a few patches > here, but mostly refactoring and deleting unused code. Some risk. > Alternative hack-fixes (such as patch currently in 807934) probably have > more risk though since they just paper around problems. Matt and I judge > this patch set to be lower risk. So I'd usually a- this based upon the STR in 807934, but what you said about other possible regressions makes me think we should land this sooner rather than later, when it'll be even higher risk to the release. Begrudgingly approved :) - thanks for jumping on this.
Comment on attachment 680315 [details] [diff] [review] Part 2: Change nsDisplayBackground invalidation to store and compare the background positioning rect Please land before Monday morning PT to make it in before the merge.
Attachment #680315 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Depends on: 815030
Depends on: 818643
Depends on: 819915
Depends on: 828146
Depends on: 828824
Depends on: 1082249
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: