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

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

Issue 1688053003: Avoid overwrite of existing PaintLayerReflectionInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo 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 | « no previous file | 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 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 // If the floating object becomes non-self-painting, so some ancestor should paint it; 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. 1417 // if it becomes self-painting, it should paint itself and no ancestor shoul d paint it.
1418 if (wasSelfPaintingLayer != isSelfPaintingLayer() && m_layoutObject->isFloat ing()) 1418 if (wasSelfPaintingLayer != isSelfPaintingLayer() && m_layoutObject->isFloat ing())
1419 LayoutBlockFlow::setAncestorShouldPaintFloatingObject(*layoutBox(), wasS elfPaintingLayer); 1419 LayoutBlockFlow::setAncestorShouldPaintFloatingObject(*layoutBox(), wasS elfPaintingLayer);
1420 } 1420 }
1421 1421
1422 void PaintLayer::updateReflectionInfo(const ComputedStyle* oldStyle) 1422 void PaintLayer::updateReflectionInfo(const ComputedStyle* oldStyle)
1423 { 1423 {
1424 ASSERT(!oldStyle || !layoutObject()->style()->reflectionDataEquivalent(oldSt yle)); 1424 ASSERT(!oldStyle || !layoutObject()->style()->reflectionDataEquivalent(oldSt yle));
1425 if (layoutObject()->hasReflection()) { 1425 if (layoutObject()->hasReflection()) {
1426 ensureRareData().reflectionInfo = adoptPtr(new PaintLayerReflectionInfo( *layoutBox())); 1426 if (!ensureRareData().reflectionInfo)
1427 m_rareData->reflectionInfo = adoptPtr(new PaintLayerReflectionInfo(* layoutBox()));
1427 m_rareData->reflectionInfo->updateAfterStyleChange(oldStyle); 1428 m_rareData->reflectionInfo->updateAfterStyleChange(oldStyle);
1428 } else if (m_rareData && m_rareData->reflectionInfo) { 1429 } else if (m_rareData && m_rareData->reflectionInfo) {
1429 m_rareData->reflectionInfo->destroy(); 1430 m_rareData->reflectionInfo->destroy();
1430 m_rareData->reflectionInfo = nullptr; 1431 m_rareData->reflectionInfo = nullptr;
1431 } 1432 }
1432 } 1433 }
1433 1434
1434 void PaintLayer::updateStackingNode() 1435 void PaintLayer::updateStackingNode()
1435 { 1436 {
1436 ASSERT(!m_stackingNode); 1437 ASSERT(!m_stackingNode);
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
2801 2802
2802 void showLayerTree(const blink::LayoutObject* layoutObject) 2803 void showLayerTree(const blink::LayoutObject* layoutObject)
2803 { 2804 {
2804 if (!layoutObject) { 2805 if (!layoutObject) {
2805 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2806 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2806 return; 2807 return;
2807 } 2808 }
2808 showLayerTree(layoutObject->enclosingLayer()); 2809 showLayerTree(layoutObject->enclosingLayer());
2809 } 2810 }
2810 #endif 2811 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698