Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| index a09d8ad25d9c9d78267b03cd21a0d957732c71f1..f82bc7ba23000c87d41c12041598201115aef465 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| @@ -3423,11 +3423,27 @@ inline void LayoutObject::markAncestorsForPaintInvalidation() { |
| inline void LayoutObject::setNeedsPaintOffsetAndVisualRectUpdate() { |
| if (needsPaintOffsetAndVisualRectUpdate()) |
| return; |
| - m_bitfields.setNeedsPaintOffsetAndVisualRectUpdate(true); |
| - for (LayoutObject* parent = paintInvalidationParent(); |
| - parent && !parent->needsPaintOffsetAndVisualRectUpdate(); |
| - parent = parent->paintInvalidationParent()) |
| - parent->m_bitfields.setNeedsPaintOffsetAndVisualRectUpdate(true); |
| + for (auto* object = this; |
| + object && !object->needsPaintOffsetAndVisualRectUpdate(); |
| + object = object->paintInvalidationParent()) { |
| + object->m_bitfields.setNeedsPaintOffsetAndVisualRectUpdate(true); |
| + |
| + // Focus ring is special because continuations affect shape of focus ring. |
| + // Mark the start object for paint invalidation if it has focus ring. |
|
wkorman
2017/03/22 18:10:56
My core question was actually, what ends up taking
Xianzhu
2017/03/22 19:18:13
<span style="outline: auto">
ABC
<div style="p
wkorman
2017/03/22 20:28:53
Ah, I see. Thank you for the explanation!
|
| + if (!object->isAnonymous() || !object->isLayoutBlockFlow()) |
| + continue; |
| + auto* blockFlow = toLayoutBlockFlow(object); |
| + if (!blockFlow->isAnonymousBlockContinuation()) |
| + continue; |
| + if (auto* inlineElementContinuation = |
| + blockFlow->inlineElementContinuation()) { |
| + auto* startOfContinuations = |
| + inlineElementContinuation->node()->layoutObject(); |
| + if (startOfContinuations && |
| + startOfContinuations->styleRef().outlineStyleIsAuto()) |
| + startOfContinuations->setMayNeedPaintInvalidation(); |
| + } |
| + } |
| } |
| void LayoutObject::setShouldInvalidateSelection() { |