Commit 1e265264 authored by abarth@chromium.org's avatar abarth@chromium.org

Remove RenderLayer::m_hasUnclippedDescendant

No one reads this state.

Review URL: https://codereview.chromium.org/310543002

git-svn-id: svn://svn.chromium.org/blink/trunk@175204 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c2e976a2
......@@ -111,7 +111,6 @@ RenderLayer::RenderLayer(RenderLayerModelObject* renderer, LayerType type)
, m_hasSelfPaintingLayerDescendantDirty(false)
, m_hasOutOfFlowPositionedDescendant(false)
, m_hasOutOfFlowPositionedDescendantDirty(true)
, m_hasUnclippedDescendant(false)
, m_isUnclippedDescendant(false)
, m_isRootLayer(renderer->isRenderView())
, m_usedTransparency(false)
......@@ -369,10 +368,6 @@ void RenderLayer::dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus()
for (RenderLayer* layer = this; layer; layer = layer->parent()) {
layer->setHasOutOfFlowPositionedDescendantDirty(true);
// We may or may not have an unclipped descendant. If we do, we'll reset
// this to true the next time composited scrolling state is updated.
layer->setHasUnclippedDescendant(false);
// If we have reached an out of flow positioned layer, we know our parent should have an out-of-flow positioned descendant.
// In this case, there is no need to dirty our ancestors further.
if (layer->renderer()->isOutOfFlowPositioned()) {
......@@ -807,9 +802,9 @@ void RenderLayer::setAncestorChainHasVisibleDescendant()
}
}
void RenderLayer::updateHasUnclippedDescendant()
void RenderLayer::updateIsUnclippedDescendant()
{
TRACE_EVENT0("blink_rendering", "RenderLayer::updateHasUnclippedDescendant");
TRACE_EVENT0("blink_rendering", "RenderLayer::updateIsUnclippedDescendant");
ASSERT(renderer()->isOutOfFlowPositioned());
if (!m_hasVisibleContent && !m_hasVisibleDescendant)
return;
......@@ -818,8 +813,9 @@ void RenderLayer::updateHasUnclippedDescendant()
if (!frameView)
return;
const RenderObject* containingBlock = renderer()->containingBlock();
setIsUnclippedDescendant(false);
const RenderObject* containingBlock = renderer()->containingBlock();
for (RenderLayer* ancestor = parent(); ancestor && ancestor->renderer() != containingBlock; ancestor = ancestor->parent()) {
// TODO(vollick): This isn't quite right. Whenever ancestor is composited and clips
// overflow, we're technically unclipped. However, this will currently cause a huge
......@@ -828,9 +824,10 @@ void RenderLayer::updateHasUnclippedDescendant()
// compositor, we will be able to relax this restriction without it being prohibitively
// expensive (currently, we have to do a lot of work in the compositor to honor a
// clip child/parent relationship).
if (ancestor->scrollsOverflow())
if (ancestor->scrollsOverflow()) {
setIsUnclippedDescendant(true);
ancestor->setHasUnclippedDescendant(true);
return;
}
}
}
......@@ -3749,12 +3746,6 @@ void RenderLayer::updateOutOfFlowPositioned(const RenderStyle* oldStyle)
if (!wasOutOfFlowPositioned && !isOutOfFlowPositioned)
return;
// Even if the layer remains out-of-flow, a change to this property
// will likely change its containing block. We must clear these bits
// so that they can be set properly by the RenderLayerCompositor.
for (RenderLayer* ancestor = parent(); ancestor; ancestor = ancestor->parent())
ancestor->setHasUnclippedDescendant(false);
// Ensures that we reset the above bits correctly.
compositor()->setNeedsUpdateCompositingRequirementsState();
......
......@@ -212,13 +212,10 @@ public:
void setHasOutOfFlowPositionedDescendant(bool hasDescendant) { m_hasOutOfFlowPositionedDescendant = hasDescendant; }
void setHasOutOfFlowPositionedDescendantDirty(bool dirty) { m_hasOutOfFlowPositionedDescendantDirty = dirty; }
bool hasUnclippedDescendant() const { return m_hasUnclippedDescendant; }
void setHasUnclippedDescendant(bool hasDescendant) { m_hasUnclippedDescendant = hasDescendant; }
void updateHasUnclippedDescendant();
void updateIsUnclippedDescendant();
bool isUnclippedDescendant() const { return m_isUnclippedDescendant; }
// Will ensure that hasUnclippedDescendant and hasNonCompositiedChild are up to date.
// Will ensure that hasNonCompositiedChild are up to date.
void updateScrollingStateAfterCompositingChange();
bool hasVisibleNonLayerContent() const { return m_hasVisibleNonLayerContent; }
bool hasNonCompositedChild() const { ASSERT(isAllowedToQueryCompositingState()); return m_hasNonCompositedChild; }
......@@ -643,12 +640,6 @@ private:
unsigned m_hasOutOfFlowPositionedDescendant : 1;
unsigned m_hasOutOfFlowPositionedDescendantDirty : 1;
// This is true if we have an out-of-flow positioned descendant whose
// containing block is our ancestor. If this is the case, the descendant
// may fall outside of our clip preventing things like opting into
// composited scrolling (which causes clipping of all descendants).
unsigned m_hasUnclippedDescendant : 1;
unsigned m_isUnclippedDescendant : 1;
const unsigned m_isRootLayer : 1;
......
......@@ -240,7 +240,7 @@ void RenderLayerCompositor::updateCompositingRequirementsState()
return;
for (HashSet<RenderLayer*>::iterator it = m_outOfFlowPositionedLayers.begin(); it != m_outOfFlowPositionedLayers.end(); ++it)
(*it)->updateHasUnclippedDescendant();
(*it)->updateIsUnclippedDescendant();
}
static RenderVideo* findFullscreenVideoRenderer(Document& document)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment