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

Unified Diff: Source/core/rendering/line/BreakingContextInlineHeaders.h

Issue 372023002: Abs-positioned objects should move with inline rel-positioned containers when the latter change wid… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 5 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 | « Source/core/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/line/BreakingContextInlineHeaders.h
diff --git a/Source/core/rendering/line/BreakingContextInlineHeaders.h b/Source/core/rendering/line/BreakingContextInlineHeaders.h
index 4459e50bcaefe4185dfc46ebbe58ba35f8cd096a..53f353d3869680d4fcb81e447bf9ffa3e2fa97d4 100644
--- a/Source/core/rendering/line/BreakingContextInlineHeaders.h
+++ b/Source/core/rendering/line/BreakingContextInlineHeaders.h
@@ -200,6 +200,7 @@ inline bool requiresLineBox(const InlineIterator& it, const LineInfo& lineInfo =
inline void setStaticPositions(RenderBlockFlow* block, RenderBox* child)
{
+ ASSERT(child->isOutOfFlowPositioned());
// FIXME: The math here is actually not really right. It's a best-guess approximation that
// will work for the common cases
RenderObject* containerBlock = child->container();
@@ -210,6 +211,10 @@ inline void setStaticPositions(RenderBlockFlow* block, RenderBox* child)
// inline so that we can obtain the value later.
toRenderInline(containerBlock)->layer()->setStaticInlinePosition(block->startAlignedOffsetForLine(blockHeight, false));
toRenderInline(containerBlock)->layer()->setStaticBlockPosition(blockHeight);
+
+ // If |child| is a leading or trailing positioned object this is its only opportunity to ensure it moves with an inline
+ // container changing width.
+ child->moveWithEdgeOfInlineContainerIfNecessary(child->isHorizontalWritingMode());
}
block->updateStaticInlinePositionForChild(child, blockHeight);
child->layer()->setStaticBlockPosition(blockHeight);
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698