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

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

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/layout/line/BreakingContextInlineHeaders.h
diff --git a/Source/core/layout/line/BreakingContextInlineHeaders.h b/Source/core/layout/line/BreakingContextInlineHeaders.h
index 62aa3a78d9263642f61c6a2fbaa8dee919cf493e..2f7047e900e7250c0288328d9f9a909213138887 100644
--- a/Source/core/layout/line/BreakingContextInlineHeaders.h
+++ b/Source/core/layout/line/BreakingContextInlineHeaders.h
@@ -25,6 +25,7 @@
#define BreakingContextInlineHeaders_h
#include "core/layout/Layer.h"
+#include "core/layout/LayoutCombineText.h"
#include "core/layout/LayoutListMarker.h"
#include "core/layout/LayoutObject.h"
#include "core/layout/LayoutRubyRun.h"
@@ -38,7 +39,6 @@
#include "core/layout/line/TrailingObjects.h"
#include "core/layout/line/WordMeasurement.h"
#include "core/layout/svg/LayoutSVGInlineText.h"
-#include "core/rendering/RenderCombineText.h"
#include "core/rendering/RenderInline.h"
#include "platform/text/TextBreakIterator.h"
@@ -308,7 +308,7 @@ inline LayoutUnit borderPaddingMarginEnd(RenderInline* child)
inline bool shouldAddBorderPaddingMargin(LayoutObject* child, bool &checkSide)
{
- if (!child || (child->isText() && !toRenderText(child)->textLength()))
+ if (!child || (child->isText() && !toLayoutText(child)->textLength()))
return true;
checkSide = false;
return checkSide;
@@ -392,8 +392,8 @@ inline bool shouldSkipWhitespaceAfterStartObject(RenderBlockFlow* block, LayoutO
while (next && next->isFloatingOrOutOfFlowPositioned())
next = bidiNextSkippingEmptyInlines(block, next);
- if (next && !next->isBR() && next->isText() && toRenderText(next)->textLength() > 0) {
- RenderText* nextText = toRenderText(next);
+ if (next && !next->isBR() && next->isText() && toLayoutText(next)->textLength() > 0) {
+ LayoutText* nextText = toLayoutText(next);
UChar nextChar = nextText->characterAt(0);
if (nextText->style()->isCollapsibleWhiteSpace(nextChar)) {
lineMidpointState.startIgnoringSpaces(InlineIterator(0, o, 0));
@@ -495,7 +495,7 @@ inline float firstPositiveWidth(const WordMeasurements& wordMeasurements)
return 0;
}
-inline float measureHyphenWidth(RenderText* renderer, const Font& font, TextDirection textDirection)
+inline float measureHyphenWidth(LayoutText* renderer, const Font& font, TextDirection textDirection)
{
const LayoutStyle& style = renderer->styleRef();
return font.width(constructTextRun(renderer, font,
@@ -508,7 +508,7 @@ ALWAYS_INLINE TextDirection textDirectionFromUnicode(WTF::Unicode::Direction dir
|| direction == WTF::Unicode::RightToLeftArabic ? RTL : LTR;
}
-ALWAYS_INLINE float textWidth(RenderText* text, unsigned from, unsigned len, const Font& font, float xPos, bool isFixedPitch, bool collapseWhiteSpace, HashSet<const SimpleFontData*>* fallbackFonts = 0)
+ALWAYS_INLINE float textWidth(LayoutText* text, unsigned from, unsigned len, const Font& font, float xPos, bool isFixedPitch, bool collapseWhiteSpace, HashSet<const SimpleFontData*>* fallbackFonts = 0)
{
GlyphOverflow glyphOverflow;
if (isFixedPitch || (!from && len == text->textLength()) || text->style()->hasTextCombine())
@@ -526,7 +526,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
if (!m_current.offset())
m_appliedStartWidth = false;
- RenderText* renderText = toRenderText(m_current.object());
+ LayoutText* renderText = toLayoutText(m_current.object());
bool isSVGText = renderText->isSVGInlineText();
@@ -683,7 +683,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
m_lineInfo.setPreviousLineBrokeCleanly(true);
wordMeasurement.endOffset = m_lineBreak.offset();
}
- if (m_lineBreak.object() && m_lineBreak.offset() && m_lineBreak.object()->isText() && toRenderText(m_lineBreak.object())->textLength() && toRenderText(m_lineBreak.object())->characterAt(m_lineBreak.offset() - 1) == softHyphen)
+ if (m_lineBreak.object() && m_lineBreak.offset() && m_lineBreak.object()->isText() && toLayoutText(m_lineBreak.object())->textLength() && toLayoutText(m_lineBreak.object())->characterAt(m_lineBreak.offset() - 1) == softHyphen)
hyphenated = true;
if (m_lineBreak.offset() && m_lineBreak.offset() != (unsigned)wordMeasurement.endOffset && !wordMeasurement.width) {
if (charWidth) {
@@ -779,7 +779,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
}
if (m_collapseWhiteSpace && m_currentCharacterIsSpace && !m_ignoringSpaces)
- m_trailingObjects.setTrailingWhitespace(toRenderText(m_current.object()));
+ m_trailingObjects.setTrailingWhitespace(toLayoutText(m_current.object()));
else if (!m_currentStyle->collapseWhiteSpace() || !m_currentCharacterIsSpace)
m_trailingObjects.clear();
@@ -826,7 +826,7 @@ inline void BreakingContext::commitAndUpdateLineBreakIfNeeded()
if (m_autoWrap && m_currentCharacterIsSpace) {
checkForBreak = true;
} else {
- RenderText* nextText = toRenderText(m_nextObject);
+ LayoutText* nextText = toLayoutText(m_nextObject);
if (nextText->textLength()) {
UChar c = nextText->characterAt(0);
// If the next item on the line is text, and if we did not end with

Powered by Google App Engine
This is Rietveld 408576698