WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
98205
Round image sizes when zooming
https://bugs.webkit.org/show_bug.cgi?id=98205
Summary
Round image sizes when zooming
Emil A Eklund
Reported
2012-10-02 15:01:34 PDT
We currently floor image sizes when zooming which can result in images being rendered at one pixel less than the actual size. This is especially likely to happen for very large images. Downstream webkit bug:
http://code.google.com/p/chromium/issues/detail?id=150802
Attachments
Patch
(98.61 KB, patch)
2012-10-02 15:03 PDT
,
Emil A Eklund
no flags
Details
Formatted Diff
Diff
Patch
(98.66 KB, patch)
2012-10-03 12:36 PDT
,
Emil A Eklund
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Emil A Eklund
Comment 1
2012-10-02 15:03:50 PDT
Created
attachment 166757
[details]
Patch
Eric Seidel (no email)
Comment 2
2012-10-02 15:20:53 PDT
Comment on
attachment 166757
[details]
Patch LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png looks like they aren't quite in the same y-offset after zooming?
Emil A Eklund
Comment 3
2012-10-02 16:33:03 PDT
The(In reply to
comment #2
)
> (From update of
attachment 166757
[details]
) > LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png looks like they aren't quite in the same y-offset after zooming?
Correct. This patch doesn't change that though, it only changes the size of the image to that it is the same size as the svg element.
Build Bot
Comment 4
2012-10-02 19:50:58 PDT
Comment on
attachment 166757
[details]
Patch
Attachment 166757
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/14123568
New failing tests: svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml fast/sub-pixel/zoomed-image-tiles.html svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml
Emil A Eklund
Comment 5
2012-10-03 12:36:18 PDT
Created
attachment 166941
[details]
Patch
Eric Seidel (no email)
Comment 6
2012-10-03 13:15:45 PDT
Comment on
attachment 166941
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=166941&action=review
OK.
> Source/WebCore/loader/cache/CachedImage.cpp:268 > + imageSize.setWidth(lroundf(imageSize.width() * widthScale)); > + imageSize.setHeight(lroundf(imageSize.height() * heightScale));
We could have also written this in terms of LayoutUnit primatives and done this w/o #ifdefs. :)
Emil A Eklund
Comment 7
2012-10-03 13:22:27 PDT
(In reply to
comment #6
)
> (From update of
attachment 166941
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=166941&action=review
> > OK. > > > Source/WebCore/loader/cache/CachedImage.cpp:268 > > + imageSize.setWidth(lroundf(imageSize.width() * widthScale)); > > + imageSize.setHeight(lroundf(imageSize.height() * heightScale)); > > We could have also written this in terms of LayoutUnit primatives and done this w/o #ifdefs. :)
I'd rather keep it as a IntSize as we need to represent images that way but yeah, I suppose we could have.
Emil A Eklund
Comment 8
2012-10-03 15:07:42 PDT
Committed
r130329
: <
http://trac.webkit.org/changeset/130329
>
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