RESOLVED FIXED Bug 68669
Remove unneeded type conversion from background bleed code
https://bugs.webkit.org/show_bug.cgi?id=68669
Summary Remove unneeded type conversion from background bleed code
Darin Adler
Reported 2011-09-22 17:33:13 PDT
Remove unneeded type conversion from background bleed code
Attachments
Patch (1.84 KB, patch)
2011-09-22 17:33 PDT, Darin Adler
no flags
Darin Adler
Comment 1 2011-09-22 17:33:55 PDT
Geoffrey Garen
Comment 2 2011-09-22 17:38:09 PDT
Comment on attachment 108429 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=108429&action=review r=me > Source/WebCore/rendering/RenderBoxModelObject.cpp:593 > + adjustedRect.inflateX(-ceil(1 / transform.xScale())); > + adjustedRect.inflateY(-ceil(1 / transform.yScale())); Maybe 1.0 would be clearer here.
Darin Adler
Comment 3 2011-09-22 17:44:51 PDT
Comment on attachment 108429 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=108429&action=review >> Source/WebCore/rendering/RenderBoxModelObject.cpp:593 >> + adjustedRect.inflateY(-ceil(1 / transform.yScale())); > > Maybe 1.0 would be clearer here. I like the 1 fine. Using 1.0 would subtly impose a conversion to double if the other type happened to be float. I prefer to just leave it off.
WebKit Review Bot
Comment 4 2011-09-22 20:20:19 PDT
Comment on attachment 108429 [details] Patch Clearing flags on attachment: 108429 Committed r95778: <http://trac.webkit.org/changeset/95778>
WebKit Review Bot
Comment 5 2011-09-22 20:20:23 PDT
All reviewed patches have been landed. Closing bug.
Adam Roben (:aroben)
Comment 6 2011-09-23 05:16:40 PDT
Looks like this broke 32-bit builds, with warnings like the following: WebCore/rendering/RenderBoxModelObject.cpp: In function 'WebCore::LayoutRect WebCore::backgroundRectAdjustedForBleedAvoidance(WebCore::GraphicsContext*, const WebCore::LayoutRect&, WebCore::BackgroundBleedAvoidance)': WebCore/rendering/RenderBoxModelObject.cpp:592: warning: implicit conversion shortens 64-bit value into a 32-bit value WebCore/rendering/RenderBoxModelObject.cpp:593: warning: implicit conversion shortens 64-bit value into a 32-bit value
Darin Adler
Comment 7 2011-09-23 09:54:01 PDT
(In reply to comment #6) > Looks like this broke 32-bit builds, with warnings like the following: > > > WebCore/rendering/RenderBoxModelObject.cpp: In function 'WebCore::LayoutRect WebCore::backgroundRectAdjustedForBleedAvoidance(WebCore::GraphicsContext*, const WebCore::LayoutRect&, WebCore::BackgroundBleedAvoidance)': > WebCore/rendering/RenderBoxModelObject.cpp:592: warning: implicit conversion shortens 64-bit value into a 32-bit value > WebCore/rendering/RenderBoxModelObject.cpp:593: warning: implicit conversion shortens 64-bit value into a 32-bit value I’ll fix that right now.
Darin Adler
Comment 8 2011-09-23 09:55:30 PDT
I’ll fix this by adding a cast. But that warning seems pointless. And this has nothing to do with 32 vs. 64-bit builds. The type float is always 32 and the type double is always 64. I think it might even be a compiler bug.
Darin Adler
Comment 9 2011-09-23 09:59:11 PDT
(In reply to comment #6) > Looks like this broke 32-bit builds Thanks for the heads up, and thanks for not just rolling it out!
Note You need to log in before you can comment on or make changes to this bug.