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

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: Fix windows build 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.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 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 } else { 1400 } else {
1401 // The ancestor layer is also inside the pagination layer, so we need to subtract the visual 1401 // The ancestor layer is also inside the pagination layer, so we need to subtract the visual
1402 // distance from the ancestor layer to the pagination layer. 1402 // distance from the ancestor layer to the pagination layer.
1403 offset.moveBy(-ancestorLayer->visualOffsetFromAncestor(paginationLayer)) ; 1403 offset.moveBy(-ancestorLayer->visualOffsetFromAncestor(paginationLayer)) ;
1404 } 1404 }
1405 return offset; 1405 return offset;
1406 } 1406 }
1407 1407
1408 void PaintLayer::didUpdateNeedsCompositedScrolling() 1408 void PaintLayer::didUpdateNeedsCompositedScrolling()
1409 { 1409 {
1410 bool wasSelfPaintingLayer = isSelfPaintingLayer();
1410 updateSelfPaintingLayer(); 1411 updateSelfPaintingLayer();
1412
1413 // If the floating object becomes non-self-painting, so some ancestor should paint it;
1414 // if it becomes self-painting, it should paint itself and no ancestor shoul d paint it.
1415 if (wasSelfPaintingLayer != isSelfPaintingLayer() && m_layoutObject->isFloat ing())
1416 LayoutBlockFlow::setAncestorShouldPaintFloatingObject(*layoutBox(), wasS elfPaintingLayer);
1411 } 1417 }
1412 1418
1413 void PaintLayer::updateReflectionInfo(const ComputedStyle* oldStyle) 1419 void PaintLayer::updateReflectionInfo(const ComputedStyle* oldStyle)
1414 { 1420 {
1415 ASSERT(!oldStyle || !layoutObject()->style()->reflectionDataEquivalent(oldSt yle)); 1421 ASSERT(!oldStyle || !layoutObject()->style()->reflectionDataEquivalent(oldSt yle));
1416 if (layoutObject()->hasReflection()) { 1422 if (layoutObject()->hasReflection()) {
1417 ensureRareData().reflectionInfo = adoptPtr(new PaintLayerReflectionInfo( *layoutBox())); 1423 ensureRareData().reflectionInfo = adoptPtr(new PaintLayerReflectionInfo( *layoutBox()));
1418 m_rareData->reflectionInfo->updateAfterStyleChange(oldStyle); 1424 m_rareData->reflectionInfo->updateAfterStyleChange(oldStyle);
1419 } else if (m_rareData && m_rareData->reflectionInfo) { 1425 } else if (m_rareData && m_rareData->reflectionInfo) {
1420 m_rareData->reflectionInfo = nullptr; 1426 m_rareData->reflectionInfo = nullptr;
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after
2791 2797
2792 void showLayerTree(const blink::LayoutObject* layoutObject) 2798 void showLayerTree(const blink::LayoutObject* layoutObject)
2793 { 2799 {
2794 if (!layoutObject) { 2800 if (!layoutObject) {
2795 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2801 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2796 return; 2802 return;
2797 } 2803 }
2798 showLayerTree(layoutObject->enclosingLayer()); 2804 showLayerTree(layoutObject->enclosingLayer());
2799 } 2805 }
2800 #endif 2806 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698