InlineTextBox's m_len can be an unsigned (rather than an unsigned short)
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jun 2014 01:19:25 +0000 (01:19 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jun 2014 01:19:25 +0000 (01:19 +0000)
commitfbf4e773873bc0276a3d25d90a2de18ac9076551
tree5135dcbea3a82bb5e61ef8858c55ab9c82def720
parentf9f6544282fbd487ac4b5af0ecb33923e987bdb2
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/InlineTextBox.h
Source/WebCore/rendering/RenderTextLineBoxes.cpp