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

Unified Diff: sky/engine/core/rendering/RenderBlock.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/rendering/PaintInvalidationState.cpp ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBlock.cpp
diff --git a/sky/engine/core/rendering/RenderBlock.cpp b/sky/engine/core/rendering/RenderBlock.cpp
index f79bd3f255bd9b7c2be4dec7de64608b1b6d680d..a558a4f485150874f197e1d39f36b42c61371f39 100644
--- a/sky/engine/core/rendering/RenderBlock.cpp
+++ b/sky/engine/core/rendering/RenderBlock.cpp
@@ -1096,10 +1096,7 @@ void RenderBlock::addOverflowFromPositionedObjects()
TrackedRendererListHashSet::iterator end = positionedDescendants->end();
for (TrackedRendererListHashSet::iterator it = positionedDescendants->begin(); it != end; ++it) {
positionedObject = *it;
-
- // Fixed positioned elements don't contribute to layout overflow, since they don't scroll with the content.
- if (positionedObject->style()->position() != FixedPosition)
- addOverflowFromChild(positionedObject, LayoutSize(positionedObject->x(), positionedObject->y()));
+ addOverflowFromChild(positionedObject, LayoutSize(positionedObject->x(), positionedObject->y()));
}
}
@@ -1204,33 +1201,7 @@ bool RenderBlock::simplifiedLayout()
void RenderBlock::markFixedPositionObjectForLayoutIfNeeded(RenderObject* child, SubtreeLayoutScope& layoutScope)
{
- if (child->style()->position() != FixedPosition)
- return;
-
- bool hasStaticBlockPosition = child->style()->hasStaticBlockPosition(isHorizontalWritingMode());
- bool hasStaticInlinePosition = child->style()->hasStaticInlinePosition(isHorizontalWritingMode());
- if (!hasStaticBlockPosition && !hasStaticInlinePosition)
- return;
-
- RenderObject* o = child->parent();
- while (o && !o->isRenderView() && o->style()->position() != AbsolutePosition)
- o = o->parent();
- if (o->style()->position() != AbsolutePosition)
- return;
-
- RenderBox* box = toRenderBox(child);
- if (hasStaticInlinePosition) {
- LogicalExtentComputedValues computedValues;
- box->computeLogicalWidth(computedValues);
- LayoutUnit newLeft = computedValues.m_position;
- if (newLeft != box->logicalLeft())
- layoutScope.setChildNeedsLayout(child);
- } else if (hasStaticBlockPosition) {
- LayoutUnit oldTop = box->logicalTop();
- box->updateLogicalHeight();
- if (box->logicalTop() != oldTop)
- layoutScope.setChildNeedsLayout(child);
- }
+ // FIXME(sky): Remove
}
LayoutUnit RenderBlock::marginIntrinsicLogicalWidthForChild(RenderBox* child) const
@@ -3195,7 +3166,7 @@ bool RenderBlock::recalcChildOverflowAfterStyleChange()
if (!box->needsOverflowRecalcAfterStyleChange())
continue;
RenderBlock* block = toRenderBlock(box);
- if (!block->recalcOverflowAfterStyleChange() || box->style()->position() == FixedPosition)
+ if (!block->recalcOverflowAfterStyleChange())
continue;
childrenOverflowChanged = true;
« no previous file with comments | « sky/engine/core/rendering/PaintInvalidationState.cpp ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698