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 42d0cb93ce21beee0ffb1afea870788548b22afd..52c0126d2e5eb8ff17f389565e35e7d42199dd6f 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
| @@ -1192,18 +1192,16 @@ void PaintPropertyTreeBuilder::UpdatePaintProperties( |
| bool had_paint_properties = object.PaintProperties(); |
| - if (needs_paint_properties) { |
| + if (needs_paint_properties && !had_paint_properties) { |
| ObjectPaintProperties& paint_properties = |
| object.GetMutableForPainting().EnsurePaintProperties(); |
| - if (!had_paint_properties && |
| - RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| paint_properties.SetCompositorElementId( |
| CreateDomNodeBasedCompositorElementId(object)); |
|
pdr.
2017/05/15 19:52:19
I think avoiding ClearPaintProperties is a nice cl
|
| } |
| - } else { |
| + } else if (!needs_paint_properties && had_paint_properties) { |
| object.GetMutableForPainting().ClearPaintProperties(); |
| - if (had_paint_properties) |
| - full_context.force_subtree_update = true; |
| + full_context.force_subtree_update = true; |
| } |
| } |