Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
index 1c5a2d9ed0e9e69867a937c85c60985efbb795b9..6abb8c9b86f975b0c840b9de557dbfc8828b50e0 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
@@ -2287,6 +2287,12 @@ void LayoutBlockFlow::setStaticInlinePositionForChild(LayoutBox& child, LayoutUn |
child.layer()->setStaticInlinePosition(inlinePosition); |
} |
+LayoutInline* LayoutBlockFlow::inlineElementContinuation() const |
+{ |
+ LayoutBoxModelObject* continuation = this->continuation(); |
+ return continuation && continuation->isInline() ? toLayoutInline(continuation) : nullptr; |
+} |
+ |
void LayoutBlockFlow::addChild(LayoutObject* newChild, LayoutObject* beforeChild) |
{ |
if (LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { |
@@ -3336,6 +3342,18 @@ bool LayoutBlockFlow::hitTestFloats(HitTestResult& result, const HitTestLocation |
return false; |
} |
+LayoutSize LayoutBlockFlow::accumulateInFlowPositionOffsets() const |
+{ |
+ if (!isAnonymousBlock() || !isInFlowPositioned()) |
+ return LayoutSize(); |
+ LayoutSize offset; |
+ for (const LayoutObject* p = inlineElementContinuation(); p && p->isLayoutInline(); p = p->parent()) { |
+ if (p->isInFlowPositioned()) |
+ offset += toLayoutInline(p)->offsetForInFlowPosition(); |
+ } |
+ return offset; |
+} |
+ |
LayoutUnit LayoutBlockFlow::logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const |
{ |
if (m_floatingObjects && m_floatingObjects->hasLeftObjects()) |