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

Unified Diff: Source/core/paint/DeprecatedPaintLayer.cpp

Issue 1198273003: Get rid of old flow thread comments and asserts in accumulateOffsetTowardsAncestor(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase master for fun and profit Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/DeprecatedPaintLayer.cpp
diff --git a/Source/core/paint/DeprecatedPaintLayer.cpp b/Source/core/paint/DeprecatedPaintLayer.cpp
index affc215ca181c69ad20eb870a947e2911e1a6930..35816c7fce8fc8f7916048454bae7897b8e2df9d 100644
--- a/Source/core/paint/DeprecatedPaintLayer.cpp
+++ b/Source/core/paint/DeprecatedPaintLayer.cpp
@@ -1266,11 +1266,6 @@ static inline const DeprecatedPaintLayer* accumulateOffsetTowardsAncestor(const
const LayoutBoxModelObject* layoutObject = layer->layoutObject();
EPosition position = layoutObject->style()->position();
- // FIXME: Positioning of out-of-flow(fixed, absolute) elements collected in a LayoutFlowThread
- // may need to be revisited in a future patch.
- // If the fixed layoutObject is inside a LayoutFlowThread, we should not compute location using localToAbsolute,
- // since localToAbsolute maps the coordinates from flow thread to column set coordinates and column sets can be
- // positioned in a completely different place in the viewport (LayoutView).
if (position == FixedPosition && (!ancestorLayer || ancestorLayer == layoutObject->view()->layer())) {
// If the fixed layer's container is the root, just add in the offset of the view. We can obtain this by calling
// localToAbsolute() on the LayoutView.
@@ -1279,9 +1274,6 @@ static inline const DeprecatedPaintLayer* accumulateOffsetTowardsAncestor(const
return ancestorLayer;
}
- // For the fixed positioned elements inside a layout flow thread, we should also skip the code path below
- // Otherwise, for the case of ancestorLayer == rootLayer and fixed positioned element child of a transformed
- // element in layout flow thread, we will hit the fixed positioned container before hitting the ancestor layer.
if (position == FixedPosition) {
// For a fixed layers, we need to walk up to the root to see if there's a fixed position container
// (e.g. a transformed layer). It's an error to call convertToLayerCoords() across a layer with a transform,
@@ -1332,9 +1324,6 @@ static inline const DeprecatedPaintLayer* accumulateOffsetTowardsAncestor(const
parentLayer = layer->parent();
bool foundAncestorFirst = false;
while (parentLayer) {
- // LayoutFlowThread is a positioned container, child of LayoutView, positioned at (0,0).
- // This implies that, for out-of-flow positioned elements inside a LayoutFlowThread,
- // we are bailing out before reaching root layer.
if (parentLayer->isPositionedContainer())
break;
@@ -1346,10 +1335,6 @@ static inline const DeprecatedPaintLayer* accumulateOffsetTowardsAncestor(const
parentLayer = parentLayer->parent();
}
- // We should not reach LayoutView layer past the LayoutFlowThread layer for any
- // children of the LayoutFlowThread.
- ASSERT(!layoutObject->flowThreadContainingBlock() || parentLayer != layoutObject->view()->layer());
-
if (foundAncestorFirst) {
// Found ancestorLayer before the abs. positioned container, so compute offset of both relative
// to enclosingPositionedAncestor and subtract.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698