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

Unified Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 329553003: Delete now-unnecessary hack for 0-size layers, now that we use transformOrigin (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/compositing/CompositedLayerMapping.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/compositing/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.cpp b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
index 828d0c2865ac324b37e1df9c82870a8e0e0e5b65..4bf8813d002aad97c923b5d34494febae5040e0a 100644
--- a/Source/core/rendering/compositing/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
@@ -162,7 +162,6 @@ static ScrollingCoordinator* scrollingCoordinatorFromLayer(RenderLayer& layer)
CompositedLayerMapping::CompositedLayerMapping(RenderLayer& layer)
: m_owningLayer(layer)
- , m_artificiallyInflatedBounds(false)
, m_isMainFrameRenderViewLayer(false)
, m_requiresOwnBackingStoreForIntrinsicReasons(true)
, m_requiresOwnBackingStoreForAncestorReasons(true)
@@ -319,36 +318,13 @@ void CompositedLayerMapping::updateContentsOpaque()
}
}
-static bool hasNonZeroTransformOrigin(const RenderObject* renderer)
-{
- RenderStyle* style = renderer->style();
- return (style->transformOriginX().type() == Fixed && style->transformOriginX().value())
- || (style->transformOriginY().type() == Fixed && style->transformOriginY().value());
-}
-
void CompositedLayerMapping::updateCompositedBounds(GraphicsLayerUpdater::UpdateType updateType)
{
if (!shouldUpdateGraphicsLayer(updateType))
return;
- LayoutRect layerBounds = m_owningLayer.boundingBoxForCompositing();
-
- // FIXME: either move this hack to RenderLayer or find a way to get rid of it. Removing it from here
- // will alow us to get rid of m_compositedBounds.
-
- // If the element has a transform-origin that has fixed lengths, and the renderer has zero size,
- // then we need to ensure that the compositing layer has non-zero size so that we can apply
- // the transform-origin via the GraphicsLayer anchorPoint (which is expressed as a fractional value).
- // FIXME: this code is no longer necessary, remove.
- if (layerBounds.isEmpty() && hasNonZeroTransformOrigin(renderer())) {
- layerBounds.setWidth(1);
- layerBounds.setHeight(1);
- m_artificiallyInflatedBounds = true;
- } else {
- m_artificiallyInflatedBounds = false;
- }
-
- m_compositedBounds = layerBounds;
+ // FIXME: if this is really needed for performance, it would be better to store it on RenderLayer.
+ m_compositedBounds = m_owningLayer.boundingBoxForCompositing();
}
void CompositedLayerMapping::updateAfterWidgetResize()
@@ -1627,7 +1603,7 @@ bool CompositedLayerMapping::hasVisibleNonCompositingDescendant(RenderLayer* par
bool CompositedLayerMapping::containsPaintedContent() const
{
- if (paintsIntoCompositedAncestor() || m_artificiallyInflatedBounds || m_owningLayer.isReflection())
+ if (paintsIntoCompositedAncestor() || m_owningLayer.isReflection())
return false;
if (isDirectlyCompositedImage())
« no previous file with comments | « Source/core/rendering/compositing/CompositedLayerMapping.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698