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

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: rebase 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
« no previous file with comments | « no previous file | Source/core/rendering/InlineTextBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/InlineTextBox.h
diff --git a/Source/core/rendering/InlineTextBox.h b/Source/core/rendering/InlineTextBox.h
index 9b5093815c6e7f727a1f5a0cc633093bfa4b7359..81d1cb204f8b7ba0beb06f82cbb21d1c1ea3b626 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698