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

Unified Diff: sky/engine/core/page/scrolling/ScrollingCoordinator.cpp

Issue 686633002: First pass at removing position:fixed. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/engine/core/frame/FrameView.cpp ('k') | sky/engine/core/rendering/ClipRects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/sky/engine/core/page/scrolling/ScrollingCoordinator.cpp b/sky/engine/core/page/scrolling/ScrollingCoordinator.cpp
index eb7b19f26d2c16922af147f9cf9e03bf00b230b0..f94cf7b04dca3fe1535f9a7db46706b21579d686 100644
--- a/sky/engine/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/sky/engine/core/page/scrolling/ScrollingCoordinator.cpp
@@ -169,20 +169,7 @@ static void clearPositionConstraintExceptForLayer(GraphicsLayer* layer, Graphics
static WebLayerPositionConstraint computePositionConstraint(const RenderLayer* layer)
{
- ASSERT(layer->hasCompositedLayerMapping());
- do {
- if (layer->renderer()->style()->position() == FixedPosition) {
- const RenderObject* fixedPositionObject = layer->renderer();
- bool fixedToRight = !fixedPositionObject->style()->right().isAuto();
- bool fixedToBottom = !fixedPositionObject->style()->bottom().isAuto();
- return WebLayerPositionConstraint::fixedPosition(fixedToRight, fixedToBottom);
- }
-
- layer = layer->parent();
-
- // Composited layers that inherit a fixed position state will be positioned with respect to the nearest compositedLayerMapping's GraphicsLayer.
- // So, once we find a layer that has its own compositedLayerMapping, we can stop searching for a fixed position RenderObject.
- } while (layer && !layer->hasCompositedLayerMapping());
+ // FIXME(sky): Remove
return WebLayerPositionConstraint();
}
@@ -791,30 +778,7 @@ void ScrollingCoordinator::handleWheelEventPhase(PlatformWheelEventPhase phase)
bool ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects(FrameView* frameView) const
{
- const FrameView::ViewportConstrainedObjectSet* viewportConstrainedObjects = frameView->viewportConstrainedObjects();
- if (!viewportConstrainedObjects)
- return false;
-
- for (FrameView::ViewportConstrainedObjectSet::const_iterator it = viewportConstrainedObjects->begin(), end = viewportConstrainedObjects->end(); it != end; ++it) {
- RenderObject* renderer = *it;
- ASSERT(renderer->isBoxModelObject() && renderer->hasLayer());
- ASSERT(renderer->style()->position() == FixedPosition);
- RenderLayer* layer = toRenderBoxModelObject(renderer)->layer();
-
- // Whether the RenderLayer scrolls with the viewport is a tree-depenent
- // property and our viewportConstrainedObjects collection is maintained
- // with only RenderObject-level information.
- if (!layer->scrollsWithViewport())
- continue;
-
- // We're only smart enough to scroll viewport-constrainted objects
- // in the compositor if they have their own backing or they paint
- // into a grouped back (which necessarily all have the same viewport
- // constraints).
- CompositingState compositingState = layer->compositingState();
- if (compositingState != PaintsIntoOwnBacking && compositingState != PaintsIntoGroupedBacking)
- return true;
- }
+ // FIXME(sky): Remove
return false;
}
« no previous file with comments | « sky/engine/core/frame/FrameView.cpp ('k') | sky/engine/core/rendering/ClipRects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698