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

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: Address comments 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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 // Adjust offset for absolute under in-flow positioned inline. 831 // Adjust offset for absolute under in-flow positioned inline.
832 LayoutSize offset = 832 LayoutSize offset =
833 ToLayoutInline(containing_layer->GetLayoutObject()) 833 ToLayoutInline(containing_layer->GetLayoutObject())
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 (!HasCompositedLayerMapping() &&
chrishtr 2017/04/28 20:11:43 This is not in general the right place to be doing
yigu 2017/04/28 20:38:56 Suppose we have a region A that needs repaint on s
842 OffsetForInFlowPosition() != new_offset) {
843 GetLayoutObject().SetShouldDoFullPaintInvalidation(
844 kPaintInvalidationLocationChange);
845 }
841 if (rare_data_ || !new_offset.IsZero()) 846 if (rare_data_ || !new_offset.IsZero())
842 EnsureRareData().offset_for_in_flow_position = new_offset; 847 EnsureRareData().offset_for_in_flow_position = new_offset;
843 local_point.Move(new_offset); 848 local_point.Move(new_offset);
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)
(...skipping 2466 matching lines...) Expand 10 before | Expand all | Expand 10 after
3317 } 3322 }
3318 3323
3319 void showLayerTree(const blink::LayoutObject* layoutObject) { 3324 void showLayerTree(const blink::LayoutObject* layoutObject) {
3320 if (!layoutObject) { 3325 if (!layoutObject) {
3321 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; 3326 LOG(INFO) << "Cannot showLayerTree. Root is (nil)";
3322 return; 3327 return;
3323 } 3328 }
3324 showLayerTree(layoutObject->EnclosingLayer()); 3329 showLayerTree(layoutObject->EnclosingLayer());
3325 } 3330 }
3326 #endif 3331 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/compositing/non-composited-sticky-element-repaint-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698