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

Unified Diff: sky/engine/core/rendering/RenderBox.cpp

Issue 686653002: Remove a bunch of fixed position dead code. (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/rendering/RenderBox.h ('k') | sky/engine/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBox.cpp
diff --git a/sky/engine/core/rendering/RenderBox.cpp b/sky/engine/core/rendering/RenderBox.cpp
index 2f358d2c71f323e9acd6842038f379beb28583b9..23feac4b19ad2a11ece75ed679e3f3b864005373 100644
--- a/sky/engine/core/rendering/RenderBox.cpp
+++ b/sky/engine/core/rendering/RenderBox.cpp
@@ -421,9 +421,9 @@ void RenderBox::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumul
rects.append(pixelSnappedIntRect(accumulatedOffset, size()));
}
-void RenderBox::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
+void RenderBox::absoluteQuads(Vector<FloatQuad>& quads) const
{
- quads.append(localToAbsoluteQuad(FloatRect(0, 0, width().toFloat(), height().toFloat()), 0 /* mode */, wasFixed));
+ quads.append(localToAbsoluteQuad(FloatRect(0, 0, width().toFloat(), height().toFloat()), 0 /* mode */));
}
void RenderBox::updateLayerTransformAfterLayout()
@@ -1538,7 +1538,7 @@ LayoutUnit RenderBox::perpendicularContainingBlockLogicalHeight() const
return cb->adjustContentBoxLogicalHeightForBoxSizing(logicalHeightLength.value());
}
-void RenderBox::mapLocalToContainer(const RenderLayerModelObject* paintInvalidationContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const
+void RenderBox::mapLocalToContainer(const RenderLayerModelObject* paintInvalidationContainer, TransformState& transformState, MapCoordinatesFlags mode, const PaintInvalidationState* paintInvalidationState) const
{
if (paintInvalidationContainer == this)
return;
@@ -1556,15 +1556,6 @@ void RenderBox::mapLocalToContainer(const RenderLayerModelObject* paintInvalidat
if (!o)
return;
- bool hasTransform = hasLayer() && layer()->transform();
- // If this box has a transform, it acts as a fixed position container for fixed descendants,
- // and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position.
- if (hasTransform)
- mode &= ~IsFixed;
-
- if (wasFixed)
- *wasFixed = mode & IsFixed;
-
LayoutSize containerOffset = offsetFromContainer(o, roundedLayoutPoint(transformState.mappedPoint()));
bool preserve3D = mode & UseTransforms && (o->style()->preserves3D() || style()->preserves3D());
@@ -1585,19 +1576,7 @@ void RenderBox::mapLocalToContainer(const RenderLayerModelObject* paintInvalidat
mode &= ~ApplyContainerFlip;
- o->mapLocalToContainer(paintInvalidationContainer, transformState, mode, wasFixed);
-}
-
-void RenderBox::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState& transformState) const
-{
- bool hasTransform = hasLayer() && layer()->transform();
- if (hasTransform) {
- // If this box has a transform, it acts as a fixed position container for fixed descendants,
- // and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position.
- mode &= ~IsFixed;
- }
-
- RenderBoxModelObject::mapAbsoluteToLocalPoint(mode, transformState);
+ o->mapLocalToContainer(paintInvalidationContainer, transformState, mode);
}
LayoutSize RenderBox::offsetFromContainer(const RenderObject* o, const LayoutPoint& point, bool* offsetDependsOnPoint) const
« no previous file with comments | « sky/engine/core/rendering/RenderBox.h ('k') | sky/engine/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698