Bug 130337 - [CSS Blending] Blend mode property is propagated to multiple GraphicLayers
Summary: [CSS Blending] Blend mode property is propagated to multiple GraphicLayers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 130331
Blocks: 95614
  Show dependency treegraph
 
Reported: 2014-03-17 07:47 PDT by Ion Rosca
Modified: 2014-03-31 14:08 PDT (History)
6 users (show)

See Also:


Attachments
path v1 (4.54 KB, patch)
2014-03-17 08:04 PDT, Ion Rosca
no flags Details | Formatted Diff | Diff
fixing style (4.53 KB, patch)
2014-03-18 05:17 PDT, Ion Rosca
no flags Details | Formatted Diff | Diff
patch v3 (4.48 KB, patch)
2014-03-19 12:37 PDT, Ion Rosca
no flags Details | Formatted Diff | Diff
removing RenderLayerBacking::setBlendMode (6.64 KB, patch)
2014-03-24 13:22 PDT, Ion Rosca
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ion Rosca 2014-03-17 07:47:34 PDT
If a blending GraphicsLayer has an ancestorClippingLayer, the blend mode property is propagated to the ancestorClippingLayer. The main graphicsLayer should reset its own blend mode to "normal", otherwise both ancestorClippingLayer and main graphicsLayer will have blend modes.
Comment 1 Ion Rosca 2014-03-17 08:04:49 PDT
Created attachment 226920 [details]
path v1
Comment 2 Ion Rosca 2014-03-17 08:06:56 PDT
The test will pass after submitting https://bugs.webkit.org/show_bug.cgi?id=130331, which brings in blend mode dumping in GraphicsLayers.
Comment 3 WebKit Commit Bot 2014-03-18 02:01:50 PDT
Attachment 226920 [details] did not pass style-queue:


ERROR: Source/WebCore/rendering/RenderLayerBacking.cpp:2063:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Ion Rosca 2014-03-18 05:17:23 PDT
Created attachment 227039 [details]
fixing style
Comment 5 Simon Fraser (smfr) 2014-03-18 13:59:25 PDT
Comment on attachment 227039 [details]
fixing style

View in context: https://bugs.webkit.org/attachment.cgi?id=227039&action=review

> LayoutTests/css3/compositing/blend-mode-ancestor-clipping-layer.html:31
> +    text.innerHTML = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);

Why does this test care about repaint rects?
Comment 6 Ion Rosca 2014-03-19 11:59:06 PDT
Comment on attachment 227039 [details]
fixing style

View in context: https://bugs.webkit.org/attachment.cgi?id=227039&action=review

>> LayoutTests/css3/compositing/blend-mode-ancestor-clipping-layer.html:31
>> +    text.innerHTML = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
> 
> Why does this test care about repaint rects?

It doesn't care about repaint rects. I will remove this flag.
Thanks.
Comment 7 Ion Rosca 2014-03-19 12:37:12 PDT
Created attachment 227209 [details]
patch v3
Comment 8 Simon Fraser (smfr) 2014-03-24 10:55:14 PDT
Comment on attachment 227209 [details]
patch v3

Not sure why RenderLayerBacking::setBlendMode() has to exist. RenderLayer::updateBlendMode() is called from RenderLayer::styleChanged()
it calls  backing()->setBlendMode() but doesn't need to because RenderLayer::styleChanged() always calls either backing()->updateGraphicsLayerGeometry() or triggers a full compositing layer rebuild.
Comment 9 Ion Rosca 2014-03-24 13:22:30 PDT
Created attachment 227685 [details]
removing RenderLayerBacking::setBlendMode
Comment 10 Ion Rosca 2014-03-24 13:26:12 PDT
Yes, it seems like it's useless as RenderLayerBacking::updateBlendMode used to be called each time after RenderLayerBacking::setBlendMode.
I removed it with the last patch. Thanks.
Comment 11 WebKit Commit Bot 2014-03-31 14:08:08 PDT
Comment on attachment 227685 [details]
removing RenderLayerBacking::setBlendMode

Clearing flags on attachment: 227685

Committed r166526: <http://trac.webkit.org/changeset/166526>
Comment 12 WebKit Commit Bot 2014-03-31 14:08:13 PDT
All reviewed patches have been landed.  Closing bug.