Subpixel layout broken with spans with CSS position other than static
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jul 2012 18:20:42 +0000 (18:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jul 2012 18:20:42 +0000 (18:20 +0000)
commit504d06d531e006fe6a5f462f02b3809d7df5494b
tree47289e271960d182d54c12666847725255bc2a6d
parent8ba9b4659d6d96e334fb15a96d305f8c200b3384
Subpixel layout broken with spans with CSS position other than static
https://bugs.webkit.org/show_bug.cgi?id=90097

Patch by Behdad Esfahbod <behdad@behdad.org> on 2012-07-05
Reviewed by Eric Seidel.

In InlineBox, don't truncate size to integers when returning.

In RenderBlock, don't round-up width to next integer.  Round-up to
next LayoutUnit instead.

Test: Added fast/sub-pixel/size-of-span-with-different-positions.html
Adjust expected outputs affected by the rounding changes.

* platform/FractionalLayoutUnit.h:
(WebCore::FractionalLayoutUnit::fromFloatCeil):
(FractionalLayoutUnit):
* rendering/InlineBox.h:
(WebCore::InlineBox::size):
* rendering/RenderBlock.cpp:
(WebCore::updatePreferredWidth):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/fast/sub-pixel/size-of-span-with-different-positions-expected.txt [new file with mode: 0644]
LayoutTests/fast/sub-pixel/size-of-span-with-different-positions.html [new file with mode: 0644]
LayoutTests/platform/chromium-linux/fast/html/details-marker-style-expected.png
LayoutTests/platform/chromium-linux/fast/html/details-marker-style-expected.txt
LayoutTests/platform/chromium-linux/media/video-zoom-controls-expected.png
LayoutTests/platform/chromium-linux/media/video-zoom-controls-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/FractionalLayoutUnit.h
Source/WebCore/rendering/InlineBox.h
Source/WebCore/rendering/RenderBlock.cpp