Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Issue 856533002: Fix problems with flakes in SVG LayoutTests.

Created:
5 years, 11 months ago by Daniel Bratell
Modified:
5 years, 10 months ago
CC:
blink-reviews, blink-reviews-rendering, Dominik Röttsches, krit, eae+blinkwatch, ed+blinkwatch_opera.com, f(malita), gyuyoung.kim_webkit.org, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fix problems with flakes in SVG LayoutTests. A bug would make 4.99999952 be printed as "5.00" instead of "5" because 4.99999952 would be compared to 4 instead of 5. Also, 4.99999952 would cause some positions and rects to be shifted by a pixel. Fix here is to snap numbers very close to integers to the closest integer before printing it. That 4.99999952 appeared only sometimes, and only on Windows, is not fully known. A suspect is that it's related to the 32-bit ABI which requires use of x87 for passing floats. That combined with various inlining decisions and context switches could possibly affect the final value. This operation gives 4.99999952: float(25 + 200 * double(1.f*(-10.0f/100.f))) This operation gives 5.00000000: float(25 + 200 * float(1.f*(-10.0f/100.f))) BUG=438282

Patch Set 1 #

Patch Set 2 : Fix rounding bug. #

Patch Set 3 : Fixed expected files. #

Patch Set 4 : One more expected file #

Patch Set 5 : Rebased to newer master. #

Total comments: 1

Patch Set 6 : Rebase to newer master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -1 line) Patch
M Source/core/rendering/svg/SVGRenderTreeAsText.cpp View 1 2 3 4 5 1 chunk +27 lines, -1 line 0 comments Download

Messages

Total messages: 10 (2 generated)
Daniel Bratell
This patch fixes the issue with the trailing zeros. I thought it would also fix ...
5 years, 11 months ago (2015-01-16 13:21:29 UTC) #2
pdr.
In general I support this kind of change! I don't understand why the hasFractions check ...
5 years, 11 months ago (2015-01-20 19:53:45 UTC) #4
Daniel Bratell
On 2015/01/20 19:53:45, pdr wrote: > In general I support this kind of change! > ...
5 years, 11 months ago (2015-01-20 22:42:22 UTC) #5
pdr.
On 2015/01/20 at 22:42:22, bratell wrote: > On 2015/01/20 19:53:45, pdr wrote: > > In ...
5 years, 11 months ago (2015-01-21 00:33:56 UTC) #6
fs
On 2015/01/21 00:33:56, pdr wrote: > On 2015/01/20 at 22:42:22, bratell wrote: > > On ...
5 years, 11 months ago (2015-01-21 09:30:43 UTC) #7
Daniel Bratell
https://codereview.chromium.org/856533002/diff/80001/Source/core/rendering/svg/SVGRenderTreeAsText.cpp File Source/core/rendering/svg/SVGRenderTreeAsText.cpp (right): https://codereview.chromium.org/856533002/diff/80001/Source/core/rendering/svg/SVGRenderTreeAsText.cpp#newcode357 Source/core/rendering/svg/SVGRenderTreeAsText.cpp:357: FloatRect rect = snapToCloseInteger(object.absoluteClippedOverflowRect()); This is too late. It's ...
5 years, 11 months ago (2015-01-22 09:21:40 UTC) #8
pdr.
On 2015/01/22 at 09:21:40, bratell wrote: > https://codereview.chromium.org/856533002/diff/80001/Source/core/rendering/svg/SVGRenderTreeAsText.cpp > File Source/core/rendering/svg/SVGRenderTreeAsText.cpp (right): > > https://codereview.chromium.org/856533002/diff/80001/Source/core/rendering/svg/SVGRenderTreeAsText.cpp#newcode357 ...
5 years, 10 months ago (2015-01-30 22:21:22 UTC) #9
fs
5 years, 10 months ago (2015-02-02 09:33:42 UTC) #10
On 2015/01/30 22:21:22, pdr wrote:
> On 2015/01/22 at 09:21:40, bratell wrote:
> >
>
https://codereview.chromium.org/856533002/diff/80001/Source/core/rendering/sv...
> > File Source/core/rendering/svg/SVGRenderTreeAsText.cpp (right):
> > 
> >
>
https://codereview.chromium.org/856533002/diff/80001/Source/core/rendering/sv...
> > Source/core/rendering/svg/SVGRenderTreeAsText.cpp:357: FloatRect rect =
> snapToCloseInteger(object.absoluteClippedOverflowRect());
> > This is too late. It's in the conversion from float to LayoutRect the large
> error is introduced.
> 
> Sorry--I'm catching up on reviews after being out this week.
> 
> This seems too good to drop :) What should we do here?
> 
> @fs, do you still think this is a good idea?

I think the "alternative" way turned out to be good enough?

Powered by Google App Engine
This is Rietveld 408576698