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

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

Issue 2378883003: Refactor PropertyTreeState to use RefPtrs (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
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPaintProperties.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 static const PropertyTreeNode* getRoot(const PropertyTreeNode* node) 409 static const PropertyTreeNode* getRoot(const PropertyTreeNode* node)
410 { 410 {
411 while (node && !node->isRoot()) 411 while (node && !node->isRoot())
412 node = node->parent(); 412 node = node->parent();
413 return node; 413 return node;
414 } 414 }
415 415
416 void writeFrameViewPaintPropertyNodes(const FrameView& frameView) 416 void writeFrameViewPaintPropertyNodes(const FrameView& frameView)
417 { 417 {
418 if (const auto* contentsState = frameView.totalPropertyTreeStateForConte nts()) { 418 if (const auto* contentsState = frameView.totalPropertyTreeStateForConte nts()) {
419 if (const auto* root = getRoot(contentsState->transform)) 419 if (const auto* root = getRoot(contentsState->transform()))
420 writePaintPropertyNode(*root, &frameView, "rootTransform"); 420 writePaintPropertyNode(*root, &frameView, "rootTransform");
421 if (const auto* root = getRoot(contentsState->clip)) 421 if (const auto* root = getRoot(contentsState->clip()))
422 writePaintPropertyNode(*root, &frameView, "rootClip"); 422 writePaintPropertyNode(*root, &frameView, "rootClip");
423 if (const auto* root = getRoot(contentsState->effect)) 423 if (const auto* root = getRoot(contentsState->effect()))
424 writePaintPropertyNode(*root, &frameView, "rootEffect"); 424 writePaintPropertyNode(*root, &frameView, "rootEffect");
425 if (const auto* root = getRoot(contentsState->scroll)) 425 if (const auto* root = getRoot(contentsState->scroll()))
426 writePaintPropertyNode(*root, &frameView, "rootScroll"); 426 writePaintPropertyNode(*root, &frameView, "rootScroll");
427 } 427 }
428 TransformPaintPropertyNode* preTranslation = frameView.preTranslation(); 428 TransformPaintPropertyNode* preTranslation = frameView.preTranslation();
429 if (preTranslation) 429 if (preTranslation)
430 writePaintPropertyNode(*preTranslation, &frameView, "preTranslation" ); 430 writePaintPropertyNode(*preTranslation, &frameView, "preTranslation" );
431 TransformPaintPropertyNode* scrollTranslation = frameView.scrollTranslat ion(); 431 TransformPaintPropertyNode* scrollTranslation = frameView.scrollTranslat ion();
432 if (scrollTranslation) 432 if (scrollTranslation)
433 writePaintPropertyNode(*scrollTranslation, &frameView, "scrollTransl ation"); 433 writePaintPropertyNode(*scrollTranslation, &frameView, "scrollTransl ation");
434 ClipPaintPropertyNode* contentClip = frameView.contentClip(); 434 ClipPaintPropertyNode* contentClip = frameView.contentClip();
435 if (contentClip) 435 if (contentClip)
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 550
551 String paintPropertyTreeGraph(const blink::FrameView& frameView) 551 String paintPropertyTreeGraph(const blink::FrameView& frameView)
552 { 552 {
553 blink::PaintPropertyTreeGraphBuilder builder; 553 blink::PaintPropertyTreeGraphBuilder builder;
554 StringBuilder stringBuilder; 554 StringBuilder stringBuilder;
555 builder.generateTreeGraph(frameView, stringBuilder); 555 builder.generateTreeGraph(frameView, stringBuilder);
556 return stringBuilder.toString(); 556 return stringBuilder.toString();
557 } 557 }
558 558
559 #endif 559 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPaintProperties.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698