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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2537653002: Invalidate previousLocationInBacking in LayoutObject::clearPreviousVisualRects() (Closed)
Patch Set: Created 4 years 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 1252
1253 void LayoutObject::adjustPreviousPaintInvalidationForScrollIfNeeded( 1253 void LayoutObject::adjustPreviousPaintInvalidationForScrollIfNeeded(
1254 const DoubleSize& scrollDelta) { 1254 const DoubleSize& scrollDelta) {
1255 if (containerForPaintInvalidation().usesCompositedScrolling()) 1255 if (containerForPaintInvalidation().usesCompositedScrolling())
1256 return; 1256 return;
1257 m_previousVisualRect.move(LayoutSize(scrollDelta)); 1257 m_previousVisualRect.move(LayoutSize(scrollDelta));
1258 } 1258 }
1259 1259
1260 void LayoutObject::clearPreviousVisualRects() { 1260 void LayoutObject::clearPreviousVisualRects() {
1261 setPreviousVisualRect(LayoutRect()); 1261 setPreviousVisualRect(LayoutRect());
1262 // Also invalidate the previous location by setting it to a special value so
1263 // that it won't match any meaningful location.
1264 ObjectPaintInvalidator(*this).setPreviousLocationInBacking(
1265 LayoutPoint(LayoutUnit::nearlyMin(), LayoutUnit::nearlyMin()));
1262 // After clearing ("invalidating" the visual rects, mark this object as 1266 // After clearing ("invalidating" the visual rects, mark this object as
chrishtr 2016/11/29 00:57:59 Noticed a typo here with mismatched parens. Might
Xianzhu 2016/11/29 01:43:27 Done.
1263 // needing to re-compute them. 1267 // needing to re-compute them.
1264 setShouldDoFullPaintInvalidation(); 1268 setShouldDoFullPaintInvalidation();
chrishtr 2016/11/29 00:57:59 This call here on line 1268 should cause full pain
Xianzhu 2016/11/29 01:43:27 We'll get the location recomputed, but may miss se
1265 } 1269 }
1266 1270
1267 LayoutRect LayoutObject::absoluteVisualRect() const { 1271 LayoutRect LayoutObject::absoluteVisualRect() const {
1268 LayoutRect rect = localVisualRect(); 1272 LayoutRect rect = localVisualRect();
1269 mapToVisualRectInAncestorSpace(view(), rect); 1273 mapToVisualRectInAncestorSpace(view(), rect);
1270 return rect; 1274 return rect;
1271 } 1275 }
1272 1276
1273 LayoutRect LayoutObject::localVisualRect() const { 1277 LayoutRect LayoutObject::localVisualRect() const {
1274 NOTREACHED(); 1278 NOTREACHED();
(...skipping 2223 matching lines...) Expand 10 before | Expand all | Expand 10 after
3498 const blink::LayoutObject* root = object1; 3502 const blink::LayoutObject* root = object1;
3499 while (root->parent()) 3503 while (root->parent())
3500 root = root->parent(); 3504 root = root->parent();
3501 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3505 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3502 } else { 3506 } else {
3503 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3507 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3504 } 3508 }
3505 } 3509 }
3506 3510
3507 #endif 3511 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/compositing/become-composited-zero-offset-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698