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

Unified Diff: Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp

Issue 940373003: Rename RenderText to LayoutText (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/editing/iterators/SimplifiedBackwardsTextIterator.cpp
diff --git a/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp b/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
index 17bf5db0d508e50d214de8bf5ce1bf3962ac819e..8fcb418b27acf612392116e872477d91a6919cbf 100644
--- a/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
+++ b/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
@@ -32,11 +32,11 @@
#include "core/editing/iterators/TextIterator.h"
#include "core/html/HTMLElement.h"
#include "core/html/HTMLTextFormControlElement.h"
-#include "core/rendering/RenderTextFragment.h"
+#include "core/layout/LayoutTextFragment.h"
namespace blink {
-static int collapsedSpaceLength(RenderText* renderer, int textEnd)
+static int collapsedSpaceLength(LayoutText* renderer, int textEnd)
{
const String& text = renderer->text();
int length = text.length();
@@ -53,7 +53,7 @@ static int maxOffsetIncludingCollapsedSpaces(Node* node)
int offset = caretMaxOffset(node);
if (node->renderer() && node->renderer()->isText())
- offset += collapsedSpaceLength(toRenderText(node->renderer()), offset);
+ offset += collapsedSpaceLength(toLayoutText(node->renderer()), offset);
return offset;
}
@@ -253,7 +253,7 @@ bool SimplifiedBackwardsTextIterator::handleTextNode()
{
int startOffset;
int offsetInNode;
- RenderText* renderer = handleFirstLetter(startOffset, offsetInNode);
+ LayoutText* renderer = handleFirstLetter(startOffset, offsetInNode);
if (!renderer)
return true;
@@ -279,9 +279,9 @@ bool SimplifiedBackwardsTextIterator::handleTextNode()
return !m_shouldHandleFirstLetter;
}
-RenderText* SimplifiedBackwardsTextIterator::handleFirstLetter(int& startOffset, int& offsetInNode)
+LayoutText* SimplifiedBackwardsTextIterator::handleFirstLetter(int& startOffset, int& offsetInNode)
{
- RenderText* renderer = toRenderText(m_node->renderer());
+ LayoutText* renderer = toLayoutText(m_node->renderer());
startOffset = (m_node == m_startNode) ? m_startOffset : 0;
if (!renderer->isTextFragment()) {
@@ -289,7 +289,7 @@ RenderText* SimplifiedBackwardsTextIterator::handleFirstLetter(int& startOffset,
return renderer;
}
- RenderTextFragment* fragment = toRenderTextFragment(renderer);
+ LayoutTextFragment* fragment = toLayoutTextFragment(renderer);
int offsetAfterFirstLetter = fragment->start();
if (startOffset >= offsetAfterFirstLetter) {
ASSERT(!m_shouldHandleFirstLetter);
@@ -312,7 +312,7 @@ RenderText* SimplifiedBackwardsTextIterator::handleFirstLetter(int& startOffset,
LayoutObject* pseudoElementRenderer = fragment->firstLetterPseudoElement()->renderer();
ASSERT(pseudoElementRenderer);
ASSERT(pseudoElementRenderer->slowFirstChild());
- RenderText* firstLetterRenderer = toRenderText(pseudoElementRenderer->slowFirstChild());
+ LayoutText* firstLetterRenderer = toLayoutText(pseudoElementRenderer->slowFirstChild());
m_offset = firstLetterRenderer->caretMaxOffset();
m_offset += collapsedSpaceLength(firstLetterRenderer, m_offset);
« no previous file with comments | « Source/core/editing/iterators/SimplifiedBackwardsTextIterator.h ('k') | Source/core/editing/iterators/TextIterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698