WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 169031
137442
There are wrong condition checking on GraphicsContext::roundToDevicePixels
https://bugs.webkit.org/show_bug.cgi?id=137442
Summary
There are wrong condition checking on GraphicsContext::roundToDevicePixels
byeongha.cho
Reported
2014-10-06 00:34:24 PDT
There are wrong condition checking on GraphicsContext::roundToDevicePixels() of GraphicsContextCairo.cpp. I think this is copy and paste mistake. // We must ensure width and height are at least 1 (or -1) when // we're given float values in the range between 0 and 1 (or -1 and 0). double width = frect.width(); double height = frect.height(); cairo_user_to_device_distance(cr, &width, &height); if (width > -1 && width < 0) width = -1; else if (width > 0 && width < 1) width = 1; else width = round(width); if (height > -1 && width < 0) //'width' should be replaced with 'height'. height = -1; else if (height > 0 && height < 1) height = 1; else height = round(height);
Attachments
Patch
(1.46 KB, patch)
2014-10-06 00:38 PDT
,
byeongha.cho
no flags
Details
Formatted Diff
Diff
Patch
(2.85 KB, patch)
2014-10-14 23:07 PDT
,
byeongha.cho
no flags
Details
Formatted Diff
Diff
Patch
(1.53 KB, patch)
2014-10-14 23:38 PDT
,
byeongha.cho
cgarcia
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
byeongha.cho
Comment 1
2014-10-06 00:38:01 PDT
Created
attachment 239315
[details]
Patch
Darin Adler
Comment 2
2014-10-07 21:42:40 PDT
Comment on
attachment 239315
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=239315&action=review
> Source/WebCore/ChangeLog:8 > + No new tests is needed. There's no functional change.
Why is there no functional change? The condition is wrong; it must lead to some kind of bug.
byeongha.cho
Comment 3
2014-10-14 23:05:08 PDT
(In reply to
comment #2
)
> (From update of
attachment 239315
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=239315&action=review
> > Source/WebCore/ChangeLog:8 > > + No new tests is needed. There's no functional change. > Why is there no functional change? The condition is wrong; it must lead to some kind of bug.
Yes, you are right. I'm going to upload the patch with detailed description again. Actually, this is regression of '[cairo][canvas] Drawing from/into float rectangles with width or height in range 0 to 1 fails' issue. I think Zan Dobersek <
zandobersek@gmail.com
> has made some mistake. So I fixed it.
byeongha.cho
Comment 4
2014-10-14 23:07:14 PDT
Created
attachment 239851
[details]
Patch
Gyuyoung Kim
Comment 5
2014-10-14 23:09:09 PDT
Comment on
attachment 239851
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=239851&action=review
> Source/WebCore/ChangeLog:10 > + commit 957e1a234d3bc5b333615b0c5b6c8da56be4600a
I think this full commit log lets us confuse to track history. I think you just mention what revision used wrong condition in ChangeLog.
byeongha.cho
Comment 6
2014-10-14 23:22:58 PDT
Please refer
https://bugs.webkit.org/show_bug.cgi?id=54491
.
byeongha.cho
Comment 7
2014-10-14 23:38:55 PDT
Created
attachment 239852
[details]
Patch
Darin Adler
Comment 8
2014-10-15 09:40:17 PDT
Comment on
attachment 239852
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=239852&action=review
> Source/WebCore/ChangeLog:9 > + Fixing copy and paste mistake of
r79129
. > + There are condition checking for width in place of height.
Why no test case? Generally we require test cases so we don’t introduce the same mistake again.
Ahmad Saleem
Comment 9
2022-06-01 15:32:46 PDT
I tried to look into GraphicsContextCairo.cpp from Webkit Github mirror but I think code is more simplified and this might not be be applicable anymore. Link -
https://github.com/WebKit/WebKit/blob/ecc984f22b6d9d87c82985a6fb0c8b8b4a5c7975/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
Can we close this, if it is not applicable anymore? Thanks!
Alexey Proskuryakov
Comment 10
2022-06-01 18:41:30 PDT
This was fixed in
bug 169031
(without a test case!!!), and later simplified to simply call into Cairo indeed. *** This bug has been marked as a duplicate of
bug 169031
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug