Title: [129401] branches/chromium/1271/Source/WebCore/rendering
Revision
129401
Author
[email protected]
Date
2012-09-24 13:06:28 -0700 (Mon, 24 Sep 2012)

Log Message

Merge 129144
BUG=145530
Review URL: https://codereview.chromium.org/10970075

Modified Paths

Diff

Modified: branches/chromium/1271/Source/WebCore/rendering/InlineBox.h (129400 => 129401)


--- branches/chromium/1271/Source/WebCore/rendering/InlineBox.h	2012-09-24 20:04:01 UTC (rev 129400)
+++ branches/chromium/1271/Source/WebCore/rendering/InlineBox.h	2012-09-24 20:06:28 UTC (rev 129401)
@@ -262,7 +262,7 @@
     virtual void clearTruncation() { }
 
     bool isDirty() const { return m_bitfields.dirty(); }
-    void markDirty(bool dirty = true) { m_bitfields.setDirty(dirty); }
+    virtual void markDirty(bool dirty = true) { m_bitfields.setDirty(dirty); }
 
     virtual void dirtyLineBoxes();
     

Modified: branches/chromium/1271/Source/WebCore/rendering/InlineTextBox.cpp (129400 => 129401)


--- branches/chromium/1271/Source/WebCore/rendering/InlineTextBox.cpp	2012-09-24 20:04:01 UTC (rev 129400)
+++ branches/chromium/1271/Source/WebCore/rendering/InlineTextBox.cpp	2012-09-24 20:06:28 UTC (rev 129401)
@@ -64,6 +64,15 @@
     InlineBox::destroy(arena);
 }
 
+void InlineTextBox::markDirty(bool dirty)
+{
+    if (dirty) {
+        m_len = 0;
+        m_start = 0;
+    }
+    InlineBox::markDirty(dirty);
+}
+
 LayoutRect InlineTextBox::logicalOverflowRect() const
 {
     if (knownToHaveNoOverflow() || !gTextBoxesWithOverflow)

Modified: branches/chromium/1271/Source/WebCore/rendering/InlineTextBox.h (129400 => 129401)


--- branches/chromium/1271/Source/WebCore/rendering/InlineTextBox.h	2012-09-24 20:04:01 UTC (rev 129400)
+++ branches/chromium/1271/Source/WebCore/rendering/InlineTextBox.h	2012-09-24 20:06:28 UTC (rev 129401)
@@ -64,17 +64,19 @@
     void setNextTextBox(InlineTextBox* n) { m_nextTextBox = n; }
     void setPreviousTextBox(InlineTextBox* p) { m_prevTextBox = p; }
 
-    unsigned start() const { return m_start; }
-    unsigned end() const { return m_len ? m_start + m_len - 1 : m_start; }
-    unsigned len() const { return m_len; }
+    unsigned start() const { ASSERT(!isDirty()); return m_start; }
+    unsigned end() const { ASSERT(!isDirty()); return m_len ? m_start + m_len - 1 : m_start; }
+    unsigned len() const { ASSERT(!isDirty()); return m_len; }
 
     void setStart(unsigned start) { m_start = start; }
     void setLen(unsigned len) { m_len = len; }
 
-    void offsetRun(int d) { m_start += d; }
+    void offsetRun(int d) { ASSERT(!isDirty()); m_start += d; }
 
     unsigned short truncation() { return m_truncation; }
 
+    virtual void markDirty(bool dirty = true) OVERRIDE;
+
     using InlineBox::hasHyphen;
     using InlineBox::setHasHyphen;
     using InlineBox::canHaveLeadingExpansion;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to