RESOLVED FIXED 129307
[CSS Blending] Blending operation is not isolated when z-index on parent changes dynamically
https://bugs.webkit.org/show_bug.cgi?id=129307
Summary [CSS Blending] Blending operation is not isolated when z-index on parent chan...
Mihai Tica
Reported 2014-02-25 06:35:37 PST
Consider the following scenario: parent element and child element having -webkit-mix-blend-mode other than normal. Set z-index and position for the parent from Javascript. Blending is not isolated, ie the blend operation is performed with all the backdrop. Instead, blending should only be performed with the contents of the parent element.
Attachments
Test case (893 bytes, text/html)
2014-02-25 06:38 PST, Mihai Tica
no flags
Not for review: reimplemented isolation with logic added in RenderLayerCompositor (9.19 KB, patch)
2014-02-28 06:45 PST, Mihai Tica
no flags
First try at isolation with descedantDependentFlag (23.50 KB, patch)
2014-03-06 11:32 PST, Mihai Tica
no flags
Patch (23.51 KB, patch)
2014-03-06 13:42 PST, Mihai Tica
no flags
Add guards in RenderLayer.cpp (23.59 KB, patch)
2014-03-07 07:06 PST, Mihai Tica
no flags
Patch (22.60 KB, patch)
2014-03-18 10:31 PDT, Mihai Tica
no flags
Patch (22.50 KB, patch)
2014-03-19 00:40 PDT, Mihai Tica
no flags
Mihai Tica
Comment 1 2014-02-25 06:38:36 PST
Created attachment 225147 [details] Test case Repaint test. Place it it fast/repaint
Mihai Tica
Comment 2 2014-02-28 01:01:40 PST
*** Bug 129305 has been marked as a duplicate of this bug. ***
Mihai Tica
Comment 3 2014-02-28 06:45:42 PST
Created attachment 225457 [details] Not for review: reimplemented isolation with logic added in RenderLayerCompositor This is a proof of concept patch. --Implementation-- The implementation correctly handles all cases, however, it resides in RenderLayerCompositor. An alternative implies adding blending as a descendant dependent flag, similar to https://codereview.chromium.org/23503046/diff/59001/Source/core/rendering/RenderLayer.cpp, however, going upwards provides better performance. --Tests-- The first test test validates that the background of the body is fully painted, and m_isolatesBlending doesn't affect the root renderer. The second tests validates that isolation is correctly handled. Note that there the third test-case fails due to https://bugs.webkit.org/show_bug.cgi?id=129480. This dependency should be fixed for all cases where RenderLayer.paintsWithTransparency should return true.
Mihai Tica
Comment 4 2014-03-03 11:46:01 PST
@Simon: could you please have a look over the last patch? Would this approach be ok? If not, do you have any suggestions?
Simon Fraser (smfr)
Comment 5 2014-03-03 11:49:21 PST
Comment on attachment 225457 [details] Not for review: reimplemented isolation with logic added in RenderLayerCompositor Did you see if this logic fits into RenderLayer::updateDescendantDependentFlags()?
Mihai Tica
Comment 6 2014-03-04 09:41:55 PST
(In reply to comment #5) > (From update of attachment 225457 [details]) > Did you see if this logic fits into RenderLayer::updateDescendantDependentFlags()? I've investigated this and it looks like it would be feasible to use the updateDescendantDependentFlags logic. Would using this be ok? I'm guessing that hooking here implies no additional traversing, thus being more performant than the implementation from my last patch.
Mihai Tica
Comment 7 2014-03-06 11:32:10 PST
Created attachment 226015 [details] First try at isolation with descedantDependentFlag
Mihai Tica
Comment 8 2014-03-06 13:42:45 PST
Mihai Tica
Comment 9 2014-03-07 07:06:15 PST
Created attachment 226124 [details] Add guards in RenderLayer.cpp
Mihai Tica
Comment 10 2014-03-12 01:38:22 PDT
@Simon: Could you please review this? Thanks
Mihai Tica
Comment 11 2014-03-18 10:31:21 PDT
WebKit Commit Bot
Comment 12 2014-03-18 10:33:17 PDT
Attachment 227071 [details] did not pass style-queue: ERROR: Source/WebCore/rendering/RenderLayer.cpp:849: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Mihai Tica
Comment 13 2014-03-19 00:40:14 PDT
WebKit Commit Bot
Comment 14 2014-03-20 10:37:47 PDT
Comment on attachment 227167 [details] Patch Clearing flags on attachment: 227167 Committed r165970: <http://trac.webkit.org/changeset/165970>
WebKit Commit Bot
Comment 15 2014-03-20 10:37:52 PDT
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.