Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| index 57fc3e24b1c1741c00b35ba8b356c4463ae97d4e..d6d2ca50bb0a9ced20f53e2167789373e375f54a 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| @@ -569,6 +569,8 @@ void PaintPropertyTreeBuilder::updateLocalBorderBoxContext( |
| if (!object.needsPaintPropertyUpdate() && !context.forceSubtreeUpdate) |
| return; |
| + object.getMutableForPainting().setPaintOffset(context.current.paintOffset); |
| + |
| // Avoid adding an ObjectPaintProperties for non-boxes to save memory, since |
| // we don't need them at the moment. |
| if (!object.isBox() && !object.hasLayer()) { |
| @@ -577,8 +579,8 @@ void PaintPropertyTreeBuilder::updateLocalBorderBoxContext( |
| } else { |
| auto& properties = object.getMutableForPainting().ensurePaintProperties(); |
| properties.updateLocalBorderBoxProperties( |
| - context.current.paintOffset, context.current.transform, |
| - context.current.clip, context.currentEffect, context.current.scroll); |
| + context.current.transform, context.current.clip, context.currentEffect, |
| + context.current.scroll); |
| } |
| } |
| @@ -880,14 +882,14 @@ static void overrideContainingBlockContextFromRealContainingBlock( |
| containingBlock.paintProperties()->localBorderBoxProperties(); |
| DCHECK(properties); |
| - context.transform = properties->propertyTreeState.transform(); |
| - context.paintOffset = properties->paintOffset; |
| + context.transform = properties->transform(); |
| + context.paintOffset = containingBlock.paintOffset(); |
| context.shouldFlattenInheritedTransform = |
| context.transform && context.transform->flattensInheritedTransform(); |
| context.renderingContextId = |
| context.transform ? context.transform->renderingContextId() : 0; |
| - context.clip = properties->propertyTreeState.clip(); |
| - context.scroll = properties->propertyTreeState.scroll(); |
| + context.clip = properties->clip(); |
| + context.scroll = properties->scroll(); |
| } |
| void PaintPropertyTreeBuilder::updateContextForBoxPosition( |
| @@ -973,15 +975,17 @@ void PaintPropertyTreeBuilder::updateContextForBoxPosition( |
| // Many paint properties depend on paint offset so we force an update of |
| // the entire subtree on paint offset changes. |
| - if (object.previousPaintOffset() != context.current.paintOffset) |
| + if (object.paintOffset() != context.current.paintOffset) |
| context.forceSubtreeUpdate = true; |
| } |
| void PaintPropertyTreeBuilder::updatePropertiesForSelf( |
| const LayoutObject& object, |
| PaintPropertyTreeBuilderContext& context) { |
| - if (!object.isBoxModelObject() && !object.isSVG()) |
| + if (!object.isBoxModelObject() && !object.isSVG()) { |
| + object.getMutableForPainting().setPaintOffset(context.current.paintOffset); |
|
pdr.
2017/01/06 18:27:42
Do we need to check that an update is needed too?
Xianzhu
2017/01/06 19:24:18
Done.
|
| return; |
| + } |
| #if DCHECK_IS_ON() |
| FindObjectPropertiesNeedingUpdateScope checkNeedsUpdateScope(object, context); |