Commit 2070a2e4 authored by Vladimir Levin's avatar Vladimir Levin Committed by Commit Bot

Inline MarkAncestorsForPaintInvalidation.

There's only one call site, so this patch inlines it so it's more clear
which functions mark the parent chain.

R=chrishtr@chromium.org, pdr@chromium.org, wangxianzhu@chromium.org

Change-Id: I367f4ffd2dfaf07ddf98a03ea247fb69d6e387b4
Reviewed-on: https://chromium-review.googlesource.com/1239263
Commit-Queue: vmpstr <vmpstr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593379}
parent 9bace7fb
...@@ -3824,13 +3824,6 @@ bool LayoutObject::IsRelayoutBoundaryForInspector() const { ...@@ -3824,13 +3824,6 @@ bool LayoutObject::IsRelayoutBoundaryForInspector() const {
return ObjectIsRelayoutBoundary(this); return ObjectIsRelayoutBoundary(this);
} }
inline void LayoutObject::MarkAncestorsForPaintInvalidation() {
for (LayoutObject* parent = ParentCrossingFrames();
parent && !parent->ShouldCheckForPaintInvalidation();
parent = parent->ParentCrossingFrames())
parent->bitfields_.SetShouldCheckForPaintInvalidation(true);
}
inline void LayoutObject::SetNeedsPaintOffsetAndVisualRectUpdate() { inline void LayoutObject::SetNeedsPaintOffsetAndVisualRectUpdate() {
DCHECK(ShouldCheckForPaintInvalidation()); DCHECK(ShouldCheckForPaintInvalidation());
bitfields_.SetNeedsPaintOffsetAndVisualRectUpdate(true); bitfields_.SetNeedsPaintOffsetAndVisualRectUpdate(true);
...@@ -3898,8 +3891,13 @@ void LayoutObject::SetShouldCheckForPaintInvalidationWithoutGeometryChange() { ...@@ -3898,8 +3891,13 @@ void LayoutObject::SetShouldCheckForPaintInvalidationWithoutGeometryChange() {
if (ShouldCheckForPaintInvalidation()) if (ShouldCheckForPaintInvalidation())
return; return;
GetFrameView()->ScheduleVisualUpdateForPaintInvalidationIfNeeded(); GetFrameView()->ScheduleVisualUpdateForPaintInvalidationIfNeeded();
bitfields_.SetShouldCheckForPaintInvalidation(true); bitfields_.SetShouldCheckForPaintInvalidation(true);
MarkAncestorsForPaintInvalidation(); for (LayoutObject* parent = ParentCrossingFrames();
parent && !parent->ShouldCheckForPaintInvalidation();
parent = parent->ParentCrossingFrames()) {
parent->bitfields_.SetShouldCheckForPaintInvalidation(true);
}
} }
void LayoutObject::SetSubtreeShouldCheckForPaintInvalidation() { void LayoutObject::SetSubtreeShouldCheckForPaintInvalidation() {
......
...@@ -2314,7 +2314,6 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, ...@@ -2314,7 +2314,6 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
inline void MarkContainerChainForOverflowRecalcIfNeeded(); inline void MarkContainerChainForOverflowRecalcIfNeeded();
inline void MarkAncestorsForPaintInvalidation();
inline void SetNeedsPaintOffsetAndVisualRectUpdate(); inline void SetNeedsPaintOffsetAndVisualRectUpdate();
inline void InvalidateContainerPreferredLogicalWidths(); inline void InvalidateContainerPreferredLogicalWidths();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment