mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Remove layerIsContainerForFixedPositionLayers.
We don't have fixed position. We'll later need to remove this functionality from cc as well. R=abarth@chromium.org Review URL: https://codereview.chromium.org/680263005
This commit is contained in:
parent
6e77ef1031
commit
f11504f4e8
@ -154,12 +154,6 @@ void ScrollingCoordinator::updateAfterCompositingChangeIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
void ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers(GraphicsLayer* layer, bool enable)
|
||||
{
|
||||
if (WebLayer* scrollableLayer = toWebLayer(layer))
|
||||
scrollableLayer->setIsContainerForFixedPositionLayers(enable);
|
||||
}
|
||||
|
||||
void ScrollingCoordinator::willDestroyScrollableArea(ScrollableArea* scrollableArea)
|
||||
{
|
||||
removeWebScrollbarLayer(scrollableArea, HorizontalScrollbar);
|
||||
|
||||
@ -96,7 +96,6 @@ public:
|
||||
// Returns true if the coordinator handled this change.
|
||||
bool scrollableAreaScrollLayerDidChange(ScrollableArea*);
|
||||
void scrollableAreaScrollbarLayerDidChange(ScrollableArea*, ScrollbarOrientation);
|
||||
void setLayerIsContainerForFixedPositionLayers(GraphicsLayer*, bool);
|
||||
void touchEventTargetRectsDidChange();
|
||||
void willDestroyRenderLayer(RenderLayer*);
|
||||
|
||||
|
||||
@ -652,7 +652,6 @@ void CompositedLayerMapping::updateGraphicsLayerGeometry(const RenderLayer* comp
|
||||
updateShouldFlattenTransform();
|
||||
updateChildrenTransform();
|
||||
updateScrollParent(compositor()->preferCompositingToLCDTextEnabled() ? m_owningLayer.scrollParent() : 0);
|
||||
registerScrollingLayers();
|
||||
|
||||
updateCompositingReasons();
|
||||
}
|
||||
@ -919,23 +918,6 @@ void CompositedLayerMapping::updateBackgroundLayerGeometry(const FloatSize& rela
|
||||
m_backgroundLayer->setOffsetFromRenderer(m_graphicsLayer->offsetFromRenderer());
|
||||
}
|
||||
|
||||
void CompositedLayerMapping::registerScrollingLayers()
|
||||
{
|
||||
// FIXME(sky): Remove this whole function. I think this doesn't do anything now that we don't support position:fixed.
|
||||
|
||||
// Register fixed position layers and their containers with the scrolling coordinator.
|
||||
ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m_owningLayer);
|
||||
if (!scrollingCoordinator)
|
||||
return;
|
||||
|
||||
// Page scale is applied as a transform on the root render view layer. Because the scroll
|
||||
// layer is further up in the hierarchy, we need to avoid marking the root render view
|
||||
// layer as a container.
|
||||
bool isContainer = m_owningLayer.hasTransform() && !m_owningLayer.isRootLayer();
|
||||
// FIXME: we should make certain that childForSuperLayers will never be the m_squashingContainmentLayer here
|
||||
scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(childForSuperlayers(), isContainer);
|
||||
}
|
||||
|
||||
void CompositedLayerMapping::updateInternalHierarchy()
|
||||
{
|
||||
// m_foregroundLayer has to be inserted in the correct order with child layers,
|
||||
|
||||
@ -253,7 +253,6 @@ private:
|
||||
void updateDrawsContent();
|
||||
void updateChildrenTransform();
|
||||
void updateCompositedBounds();
|
||||
void registerScrollingLayers();
|
||||
|
||||
// Also sets subpixelAccumulation on the layer.
|
||||
void computeBoundsOfOwningLayer(const RenderLayer* compositedAncestor, IntRect& localCompositingBounds, IntRect& compositingBoundsRelativeToCompositedAncestor, LayoutPoint& offsetFromCompositedAncestor, IntPoint& snappedOffsetFromCompositedAncestor);
|
||||
|
||||
@ -791,8 +791,6 @@ void RenderLayerCompositor::ensureRootLayer()
|
||||
m_containerLayer->setMasksToBounds(containerMasksToBounds);
|
||||
|
||||
m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
|
||||
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
|
||||
scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(m_scrollLayer.get(), true);
|
||||
|
||||
// Hook them up
|
||||
m_overflowControlsHostLayer->addChild(m_containerLayer.get());
|
||||
|
||||
@ -186,9 +186,6 @@ public:
|
||||
virtual void setTouchEventHandlerRegion(const WebVector<WebRect>&) = 0;
|
||||
virtual WebVector<WebRect> touchEventHandlerRegion() const = 0;
|
||||
|
||||
virtual void setIsContainerForFixedPositionLayers(bool) = 0;
|
||||
virtual bool isContainerForFixedPositionLayers() const = 0;
|
||||
|
||||
// The scroll client is notified when the scroll position of the WebLayer
|
||||
// changes. Only a single scroll client can be set for a WebLayer at a time.
|
||||
// The WebLayer does not take ownership of the scroll client, and it is the
|
||||
|
||||
@ -379,14 +379,6 @@ WebVector<WebRect> WebLayerImpl::touchEventHandlerRegion() const {
|
||||
return result;
|
||||
}
|
||||
|
||||
void WebLayerImpl::setIsContainerForFixedPositionLayers(bool enable) {
|
||||
layer_->SetIsContainerForFixedPositionLayers(enable);
|
||||
}
|
||||
|
||||
bool WebLayerImpl::isContainerForFixedPositionLayers() const {
|
||||
return layer_->IsContainerForFixedPositionLayers();
|
||||
}
|
||||
|
||||
void WebLayerImpl::setScrollClient(blink::WebLayerScrollClient* scroll_client) {
|
||||
if (scroll_client) {
|
||||
layer_->set_did_scroll_callback(
|
||||
|
||||
@ -123,8 +123,6 @@ class WebLayerImpl : public blink::WebLayer, public cc::LayerClient {
|
||||
virtual void setTouchEventHandlerRegion(
|
||||
const blink::WebVector<blink::WebRect>& region);
|
||||
virtual blink::WebVector<blink::WebRect> touchEventHandlerRegion() const;
|
||||
virtual void setIsContainerForFixedPositionLayers(bool is_container);
|
||||
virtual bool isContainerForFixedPositionLayers() const;
|
||||
virtual void setScrollClient(blink::WebLayerScrollClient* client);
|
||||
virtual bool isOrphan() const;
|
||||
virtual void setWebLayerClient(blink::WebLayerClient* client);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user