Index: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp |
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp |
index b566d57efae8cf1c6442700c188c39af9662c424..e41d807fd6544a6a94e17a77747946445fe5ea3e 100644 |
--- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp |
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp |
@@ -488,14 +488,15 @@ ObjectPaintInvalidatorWithContext::computePaintInvalidationReason() { |
if (m_object.paintedOutputOfObjectHasNoEffectRegardlessOfSize()) |
return PaintInvalidationNone; |
- const ComputedStyle& style = m_object.styleRef(); |
- |
// The outline may change shape because of position change of descendants. For |
// simplicity, just force full paint invalidation if this object is marked for |
chrishtr
2017/02/03 02:00:11
Comment needs updating.
Xianzhu
2017/02/03 04:38:35
Done.
|
// checking paint invalidation for any reason. |
- // TODO(wangxianzhu): Optimize this. |
- if (style.hasOutline()) |
+ if (m_object.outlineMayBeAffectedByDescendants() || |
+ m_object.previousOutlineMayBeAffectedByDescendants()) { |
+ m_object.getMutableForPainting() |
+ .updatePreviousOutlineMayBeAffectedByDescendants(); |
return PaintInvalidationOutline; |
+ } |
// If the size is zero on one of our bounds then we know we're going to have |
// to do a full invalidation of either old bounds or new bounds. |