Summary: | [CSS Blending] Webkit-blend-mode fails for accelerated parent with overflow:hidden | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mihai Tica <mitica> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | buildbot, commit-queue, esprehn+autocc, glenn, kondapallykalyan, mihnea, rniwa, simon.fraser, WebkitBugTracker |
Priority: | P2 | Keywords: | AdobeTracked |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=197731 https://bugs.webkit.org/show_bug.cgi?id=197695 |
||
Bug Depends on: | |||
Bug Blocks: | 95614 | ||
Attachments: |
Description
Mihai Tica
2013-12-23 06:19:17 PST
Created attachment 219914 [details]
Test case showing the problem
Created attachment 225367 [details]
Screenshot of expected versus current behaviour
Use case:
Composited parent with overflow:hidden. Two children, the second child is composited, overlaps the first child and has mix-blend-mode applied.
This screenshot shows the current versus the desired behaviour: the second child should blend with both the parent and its sibling. This currently fails.
Created attachment 225369 [details]
Prototype: not for review
This is a solution discussed with Simon Fraser when initially implementing composited mix-blend-mode.
For this use case, the parent creates a descendant clipping layer, which prevents blending for the second child.
The proposed solution, (prototyped in this patch) is:
If a layer has clipping, is composited and has a blended child, it propagates clipping by setting ancestor clipping layers for each child, instead of setting a descendant clipping layer on itself.
If you have the following structure, for example:
<parent overflow:hidden composited>
<child1>
<child2>
<blended child>
<child3>
the parent would no longer create a descendant clipping layer. Instead, child1 and child2 would get ancestor clipping layers.
Note that this patch is just a proof of concept, it should be a starting point and only provides minimal tested functionality.
Created attachment 227422 [details]
Usecase with overflow:scroll
Created attachment 228829 [details]
fix #1
Created attachment 230811 [details]
Patch
Created attachment 230812 [details]
Patch
Comment on attachment 230812 [details] Patch Attachment 230812 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/6243960724914176 New failing tests: css3/compositing/blend-mode-clip-accelerated-blending-canvas.html media/W3C/video/networkState/networkState_during_loadstart.html Created attachment 230814 [details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Comment on attachment 230812 [details] Patch Attachment 230812 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/4910260368179200 New failing tests: css3/compositing/blend-mode-clip-accelerated-blending-canvas.html compositing/geometry/video-opacity-overlay.html Created attachment 230816 [details]
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-06 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Comment on attachment 230812 [details] Patch Attachment 230812 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/5721422387216384 New failing tests: css3/compositing/blend-mode-clip-accelerated-blending-canvas.html Created attachment 230818 [details]
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-03 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Created attachment 230820 [details]
Patch
Comment on attachment 230820 [details] Patch Clearing flags on attachment: 230820 Committed r168314: <http://trac.webkit.org/changeset/168314> All reviewed patches have been landed. Closing bug. |