RESOLVED FIXED 104981
Element is displayed behind a composited layer when clipping is used on a previous element
https://bugs.webkit.org/show_bug.cgi?id=104981
Summary Element is displayed behind a composited layer when clipping is used on a pre...
Alexandru Chiculita
Reported 2012-12-13 17:44:53 PST
Created attachment 179385 [details] test case Look at the attached test case. "Layer3" needs to be displayed on top of everything else, but instead it is displayed behind. The element needs to be promoted to composited layer, but it is not. The problem is in RenderLayerCompositor::computeCompositingRequirements at the following line: > // We're done processing an element that clips. The container can keep testing overlap. > compositingState.m_testingOverlap = true; The problem is that there's another animation behind it that requested to skip testing for overlaps, but the overflow:hidden element that comes right in the middle will reset the flag and will force the top-most element incorrectly check for overlaps again.
Attachments
test case (828 bytes, text/html)
2012-12-13 17:44 PST, Alexandru Chiculita
no flags
Patch V1 (45.05 KB, patch)
2013-01-03 15:15 PST, Alexandru Chiculita
no flags
Patch V2 (45.80 KB, patch)
2013-01-03 15:19 PST, Alexandru Chiculita
buildbot: commit-queue-
Patch V3 (35.13 KB, patch)
2013-01-09 16:57 PST, Alexandru Chiculita
webkit.review.bot: commit-queue-
Patch V4 (44.16 KB, patch)
2013-01-11 12:55 PST, Alexandru Chiculita
no flags
Patch V5 (44.00 KB, patch)
2013-01-11 13:22 PST, Alexandru Chiculita
no flags
Simon Fraser (smfr)
Comment 1 2012-12-13 18:19:45 PST
Resizing the window at the right time fixes it. Hm, maybe we need to push/pop the m_testingOverlap state.
Alexandru Chiculita
Comment 2 2013-01-03 15:15:42 PST
Created attachment 181230 [details] Patch V1
Alexandru Chiculita
Comment 3 2013-01-03 15:18:35 PST
(In reply to comment #1) > Resizing the window at the right time fixes it. > > Hm, maybe we need to push/pop the m_testingOverlap state. Yeah, resizing at the right time will compute the layer overlaps in the middle of the animation. I will add two other bugs: 1. try to approximate the animation bounding box for easy cases. 2. try to use the clip-rectangle when the clipping-container is not creating a stacking context.
Alexandru Chiculita
Comment 4 2013-01-03 15:19:34 PST
Created attachment 181232 [details] Patch V2 This time with git diff --binary
Simon Fraser (smfr)
Comment 5 2013-01-03 15:25:51 PST
Comment on attachment 181232 [details] Patch V2 View in context: https://bugs.webkit.org/attachment.cgi?id=181232&action=review > Source/WebCore/ChangeLog:30 > + Also, part of this patch I've removed the check for 3D transforms that were forcing the following layers to become composited, much like > + the animations are. Can you do this in a separate patch? I'm concerned that this has possibly change a bunch of testcases so that they no longer test what they were designed for.
Alexandru Chiculita
Comment 6 2013-01-03 16:38:29 PST
(In reply to comment #5) > (From update of attachment 181232 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=181232&action=review > > > Source/WebCore/ChangeLog:30 > > + Also, part of this patch I've removed the check for 3D transforms that were forcing the following layers to become composited, much like > > + the animations are. > > Can you do this in a separate patch? I'm concerned that this has possibly change a bunch of testcases so that they no longer test what they were designed for. Sure, will do.
Build Bot
Comment 7 2013-01-03 17:15:43 PST
Comment on attachment 181232 [details] Patch V2 Attachment 181232 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15647883 New failing tests: css3/filters/filtered-compositing-descendant.html
Build Bot
Comment 8 2013-01-03 17:31:21 PST
Comment on attachment 181232 [details] Patch V2 Attachment 181232 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15649837 New failing tests: css3/filters/filtered-compositing-descendant.html fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html fast/sub-pixel/sub-pixel-accumulates-to-layers.html fast/sub-pixel/transformed-iframe-copy-on-scroll.html
WebKit Review Bot
Comment 9 2013-01-03 19:32:06 PST
Comment on attachment 181232 [details] Patch V2 Attachment 181232 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15691003 New failing tests: platform/chromium/virtual/softwarecompositing/layer-creation/overlap-animation-container.html compositing/layer-creation/overlap-animation-clipping.html platform/chromium/virtual/softwarecompositing/layer-creation/overlap-animation-clipping.html compositing/geometry/ancestor-overflow-change.html compositing/overflow/clip-descendents.html css3/filters/filtered-compositing-descendant.html compositing/layer-creation/overlap-animation-container.html platform/chromium/virtual/gpu/compositedscrolling/overflow/clip-descendents.html platform/chromium/virtual/softwarecompositing/geometry/ancestor-overflow-change.html platform/chromium/virtual/softwarecompositing/overflow/clip-descendents.html
Alexandru Chiculita
Comment 10 2013-01-09 16:57:19 PST
Created attachment 182015 [details] Patch V3 Removed the 3d transforms check. Note that this is triggering some more layers in some cases, when it didn't before. That's because 3d transforms are treated more like animations and there were tests that reproduced the same case like the one with the clipping rectangle, but with 3d transforms instead of animations. I will fix that in a following patch.
Simon Fraser (smfr)
Comment 11 2013-01-09 17:14:00 PST
Comment on attachment 182015 [details] Patch V3 View in context: https://bugs.webkit.org/attachment.cgi?id=182015&action=review > LayoutTests/ChangeLog:18 > + * compositing/layer-creation/overlap-transforms-expected.txt: Removed. > + * compositing/layer-creation/overlap-transforms.html: Removed. Why was this removed?
Alexandru Chiculita
Comment 12 2013-01-09 18:26:37 PST
(In reply to comment #11) > (From update of attachment 182015 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=182015&action=review > > > LayoutTests/ChangeLog:18 > > + * compositing/layer-creation/overlap-transforms-expected.txt: Removed. > > + * compositing/layer-creation/overlap-transforms.html: Removed. > > Why was this removed? Those tests were related to the 3d transforms check that I've now added back. I will post another patch to remove that check and include those two tests.
WebKit Review Bot
Comment 13 2013-01-09 19:03:29 PST
Comment on attachment 182015 [details] Patch V3 Attachment 182015 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15763773 New failing tests: platform/chromium/virtual/softwarecompositing/layer-creation/overlap-animation-container.html compositing/layer-creation/overlap-animation-clipping.html platform/chromium/virtual/softwarecompositing/layer-creation/overlap-animation-clipping.html compositing/overflow/clip-descendents.html compositing/layer-creation/overlap-animation-container.html platform/chromium/virtual/gpu/compositedscrolling/overflow/clip-descendents.html platform/chromium/virtual/softwarecompositing/overflow/clip-descendents.html
WebKit Review Bot
Comment 14 2013-01-09 19:44:49 PST
Comment on attachment 182015 [details] Patch V3 Attachment 182015 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15759790 New failing tests: platform/chromium/virtual/softwarecompositing/layer-creation/overlap-animation-container.html compositing/layer-creation/overlap-animation-clipping.html platform/chromium/virtual/softwarecompositing/layer-creation/overlap-animation-clipping.html compositing/overflow/clip-descendents.html compositing/layer-creation/overlap-animation-container.html platform/chromium/virtual/gpu/compositedscrolling/overflow/clip-descendents.html platform/chromium/virtual/softwarecompositing/overflow/clip-descendents.html
Alexandru Chiculita
Comment 15 2013-01-10 15:51:48 PST
(In reply to comment #12) > (In reply to comment #11) > > (From update of attachment 182015 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=182015&action=review > > > > > LayoutTests/ChangeLog:18 > > > + * compositing/layer-creation/overlap-transforms-expected.txt: Removed. > > > + * compositing/layer-creation/overlap-transforms.html: Removed. > > > > Why was this removed? > > Those tests were related to the 3d transforms check that I've now added back. I will post another patch to remove that check and include those two tests. By future patch I mean, in a separate bug.
Alexandru Chiculita
Comment 16 2013-01-11 12:55:09 PST
Created attachment 182398 [details] Patch V4 Added the old test back, sorry about the misunderstanding. I thought you are asking about the other two tests that I had initially added in the first patch. I didn't realize I've actually removed an old test file too, so that generated some confusion on my side. Also fixed the chromium test failures. It happened because of the text displayed on the page (in the "#layers" element). It had different line-heights across platforms, so it ended up having slightly different numbers in the output. I fixed it by hiding the "layers" element before it takes the "layers-snapshot".
Alexandru Chiculita
Comment 17 2013-01-11 13:22:20 PST
Created attachment 182404 [details] Patch V5 Rebased the patch.
WebKit Review Bot
Comment 18 2013-01-11 14:06:50 PST
Comment on attachment 182404 [details] Patch V5 Clearing flags on attachment: 182404 Committed r139493: <http://trac.webkit.org/changeset/139493>
WebKit Review Bot
Comment 19 2013-01-11 14:06:55 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.