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

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

Issue 2605543002: Replace adjustment of previous visual rects on scroll with normal paint invalidation (Closed)
Patch Set: Remove unused parameters Created 3 years, 11 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) 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 } 1253 }
1254 1254
1255 LayoutRect LayoutObject::previousVisualRectIncludingCompositedScrolling( 1255 LayoutRect LayoutObject::previousVisualRectIncludingCompositedScrolling(
1256 const LayoutBoxModelObject& paintInvalidationContainer) const { 1256 const LayoutBoxModelObject& paintInvalidationContainer) const {
1257 LayoutRect rect = previousVisualRect(); 1257 LayoutRect rect = previousVisualRect();
1258 adjustVisualRectForCompositedScrolling(rect, paintInvalidationContainer); 1258 adjustVisualRectForCompositedScrolling(rect, paintInvalidationContainer);
1259 return rect; 1259 return rect;
1260 } 1260 }
1261 1261
1262 void LayoutObject::adjustPreviousPaintInvalidationForScrollIfNeeded(
1263 const DoubleSize& scrollDelta) {
1264 if (containerForPaintInvalidation().usesCompositedScrolling())
1265 return;
1266 m_previousVisualRect.move(LayoutSize(scrollDelta));
1267 }
1268
1269 void LayoutObject::clearPreviousVisualRects() { 1262 void LayoutObject::clearPreviousVisualRects() {
1270 setPreviousVisualRect(LayoutRect()); 1263 setPreviousVisualRect(LayoutRect());
1271 ObjectPaintInvalidator(*this).setPreviousLocationInBacking(LayoutPoint()); 1264 ObjectPaintInvalidator(*this).setPreviousLocationInBacking(LayoutPoint());
1272 // Ensure check paint invalidation of subtree that would be triggered by 1265 // Ensure check paint invalidation of subtree that would be triggered by
1273 // location change if we had valid previous location. 1266 // location change if we had valid previous location.
1274 setMayNeedPaintInvalidationSubtree(); 1267 setMayNeedPaintInvalidationSubtree();
1275 // After clearing ("invalidating") the visual rects, mark this object as 1268 // After clearing ("invalidating") the visual rects, mark this object as
1276 // needing to re-compute them. 1269 // needing to re-compute them.
1277 setShouldDoFullPaintInvalidation(); 1270 setShouldDoFullPaintInvalidation();
1278 } 1271 }
(...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after
3519 const blink::LayoutObject* root = object1; 3512 const blink::LayoutObject* root = object1;
3520 while (root->parent()) 3513 while (root->parent())
3521 root = root->parent(); 3514 root = root->parent();
3522 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3515 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3523 } else { 3516 } else {
3524 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3517 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3525 } 3518 }
3526 } 3519 }
3527 3520
3528 #endif 3521 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698