WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
fixing user facing string & test error check
bug-131153-20140404165027.patch (text/plain), 14.56 KB, created by
Ion Rosca
on 2014-04-04 06:50:50 PDT
(
hide
)
Description:
fixing user facing string & test error check
Filename:
MIME Type:
Creator:
Ion Rosca
Created:
2014-04-04 06:50:50 PDT
Size:
14.56 KB
patch
obsolete
>Subversion Revision: 166635 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 876c00333999558c300e38c9047e363fefc2c451..6c5b7949b8b8530d7abb5520274f0a75acce4597 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,24 @@ >+2014-04-03 Ion Rosca <rosca@adobe.com> >+ >+ [CSS Blending] Add compositing reason for isolation. >+ https://bugs.webkit.org/show_bug.cgi?id=131153 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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. >+ > 2014-04-02 Ion Rosca <rosca@adobe.com> > > [CSS Blending] Compositing requirements for blending are not computed correctly >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 2240dfc82d08dc9e9cfd1e21e1027c7fc6d8ec75..06d54e95a5fb43186c372eb86887a1675e04fbe7 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,14 @@ >+2014-04-03 Ion Rosca <rosca@adobe.com> >+ >+ [CSS Blending] Add compositing reason for isolation. >+ https://bugs.webkit.org/show_bug.cgi?id=131153 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Localizations/en.lproj/localizedStrings.js: >+ * UserInterface/Views/LayerTreeSidebarPanel.js: >+ (WebInspector.LayerTreeSidebarPanel.prototype._populateListOfCompositingReasons): >+ > 2014-04-01 Timothy Hatcher <timothy@apple.com> > > Remove HeapProfiler from the Web Inspector protocol. >diff --git a/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp b/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp >index 0b2593b54db547253cc562cafbe92a0a6217e8c9..a037fa8cc970ccdfc61f8a8864a9896acf37d9d0 100644 >--- a/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp >+++ b/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp >@@ -298,6 +298,9 @@ void InspectorLayerTreeAgent::reasonsForCompositingLayer(ErrorString* errorStrin > if (reasonsBitmask & CompositingReasonBlendingWithCompositedDescendants) > compositingReasons->setBlendingWithCompositedDescendants(true); > >+ if (reasonsBitmask & CompositingReasonIsolatesCompositedBlendingDescendants) >+ compositingReasons->setIsolatesCompositedBlendingDescendants(true); >+ > if (reasonsBitmask & CompositingReasonPerspective) > compositingReasons->setPerspective(true); > >diff --git a/Source/WebCore/inspector/protocol/LayerTree.json b/Source/WebCore/inspector/protocol/LayerTree.json >index 33f7dbf0398bf34aed5f4ae0536ba4319ecef492..bc35ce8a92cd7c43a39996c96dea3add0068b8a2 100644 >--- a/Source/WebCore/inspector/protocol/LayerTree.json >+++ b/Source/WebCore/inspector/protocol/LayerTree.json >@@ -67,6 +67,7 @@ > { "name": "reflectionWithCompositedDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element with a reflection and composited descendants." }, > { "name": "filterWithCompositedDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element with CSS filters applied and composited descendants." }, > { "name": "blendingWithCompositedDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element with CSS blending applied and composited descendants." }, >+ { "name": "isolatesCompositedBlendingDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element isolating compositing descendants having CSS blending applied." }, > { "name": "perspective", "type": "boolean", "optional": true, "description": "Composition due to association with an element with perspective applied." }, > { "name": "preserve3D", "type": "boolean", "optional": true, "description": "Composition due to association with an element with a \"transform-style: preserve-3d\" style." }, > { "name": "root", "type": "boolean", "optional": true, "description": "Composition due to association with the root element." }, >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index b55f5e43191af8ae3eaf51dd7cf555e9d6553745..2178753c454436943997603379932274f796fdc8 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -2127,6 +2127,9 @@ CompositingReasons RenderLayerCompositor::reasonsForCompositing(const RenderLaye > > #if ENABLE(CSS_COMPOSITING) > if (layer.isolatesCompositedBlending()) >+ reasons |= CompositingReasonIsolatesCompositedBlendingDescendants; >+ >+ if (layer.hasBlendMode()) > reasons |= CompositingReasonBlendingWithCompositedDescendants; > #endif > >@@ -2202,10 +2205,15 @@ const char* RenderLayerCompositor::logReasonsForCompositing(const RenderLayer& l > > if (reasons & CompositingReasonFilterWithCompositedDescendants) > return "filter with composited descendants"; >- >+ >+#if ENABLE(CSS_COMPOSITING) > if (reasons & CompositingReasonBlendingWithCompositedDescendants) > return "blending with composited descendants"; > >+ if (reasons & CompositingReasonIsolatesCompositedBlendingDescendants) >+ return "isolates composited blending descendants"; >+#endif >+ > if (reasons & CompositingReasonPerspective) > return "perspective"; > >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.h b/Source/WebCore/rendering/RenderLayerCompositor.h >index e86561c3f5f35b4bdd2db2ff36ae104651f2d9a0..03952bccb45e2d38655136011f7d9be547b19307 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.h >+++ b/Source/WebCore/rendering/RenderLayerCompositor.h >@@ -80,7 +80,8 @@ enum { > CompositingReasonBlendingWithCompositedDescendants = 1 << 20, > CompositingReasonPerspective = 1 << 21, > CompositingReasonPreserve3D = 1 << 22, >- CompositingReasonRoot = 1 << 23 >+ CompositingReasonRoot = 1 << 23, >+ CompositingReasonIsolatesCompositedBlendingDescendants = 1 << 24, > }; > typedef unsigned CompositingReasons; > >diff --git a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >index 665b25ec6e3a70308b4f12c92bb9103a52699933..d7ed5f6e5594bcc4f212f4226ebbc3c062d3743e 100644 >GIT binary patch >delta 106 >zcmZ29pLxR~<_-6qC+i1sOipxC;#XiuWXNMkVNhVm0J4fF2e|2TDln8YWHOX6WK4E( >U)}GAkB13}eaF>kDye?C_0T|sJjsO4v > >delta 18 >acmdn6h<VX`<_-6qC(FC(ZJzBqwHp9Wz6eDC > >diff --git a/Source/WebInspectorUI/UserInterface/Views/LayerTreeSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/LayerTreeSidebarPanel.js >index 4e50e3edea02b08a3a91076cedb0d4a87e6acb4b..b5d1eaede344e51b69d11a0e2df826d2561c9a3f 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/LayerTreeSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/LayerTreeSidebarPanel.js >@@ -432,6 +432,8 @@ WebInspector.LayerTreeSidebarPanel.prototype = { > addReason(WebInspector.UIString("Element has CSS filters applied and composited descendants")); > if (compositingReasons.blendingWithCompositedDescendants) > addReason(WebInspector.UIString("Element has CSS blending applied and composited descendants")); >+ if (compositingReasons.isolatesCompositedBlendingDescendants) >+ addReason(WebInspector.UIString("Element is a stacking context and has composited descendants with CSS blending applied")); > if (compositingReasons.perspective) > addReason(WebInspector.UIString("Element has perspective applied")); > if (compositingReasons.preserve3D) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 44796ef86e1a428b8fde29fc29f5902ba6a69377..aa58213556aa78b5d10ccf666f9f79781447299b 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2014-04-03 Ion Rosca <rosca@adobe.com> >+ >+ [CSS Blending] Add compositing reason for isolation. >+ https://bugs.webkit.org/show_bug.cgi?id=131153 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector-protocol/layers/layers-blending-compositing-reasons-expected.txt: Added. >+ * inspector-protocol/layers/layers-blending-compositing-reasons.html: Added. >+ > 2014-04-02 Ion Rosca <rosca@adobe.com> > > [CSS Blending] Compositing requirements for blending are not computed correctly >diff --git a/LayoutTests/inspector-protocol/layers/layers-blending-compositing-reasons-expected.txt b/LayoutTests/inspector-protocol/layers/layers-blending-compositing-reasons-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..1e8758551d00a40dfd46b44c379bc9e206a80f99 >--- /dev/null >+++ b/LayoutTests/inspector-protocol/layers/layers-blending-compositing-reasons-expected.txt >@@ -0,0 +1,18 @@ >+ >+=== Enable the LayerTree agent === >+ >+PASS >+ >+=== Get the Document === >+ >+PASS >+ >+=== Get the layer tree === >+ >+PASS >+ >+=== Check layers' reasons for compositing === >+ >+PASS: <div id="isolating"> is composition due to isolating compositing descendants having CSS blending applied. >+PASS: <div id="blending"> is composited due having CSS blending applied and composited descendants. >+ >diff --git a/LayoutTests/inspector-protocol/layers/layers-blending-compositing-reasons.html b/LayoutTests/inspector-protocol/layers/layers-blending-compositing-reasons.html >new file mode 100644 >index 0000000000000000000000000000000000000000..d09e85969780b36627c206b27323be7746e962b5 >--- /dev/null >+++ b/LayoutTests/inspector-protocol/layers/layers-blending-compositing-reasons.html >@@ -0,0 +1,163 @@ >+<html> >+<head> >+<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/protocol-test.js"></script> >+<script type="text/javascript"> >+ >+function test() >+{ >+ >+ var nodes = []; >+ >+ InspectorTest.eventHandler["DOM.setChildNodes"] = setChildNodes; >+ >+ enableLayerTreeAgent(); >+ >+ function enableLayerTreeAgent(result) >+ { >+ step({ >+ name: "Enable the LayerTree agent", >+ command: "LayerTree.enable", >+ parameters: {}, >+ callback: getDocument >+ }); >+ }; >+ >+ function getDocument() >+ { >+ // We must first get the document so that later on we may get sensible nodeIds. >+ step({ >+ name: "Get the Document", >+ command: "DOM.getDocument", >+ parameters: {}, >+ callback: getLayerTree >+ }); >+ }; >+ >+ function getLayerTree(result) >+ { >+ step({ >+ name: "Get the layer tree", >+ command: "LayerTree.layersForNode", >+ parameters: {"nodeId": result.root.nodeId}, >+ callback: gotLayerTree >+ }); >+ }; >+ >+ function gotLayerTree(result) >+ { >+ logTestName("Check layers' reasons for compositing") >+ >+ var layers = result.layers; >+ >+ var nodesById = {}; >+ nodes.forEach(function(node) { >+ nodesById[node.nodeId] = node; >+ }); >+ >+ var count = 0; >+ >+ function hasId(node, id) { >+ return node && node.attributes && node.attributes[0] === "id" && node.attributes[1] === id; >+ } >+ >+ function dumpReasons(layer, compositingReasons) { >+ var node = nodesById[layer.nodeId]; >+ >+ if (hasId(node, "blending")) { >+ assert( >+ "<div id=\"blending\"> is composited due having CSS blending applied and composited descendants", >+ compositingReasons.blendingWithCompositedDescendants, >+ true); >+ } else if (hasId(node, "isolating")) { >+ assert( >+ "<div id=\"isolating\"> is composition due to isolating compositing descendants having CSS blending applied", >+ compositingReasons.isolatesCompositedBlendingDescendants, >+ true); >+ } >+ >+ if (++count === layers.length) >+ InspectorTest.completeTest(); >+ }; >+ >+ layers.forEach(function (layer) { >+ runCommand({ >+ command: "LayerTree.reasonsForCompositingLayer", >+ parameters: {"layerId": layer.layerId}, >+ callback: function(result) { >+ dumpReasons(layer, result.compositingReasons); >+ } >+ }); >+ }); >+ }; >+ >+ function setChildNodes (messageObject) { >+ messageObject.params.nodes.forEach(function (node) { >+ nodes.push(node); >+ }) >+ }; >+ >+ function step(test) >+ { >+ if (test.callback) >+ logTestName(test.name); >+ runCommand(test); >+ }; >+ >+ function logTestName(name) >+ { >+ InspectorTest.log("\n=== " + name + " ===\n"); >+ }; >+ >+ function runCommand(command) >+ { >+ InspectorTest.sendCommand(command.command, command.parameters, function(messageObject) { >+ InspectorTest.checkForError(messageObject); >+ >+ if (command.name) >+ InspectorTest.log("PASS"); >+ >+ if (command.callback) >+ command.callback(messageObject.result); >+ }); >+ }; >+ >+ function assert(name, actual, expected) >+ { >+ if (expected === actual) >+ InspectorTest.log("PASS: " + name + "."); >+ else >+ InspectorTest.log("FAIL: " + name + ". Expected " + expected + " but got " + actual); >+ }; >+ >+}; >+ >+window.addEventListener("DOMContentLoaded", function() >+{ >+ runTest(); >+}, false); >+ >+</script> >+<style type="text/css"> >+ >+ #isolating { >+ -webkit-isolation: isolate; >+ } >+ >+ #blending { >+ -webkit-mix-blend-mode: difference; >+ } >+ >+ #composited { >+ -webkit-transform: translateZ(0); >+ } >+ >+</style> >+</head> >+<body> >+ <div id="isolating"> >+ <div id="blending"> >+ <div id="composited"></div> >+ </div> >+ </div> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 131153
:
228473
|
228475
|
228532
| 228589