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

Unified Diff: Source/WebCore/rendering/RenderLayerBacking.cpp

Issue 9120020: Revert 98735 - Source/WebCore: The HTML5 video element in Safari does not respect "visibility:hid... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 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/WebCore/rendering/RenderLayerBacking.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderLayerBacking.cpp
===================================================================
--- Source/WebCore/rendering/RenderLayerBacking.cpp (revision 104364)
+++ Source/WebCore/rendering/RenderLayerBacking.cpp (working copy)
@@ -361,9 +361,6 @@
if (!renderer()->animation()->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity))
updateLayerOpacity(renderer()->style());
- m_owningLayer->updateVisibilityStatus();
- m_graphicsLayer->setContentsVisible(m_owningLayer->hasVisibleContent());
-
RenderStyle* style = renderer()->style();
m_graphicsLayer->setPreserves3D(style->transformStyle3D() == TransformStyle3DPreserve3D && !renderer()->hasReflection());
m_graphicsLayer->setBackfaceVisibility(style->backfaceVisibility() == BackfaceVisibilityVisible);
@@ -792,15 +789,14 @@
return false;
RenderStyle* style = renderObject->style();
- bool isVisible = m_owningLayer->hasVisibleContent();
// Reject anything that has a border, a border-radius or outline,
// or any background (color or image).
// FIXME: we could optimize layers for simple backgrounds.
- if (isVisible && hasBoxDecorationsOrBackground(renderObject))
+ if (hasBoxDecorationsOrBackground(renderObject))
return false;
- if (isVisible && m_owningLayer->hasOverflowControls())
+ if (m_owningLayer->hasOverflowControls())
return false;
// If we have got this far and the renderer has no children, then we're ok.
@@ -832,21 +828,21 @@
return false;
// Check to see if all the body's children are compositing layers.
- if (hasVisibleNonCompositingDescendants())
+ if (hasNonCompositingDescendants())
return false;
return true;
}
// Check to see if all the renderer's children are compositing layers.
- if (isVisible && hasVisibleNonCompositingDescendants())
+ if (hasNonCompositingDescendants())
return false;
return true;
}
// Conservative test for having no rendered children.
-bool RenderLayerBacking::hasVisibleNonCompositingDescendants() const
+bool RenderLayerBacking::hasNonCompositingDescendants() const
{
// Some HTML can cause whitespace text nodes to have renderers, like:
// <div>
@@ -863,25 +859,13 @@
}
}
- if (Vector<RenderLayer*>* normalFlowList = m_owningLayer->normalFlowList()) {
- size_t listSize = normalFlowList->size();
- for (size_t i = 0; i < listSize; ++i) {
- RenderLayer* curLayer = normalFlowList->at(i);
- if (!curLayer->isComposited() && curLayer->hasVisibleContent())
- return true;
- }
- }
-
if (m_owningLayer->isStackingContext()) {
- if (!m_owningLayer->hasVisibleDescendant())
- return false;
-
// Use the m_hasCompositingDescendant bit to optimize?
if (Vector<RenderLayer*>* negZOrderList = m_owningLayer->negZOrderList()) {
size_t listSize = negZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = negZOrderList->at(i);
- if (!curLayer->isComposited() && curLayer->hasVisibleContent())
+ if (!curLayer->isComposited())
return true;
}
}
@@ -890,12 +874,21 @@
size_t listSize = posZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = posZOrderList->at(i);
- if (!curLayer->isComposited() && curLayer->hasVisibleContent())
+ if (!curLayer->isComposited())
return true;
}
}
}
+ if (Vector<RenderLayer*>* normalFlowList = m_owningLayer->normalFlowList()) {
+ size_t listSize = normalFlowList->size();
+ for (size_t i = 0; i < listSize; ++i) {
+ RenderLayer* curLayer = normalFlowList->at(i);
+ if (!curLayer->isComposited())
+ return true;
+ }
+ }
+
return false;
}
« no previous file with comments | « Source/WebCore/rendering/RenderLayerBacking.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698