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

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

Issue 2359063002: Add static root property tree nodes [spv2] (Closed)
Patch Set: Address reviewer comments and fix a test 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 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/LayoutMultiColumnSpannerPlaceholder.h" 10 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h"
(...skipping 10 matching lines...) Expand all
21 { } 21 { }
22 22
23 PaintPropertyTreeBuilderContext treeBuilderContext; 23 PaintPropertyTreeBuilderContext treeBuilderContext;
24 PaintInvalidatorContext paintInvalidatorContext; 24 PaintInvalidatorContext paintInvalidatorContext;
25 }; 25 };
26 26
27 void PrePaintTreeWalk::walk(FrameView& rootFrame) 27 void PrePaintTreeWalk::walk(FrameView& rootFrame)
28 { 28 {
29 DCHECK(rootFrame.frame().document()->lifecycle().state() == DocumentLifecycl e::InPrePaint); 29 DCHECK(rootFrame.frame().document()->lifecycle().state() == DocumentLifecycl e::InPrePaint);
30 30
31 PrePaintTreeWalkContext rootContext; 31 PrePaintTreeWalkContext initialContext;
32 m_propertyTreeBuilder.buildTreeRootNodes(rootFrame, rootContext.treeBuilderC ontext); 32 initialContext.treeBuilderContext = m_propertyTreeBuilder.setupInitialContex t();
33 walk(rootFrame, rootContext); 33 walk(rootFrame, initialContext);
34 m_paintInvalidator.processPendingDelayedPaintInvalidations(); 34 m_paintInvalidator.processPendingDelayedPaintInvalidations();
35 } 35 }
36 36
37 void PrePaintTreeWalk::walk(FrameView& frameView, const PrePaintTreeWalkContext& context) 37 void PrePaintTreeWalk::walk(FrameView& frameView, const PrePaintTreeWalkContext& context)
38 { 38 {
39 if (frameView.shouldThrottleRendering()) 39 if (frameView.shouldThrottleRendering())
40 return; 40 return;
41 41
42 PrePaintTreeWalkContext localContext(context); 42 PrePaintTreeWalkContext localContext(context);
43 m_propertyTreeBuilder.buildTreeNodes(frameView, localContext.treeBuilderCont ext); 43 m_propertyTreeBuilder.buildTreeNodes(frameView, localContext.treeBuilderCont ext);
(...skipping 30 matching lines...) Expand all
74 if (widget && widget->isFrameView()) { 74 if (widget && widget->isFrameView()) {
75 localContext.treeBuilderContext.current.paintOffset += layoutPart.re placedContentRect().location() - widget->frameRect().location(); 75 localContext.treeBuilderContext.current.paintOffset += layoutPart.re placedContentRect().location() - widget->frameRect().location();
76 localContext.treeBuilderContext.current.paintOffset = roundedIntPoin t(localContext.treeBuilderContext.current.paintOffset); 76 localContext.treeBuilderContext.current.paintOffset = roundedIntPoin t(localContext.treeBuilderContext.current.paintOffset);
77 walk(*toFrameView(widget), localContext); 77 walk(*toFrameView(widget), localContext);
78 } 78 }
79 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). 79 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281).
80 } 80 }
81 } 81 }
82 82
83 } // namespace blink 83 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698