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

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: Update tests 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 16f625873668c322d216058212ebb91e6e3d0ab5..0c895d1e5a4766d2ef1e6bf8df1342841085eb6c 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -838,6 +838,12 @@ void PaintLayer::UpdateLayerPosition() {
if (GetLayoutObject().IsInFlowPositioned()) {
LayoutSize new_offset = GetLayoutObject().OffsetForInFlowPosition();
+ if (GetLayoutObject().Style()->GetPosition() == EPosition::kSticky &&
flackr 2017/04/28 17:14:57 Remove the check for position sticky, I don't thin
yigu 2017/04/28 20:01:29 Done.
+ !HasCompositedLayerMapping() &&
+ OffsetForInFlowPosition() != new_offset) {
+ ObjectPaintInvalidator(GetLayoutObject())
+ .InvalidatePaintIncludingNonCompositingDescendants();
+ }
if (rare_data_ || !new_offset.IsZero())
EnsureRareData().offset_for_in_flow_position = new_offset;
local_point.Move(new_offset);

Powered by Google App Engine
This is Rietveld 408576698