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

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

Issue 2555283002: Add mask layer and offsetFromLayoutObject info to GraphicsLayer JSON (Closed)
Patch Set: 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
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 db81304fab7f368b78f89c864302c78a8960453c..57f7305f47ea0a61c0fb73af2c3619a934e648fd 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -648,6 +648,11 @@ std::unique_ptr<JSONObject> GraphicsLayer::layerAsJSONInternal(
if (m_position != FloatPoint())
json->setArray("position", pointAsJSONArray(m_position));
+ if (m_offsetFromLayoutObject != DoubleSize()) {
+ json->setArray("offsetFromLayoutObject",
+ sizeAsJSONArray(m_offsetFromLayoutObject));
+ }
Stephen Chennney 2016/12/07 20:29:11 I'm not so sure about outputting this. Lots of lay
ajuma 2016/12/07 22:53:18 What about adding a LayerTreeFlag for it and only
+
if (m_hasTransformOrigin &&
m_transformOrigin !=
FloatPoint3D(m_size.width() * 0.5f, m_size.height() * 0.5f, 0))
@@ -768,6 +773,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));
+ }
Stephen Chennney 2016/12/07 20:29:11 These missing layers were a big issue in originall
+
return json;
}

Powered by Google App Engine
This is Rietveld 408576698