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

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: Update tests 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 (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.
842 !HasCompositedLayerMapping() &&
843 OffsetForInFlowPosition() != new_offset) {
844 ObjectPaintInvalidator(GetLayoutObject())
845 .InvalidatePaintIncludingNonCompositingDescendants();
846 }
841 if (rare_data_ || !new_offset.IsZero()) 847 if (rare_data_ || !new_offset.IsZero())
842 EnsureRareData().offset_for_in_flow_position = new_offset; 848 EnsureRareData().offset_for_in_flow_position = new_offset;
843 local_point.Move(new_offset); 849 local_point.Move(new_offset);
844 } else if (rare_data_) { 850 } else if (rare_data_) {
845 rare_data_->offset_for_in_flow_position = LayoutSize(); 851 rare_data_->offset_for_in_flow_position = LayoutSize();
846 } 852 }
847 853
848 location_ = local_point; 854 location_ = local_point;
849 855
850 if (scrollable_area_ && did_resize) 856 if (scrollable_area_ && did_resize)
(...skipping 2466 matching lines...) Expand 10 before | Expand all | Expand 10 after
3317 } 3323 }
3318 3324
3319 void showLayerTree(const blink::LayoutObject* layoutObject) { 3325 void showLayerTree(const blink::LayoutObject* layoutObject) {
3320 if (!layoutObject) { 3326 if (!layoutObject) {
3321 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; 3327 LOG(INFO) << "Cannot showLayerTree. Root is (nil)";
3322 return; 3328 return;
3323 } 3329 }
3324 showLayerTree(layoutObject->EnclosingLayer()); 3330 showLayerTree(layoutObject->EnclosingLayer());
3325 } 3331 }
3326 #endif 3332 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698