RESOLVED FIXED 63363
Add an option to enable legacy rounding hacks
https://bugs.webkit.org/show_bug.cgi?id=63363
Summary Add an option to enable legacy rounding hacks
mitz
Reported 2011-06-24 16:20:36 PDT
Add an option to enable legacy rounding hacks
Attachments
Re-add most rounding hack code and add SPI for enabling it on OS X (161.90 KB, patch)
2011-06-24 16:38 PDT, mitz
andersca: review+
Re-add most rounding hack code and add SPI for enabling it on OS X (54.84 KB, patch)
2011-06-24 21:45 PDT, mitz
webkit.review.bot: commit-queue-
Archive of layout-test-results from ec2-cr-linux-02 (1.29 MB, application/zip)
2011-06-24 22:07 PDT, WebKit Review Bot
no flags
Re-add most rounding hack code and add SPI for enabling it on OS X (162.06 KB, patch)
2011-06-24 22:36 PDT, mitz
no flags
mitz
Comment 1 2011-06-24 16:38:37 PDT
Created attachment 98561 [details] Re-add most rounding hack code and add SPI for enabling it on OS X
mitz
Comment 2 2011-06-24 16:39:24 PDT
Darin Adler
Comment 3 2011-06-24 17:04:31 PDT
Comment on attachment 98561 [details] Re-add most rounding hack code and add SPI for enabling it on OS X View in context: https://bugs.webkit.org/attachment.cgi?id=98561&action=review Looks like the EWS patch did not apply. I’m a little unclear on the importance of the multiple levels of allowing/disallowing rounding hacks, but I trust they are all needed. > Source/WebCore/platform/graphics/StringTruncator.cpp:95 > -static float stringWidth(const Font& renderer, const UChar* characters, unsigned length) > +static float stringWidth(const Font& renderer, const UChar* characters, unsigned length, bool disableRoundingHacks) Seems potentially confusing that half this file uses the enum and half this file uses a bool. Any reason to not just use the enum all the way down? > Source/WebCore/platform/graphics/StringTruncator.h:40 > + Extra blank line here.
mitz
Comment 4 2011-06-24 20:40:42 PDT
(In reply to comment #3) > (From update of attachment 98561 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=98561&action=review > > Looks like the EWS patch did not apply. That's unfortunate. I can try uploading just the code changes, in case the test is the problem. > I’m a little unclear on the importance of the multiple levels of allowing/disallowing rounding hacks, but I trust they are all needed. I think there is only one level that controls whether rounding hacks are allowed, then there are all the call sites that either ask for the hacks or don't. This is similar to the Core Graphics notions of "allow" and "should". > > > Source/WebCore/platform/graphics/StringTruncator.cpp:95 > > -static float stringWidth(const Font& renderer, const UChar* characters, unsigned length) > > +static float stringWidth(const Font& renderer, const UChar* characters, unsigned length, bool disableRoundingHacks) > > Seems potentially confusing that half this file uses the enum and half this file uses a bool. Any reason to not just use the enum all the way down? > Only historical reasons. > > Source/WebCore/platform/graphics/StringTruncator.h:40 > > + > > Extra blank line here.
mitz
Comment 5 2011-06-24 21:45:57 PDT
Created attachment 98575 [details] Re-add most rounding hack code and add SPI for enabling it on OS X Updated after r89690.
WebKit Review Bot
Comment 6 2011-06-24 22:07:20 PDT
Comment on attachment 98575 [details] Re-add most rounding hack code and add SPI for enabling it on OS X Attachment 98575 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/8937643 New failing tests: css1/basic/comments.html css1/basic/grouping.html css1/box_properties/border_bottom_width.html css1/box_properties/border_bottom_width_inline.html css1/box_properties/border_left_width.html css1/basic/inheritance.html css1/box_properties/border_color_inline.html css1/box_properties/border_inline.html css1/basic/class_as_selector.html css1/box_properties/border.html css1/box_properties/acid_test.html css1/box_properties/border_color.html css1/box_properties/border_left_width_inline.html css1/basic/id_as_selector.html css1/box_properties/border_left.html css1/box_properties/border_bottom_inline.html css1/basic/containment.html css1/box_properties/border_bottom.html css1/box_properties/border_left_inline.html css1/basic/contextual_selectors.html
WebKit Review Bot
Comment 7 2011-06-24 22:07:25 PDT
Created attachment 98578 [details] Archive of layout-test-results from ec2-cr-linux-02 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-02 Port: Chromium Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
mitz
Comment 8 2011-06-24 22:36:25 PDT
Created attachment 98580 [details] Re-add most rounding hack code and add SPI for enabling it on OS X
mitz
Comment 9 2011-06-24 23:49:43 PDT
James Robinson
Comment 10 2011-06-27 13:49:59 PDT
Are y'all free to share why the rounding hacks had to be added back? Are there site compatibility issues we should be aware of, or was this just about non-web content? Thanks!
mitz
Comment 11 2011-06-27 14:31:48 PDT
There are no known website compatibility issues.
Ryosuke Niwa
Comment 12 2011-06-27 21:00:44 PDT
According to http://build.webkit.org/TestFailures/#/Leopard Intel Debug (Tests), fast/text/zero-font-size.html started failing on Leopard Intel Debug (Tests) after this patch was landed: http://build.webkit.org/results/Leopard%20Intel%20Debug%20(Tests)/r89733%20(31715)/fast/text/zero-font-size-pretty-diff.html The size of box is 0x80000000 instead of 0.
Ryosuke Niwa
Comment 13 2011-06-27 21:01:18 PDT
(In reply to comment #12) > The size of box is 0x80000000 instead of 0. I mean the width.
mitz
Comment 14 2011-06-27 21:21:08 PDT
(In reply to comment #12) > According to http://build.webkit.org/TestFailures/#/Leopard Intel Debug (Tests), fast/text/zero-font-size.html started failing on Leopard Intel Debug (Tests) after this patch was landed: > > http://build.webkit.org/results/Leopard%20Intel%20Debug%20(Tests)/r89733%20(31715)/fast/text/zero-font-size-pretty-diff.html > > The size of box is 0x80000000 instead of 0. I am looking into it.
mitz
Comment 15 2011-06-27 23:01:01 PDT
wkGetGlyphTransformedAdvances() is sometimes returning a huge horizontal advance for some glyphs in Times under the 0 transform. That code hasn’t changed in r89733. I am going to check if the r89732 WidthIterator was somehow masking the incorrect values.
mitz
Comment 16 2011-06-27 23:05:57 PDT
Reverting just WidthIterator changes the results from wkGetGlyphTransformedAdvances(). I don’t know how to explain this.
mitz
Comment 17 2011-06-27 23:14:29 PDT
Filed bug 63512.
Note You need to log in before you can comment on or make changes to this bug.