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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1661523002: Update should paint flag when a float's composited scrolling status changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 } else { 1403 } else {
1404 // The ancestor layer is also inside the pagination layer, so we need to subtract the visual 1404 // The ancestor layer is also inside the pagination layer, so we need to subtract the visual
1405 // distance from the ancestor layer to the pagination layer. 1405 // distance from the ancestor layer to the pagination layer.
1406 offset.moveBy(-ancestorLayer->visualOffsetFromAncestor(paginationLayer)) ; 1406 offset.moveBy(-ancestorLayer->visualOffsetFromAncestor(paginationLayer)) ;
1407 } 1407 }
1408 return offset; 1408 return offset;
1409 } 1409 }
1410 1410
1411 void PaintLayer::didUpdateNeedsCompositedScrolling() 1411 void PaintLayer::didUpdateNeedsCompositedScrolling()
1412 { 1412 {
1413 bool wasSelfPaintingLayer = m_isSelfPaintingLayer;
1413 updateSelfPaintingLayer(); 1414 updateSelfPaintingLayer();
1415
1416 // If the floating object becomes non-self-painting, so some ancestor should paint it;
1417 // if it becomes self-painting, it should paint itself and no ancestor shoul d paint it.
1418 if (wasSelfPaintingLayer != m_isSelfPaintingLayer && m_layoutObject->isFloat ing())
1419 LayoutBlockFlow::setAncestorShouldPaintFloatingObject(*layoutBox(), wasS elfPaintingLayer);
1414 } 1420 }
1415 1421
1416 void PaintLayer::updateReflectionInfo(const ComputedStyle* oldStyle) 1422 void PaintLayer::updateReflectionInfo(const ComputedStyle* oldStyle)
1417 { 1423 {
1418 ASSERT(!oldStyle || !layoutObject()->style()->reflectionDataEquivalent(oldSt yle)); 1424 ASSERT(!oldStyle || !layoutObject()->style()->reflectionDataEquivalent(oldSt yle));
1419 if (layoutObject()->hasReflection()) { 1425 if (layoutObject()->hasReflection()) {
1420 ensureRareData().reflectionInfo = adoptPtr(new PaintLayerReflectionInfo( *layoutBox())); 1426 ensureRareData().reflectionInfo = adoptPtr(new PaintLayerReflectionInfo( *layoutBox()));
1421 m_rareData->reflectionInfo->updateAfterStyleChange(oldStyle); 1427 m_rareData->reflectionInfo->updateAfterStyleChange(oldStyle);
1422 } else if (m_rareData && m_rareData->reflectionInfo) { 1428 } else if (m_rareData && m_rareData->reflectionInfo) {
1423 m_rareData->reflectionInfo->destroy(); 1429 m_rareData->reflectionInfo->destroy();
(...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after
2795 2801
2796 void showLayerTree(const blink::LayoutObject* layoutObject) 2802 void showLayerTree(const blink::LayoutObject* layoutObject)
2797 { 2803 {
2798 if (!layoutObject) { 2804 if (!layoutObject) {
2799 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2805 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2800 return; 2806 return;
2801 } 2807 }
2802 showLayerTree(layoutObject->enclosingLayer()); 2808 showLayerTree(layoutObject->enclosingLayer());
2803 } 2809 }
2804 #endif 2810 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698