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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTextFragment.cpp

Issue 1414393003: Rename LayoutTextFragment::m_end to m_length (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make fragmentLength() private Created 5 years, 2 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: third_party/WebKit/Source/core/layout/LayoutTextFragment.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTextFragment.cpp b/third_party/WebKit/Source/core/layout/LayoutTextFragment.cpp
index 13209b9f5404a7acd73e59bf6dc25006d0973a98..83ed647b5d1b97990bd9a7ab994550562c22d680 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTextFragment.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTextFragment.cpp
@@ -35,7 +35,7 @@ namespace blink {
LayoutTextFragment::LayoutTextFragment(Node* node, StringImpl* str, int startOffset, int length)
: LayoutText(node, str ? str->substring(startOffset, length) : PassRefPtr<StringImpl>(nullptr))
, m_start(startOffset)
- , m_end(length)
+ , m_fragmentLength(length)
, m_isRemainingTextLayoutObject(false)
, m_contentString(str)
, m_firstLetterPseudoElement(nullptr)
@@ -45,7 +45,7 @@ LayoutTextFragment::LayoutTextFragment(Node* node, StringImpl* str, int startOff
LayoutTextFragment::LayoutTextFragment(Node* node, StringImpl* str)
: LayoutText(node, str)
, m_start(0)
- , m_end(str ? str->length() : 0)
+ , m_fragmentLength(str ? str->length() : 0)
, m_isRemainingTextLayoutObject(false)
, m_contentString(str)
, m_firstLetterPseudoElement(nullptr)
@@ -82,7 +82,7 @@ PassRefPtr<StringImpl> LayoutTextFragment::originalText() const
RefPtr<StringImpl> result = completeText();
if (!result)
return nullptr;
- return result->substring(start(), end());
+ return result->substring(start(), fragmentLength());
}
void LayoutTextFragment::setText(PassRefPtr<StringImpl> text, bool force)
@@ -90,7 +90,7 @@ void LayoutTextFragment::setText(PassRefPtr<StringImpl> text, bool force)
LayoutText::setText(text, force);
m_start = 0;
- m_end = textLength();
+ m_fragmentLength = textLength();
// If we're the remaining text from a first letter then we have to tell the
// first letter pseudo element to reattach itself so it can re-calculate the
@@ -106,7 +106,7 @@ void LayoutTextFragment::setTextFragment(PassRefPtr<StringImpl> text, unsigned s
LayoutText::setText(text, false);
m_start = start;
- m_end = length;
+ m_fragmentLength = length;
}
void LayoutTextFragment::transformText()

Powered by Google App Engine
This is Rietveld 408576698