Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1029)

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2555283002: Add mask layer and offsetFromLayoutObject info to GraphicsLayer JSON (Closed)
Patch Set: Rebased Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/FilterPainter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index 32f307ae6586b4231d9813c7b843200a1323ca33..55b20d38141879bd740a87dce407fd13bb8bbb8b 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -648,6 +648,12 @@ std::unique_ptr<JSONObject> GraphicsLayer::layerAsJSONInternal(
if (m_position != FloatPoint())
json->setArray("position", pointAsJSONArray(m_position));
+ if (flags & LayerTreeIncludesDebugInfo &&
+ m_offsetFromLayoutObject != DoubleSize()) {
+ json->setArray("offsetFromLayoutObject",
+ sizeAsJSONArray(m_offsetFromLayoutObject));
+ }
+
if (m_hasTransformOrigin &&
m_transformOrigin !=
FloatPoint3D(m_size.width() * 0.5f, m_size.height() * 0.5f, 0))
@@ -768,6 +774,24 @@ std::unique_ptr<JSONObject> GraphicsLayer::layerAsJSONInternal(
json->setArray("squashingDisallowedReasons",
std::move(squashingDisallowedReasonsJSON));
}
+
+ if (m_maskLayer) {
+ std::unique_ptr<JSONArray> maskLayerJSON = JSONArray::create();
+ maskLayerJSON->pushObject(
+ m_maskLayer->layerAsJSONInternal(flags, renderingContextMap));
+ json->setArray("maskLayer", std::move(maskLayerJSON));
+ }
+
+ if (m_contentsClippingMaskLayer) {
+ std::unique_ptr<JSONArray> contentsClippingMaskLayerJSON =
+ JSONArray::create();
+ contentsClippingMaskLayerJSON->pushObject(
+ m_contentsClippingMaskLayer->layerAsJSONInternal(flags,
+ renderingContextMap));
+ json->setArray("contentsClippingMaskLayer",
+ std::move(contentsClippingMaskLayerJSON));
+ }
+
return json;
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/FilterPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698