| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/paint/PaintPropertyTreePrinter.h" | 5 #include "core/paint/PaintPropertyTreePrinter.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "core/layout/LayoutPart.h" | 9 #include "core/layout/LayoutPart.h" |
| 10 #include "core/layout/LayoutView.h" | 10 #include "core/layout/LayoutView.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 } | 161 } |
| 162 | 162 |
| 163 static void addObjectPaintProperties(const LayoutObject& object, const Objec
tPaintProperties& paintProperties, PropertyTreePrinter<ClipPaintPropertyNode>& p
rinter) | 163 static void addObjectPaintProperties(const LayoutObject& object, const Objec
tPaintProperties& paintProperties, PropertyTreePrinter<ClipPaintPropertyNode>& p
rinter) |
| 164 { | 164 { |
| 165 if (const ClipPaintPropertyNode* cssClip = paintProperties.cssClip()) | 165 if (const ClipPaintPropertyNode* cssClip = paintProperties.cssClip()) |
| 166 printer.addPropertyNode(cssClip, "CssClip (" + object.debugName() +
")"); | 166 printer.addPropertyNode(cssClip, "CssClip (" + object.debugName() +
")"); |
| 167 if (const ClipPaintPropertyNode* cssClipFixedPosition = paintProperties.
cssClipFixedPosition()) | 167 if (const ClipPaintPropertyNode* cssClipFixedPosition = paintProperties.
cssClipFixedPosition()) |
| 168 printer.addPropertyNode(cssClipFixedPosition, "CssClipFixedPosition
(" + object.debugName() + ")"); | 168 printer.addPropertyNode(cssClipFixedPosition, "CssClipFixedPosition
(" + object.debugName() + ")"); |
| 169 if (const ClipPaintPropertyNode* overflowClip = paintProperties.overflow
Clip()) | 169 if (const ClipPaintPropertyNode* overflowClip = paintProperties.overflow
Clip()) |
| 170 printer.addPropertyNode(overflowClip, "OverflowClip (" + object.debu
gName() + ")"); | 170 printer.addPropertyNode(overflowClip, "OverflowClip (" + object.debu
gName() + ")"); |
| 171 if (const ClipPaintPropertyNode* svgRootViewportClip = paintProperties.s
vgRootViewportClip()) |
| 172 printer.addPropertyNode(svgRootViewportClip, "SvgRootViewportClip ("
+ object.debugName() + ")"); |
| 171 } | 173 } |
| 172 | 174 |
| 173 static void printNodeAsString(const ClipPaintPropertyNode* node, StringBuild
er& stringBuilder) | 175 static void printNodeAsString(const ClipPaintPropertyNode* node, StringBuild
er& stringBuilder) |
| 174 { | 176 { |
| 175 stringBuilder.append(String::format(" localTransformSpace=%p ", node->lo
calTransformSpace())); | 177 stringBuilder.append(String::format(" localTransformSpace=%p ", node->lo
calTransformSpace())); |
| 176 stringBuilder.append(String::format("rect=%f,%f,%f,%f", | 178 stringBuilder.append(String::format("rect=%f,%f,%f,%f", |
| 177 node->clipRect().rect().x(), node->clipRect().rect().y(), | 179 node->clipRect().rect().x(), node->clipRect().rect().y(), |
| 178 node->clipRect().rect().width(), node->clipRect().rect().height())); | 180 node->clipRect().rect().width(), node->clipRect().rect().height())); |
| 179 } | 181 } |
| 180 }; | 182 }; |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 | 552 |
| 551 String paintPropertyTreeGraph(const blink::FrameView& frameView) | 553 String paintPropertyTreeGraph(const blink::FrameView& frameView) |
| 552 { | 554 { |
| 553 blink::PaintPropertyTreeGraphBuilder builder; | 555 blink::PaintPropertyTreeGraphBuilder builder; |
| 554 StringBuilder stringBuilder; | 556 StringBuilder stringBuilder; |
| 555 builder.generateTreeGraph(frameView, stringBuilder); | 557 builder.generateTreeGraph(frameView, stringBuilder); |
| 556 return stringBuilder.toString(); | 558 return stringBuilder.toString(); |
| 557 } | 559 } |
| 558 | 560 |
| 559 #endif | 561 #endif |
| OLD | NEW |