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

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

Issue 2036533002: Combine PaintPropertyTreeBuilderRootContext into PaintPropertyTreeBuilder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Rename
Patch Set: Created 4 years, 6 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/PaintPropertyTreeBuilder.cpp ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/PrePaintTreeWalk.h" 5 #include "core/paint/PrePaintTreeWalk.h"
6 6
7 #include "core/dom/DocumentLifecycle.h" 7 #include "core/dom/DocumentLifecycle.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/layout/LayoutPart.h" 10 #include "core/layout/LayoutPart.h"
11 #include "core/layout/LayoutView.h" 11 #include "core/layout/LayoutView.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 struct PrePaintTreeWalkContext { 15 struct PrePaintTreeWalkContext {
16 PaintPropertyTreeBuilderContext treeBuilderContext; 16 PaintPropertyTreeBuilderContext treeBuilderContext;
17 }; 17 };
18 18
19 void PrePaintTreeWalk::walk(FrameView& rootFrame) 19 void PrePaintTreeWalk::walk(FrameView& rootFrame)
20 { 20 {
21 DCHECK(rootFrame.frame().document()->lifecycle().state() == DocumentLifecycl e::InPrePaint); 21 DCHECK(rootFrame.frame().document()->lifecycle().state() == DocumentLifecycl e::InPrePaint);
22 22
23 PaintPropertyTreeBuilderRootContext treeBuilderRootContext; 23 PrePaintTreeWalkContext rootContext;
24 m_propertyTreeBuilder.buildTreeRootNodes(rootFrame, treeBuilderRootContext); 24 m_propertyTreeBuilder.buildTreeRootNodes(rootFrame, rootContext.treeBuilderC ontext);
25 PrePaintTreeWalkContext rootContext = { treeBuilderRootContext };
26 walk(rootFrame, rootContext); 25 walk(rootFrame, rootContext);
27 } 26 }
28 27
29 void PrePaintTreeWalk::walk(FrameView& frameView, const PrePaintTreeWalkContext& context) 28 void PrePaintTreeWalk::walk(FrameView& frameView, const PrePaintTreeWalkContext& context)
30 { 29 {
31 PrePaintTreeWalkContext localContext(context); 30 PrePaintTreeWalkContext localContext(context);
32 m_propertyTreeBuilder.buildTreeNodes(frameView, localContext.treeBuilderCont ext); 31 m_propertyTreeBuilder.buildTreeNodes(frameView, localContext.treeBuilderCont ext);
33 if (LayoutView* layoutView = frameView.layoutView()) 32 if (LayoutView* layoutView = frameView.layoutView())
34 walk(*layoutView, localContext); 33 walk(*layoutView, localContext);
35 } 34 }
(...skipping 10 matching lines...) Expand all
46 45
47 if (object.isLayoutPart()) { 46 if (object.isLayoutPart()) {
48 Widget* widget = toLayoutPart(object).widget(); 47 Widget* widget = toLayoutPart(object).widget();
49 if (widget && widget->isFrameView()) 48 if (widget && widget->isFrameView())
50 walk(*toFrameView(widget), localContext); 49 walk(*toFrameView(widget), localContext);
51 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). 50 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281).
52 } 51 }
53 } 52 }
54 53
55 } // namespace blink 54 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698