diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/chromium/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp b/chromium/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp index 4bb9696ef87..8ef8813de2e 100644 --- a/chromium/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp +++ b/chromium/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp @@ -170,18 +170,8 @@ bool PrePaintTreeWalk::NeedsTreeBuilderContextUpdate( object); } -void PrePaintTreeWalk::Walk(const LayoutObject& object, - const PrePaintTreeWalkContext& parent_context) { - // Early out from the tree walk if possible. - bool needs_tree_builder_context_update = - this->NeedsTreeBuilderContextUpdate(object, parent_context); - if (!needs_tree_builder_context_update && - !object.ShouldCheckForPaintInvalidation()) - return; - - PrePaintTreeWalkContext context(parent_context, - needs_tree_builder_context_update); - +void PrePaintTreeWalk::WalkInternal(const LayoutObject& object, + PrePaintTreeWalkContext& context) { // This must happen before updatePropertiesForSelf, because the latter reads // some of the state computed here. UpdateAuxiliaryObjectProperties(object, context); @@ -205,6 +195,20 @@ void PrePaintTreeWalk::Walk(const LayoutObject& object, InvalidatePaintLayerOptimizationsIfNeeded(object, context); } +} + +void PrePaintTreeWalk::Walk(const LayoutObject& object, + const PrePaintTreeWalkContext& parent_context) { + // Early out from the tree walk if possible. + bool needs_tree_builder_context_update = + this->NeedsTreeBuilderContextUpdate(object, parent_context); + if (!needs_tree_builder_context_update && + !object.ShouldCheckForPaintInvalidation()) + return; + + PrePaintTreeWalkContext context(parent_context, + needs_tree_builder_context_update); + WalkInternal(object, context); for (const LayoutObject* child = object.SlowFirstChild(); child; child = child->NextSibling()) { |