Commit f070db9e authored by wangxianzhu's avatar wangxianzhu Committed by Commit bot

Fix PaintPropertyTreePrinter

Previously it printed nothing because it didn't collect the root nodes.

Review-Url: https://codereview.chromium.org/2157173002
Cr-Commit-Position: refs/heads/master@{#406132}
parent f03aa24a
...@@ -86,10 +86,12 @@ class PropertyTreePrinterTraits<TransformPaintPropertyNode> { ...@@ -86,10 +86,12 @@ class PropertyTreePrinterTraits<TransformPaintPropertyNode> {
public: public:
static void addFrameViewProperties(const FrameView& frameView, PropertyTreePrinter<TransformPaintPropertyNode>& printer) static void addFrameViewProperties(const FrameView& frameView, PropertyTreePrinter<TransformPaintPropertyNode>& printer)
{ {
if (const TransformPaintPropertyNode* rootTransform = frameView.rootTransform())
printer.addPropertyNode(rootTransform, "RootTransform (FrameView)");
if (const TransformPaintPropertyNode* preTranslation = frameView.preTranslation()) if (const TransformPaintPropertyNode* preTranslation = frameView.preTranslation())
printer.addPropertyNode(preTranslation, String("PreTranslation (FrameView)")); printer.addPropertyNode(preTranslation, "PreTranslation (FrameView)");
if (const TransformPaintPropertyNode* scrollTranslation = frameView.scrollTranslation()) if (const TransformPaintPropertyNode* scrollTranslation = frameView.scrollTranslation())
printer.addPropertyNode(scrollTranslation, String("ScrollTranslation (FrameView)")); printer.addPropertyNode(scrollTranslation, "ScrollTranslation (FrameView)");
} }
static void addObjectPaintProperties(const LayoutObject& object, const ObjectPaintProperties& paintProperties, PropertyTreePrinter<TransformPaintPropertyNode>& printer) static void addObjectPaintProperties(const LayoutObject& object, const ObjectPaintProperties& paintProperties, PropertyTreePrinter<TransformPaintPropertyNode>& printer)
...@@ -134,6 +136,8 @@ class PropertyTreePrinterTraits<ClipPaintPropertyNode> { ...@@ -134,6 +136,8 @@ class PropertyTreePrinterTraits<ClipPaintPropertyNode> {
public: public:
static void addFrameViewProperties(const FrameView& frameView, PropertyTreePrinter<ClipPaintPropertyNode>& printer) static void addFrameViewProperties(const FrameView& frameView, PropertyTreePrinter<ClipPaintPropertyNode>& printer)
{ {
if (const ClipPaintPropertyNode* rootClip = frameView.rootClip())
printer.addPropertyNode(rootClip, "RootClip (FrameView)");
if (const ClipPaintPropertyNode* contentClip = frameView.contentClip()) if (const ClipPaintPropertyNode* contentClip = frameView.contentClip())
printer.addPropertyNode(contentClip, "ContentClip (FrameView)"); printer.addPropertyNode(contentClip, "ContentClip (FrameView)");
} }
...@@ -162,7 +166,8 @@ class PropertyTreePrinterTraits<EffectPaintPropertyNode> { ...@@ -162,7 +166,8 @@ class PropertyTreePrinterTraits<EffectPaintPropertyNode> {
public: public:
static void addFrameViewProperties(const FrameView& frameView, PropertyTreePrinter<EffectPaintPropertyNode>& printer) static void addFrameViewProperties(const FrameView& frameView, PropertyTreePrinter<EffectPaintPropertyNode>& printer)
{ {
// FrameView does not create any effect nodes. if (const EffectPaintPropertyNode* rootEffect = frameView.rootEffect())
printer.addPropertyNode(rootEffect, "RootEffect (FrameView)");
} }
static void addObjectPaintProperties(const LayoutObject& object, const ObjectPaintProperties& paintProperties, PropertyTreePrinter<EffectPaintPropertyNode>& printer) static void addObjectPaintProperties(const LayoutObject& object, const ObjectPaintProperties& paintProperties, PropertyTreePrinter<EffectPaintPropertyNode>& printer)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment