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

Side by Side Diff: Source/core/paint/DeprecatedPaintLayer.cpp

Issue 1287413002: Fix paint invalidation rect tracking within composited scrolling layers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutObjectChildList.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 void DeprecatedPaintLayer::updateLayerPositionsAfterScrollRecursive(const Double Size& scrollDelta, bool paintInvalidationContainerWasScrolled) 321 void DeprecatedPaintLayer::updateLayerPositionsAfterScrollRecursive(const Double Size& scrollDelta, bool paintInvalidationContainerWasScrolled)
322 { 322 {
323 updateLayerPosition(); 323 updateLayerPosition();
324 if (paintInvalidationContainerWasScrolled && !isPaintInvalidationContainer() ) { 324 if (paintInvalidationContainerWasScrolled && !isPaintInvalidationContainer() ) {
325 // Paint invalidation rects are in the coordinate space of the paint inv alidation container. 325 // Paint invalidation rects are in the coordinate space of the paint inv alidation container.
326 // If it has scrolled, the rect must be adjusted. Note that it is not sa fe to reset it to 326 // If it has scrolled, the rect must be adjusted. Note that it is not sa fe to reset it to
327 // the current bounds rect, as the LayoutObject may have moved since the last invalidation. 327 // the current bounds rect, as the LayoutObject may have moved since the last invalidation.
328 // FIXME(416535): Ideally, pending invalidations of scrolling content sh ould be stored in 328 // FIXME(416535): Ideally, pending invalidations of scrolling content sh ould be stored in
329 // the coordinate space of the scrolling content layer, so that they nee d no adjustment. 329 // the coordinate space of the scrolling content layer, so that they nee d no adjustment.
330 LayoutRect invalidationRect = m_layoutObject->previousPaintInvalidationR ect(); 330 m_layoutObject->adjustPreviousPaintInvalidationForScrollIfNeeded(scrollD elta);
331 invalidationRect.move(LayoutSize(scrollDelta));
332 m_layoutObject->setPreviousPaintInvalidationRect(invalidationRect);
333 } 331 }
334 for (DeprecatedPaintLayer* child = firstChild(); child; child = child->nextS ibling()) { 332 for (DeprecatedPaintLayer* child = firstChild(); child; child = child->nextS ibling()) {
335 child->updateLayerPositionsAfterScrollRecursive(scrollDelta, 333 child->updateLayerPositionsAfterScrollRecursive(scrollDelta,
336 paintInvalidationContainerWasScrolled && !child->isPaintInvalidation Container()); 334 paintInvalidationContainerWasScrolled && !child->isPaintInvalidation Container());
337 } 335 }
338 } 336 }
339 337
340 void DeprecatedPaintLayer::updateTransformationMatrix() 338 void DeprecatedPaintLayer::updateTransformationMatrix()
341 { 339 {
342 if (m_transform) { 340 if (m_transform) {
(...skipping 2317 matching lines...) Expand 10 before | Expand all | Expand 10 after
2660 2658
2661 void showLayerTree(const blink::LayoutObject* layoutObject) 2659 void showLayerTree(const blink::LayoutObject* layoutObject)
2662 { 2660 {
2663 if (!layoutObject) { 2661 if (!layoutObject) {
2664 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2662 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2665 return; 2663 return;
2666 } 2664 }
2667 showLayerTree(layoutObject->enclosingLayer()); 2665 showLayerTree(layoutObject->enclosingLayer());
2668 } 2666 }
2669 #endif 2667 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutObjectChildList.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698