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

Unified Diff: Source/core/rendering/InlineTextBox.h

Issue 622253002: Pass start/length at InlineTextBox construction time. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: condense by one line Created 6 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: Source/core/rendering/InlineTextBox.h
diff --git a/Source/core/rendering/InlineTextBox.h b/Source/core/rendering/InlineTextBox.h
index f82a860ba6e93db65c589735b64990f43a9a1cdf..64cf4d6f14110dede9bfbae346a1d0f9c63fe27c 100644
--- a/Source/core/rendering/InlineTextBox.h
+++ b/Source/core/rendering/InlineTextBox.h
@@ -40,14 +40,15 @@ const unsigned short cFullTruncation = USHRT_MAX - 1;
class InlineTextBox : public InlineBox {
public:
- InlineTextBox(RenderObject& obj)
+ InlineTextBox(RenderObject& obj, int start, unsigned short length)
: InlineBox(obj)
, m_prevTextBox(0)
, m_nextTextBox(0)
- , m_start(0)
- , m_len(0)
+ , m_start(start)
+ , m_len(length)
, m_truncation(cNoTruncation)
{
+ setIsText(true);
}
RenderText& renderer() const { return toRenderText(InlineBox::renderer()); }
@@ -64,10 +65,7 @@ public:
unsigned end() const { return m_len ? m_start + m_len - 1 : m_start; }
unsigned len() const { return m_len; }
- void setStart(unsigned start) { m_start = start; }
- void setLen(unsigned len) { m_len = len; }
-
- void offsetRun(int d) { ASSERT(!isDirty()); m_start += d; }
+ void offsetRun(int delta);
unsigned short truncation() { return m_truncation; }
« no previous file with comments | « no previous file | Source/core/rendering/InlineTextBox.cpp » ('j') | Source/core/rendering/RenderBlockLineLayout.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698