| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 } | 486 } |
| 487 os << "\"];" << std::endl; | 487 os << "\"];" << std::endl; |
| 488 const void* parent = object.isLayoutView() | 488 const void* parent = object.isLayoutView() |
| 489 ? (const void*)toLayoutView(object).frameView() | 489 ? (const void*)toLayoutView(object).frameView() |
| 490 : (const void*)object.parent(); | 490 : (const void*)object.parent(); |
| 491 writeParentEdge(&object, parent, s_layoutNodeColor, os); | 491 writeParentEdge(&object, parent, s_layoutNodeColor, os); |
| 492 writeObjectPaintPropertyNodes(object); | 492 writeObjectPaintPropertyNodes(object); |
| 493 for (const LayoutObject* child = object.slowFirstChild(); child; | 493 for (const LayoutObject* child = object.slowFirstChild(); child; |
| 494 child = child->nextSibling()) | 494 child = child->nextSibling()) |
| 495 writeLayoutObjectNode(*child); | 495 writeLayoutObjectNode(*child); |
| 496 if (object.isLayoutPart() && toLayoutPart(object).widget() && | 496 if (object.isLayoutPart() && toLayoutPart(object).frameViewBase() && |
| 497 toLayoutPart(object).widget()->isFrameView()) { | 497 toLayoutPart(object).frameViewBase()->isFrameView()) { |
| 498 FrameView* frameView = | 498 FrameView* frameView = toFrameView(toLayoutPart(object).frameViewBase()); |
| 499 static_cast<FrameView*>(toLayoutPart(object).widget()); | |
| 500 writeFrameViewNode(*frameView, &object); | 499 writeFrameViewNode(*frameView, &object); |
| 501 } | 500 } |
| 502 } | 501 } |
| 503 | 502 |
| 504 void writeFrameViewNode(const FrameView& frameView, const void* parent) { | 503 void writeFrameViewNode(const FrameView& frameView, const void* parent) { |
| 505 std::ostream& os = m_layout; | 504 std::ostream& os = m_layout; |
| 506 os << "n" << &frameView << " [color=" << s_layoutNodeColor | 505 os << "n" << &frameView << " [color=" << s_layoutNodeColor |
| 507 << ", fontcolor=" << s_layoutNodeColor << ", shape=doublecircle" | 506 << ", fontcolor=" << s_layoutNodeColor << ", shape=doublecircle" |
| 508 << ", label=FrameView];" << std::endl; | 507 << ", label=FrameView];" << std::endl; |
| 509 | 508 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 } | 578 } |
| 580 | 579 |
| 581 String paintPropertyTreeGraph(const blink::FrameView& frameView) { | 580 String paintPropertyTreeGraph(const blink::FrameView& frameView) { |
| 582 blink::PaintPropertyTreeGraphBuilder builder; | 581 blink::PaintPropertyTreeGraphBuilder builder; |
| 583 StringBuilder stringBuilder; | 582 StringBuilder stringBuilder; |
| 584 builder.generateTreeGraph(frameView, stringBuilder); | 583 builder.generateTreeGraph(frameView, stringBuilder); |
| 585 return stringBuilder.toString(); | 584 return stringBuilder.toString(); |
| 586 } | 585 } |
| 587 | 586 |
| 588 #endif // DCHECK_IS_ON() | 587 #endif // DCHECK_IS_ON() |
| OLD | NEW |