[Subpixel] Use floats instead of ints for text justification expansion
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Oct 2014 22:25:50 +0000 (22:25 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Oct 2014 22:25:50 +0000 (22:25 +0000)
commit0dc54c8556aeb017d4b016b2ecf8b1a1f8051af8
tree7f4fdb7b27284ba902ba5fb027c912d63b2c37da
parent4b8fdcfb7bf8894c485c0288b516ea2cfe1a62d1
[Subpixel] Use floats instead of ints for text justification expansion
https://bugs.webkit.org/show_bug.cgi?id=137327

Reviewed by Zalan Bujtas.

Source/WebCore:

Use a float instead of an int for the expansion variable in InlineBox. The int was inside an inner class
that held a collection of bitfields, and this patch removes that inner-inner variable.

No new tests because there is plenty of existing coverage and existing tests are rebaselined.

* rendering/InlineBox.cpp: Update static_assert for the size of InlineBox.
* rendering/InlineBox.h: Use a float for the justification expansion amount instead of an int bitfield.
(WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields): Remove int bitfield.
(WebCore::InlineBox::InlineBox): Initialize float expansion.
(WebCore::InlineBox::expansion): Return a float.
(WebCore::InlineBox::setExpansion): Take a float.
(WebCore::InlineBox::InlineBoxBitfields::expansion): Deleted. Moved to InlineBox.
(WebCore::InlineBox::InlineBoxBitfields::setExpansion): Deleted. Ditto.
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::setExpansion): Take a float.

LayoutTests:

Rebaselining tests due to subpixel differences.

* 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.txt:
* platform/mac/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt:
* platform/mac/css2.1/t1602-c546-txt-align-00-b-expected.txt:
* platform/mac/fast/multicol/float-avoidance-expected.txt:
* platform/mac/fast/multicol/overflow-across-columns-expected.txt:
* platform/mac/fast/multicol/overflow-across-columns-percent-height-expected.txt:
* platform/mac/fast/multicol/overflow-unsplittable-expected.txt:
* platform/mac/fast/multicol/positive-leading-expected.txt:
* platform/mac/fast/multicol/vertical-lr/float-avoidance-expected.txt:
* platform/mac/fast/multicol/vertical-rl/float-avoidance-expected.txt:
* platform/mac/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt:
* platform/mac/fast/regions/repaint/line-flow-with-floats-in-regions-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-1-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-10-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-2-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-3-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-4-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-5-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-6-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-7-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-8-expected.txt:
* platform/mac/fast/repaint/line-flow-with-floats-9-expected.txt:
* platform/mac/fast/ruby/bopomofo-rl-expected.txt:
* platform/mac/fast/text/hyphenate-character-expected.txt:
* platform/mac/fast/text/hyphens-expected.txt:
* platform/mac/fast/text/justified-selection-at-edge-expected.txt:
* platform/mac/fast/text/justify-ideograph-leading-expansion-expected.txt:
* platform/mac/fast/text/justify-nbsp-expected.txt: Added.
* platform/mac/fast/text/trailing-white-space-2-expected.txt:
* platform/mac/fast/text/trailing-white-space-expected.txt:
* platform/mac/tables/mozilla/marvin/x_tbody_align_justify-expected.txt:
* platform/mac/tables/mozilla/marvin/x_td_align_justify-expected.txt:
* platform/mac/tables/mozilla/marvin/x_tfoot_align_justify-expected.txt:
* platform/mac/tables/mozilla/marvin/x_th_align_justify-expected.txt:
* platform/mac/tables/mozilla/marvin/x_thead_align_justify-expected.txt:
* platform/mac/tables/mozilla/marvin/x_tr_align_justify-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
44 files changed:
LayoutTests/ChangeLog
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.txt
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.txt
LayoutTests/platform/mac/fast/multicol/float-avoidance-expected.txt
LayoutTests/platform/mac/fast/multicol/overflow-across-columns-expected.txt
LayoutTests/platform/mac/fast/multicol/overflow-across-columns-percent-height-expected.txt
LayoutTests/platform/mac/fast/multicol/overflow-unsplittable-expected.txt
LayoutTests/platform/mac/fast/multicol/positive-leading-expected.txt
LayoutTests/platform/mac/fast/multicol/vertical-lr/float-avoidance-expected.txt
LayoutTests/platform/mac/fast/multicol/vertical-rl/float-avoidance-expected.txt
LayoutTests/platform/mac/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt
LayoutTests/platform/mac/fast/regions/repaint/line-flow-with-floats-in-regions-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-1-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-10-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-2-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-3-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-4-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-5-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-6-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-7-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-8-expected.txt
LayoutTests/platform/mac/fast/repaint/line-flow-with-floats-9-expected.txt
LayoutTests/platform/mac/fast/ruby/bopomofo-rl-expected.txt
LayoutTests/platform/mac/fast/text/hyphenate-character-expected.txt
LayoutTests/platform/mac/fast/text/hyphens-expected.txt
LayoutTests/platform/mac/fast/text/justified-selection-at-edge-expected.txt
LayoutTests/platform/mac/fast/text/justify-ideograph-leading-expansion-expected.txt
LayoutTests/platform/mac/fast/text/justify-nbsp-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/text/trailing-white-space-2-expected.txt
LayoutTests/platform/mac/fast/text/trailing-white-space-expected.txt
LayoutTests/platform/mac/tables/mozilla/marvin/x_tbody_align_justify-expected.txt
LayoutTests/platform/mac/tables/mozilla/marvin/x_td_align_justify-expected.txt
LayoutTests/platform/mac/tables/mozilla/marvin/x_tfoot_align_justify-expected.txt
LayoutTests/platform/mac/tables/mozilla/marvin/x_th_align_justify-expected.txt
LayoutTests/platform/mac/tables/mozilla/marvin/x_thead_align_justify-expected.txt
LayoutTests/platform/mac/tables/mozilla/marvin/x_tr_align_justify-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/InlineBox.cpp
Source/WebCore/rendering/InlineBox.h
Source/WebCore/rendering/InlineTextBox.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp