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

Unified Diff: Source/core/rendering/RenderBlockLineLayout.cpp

Issue 940373003: Rename RenderText to LayoutText (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Merge w/HEAD again Created 5 years, 10 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
Index: Source/core/rendering/RenderBlockLineLayout.cpp
diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp
index 66dd4b38d32057db1453819b853543d363b62471..83af35e7dd021c4370062fefbfa623f1328780dc 100644
--- a/Source/core/rendering/RenderBlockLineLayout.cpp
+++ b/Source/core/rendering/RenderBlockLineLayout.cpp
@@ -69,7 +69,7 @@ static inline InlineBox* createInlineBoxForRenderer(LayoutObject* obj, bool isRo
static inline InlineTextBox* createInlineBoxForText(BidiRun& run, bool isOnlyRun)
{
ASSERT(run.m_object->isText());
- RenderText* text = toRenderText(run.m_object);
+ LayoutText* text = toLayoutText(run.m_object);
InlineTextBox* textBox = text->createInlineTextBox(run.m_start, run.m_stop - run.m_start);
// We only treat a box as text for a <br> if we are on a line by ourself or in strict mode
// (Note the use of strict mode. In "almost strict" mode, we don't treat the box for <br> as text.)
@@ -84,7 +84,7 @@ static inline InlineTextBox* createInlineBoxForText(BidiRun& run, bool isOnlyRun
static inline void dirtyLineBoxesForRenderer(LayoutObject* o, bool fullLayout)
{
if (o->isText()) {
- RenderText* renderText = toRenderText(o);
+ LayoutText* renderText = toLayoutText(o);
renderText->dirtyOrDeleteLineBoxesIfNeeded(fullLayout);
} else
toRenderInline(o)->dirtyLineBoxes(fullLayout);
@@ -182,7 +182,7 @@ static bool reachedEndOfTextRenderer(const BidiRunList<BidiRun>& bidiRuns)
LayoutObject* r = run->m_object;
if (!r->isText() || r->isBR())
return false;
- RenderText* renderText = toRenderText(r);
+ LayoutText* renderText = toLayoutText(r);
unsigned length = renderText->textLength();
if (pos >= length)
return true;
@@ -365,7 +365,7 @@ void RenderBlockFlow::setMarginsForRubyRun(BidiRun* run, LayoutRubyRun* renderer
setMarginEndForChild(*renderer, -endOverhang);
}
-static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* run, RenderText* renderer, float xPos, const LineInfo& lineInfo,
+static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* run, LayoutText* renderer, float xPos, const LineInfo& lineInfo,
GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& verticalPositionCache, WordMeasurements& wordMeasurements)
{
HashSet<const SimpleFontData*> fallbackFonts;
@@ -593,7 +593,7 @@ BidiRun* RenderBlockFlow::computeInlineDirectionPositionsForSegment(RootInlineBo
// correct static x position. They have no effect on the width.
// Similarly, line break boxes have no effect on the width.
if (r->m_object->isText()) {
- RenderText* rt = toRenderText(r->m_object);
+ LayoutText* rt = toLayoutText(r->m_object);
if (textAlign == JUSTIFY && r != trailingSpaceRun && textJustify != TextJustifyNone) {
if (!isAfterExpansion)
toInlineTextBox(r->m_box)->setCanHaveLeadingExpansion(true);
@@ -660,7 +660,7 @@ void RenderBlockFlow::computeBlockDirectionPositionsForLine(RootInlineBox* lineB
// Position is used to properly position both replaced elements and
// to update the static normal flow x/y of positioned elements.
if (r->m_object->isText())
- toRenderText(r->m_object)->positionLineBox(r->m_box);
+ toLayoutText(r->m_object)->positionLineBox(r->m_box);
else if (r->m_object->isBox())
toLayoutBox(r->m_object)->positionLineBox(r->m_box);
}
@@ -1172,7 +1172,7 @@ static inline void stripTrailingSpace(FloatWillBeLayoutUnit& inlineMax, FloatWil
// the first white-space character and subtracting its width. Subsequent
// white-space characters have been collapsed into the first one (which
// can be either a space or a tab character).
- RenderText* text = toRenderText(trailingSpaceChild);
+ LayoutText* text = toLayoutText(trailingSpaceChild);
UChar trailingWhitespaceChar = ' ';
for (unsigned i = text->textLength(); i > 0; i--) {
UChar c = text->characterAt(i - 1);
@@ -1389,7 +1389,7 @@ void RenderBlockFlow::computeInlinePreferredLogicalWidths(LayoutUnit& minLogical
}
} else if (child->isText()) {
// Case (3). Text.
- RenderText* t = toRenderText(child);
+ LayoutText* t = toLayoutText(child);
if (t->isWordBreak()) {
minLogicalWidth = std::max(minLogicalWidth, inlineMin.toLayoutUnit());
@@ -1711,7 +1711,7 @@ RootInlineBox* RenderBlockFlow::determineStartPosition(LineLayoutState& layoutSt
// We have a dirty line.
if (RootInlineBox* prevRootBox = curr->prevRootBox()) {
// We have a previous line.
- if (!dirtiedByFloat && (!prevRootBox->endsWithBreak() || !prevRootBox->lineBreakObj() || (prevRootBox->lineBreakObj()->isText() && prevRootBox->lineBreakPos() >= toRenderText(prevRootBox->lineBreakObj())->textLength())))
+ if (!dirtiedByFloat && (!prevRootBox->endsWithBreak() || !prevRootBox->lineBreakObj() || (prevRootBox->lineBreakObj()->isText() && prevRootBox->lineBreakPos() >= toLayoutText(prevRootBox->lineBreakObj())->textLength())))
// The previous line didn't break cleanly or broke at a newline
// that has been deleted, so treat it as dirty too.
curr = prevRootBox;

Powered by Google App Engine
This is Rietveld 408576698