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

Side by Side Diff: Source/core/rendering/CompositedLayerMapping.cpp

Issue 68833004: Fix chicken and egg problem in composited bounds computation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 7 years, 1 month 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 | « LayoutTests/TestExpectations ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | 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) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 bool hasAncestorClippingLayer = compositor()->clippedByAncestor(m_owningLaye r); 317 bool hasAncestorClippingLayer = compositor()->clippedByAncestor(m_owningLaye r);
318 bool clippingAncestorIsScrollParent = m_owningLayer->renderer()->containingB lock()->enclosingLayer() == m_owningLayer->ancestorScrollingLayer(); 318 bool clippingAncestorIsScrollParent = m_owningLayer->renderer()->containingB lock()->enclosingLayer() == m_owningLayer->ancestorScrollingLayer();
319 if (hasAncestorClippingLayer && clippingAncestorIsScrollParent) 319 if (hasAncestorClippingLayer && clippingAncestorIsScrollParent)
320 return false; 320 return false;
321 321
322 return true; 322 return true;
323 } 323 }
324 324
325 void CompositedLayerMapping::updateCompositedBounds() 325 void CompositedLayerMapping::updateCompositedBounds()
326 { 326 {
327 // We need to know if we draw content in order to update our bounds (this ha s an effect
328 // on whether or not descendands will paint into our backing). Update this v alue now.
329 updateDrawsContent(isSimpleContainerCompositingLayer());
330
327 IntRect layerBounds = compositor()->calculateCompositedBounds(m_owningLayer, m_owningLayer); 331 IntRect layerBounds = compositor()->calculateCompositedBounds(m_owningLayer, m_owningLayer);
328 332
329 // Clip to the size of the document or enclosing overflow-scroll layer. 333 // Clip to the size of the document or enclosing overflow-scroll layer.
330 // If this or an ancestor is transformed, we can't currently compute the cor rect rect to intersect with. 334 // If this or an ancestor is transformed, we can't currently compute the cor rect rect to intersect with.
331 // We'd need RenderObject::convertContainerToLocalQuad(), which doesn't yet exist. 335 // We'd need RenderObject::convertContainerToLocalQuad(), which doesn't yet exist.
332 if (shouldClipCompositedBounds()) { 336 if (shouldClipCompositedBounds()) {
333 RenderView* view = m_owningLayer->renderer()->view(); 337 RenderView* view = m_owningLayer->renderer()->view();
334 RenderLayer* rootLayer = view->layer(); 338 RenderLayer* rootLayer = view->layer();
335 339
336 LayoutRect clippingBounds; 340 LayoutRect clippingBounds;
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2006 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2003 name = "Scrolling Contents Layer"; 2007 name = "Scrolling Contents Layer";
2004 } else { 2008 } else {
2005 ASSERT_NOT_REACHED(); 2009 ASSERT_NOT_REACHED();
2006 } 2010 }
2007 2011
2008 return name; 2012 return name;
2009 } 2013 }
2010 2014
2011 } // namespace WebCore 2015 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698