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

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

Issue 322163003: Rename AncestorDependentProperties to CompositingInputs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moar renaming 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
Index: Source/core/rendering/compositing/CompositingPropertyUpdater.cpp
diff --git a/Source/core/rendering/compositing/CompositingPropertyUpdater.cpp b/Source/core/rendering/compositing/CompositingPropertyUpdater.cpp
deleted file mode 100644
index 4e9f5a1128a1a74b9f48cadb14dde968e3082509..0000000000000000000000000000000000000000
--- a/Source/core/rendering/compositing/CompositingPropertyUpdater.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-#include "core/rendering/compositing/CompositingPropertyUpdater.h"
-
-#include "core/rendering/RenderBlock.h"
-#include "core/rendering/RenderLayer.h"
-#include "core/rendering/compositing/CompositedLayerMapping.h"
-
-namespace WebCore {
-
-CompositingPropertyUpdater::CompositingPropertyUpdater(RenderLayer* rootRenderLayer)
- : m_geometryMap(UseTransforms)
- , m_rootRenderLayer(rootRenderLayer)
-{
- rootRenderLayer->updateDescendantDependentFlags();
-}
-
-CompositingPropertyUpdater::~CompositingPropertyUpdater()
-{
-}
-
-void CompositingPropertyUpdater::updateAncestorDependentProperties(RenderLayer* layer, UpdateType updateType, AncestorInfo info)
-{
- if (!layer->childNeedsToUpdateAncestorDependantProperties() && updateType != ForceUpdate)
- return;
-
- m_geometryMap.pushMappingsToAncestor(layer, layer->parent());
-
- if (layer->hasCompositedLayerMapping())
- info.enclosingCompositedLayer = layer;
-
- if (layer->needsToUpdateAncestorDependentProperties()) {
- if (info.enclosingCompositedLayer)
- info.enclosingCompositedLayer->compositedLayerMapping()->setNeedsGraphicsLayerUpdate();
- updateType = ForceUpdate;
- }
-
- if (updateType == ForceUpdate) {
- RenderLayer::AncestorDependentProperties properties;
-
- if (!layer->isRootLayer()) {
- properties.clippedAbsoluteBoundingBox = enclosingIntRect(m_geometryMap.absoluteRect(layer->boundingBoxForCompositingOverlapTest()));
- // FIXME: Setting the absBounds to 1x1 instead of 0x0 makes very little sense,
- // but removing this code will make JSGameBench sad.
- // See https://codereview.chromium.org/13912020/
- if (properties.clippedAbsoluteBoundingBox.isEmpty())
- properties.clippedAbsoluteBoundingBox.setSize(IntSize(1, 1));
-
- IntRect clipRect = pixelSnappedIntRect(layer->clipper().backgroundClipRect(ClipRectsContext(m_rootRenderLayer, AbsoluteClipRects)).rect());
- properties.clippedAbsoluteBoundingBox.intersect(clipRect);
-
- const RenderLayer* parent = layer->parent();
- properties.opacityAncestor = parent->isTransparent() ? parent : parent->ancestorDependentProperties().opacityAncestor;
- properties.transformAncestor = parent->hasTransform() ? parent : parent->ancestorDependentProperties().transformAncestor;
- properties.filterAncestor = parent->hasFilter() ? parent : parent->ancestorDependentProperties().filterAncestor;
-
- if (layer->renderer()->isOutOfFlowPositioned() && info.ancestorScrollingLayer && !layer->subtreeIsInvisible()) {
- const RenderObject* container = layer->renderer()->containingBlock();
- const RenderObject* scroller = info.ancestorScrollingLayer->renderer();
- properties.isUnclippedDescendant = scroller != container && scroller->isDescendantOf(container);
- }
- }
-
- layer->updateAncestorDependentProperties(properties);
- }
-
- if (layer->scrollsOverflow())
- info.ancestorScrollingLayer = layer;
-
- for (RenderLayer* child = layer->firstChild(); child; child = child->nextSibling())
- updateAncestorDependentProperties(child, updateType, info);
-
- m_geometryMap.popMappingsToAncestor(layer->parent());
-
- layer->clearChildNeedsToUpdateAncestorDependantProperties();
-}
-
-#if !ASSERT_DISABLED
-
-void CompositingPropertyUpdater::assertNeedsToUpdateAncestorDependantPropertiesBitsCleared(RenderLayer* layer)
-{
- ASSERT(!layer->childNeedsToUpdateAncestorDependantProperties());
- ASSERT(!layer->needsToUpdateAncestorDependentProperties());
-
- for (RenderLayer* child = layer->firstChild(); child; child = child->nextSibling())
- assertNeedsToUpdateAncestorDependantPropertiesBitsCleared(child);
-}
-
-#endif
-
-} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698