<rdar://problem/9401853> REGRESSION (r78846): Insufficient expansion for justificatio...
authorDan Bernstein <mitz@webkit.org>
Sun, 8 May 2011 16:27:31 +0000 (16:27 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Thu, 26 May 2011 19:42:42 +0000 (16:42 -0300)
commit7e1bab1f637b8196347d8137f98afa31c175feef
tree4417834301ee2ef04fd0811d0d2488c93b8bbc01
parent6b2f43681ad8f1d8346fc5906236ccfc7a45c362
<rdar://problem/9401853> REGRESSION (r78846): Insufficient expansion for justification when there are multiple inline boxes
https://bugs.webkit.org/show_bug.cgi?id=60432

Reviewed by Darin Adler.

Source/WebCore:

* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::setExpansion): Changed back to take a int, since the m_expansion member
variable is a (truncated) int anyway.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::computeExpansionForJustifiedText): Changed the expansion local variable into an int
so that the right amount is added to the total width. Also changed to use an early return.

LayoutTests:

* fast/text/justify-nbsp-expected.png:
* fast/text/justify-nbsp-expected.txt:
* platform/mac-snowleopard/fast/text/justify-ideograph-leading-expansion-expected.txt:
* platform/mac/css1/box_properties/clear_float-expected.png:
* platform/mac/css1/box_properties/clear_float-expected.txt:
* platform/mac/css1/box_properties/float_on_text_elements-expected.txt:
* platform/mac/css2.1/t0905-c5525-fltcont-00-d-g-expected.png:
* platform/mac/css2.1/t0905-c5525-fltcont-00-d-g-expected.txt:
* platform/mac/css2.1/t0905-c5525-fltwidth-00-c-g-expected.png:
* platform/mac/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt:
* platform/mac/css2.1/t1602-c546-txt-align-00-b-expected.png:
* platform/mac/css2.1/t1602-c546-txt-align-00-b-expected.txt:
* platform/mac/fast/multicol/float-avoidance-expected.png:
* platform/mac/fast/multicol/float-avoidance-expected.txt:
* platform/mac/fast/multicol/vertical-lr/float-avoidance-expected.png:
* platform/mac/fast/multicol/vertical-lr/float-avoidance-expected.txt:
* platform/mac/fast/multicol/vertical-rl/float-avoidance-expected.png:
* platform/mac/fast/multicol/vertical-rl/float-avoidance-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-1-expected.png:
* platform/mac/fast/repaint/line-flow-with-floats-1-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-10-expected.png:
* platform/mac/fast/repaint/line-flow-with-floats-10-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-2-expected.png:
* platform/mac/fast/repaint/line-flow-with-floats-2-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-3-expected.png:
* platform/mac/fast/repaint/line-flow-with-floats-3-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-4-expected.png:
* platform/mac/fast/repaint/line-flow-with-floats-4-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-5-expected.png:
* platform/mac/fast/repaint/line-flow-with-floats-5-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-6-expected.png:
* platform/mac/fast/repaint/line-flow-with-floats-6-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-7-expected.png:
* platform/mac/fast/repaint/line-flow-with-floats-7-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-8-expected.png:
* platform/mac/fast/repaint/line-flow-with-floats-8-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-9-expected.png:
* platform/mac/fast/repaint/line-flow-with-floats-9-expected.txt:
* platform/mac/fast/text/hyphenate-character-expected.png:
* platform/mac/fast/text/hyphenate-character-expected.txt:
* platform/mac/fast/text/hyphens-expected.png:
* platform/mac/fast/text/hyphens-expected.txt:
* platform/mac/fast/text/justified-selection-at-edge-expected.png:
* platform/mac/fast/text/justified-selection-at-edge-expected.txt:
* platform/mac/fast/text/justify-ideograph-leading-expansion-expected.png:
* platform/mac/svg/custom/svg-fonts-in-html-expected.png:
* platform/mac/svg/custom/svg-fonts-in-html-expected.txt:
* platform/mac/tables/mozilla/marvin/x_tbody_align_justify-expected.png:
* platform/mac/tables/mozilla/marvin/x_tbody_align_justify-expected.txt:
* platform/mac/tables/mozilla/marvin/x_td_align_justify-expected.png:
* platform/mac/tables/mozilla/marvin/x_td_align_justify-expected.txt:
* platform/mac/tables/mozilla/marvin/x_tfoot_align_justify-expected.png:
* platform/mac/tables/mozilla/marvin/x_tfoot_align_justify-expected.txt:
* platform/mac/tables/mozilla/marvin/x_th_align_justify-expected.png:
* platform/mac/tables/mozilla/marvin/x_th_align_justify-expected.txt:
* platform/mac/tables/mozilla/marvin/x_thead_align_justify-expected.png:
* platform/mac/tables/mozilla/marvin/x_thead_align_justify-expected.txt:
* platform/mac/tables/mozilla/marvin/x_tr_align_justify-expected.png:
* platform/mac/tables/mozilla/marvin/x_tr_align_justify-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
63 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/text/justify-nbsp-expected.png
LayoutTests/fast/text/justify-nbsp-expected.txt
LayoutTests/platform/mac-snowleopard/fast/text/justify-ideograph-leading-expansion-expected.txt
LayoutTests/platform/mac/css1/box_properties/clear_float-expected.png
LayoutTests/platform/mac/css1/box_properties/clear_float-expected.txt
LayoutTests/platform/mac/css1/box_properties/float_on_text_elements-expected.txt
LayoutTests/platform/mac/css2.1/t0905-c5525-fltcont-00-d-g-expected.png
LayoutTests/platform/mac/css2.1/t0905-c5525-fltcont-00-d-g-expected.txt
LayoutTests/platform/mac/css2.1/t0905-c5525-fltwidth-00-c-g-expected.png
LayoutTests/platform/mac/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt
LayoutTests/platform/mac/css2.1/t1602-c546-txt-align-00-b-expected.png
LayoutTests/platform/mac/css2.1/t1602-c546-txt-align-00-b-expected.txt
LayoutTests/platform/mac/fast/multicol/float-avoidance-expected.png
LayoutTests/platform/mac/fast/multicol/float-avoidance-expected.txt
LayoutTests/platform/mac/fast/multicol/vertical-lr/float-avoidance-expected.png
LayoutTests/platform/mac/fast/multicol/vertical-lr/float-avoidance-expected.txt
LayoutTests/platform/mac/fast/multicol/vertical-rl/float-avoidance-expected.png
LayoutTests/platform/mac/fast/multicol/vertical-rl/float-avoidance-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-1-expected.png
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-1-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-10-expected.png
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-10-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-2-expected.png
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-2-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-3-expected.png
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-3-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-4-expected.png
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-4-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-5-expected.png
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-5-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-6-expected.png
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-6-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-7-expected.png
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-7-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-8-expected.png
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-8-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-9-expected.png
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-9-expected.txt
LayoutTests/platform/mac/fast/text/hyphenate-character-expected.png
LayoutTests/platform/mac/fast/text/hyphenate-character-expected.txt
LayoutTests/platform/mac/fast/text/hyphens-expected.png
LayoutTests/platform/mac/fast/text/hyphens-expected.txt
LayoutTests/platform/mac/fast/text/justified-selection-at-edge-expected.png
LayoutTests/platform/mac/fast/text/justified-selection-at-edge-expected.txt
LayoutTests/platform/mac/fast/text/justify-ideograph-leading-expansion-expected.png
LayoutTests/platform/mac/svg/custom/svg-fonts-in-html-expected.png
LayoutTests/platform/mac/svg/custom/svg-fonts-in-html-expected.txt
LayoutTests/platform/mac/tables/mozilla/marvin/x_tbody_align_justify-expected.png
LayoutTests/platform/mac/tables/mozilla/marvin/x_tbody_align_justify-expected.txt
LayoutTests/platform/mac/tables/mozilla/marvin/x_td_align_justify-expected.png
LayoutTests/platform/mac/tables/mozilla/marvin/x_td_align_justify-expected.txt
LayoutTests/platform/mac/tables/mozilla/marvin/x_tfoot_align_justify-expected.png
LayoutTests/platform/mac/tables/mozilla/marvin/x_tfoot_align_justify-expected.txt
LayoutTests/platform/mac/tables/mozilla/marvin/x_th_align_justify-expected.png
LayoutTests/platform/mac/tables/mozilla/marvin/x_th_align_justify-expected.txt
LayoutTests/platform/mac/tables/mozilla/marvin/x_thead_align_justify-expected.png
LayoutTests/platform/mac/tables/mozilla/marvin/x_thead_align_justify-expected.txt
LayoutTests/platform/mac/tables/mozilla/marvin/x_tr_align_justify-expected.png
LayoutTests/platform/mac/tables/mozilla/marvin/x_tr_align_justify-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/InlineTextBox.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp