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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 .OffsetForInFlowPositionedInline(ToLayoutBox(GetLayoutObject())); 834 .OffsetForInFlowPositionedInline(ToLayoutBox(GetLayoutObject()));
835 local_point += offset; 835 local_point += offset;
836 } 836 }
837 } 837 }
838 838
839 if (GetLayoutObject().IsInFlowPositioned()) { 839 if (GetLayoutObject().IsInFlowPositioned()) {
840 LayoutSize new_offset = GetLayoutObject().OffsetForInFlowPosition(); 840 LayoutSize new_offset = GetLayoutObject().OffsetForInFlowPosition();
841 if (rare_data_ || !new_offset.IsZero()) 841 if (rare_data_ || !new_offset.IsZero())
842 EnsureRareData().offset_for_in_flow_position = new_offset; 842 EnsureRareData().offset_for_in_flow_position = new_offset;
843 local_point.Move(new_offset); 843 local_point.Move(new_offset);
844 if (GetLayoutObject().Style()->GetPosition() == EPosition::kSticky &&
845 !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.
846 ObjectPaintInvalidator(GetLayoutObject())
847 .InvalidatePaintIncludingNonCompositingDescendants();
848 }
844 } else if (rare_data_) { 849 } else if (rare_data_) {
845 rare_data_->offset_for_in_flow_position = LayoutSize(); 850 rare_data_->offset_for_in_flow_position = LayoutSize();
846 } 851 }
847 852
848 location_ = local_point; 853 location_ = local_point;
849 854
850 if (scrollable_area_ && did_resize) 855 if (scrollable_area_ && did_resize)
851 scrollable_area_->VisibleSizeChanged(); 856 scrollable_area_->VisibleSizeChanged();
852 857
853 #if DCHECK_IS_ON() 858 #if DCHECK_IS_ON()
(...skipping 2462 matching lines...) Expand 10 before | Expand all | Expand 10 after
3316 } 3321 }
3317 3322
3318 void showLayerTree(const blink::LayoutObject* layoutObject) { 3323 void showLayerTree(const blink::LayoutObject* layoutObject) {
3319 if (!layoutObject) { 3324 if (!layoutObject) {
3320 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; 3325 LOG(INFO) << "Cannot showLayerTree. Root is (nil)";
3321 return; 3326 return;
3322 } 3327 }
3323 showLayerTree(layoutObject->EnclosingLayer()); 3328 showLayerTree(layoutObject->EnclosingLayer());
3324 } 3329 }
3325 #endif 3330 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698