InlineTextBox's m_len can be an unsigned (rather than an unsigned short)
[WebKit-https.git] / Source / WebCore / ChangeLog
index 3c507cc88ed213684d141e02ea000c52bb3b4dd9..a0b1a239445d4a0a53c610c0b26a1a69025fa835 100644 (file)
@@ -1,3 +1,34 @@
+2014-06-24  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        InlineTextBox's m_len can be an unsigned (rather than an unsigned short)
+        https://bugs.webkit.org/show_bug.cgi?id=134173
+
+        Reviewed by Daniel Bates.
+
+        After Zalan's talks with Kling, it seems that the simple line layout code
+        might alleviate the need for the space savings in InlineTextBox. Given this,
+        it would be beneficial to be a little more safe by using unsigneds throughout.
+
+        For example, we have code like "void setLen(unsigned len) { m_len = len; }"
+        which might silently break if given particular inputs.
+
+        No new tests because there is no behavior change.
+
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::isSelected):
+        (WebCore::InlineTextBox::localSelectionRect):
+        (WebCore::InlineTextBox::paint):
+        (WebCore::InlineTextBox::selectionStartEnd):
+        (WebCore::InlineTextBox::paintSelection):
+        (WebCore::InlineTextBox::paintCompositionBackground):
+        (WebCore::InlineTextBox::paintDocumentMarker):
+        (WebCore::InlineTextBox::paintTextMatchMarker):
+        (WebCore::InlineTextBox::computeRectForReplacementMarker):
+        * rendering/InlineTextBox.h:
+        (WebCore::InlineTextBox::truncation):
+        * rendering/RenderTextLineBoxes.cpp:
+        (WebCore::ellipsisRectForBox):
+
 2014-06-24  Ryosuke Niwa  <rniwa@webkit.org>
 
         Speculative 32-bit Mac build fix after r170402.