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

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

Issue 2810873007: Replace LayoutPart::GetFrameViewBase with GetNodeFrameView (Closed)
Patch Set: No need for child_frame_view var Created 3 years, 8 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 } 488 }
489 os << "\"];" << std::endl; 489 os << "\"];" << std::endl;
490 const void* parent = object.IsLayoutView() 490 const void* parent = object.IsLayoutView()
491 ? (const void*)ToLayoutView(object).GetFrameView() 491 ? (const void*)ToLayoutView(object).GetFrameView()
492 : (const void*)object.Parent(); 492 : (const void*)object.Parent();
493 WriteParentEdge(&object, parent, layout_node_color_, os); 493 WriteParentEdge(&object, parent, layout_node_color_, os);
494 WriteObjectPaintPropertyNodes(object); 494 WriteObjectPaintPropertyNodes(object);
495 for (const LayoutObject* child = object.SlowFirstChild(); child; 495 for (const LayoutObject* child = object.SlowFirstChild(); child;
496 child = child->NextSibling()) 496 child = child->NextSibling())
497 WriteLayoutObjectNode(*child); 497 WriteLayoutObjectNode(*child);
498 if (object.IsLayoutPart() && ToLayoutPart(object).GetFrameViewBase() && 498 if (object.IsLayoutPart()) {
499 ToLayoutPart(object).GetFrameViewBase()->IsFrameView()) { 499 FrameView* frame_view = ToLayoutPart(object).ChildFrameView();
500 FrameView* frame_view = 500 if (frame_view)
501 ToFrameView(ToLayoutPart(object).GetFrameViewBase()); 501 WriteFrameViewNode(*frame_view, &object);
502 WriteFrameViewNode(*frame_view, &object);
503 } 502 }
504 } 503 }
505 504
506 void WriteFrameViewNode(const FrameView& frame_view, const void* parent) { 505 void WriteFrameViewNode(const FrameView& frame_view, const void* parent) {
507 std::ostream& os = layout_; 506 std::ostream& os = layout_;
508 os << "n" << &frame_view << " [color=" << layout_node_color_ 507 os << "n" << &frame_view << " [color=" << layout_node_color_
509 << ", fontcolor=" << layout_node_color_ << ", shape=doublecircle" 508 << ", fontcolor=" << layout_node_color_ << ", shape=doublecircle"
510 << ", label=FrameView];" << std::endl; 509 << ", label=FrameView];" << std::endl;
511 510
512 WriteFrameViewPaintPropertyNodes(frame_view); 511 WriteFrameViewPaintPropertyNodes(frame_view);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 } 580 }
582 581
583 String paintPropertyTreeGraph(const blink::FrameView& frameView) { 582 String paintPropertyTreeGraph(const blink::FrameView& frameView) {
584 blink::PaintPropertyTreeGraphBuilder builder; 583 blink::PaintPropertyTreeGraphBuilder builder;
585 StringBuilder stringBuilder; 584 StringBuilder stringBuilder;
586 builder.GenerateTreeGraph(frameView, stringBuilder); 585 builder.GenerateTreeGraph(frameView, stringBuilder);
587 return stringBuilder.ToString(); 586 return stringBuilder.ToString();
588 } 587 }
589 588
590 #endif // DCHECK_IS_ON() 589 #endif // DCHECK_IS_ON()
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp ('k') | third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698