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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreePrinter.cpp

Issue 2430813002: Switch to shorter names for property tree storage and updates (Closed)
Patch Set: Created 4 years, 2 months 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 unified diff | Download patch
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 for (Frame* child = frameView.frame().tree().firstChild(); child; 68 for (Frame* child = frameView.frame().tree().firstChild(); child;
69 child = child->tree().nextSibling()) { 69 child = child->tree().nextSibling()) {
70 if (!child->isLocalFrame()) 70 if (!child->isLocalFrame())
71 continue; 71 continue;
72 if (FrameView* childView = toLocalFrame(child)->view()) 72 if (FrameView* childView = toLocalFrame(child)->view())
73 collectPropertyNodes(*childView); 73 collectPropertyNodes(*childView);
74 } 74 }
75 } 75 }
76 76
77 void collectPropertyNodes(const LayoutObject& object) { 77 void collectPropertyNodes(const LayoutObject& object) {
78 if (const ObjectPaintProperties* paintProperties = 78 if (const ObjectPaintProperties* paintProperties = object.paintProperties())
79 object.objectPaintProperties())
80 Traits::addObjectPaintProperties(object, *paintProperties, *this); 79 Traits::addObjectPaintProperties(object, *paintProperties, *this);
81 for (LayoutObject* child = object.slowFirstChild(); child; 80 for (LayoutObject* child = object.slowFirstChild(); child;
82 child = child->nextSibling()) 81 child = child->nextSibling())
83 collectPropertyNodes(*child); 82 collectPropertyNodes(*child);
84 } 83 }
85 84
86 void addAllPropertyNodes(StringBuilder& stringBuilder, 85 void addAllPropertyNodes(StringBuilder& stringBuilder,
87 const PropertyTreeNode* node, 86 const PropertyTreeNode* node,
88 unsigned indent = 0) { 87 unsigned indent = 0) {
89 DCHECK(node); 88 DCHECK(node);
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 writeParentEdge(&node, node.parent(), s_effectNodeColor, os); 444 writeParentEdge(&node, node.parent(), s_effectNodeColor, os);
446 } 445 }
447 446
448 void writePaintPropertyNode(const ScrollPaintPropertyNode&, 447 void writePaintPropertyNode(const ScrollPaintPropertyNode&,
449 const void*, 448 const void*,
450 const char*) { 449 const char*) {
451 // TODO(pdr): fill this out. 450 // TODO(pdr): fill this out.
452 } 451 }
453 452
454 void writeObjectPaintPropertyNodes(const LayoutObject& object) { 453 void writeObjectPaintPropertyNodes(const LayoutObject& object) {
455 const ObjectPaintProperties* properties = object.objectPaintProperties(); 454 const ObjectPaintProperties* properties = object.paintProperties();
456 if (!properties) 455 if (!properties)
457 return; 456 return;
458 const TransformPaintPropertyNode* paintOffset = 457 const TransformPaintPropertyNode* paintOffset =
459 properties->paintOffsetTranslation(); 458 properties->paintOffsetTranslation();
460 if (paintOffset) 459 if (paintOffset)
461 writePaintPropertyNode(*paintOffset, &object, "paintOffset"); 460 writePaintPropertyNode(*paintOffset, &object, "paintOffset");
462 const TransformPaintPropertyNode* transform = properties->transform(); 461 const TransformPaintPropertyNode* transform = properties->transform();
463 if (transform) 462 if (transform)
464 writePaintPropertyNode(*transform, &object, "transform"); 463 writePaintPropertyNode(*transform, &object, "transform");
465 const TransformPaintPropertyNode* perspective = properties->perspective(); 464 const TransformPaintPropertyNode* perspective = properties->perspective();
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 } 695 }
697 696
698 String paintPropertyTreeGraph(const blink::FrameView& frameView) { 697 String paintPropertyTreeGraph(const blink::FrameView& frameView) {
699 blink::PaintPropertyTreeGraphBuilder builder; 698 blink::PaintPropertyTreeGraphBuilder builder;
700 StringBuilder stringBuilder; 699 StringBuilder stringBuilder;
701 builder.generateTreeGraph(frameView, stringBuilder); 700 builder.generateTreeGraph(frameView, stringBuilder);
702 return stringBuilder.toString(); 701 return stringBuilder.toString();
703 } 702 }
704 703
705 #endif 704 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698