[svg] Remove unnecessary rounding in SVGRootInlineBox::layoutRootBox
authoreae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2013 22:48:50 +0000 (22:48 +0000)
committereae@chromium.org <eae@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2013 22:48:50 +0000 (22:48 +0000)
commit4d824d63869af8d276c76bdb83fbe618323313cf
tree88f429fe39e1799377f832e7eed530e80089772f
parentce6f5f757b371590d3841ad4fcbe30b80ab0fa33
[svg] Remove unnecessary rounding in SVGRootInlineBox::layoutRootBox
https://bugs.webkit.org/show_bug.cgi?id=107771

Source/WebCore:

Reviewed by Levi Weintraub.

SVGRootInlineBox::layoutRootBox rounds the location and size of
the container to the nearest enclosing integer values. Now that
layout uses subpixel positioning this is no longer needed and
results in undesirable rounding. For high-dpi screens in
particular this is especially noticeable as it is rounded to
"pixels" which can map to two our more device pixels.

Test: svg/text/text-rect-precision.html

* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::layoutRootBox):
Change from enclosingIntRect to enclosingLayoutRect to align to
the closest containing LayoutRect now that layout is done using
subpixel precision.

LayoutTests:

Reviewed by Levi Weintraub.

Add test for svg text subpixel measurement and update
expectations as needed.

* css3/zoom-coords.xhtml:
* platform/chromium/TestExpectations:
* platform/mac/TestExpectations:
* svg/W3C-SVG-1.1-SE/color-prop-05-t-expected.txt:
* svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.txt:
* svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.txt:
* svg/W3C-SVG-1.1-SE/struct-use-14-f-expected.txt:
* svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt:
* svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt:
* svg/custom/glyph-setting-d-attribute-expected.txt:
* svg/foreignObject/text-tref-02-b-expected.txt:
* svg/hixie/viewbox/002-expected.txt:
* svg/hixie/viewbox/003-expected.txt:
* svg/text/text-rect-precision.html: Added.
* svg/text/text-viewbox-rescale-expected.txt:
* svg/zoom/page/zoom-zoom-coords-expected.txt:
* svg/zoom/page/zoom-zoom-coords.xhtml:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/zoom-coords.xhtml
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/svg/W3C-SVG-1.1-SE/color-prop-05-t-expected.txt
LayoutTests/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.txt
LayoutTests/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.txt
LayoutTests/svg/W3C-SVG-1.1-SE/struct-use-14-f-expected.txt
LayoutTests/svg/W3C-SVG-1.1-SE/svgdom-over-01-f-expected.txt
LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt
LayoutTests/svg/custom/glyph-setting-d-attribute-expected.txt
LayoutTests/svg/foreignObject/text-tref-02-b-expected.txt
LayoutTests/svg/hixie/viewbox/002-expected.txt
LayoutTests/svg/hixie/viewbox/003-expected.txt
LayoutTests/svg/text/text-rect-precision.html [new file with mode: 0644]
LayoutTests/svg/text/text-viewbox-rescale-expected.txt
LayoutTests/svg/zoom/page/zoom-zoom-coords-expected.txt
LayoutTests/svg/zoom/page/zoom-zoom-coords.xhtml
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/SVGRootInlineBox.cpp