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

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

Issue 2241663002: Take CSS Clip and contain: paint into account when computing visual rects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 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
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 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after
2407 if (m_stackingNode->zOrderListsDirty()) 2407 if (m_stackingNode->zOrderListsDirty())
2408 return false; 2408 return false;
2409 2409
2410 // FIXME: We currently only check the immediate layoutObject, 2410 // FIXME: We currently only check the immediate layoutObject,
2411 // which will miss many cases. 2411 // which will miss many cases.
2412 if (layoutObject()->backgroundIsKnownToBeOpaqueInRect(localRect)) 2412 if (layoutObject()->backgroundIsKnownToBeOpaqueInRect(localRect))
2413 return true; 2413 return true;
2414 2414
2415 // We can't consult child layers if we clip, since they might cover 2415 // We can't consult child layers if we clip, since they might cover
2416 // parts of the rect that are clipped out. 2416 // parts of the rect that are clipped out.
2417 if (layoutObject()->hasOverflowClip() || layoutObject()->style()->containsPa int()) 2417 if (layoutObject()->hasClipRelatedProperty())
2418 return false; 2418 return false;
2419 2419
2420 return childBackgroundIsKnownToBeOpaqueInRect(localRect); 2420 return childBackgroundIsKnownToBeOpaqueInRect(localRect);
2421 } 2421 }
2422 2422
2423 bool PaintLayer::childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR ect) const 2423 bool PaintLayer::childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR ect) const
2424 { 2424 {
2425 PaintLayerStackingNodeReverseIterator revertseIterator(*m_stackingNode, Posi tiveZOrderChildren | NormalFlowChildren | NegativeZOrderChildren); 2425 PaintLayerStackingNodeReverseIterator revertseIterator(*m_stackingNode, Posi tiveZOrderChildren | NormalFlowChildren | NegativeZOrderChildren);
2426 while (PaintLayerStackingNode* child = revertseIterator.next()) { 2426 while (PaintLayerStackingNode* child = revertseIterator.next()) {
2427 const PaintLayer* childLayer = child->layer(); 2427 const PaintLayer* childLayer = child->layer();
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
2924 2924
2925 void showLayerTree(const blink::LayoutObject* layoutObject) 2925 void showLayerTree(const blink::LayoutObject* layoutObject)
2926 { 2926 {
2927 if (!layoutObject) { 2927 if (!layoutObject) {
2928 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2928 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2929 return; 2929 return;
2930 } 2930 }
2931 showLayerTree(layoutObject->enclosingLayer()); 2931 showLayerTree(layoutObject->enclosingLayer());
2932 } 2932 }
2933 #endif 2933 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698