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

Unified Diff: Source/core/layout/LayoutBlockFlowLine.cpp

Issue 1164933006: Create LineLayout api (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase + nits Created 5 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/layout/LayoutBlockFlow.cpp ('k') | Source/core/layout/LayoutBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBlockFlowLine.cpp
diff --git a/Source/core/layout/LayoutBlockFlowLine.cpp b/Source/core/layout/LayoutBlockFlowLine.cpp
index 8d5afbad9e49f34f9428fdb51afb3e2ee2a09744..424dc88a4f48a6f694a19fca94b2c63484303156 100644
--- a/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -32,6 +32,7 @@
#include "core/layout/LayoutView.h"
#include "core/layout/TextRunConstructor.h"
#include "core/layout/VerticalPositionCache.h"
+#include "core/layout/api/LineLayoutItem.h"
#include "core/layout/line/BreakingContextInlineHeaders.h"
#include "core/layout/line/GlyphOverflow.h"
#include "core/layout/line/LayoutTextInfo.h"
@@ -783,7 +784,7 @@ void LayoutBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState,
LayoutTextInfo layoutTextInfo;
VerticalPositionCache verticalPositionCache;
- LineBreaker lineBreaker(this);
+ LineBreaker lineBreaker(LineLayoutBlockFlow(this));
while (!endOfLine.atEnd()) {
bool logicalWidthIsAvailable = false;
@@ -881,7 +882,7 @@ void LayoutBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState,
if (!logicalWidthIsAvailable) {
for (size_t i = 0; i < lineBreaker.positionedObjects().size(); ++i)
- setStaticPositions(this, lineBreaker.positionedObjects()[i]);
+ setStaticPositions(LineLayoutBlockFlow(this), lineBreaker.positionedObjects()[i]);
if (!layoutState.lineInfo().isEmpty())
layoutState.lineInfo().setFirstLine(false);
@@ -1742,7 +1743,7 @@ RootInlineBox* LayoutBlockFlow::determineStartPosition(LineLayoutState& layoutSt
if (last) {
setLogicalHeight(last->lineBottomWithLeading());
- InlineIterator iter = InlineIterator(this, last->lineBreakObj(), last->lineBreakPos());
+ InlineIterator iter = InlineIterator(LineLayoutBlockFlow(this), LineLayoutItem(last->lineBreakObj()), last->lineBreakPos());
resolver.setPosition(iter, numberOfIsolateAncestors(iter));
resolver.setStatus(last->lineBreakBidiStatus());
} else {
@@ -1750,7 +1751,7 @@ RootInlineBox* LayoutBlockFlow::determineStartPosition(LineLayoutState& layoutSt
if (style()->unicodeBidi() == Plaintext)
direction = determinePlaintextDirectionality(this);
resolver.setStatus(BidiStatus(direction, isOverride(style()->unicodeBidi())));
- InlineIterator iter = InlineIterator(this, bidiFirstSkippingEmptyInlines(this, resolver.runs(), &resolver), 0);
+ InlineIterator iter = InlineIterator(LineLayoutBlockFlow(this), bidiFirstSkippingEmptyInlines(LineLayoutBlockFlow(this), resolver.runs(), &resolver), 0);
resolver.setPosition(iter, numberOfIsolateAncestors(iter));
}
return curr;
@@ -1794,7 +1795,7 @@ void LayoutBlockFlow::determineEndPosition(LineLayoutState& layoutState, RootInl
// in the block.
RootInlineBox* prev = last->prevRootBox();
- cleanLineStart = InlineIterator(this, prev->lineBreakObj(), prev->lineBreakPos());
+ cleanLineStart = InlineIterator(LineLayoutItem(this), LineLayoutItem(prev->lineBreakObj()), prev->lineBreakPos());
cleanLineBidiStatus = prev->lineBreakBidiStatus();
layoutState.setEndLineLogicalTop(prev->lineBottomWithLeading());
@@ -1890,7 +1891,7 @@ bool LayoutBlockFlow::generatesLineBoxesForInlineChild(LayoutObject* inlineObj)
{
ASSERT(inlineObj->parent() == this);
- InlineIterator it(this, inlineObj, 0);
+ InlineIterator it(LineLayoutBlockFlow(this), LineLayoutItem(inlineObj), 0);
// FIXME: We should pass correct value for WhitespacePosition.
while (!it.atEnd() && !requiresLineBox(it))
it.increment();
« no previous file with comments | « Source/core/layout/LayoutBlockFlow.cpp ('k') | Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698