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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2845613002: Fix the bug that sticky element may not be correctly invalidated due to non-promotion (Closed)
Patch Set: Created 3 years, 8 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/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 1f9148f70c35bc50321b277d0a6b01410f2b6fb7..3cfc2669d76f980954bd6725e14221974db23df3 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -841,6 +841,11 @@ void PaintLayer::UpdateLayerPosition() {
if (rare_data_ || !new_offset.IsZero())
EnsureRareData().offset_for_in_flow_position = new_offset;
local_point.Move(new_offset);
+ if (GetLayoutObject().Style()->GetPosition() == EPosition::kSticky &&
+ !new_offset.IsZero()) {
flackr 2017/04/26 15:21:01 This will invalidate as long as the offset is not
yigu 2017/04/26 21:46:57 Done.
+ ObjectPaintInvalidator(GetLayoutObject())
+ .InvalidatePaintIncludingNonCompositingDescendants();
+ }
} else if (rare_data_) {
rare_data_->offset_for_in_flow_position = LayoutSize();
}

Powered by Google App Engine
This is Rietveld 408576698