Changeset 166800 in webkit


Ignore:
Timestamp:
Apr 4, 2014 1:34:23 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

[CSS Blending] Add compositing reason for isolation.
https://bugs.webkit.org/show_bug.cgi?id=131153

Patch by Ion Rosca <Ion Rosca> on 2014-04-04
Reviewed by Joseph Pecoraro.

Source/WebCore:

There are 2 reasons involving blend modes for a layer to be composited:
1) the layer has blend mode and has composited descendants: CompositingReasonBlendingWithCompositedDescendants.
2) the layer has to isolate composited blending descendants: CompositingReasonIsolatesCompositedBlendingDescendants

Test: inspector-protocol/layers/layers-blending-compositing-reasons.html

  • inspector/InspectorLayerTreeAgent.cpp:

(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):

  • inspector/protocol/LayerTree.json:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::logReasonsForCompositing):

  • rendering/RenderLayerCompositor.h: adding CompositingReasonIsolatesCompositedBlendingDescendants.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/LayerTreeSidebarPanel.js:

(WebInspector.LayerTreeSidebarPanel.prototype._populateListOfCompositingReasons):

LayoutTests:

  • inspector-protocol/layers/layers-blending-compositing-reasons-expected.txt: Added.
  • inspector-protocol/layers/layers-blending-compositing-reasons.html: Added.
Location:
trunk
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r166793 r166800  
     12014-04-04  Ion Rosca  <rosca@adobe.com>
     2
     3        [CSS Blending] Add compositing reason for isolation.
     4        https://bugs.webkit.org/show_bug.cgi?id=131153
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * inspector-protocol/layers/layers-blending-compositing-reasons-expected.txt: Added.
     9        * inspector-protocol/layers/layers-blending-compositing-reasons.html: Added.
     10
    1112014-04-04  Alexey Proskuryakov  <ap@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r166797 r166800  
     12014-04-04  Ion Rosca  <rosca@adobe.com>
     2
     3        [CSS Blending] Add compositing reason for isolation.
     4        https://bugs.webkit.org/show_bug.cgi?id=131153
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        There are 2 reasons involving blend modes for a layer to be composited:
     9        1) the layer has blend mode and has composited descendants: CompositingReasonBlendingWithCompositedDescendants.
     10        2) the layer has to isolate composited blending descendants: CompositingReasonIsolatesCompositedBlendingDescendants
     11
     12        Test: inspector-protocol/layers/layers-blending-compositing-reasons.html
     13
     14        * inspector/InspectorLayerTreeAgent.cpp:
     15        (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
     16        * inspector/protocol/LayerTree.json:
     17        * rendering/RenderLayerCompositor.cpp:
     18        (WebCore::RenderLayerCompositor::reasonsForCompositing):
     19        (WebCore::RenderLayerCompositor::logReasonsForCompositing):
     20        * rendering/RenderLayerCompositor.h: adding CompositingReasonIsolatesCompositedBlendingDescendants.
     21
    1222014-04-04  Bem Jones-Bey  <bjonesbe@adobe.com>
    223
  • trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp

    r163955 r166800  
    299299        compositingReasons->setBlendingWithCompositedDescendants(true);
    300300
     301    if (reasonsBitmask & CompositingReasonIsolatesCompositedBlendingDescendants)
     302        compositingReasons->setIsolatesCompositedBlendingDescendants(true);
     303
    301304    if (reasonsBitmask & CompositingReasonPerspective)
    302305        compositingReasons->setPerspective(true);
  • trunk/Source/WebCore/inspector/protocol/LayerTree.json

    r161673 r166800  
    6868                { "name": "filterWithCompositedDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element with CSS filters applied and composited descendants." },
    6969                { "name": "blendingWithCompositedDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element with CSS blending applied and composited descendants." },
     70                { "name": "isolatesCompositedBlendingDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element isolating compositing descendants having CSS blending applied." },
    7071                { "name": "perspective", "type": "boolean", "optional": true, "description": "Composition due to association with an element with perspective applied." },
    7172                { "name": "preserve3D", "type": "boolean", "optional": true, "description": "Composition due to association with an element with a \"transform-style: preserve-3d\" style." },
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r166739 r166800  
    21282128#if ENABLE(CSS_COMPOSITING)
    21292129        if (layer.isolatesCompositedBlending())
     2130            reasons |= CompositingReasonIsolatesCompositedBlendingDescendants;
     2131
     2132        if (layer.hasBlendMode())
    21302133            reasons |= CompositingReasonBlendingWithCompositedDescendants;
    21312134#endif
     
    22032206    if (reasons & CompositingReasonFilterWithCompositedDescendants)
    22042207        return "filter with composited descendants";
    2205            
     2208
     2209#if ENABLE(CSS_COMPOSITING)
    22062210    if (reasons & CompositingReasonBlendingWithCompositedDescendants)
    22072211        return "blending with composited descendants";
     2212
     2213    if (reasons & CompositingReasonIsolatesCompositedBlendingDescendants)
     2214        return "isolates composited blending descendants";
     2215#endif
    22082216
    22092217    if (reasons & CompositingReasonPerspective)
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r166634 r166800  
    8181    CompositingReasonPerspective                            = 1 << 21,
    8282    CompositingReasonPreserve3D                             = 1 << 22,
    83     CompositingReasonRoot                                   = 1 << 23
     83    CompositingReasonRoot                                   = 1 << 23,
     84    CompositingReasonIsolatesCompositedBlendingDescendants  = 1 << 24,
    8485};
    8586typedef unsigned CompositingReasons;
  • trunk/Source/WebInspectorUI/ChangeLog

    r166657 r166800  
     12014-04-04  Ion Rosca  <rosca@adobe.com>
     2
     3        [CSS Blending] Add compositing reason for isolation.
     4        https://bugs.webkit.org/show_bug.cgi?id=131153
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * Localizations/en.lproj/localizedStrings.js:
     9        * UserInterface/Views/LayerTreeSidebarPanel.js:
     10        (WebInspector.LayerTreeSidebarPanel.prototype._populateListOfCompositingReasons):
     11
    1122014-04-02  Timothy Hatcher  <timothy@apple.com>
    213
  • trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js

    r166449 r166800  
    151151localizedStrings["Element establishes a stacking context"] = "Element establishes a stacking context";
    152152localizedStrings["Element has CSS blending applied and composited descendants"] = "Element has CSS blending applied and composited descendants";
     153localizedStrings["Element is a stacking context and has composited descendants with CSS blending applied"] = "Element is a stacking context and has composited descendants with CSS blending applied";
    153154localizedStrings["Element has CSS filters applied"] = "Element has CSS filters applied";
    154155localizedStrings["Element has CSS filters applied and composited descendants"] = "Element has CSS filters applied and composited descendants";
  • trunk/Source/WebInspectorUI/UserInterface/Views/LayerTreeSidebarPanel.js

    r165487 r166800  
    433433        if (compositingReasons.blendingWithCompositedDescendants)
    434434            addReason(WebInspector.UIString("Element has CSS blending applied and composited descendants"));
     435        if (compositingReasons.isolatesCompositedBlendingDescendants)
     436            addReason(WebInspector.UIString("Element is a stacking context and has composited descendants with CSS blending applied"));
    435437        if (compositingReasons.perspective)
    436438            addReason(WebInspector.UIString("Element has perspective applied"));
Note: See TracChangeset for help on using the changeset viewer.