Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1606)

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2872423002: Tweak PaintInvalidationReasons (Closed)
Patch Set: Rebaseline-cl Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 92fc41da4e9b6acd0ff2bff1a01d8aa5c2561f3b..3c813d65b231d629a7c9f2b5d4b00c6361be42aa 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -1706,8 +1706,10 @@ void FrameView::ViewportSizeChanged(bool width_changed, bool height_changed) {
// above.
LayoutViewItem lvi = GetLayoutViewItem();
DCHECK(!lvi.IsNull());
- if (lvi.DocumentRect().Height() < lvi.ViewRect().Height())
- lvi.SetShouldDoFullPaintInvalidation();
+ if (lvi.DocumentRect().Height() < lvi.ViewRect().Height()) {
+ lvi.SetShouldDoFullPaintInvalidation(
+ PaintInvalidationReason::kGeometry);
+ }
}
}
@@ -1760,8 +1762,10 @@ void FrameView::ScrollContentsIfNeededRecursive() {
}
void FrameView::InvalidateBackgroundAttachmentFixedObjects() {
- for (const auto& layout_object : background_attachment_fixed_objects_)
- layout_object->SetShouldDoFullPaintInvalidation();
+ for (const auto& layout_object : background_attachment_fixed_objects_) {
+ layout_object->SetShouldDoFullPaintInvalidation(
+ PaintInvalidationReason::kBackground);
+ }
}
bool FrameView::HasBackgroundAttachmentFixedDescendants(
@@ -3480,9 +3484,10 @@ void FrameView::DeprecatedInvalidateTreeRecursiveInternal() {
// Process objects needing paint invalidation on the next frame. See the
// definition of PaintInvalidationDelayedFull for more details.
- for (auto& target : pending_delayed_paint_invalidations)
+ for (auto& target : pending_delayed_paint_invalidations) {
target->GetMutableForPainting().SetShouldDoFullPaintInvalidation(
- kPaintInvalidationDelayedFull);
+ PaintInvalidationReason::kDelayedFull);
+ }
}
void FrameView::EnableAutoSizeMode(const IntSize& min_size,

Powered by Google App Engine
This is Rietveld 408576698