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

Unified Diff: Source/core/layout/line/InlineIterator.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/InlineIterator.h
diff --git a/Source/core/layout/line/InlineIterator.h b/Source/core/layout/line/InlineIterator.h
index 1f876342b97873322fdeb6fb8c846b30edcf18cb..808cba27acd1de4799c7b9bb7440212e62a65821 100644
--- a/Source/core/layout/line/InlineIterator.h
+++ b/Source/core/layout/line/InlineIterator.h
@@ -24,15 +24,15 @@
#define InlineIterator_h
#include "core/layout/BidiRun.h"
+#include "core/layout/LayoutText.h"
#include "core/rendering/RenderBlockFlow.h"
#include "core/rendering/RenderInline.h"
-#include "core/rendering/RenderText.h"
#include "wtf/StdLibExtras.h"
namespace blink {
// This class is used to RenderInline subtrees, stepping by character within the
-// text children. InlineIterator will use bidiNext to find the next RenderText
+// text children. InlineIterator will use bidiNext to find the next LayoutText
// optionally notifying a BidiResolver every time it steps into/out of a RenderInline.
class InlineIterator {
public:
@@ -87,8 +87,8 @@ public:
inline bool atTextParagraphSeparator() const
{
- return m_obj && m_obj->preservesNewline() && m_obj->isText() && toRenderText(m_obj)->textLength()
- && !toRenderText(m_obj)->isWordBreak() && toRenderText(m_obj)->characterAt(m_pos) == '\n';
+ return m_obj && m_obj->preservesNewline() && m_obj->isText() && toLayoutText(m_obj)->textLength()
+ && !toLayoutText(m_obj)->isWordBreak() && toLayoutText(m_obj)->characterAt(m_pos) == '\n';
}
inline bool atParagraphSeparator() const
@@ -193,7 +193,7 @@ static bool isEmptyInline(LayoutObject* object)
for (LayoutObject* curr = toRenderInline(object)->firstChild(); curr; curr = curr->nextSibling()) {
if (curr->isFloatingOrOutOfFlowPositioned())
continue;
- if (curr->isText() && toRenderText(curr)->isAllCollapsibleWhitespace())
+ if (curr->isText() && toLayoutText(curr)->isAllCollapsibleWhitespace())
continue;
if (!isEmptyInline(curr))
@@ -326,7 +326,7 @@ inline void InlineIterator::fastIncrementInTextNode()
{
ASSERT(m_obj);
ASSERT(m_obj->isText());
- ASSERT(m_pos <= toRenderText(m_obj)->textLength());
+ ASSERT(m_pos <= toLayoutText(m_obj)->textLength());
if (m_pos < INT_MAX)
m_pos++;
}
@@ -390,7 +390,7 @@ inline void InlineIterator::increment(InlineBidiResolver* resolver, IncrementRul
if (m_obj->isText()) {
fastIncrementInTextNode();
- if (m_pos < toRenderText(m_obj)->textLength())
+ if (m_pos < toLayoutText(m_obj)->textLength())
return;
}
// bidiNext can return 0, so use moveTo instead of moveToStartOf
@@ -407,7 +407,7 @@ inline UChar InlineIterator::characterAt(unsigned index) const
if (!m_obj || !m_obj->isText())
return 0;
- return toRenderText(m_obj)->characterAt(index);
+ return toLayoutText(m_obj)->characterAt(index);
}
inline UChar InlineIterator::current() const
@@ -452,7 +452,7 @@ inline bool InlineBidiResolver::isEndOfLine(const InlineIterator& end)
return inEndOfLine;
}
-static inline bool isCollapsibleSpace(UChar character, RenderText* renderer)
+static inline bool isCollapsibleSpace(UChar character, LayoutText* renderer)
{
if (character == ' ' || character == '\t' || character == softHyphen)
return true;
@@ -462,7 +462,7 @@ static inline bool isCollapsibleSpace(UChar character, RenderText* renderer)
}
template <typename CharacterType>
-static inline int findFirstTrailingSpace(RenderText* lastText, const CharacterType* characters, int start, int stop)
+static inline int findFirstTrailingSpace(LayoutText* lastText, const CharacterType* characters, int start, int stop)
{
int firstSpace = stop;
while (firstSpace > start) {
@@ -483,7 +483,7 @@ inline int InlineBidiResolver::findFirstTrailingSpaceAtRun(BidiRun* run)
if (!lastObject->isText())
return run->m_stop;
- RenderText* lastText = toRenderText(lastObject);
+ LayoutText* lastText = toLayoutText(lastObject);
int firstSpace;
if (lastText->is8Bit())
firstSpace = findFirstTrailingSpace(lastText, lastText->characters8(), run->start(), run->stop());

Powered by Google App Engine
This is Rietveld 408576698