Bug 130337

Summary: [CSS Blending] Blend mode property is propagated to multiple GraphicLayers
Product: WebKit Reporter: Ion Rosca <rosca>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, simon.fraser, WebkitBugTracker
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 130331    
Bug Blocks: 95614    
Attachments:
Description Flags
path v1
none
fixing style
none
patch v3
none
removing RenderLayerBacking::setBlendMode none

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.