WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
173135
[Win] Play button on movie trailers page is cropped with device scale factor 1.25.
https://bugs.webkit.org/show_bug.cgi?id=173135
Summary
[Win] Play button on movie trailers page is cropped with device scale factor ...
Per Arne Vollan
Reported
2017-06-08 23:37:38 PDT
1) Visit trailers.apple.com. 2) Choose one of the available trailers. 3) Observe how the play button is cropped when the device scale factor is 1.25.
Attachments
Image showing cropped play button.
(1.79 KB, image/png)
2017-06-08 23:39 PDT
,
Per Arne Vollan
no flags
Details
Patch
(1.98 KB, patch)
2017-06-08 23:52 PDT
,
Per Arne Vollan
zalan
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Per Arne Vollan
Comment 1
2017-06-08 23:39:13 PDT
Created
attachment 312393
[details]
Image showing cropped play button.
Per Arne Vollan
Comment 2
2017-06-08 23:52:21 PDT
Created
attachment 312395
[details]
Patch
Per Arne Vollan
Comment 3
2017-06-08 23:54:14 PDT
(In reply to Per Arne Vollan from
comment #2
)
> Created
attachment 312395
[details]
> Patch
This patch fixes this specific bug, but I don't think it is the correct fix, so input is highly appreciated :)
Per Arne Vollan
Comment 4
2017-06-08 23:59:28 PDT
<
rdar://problem/32547940
>
Brent Fulgham
Comment 5
2017-06-09 08:46:47 PDT
Comment on
attachment 312395
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=312395&action=review
> Source/WebCore/platform/graphics/LayoutRect.h:229 > + return FloatRect(FloatPoint(roundToDevicePixel(rect.x(), pixelSnappingFactor), roundToDevicePixel(rect.y(), pixelSnappingFactor)), FloatPoint(roundToDevicePixel(rect.maxX(), pixelSnappingFactor), roundToDevicePixel(rect.maxY(), pixelSnappingFactor)));
We need Zalan to look at this!
alan
Comment 6
2017-06-09 09:23:40 PDT
Comment on
attachment 312395
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=312395&action=review
> Source/WebCore/ChangeLog:10 > + Instead of using the function snapSizeToDevicePixel to compute the bottom, right corder of the > + snapped rectangle, we can use the function roundToDevicePixel.
In the ChangeLog entry you should explain the "why" and not the "what".
> Source/WebCore/ChangeLog:12 > + Covered by existing tests.
It is clearly a behavior change and unless you unksip some test, I don't think the 'covered by existing tests' is correct. Please add a test case for this progression.
>> Source/WebCore/platform/graphics/LayoutRect.h:229 >> - return FloatRect(FloatPoint(roundToDevicePixel(rect.x(), pixelSnappingFactor), roundToDevicePixel(rect.y(), pixelSnappingFactor)), snapSizeToDevicePixel(rect.size(), rect.location(), pixelSnappingFactor)); >> + return FloatRect(FloatPoint(roundToDevicePixel(rect.x(), pixelSnappingFactor), roundToDevicePixel(rect.y(), pixelSnappingFactor)), FloatPoint(roundToDevicePixel(rect.maxX(), pixelSnappingFactor), roundToDevicePixel(rect.maxY(), pixelSnappingFactor))); > > We need Zalan to look at this!
I need to do a bit more digging to figure out if it is correct. in the meantime, for the reasons above -> r-.
Per Arne Vollan
Comment 7
2017-06-09 09:31:57 PDT
(In reply to zalan from
comment #6
)
> Comment on
attachment 312395
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=312395&action=review
> > > Source/WebCore/ChangeLog:10 > > + Instead of using the function snapSizeToDevicePixel to compute the bottom, right corder of the > > + snapped rectangle, we can use the function roundToDevicePixel. > > In the ChangeLog entry you should explain the "why" and not the "what". > > > Source/WebCore/ChangeLog:12 > > + Covered by existing tests. > > It is clearly a behavior change and unless you unksip some test, I don't > think the 'covered by existing tests' is correct. Please add a test case for > this progression. > > >> Source/WebCore/platform/graphics/LayoutRect.h:229 > >> - return FloatRect(FloatPoint(roundToDevicePixel(rect.x(), pixelSnappingFactor), roundToDevicePixel(rect.y(), pixelSnappingFactor)), snapSizeToDevicePixel(rect.size(), rect.location(), pixelSnappingFactor)); > >> + return FloatRect(FloatPoint(roundToDevicePixel(rect.x(), pixelSnappingFactor), roundToDevicePixel(rect.y(), pixelSnappingFactor)), FloatPoint(roundToDevicePixel(rect.maxX(), pixelSnappingFactor), roundToDevicePixel(rect.maxY(), pixelSnappingFactor))); > > > > We need Zalan to look at this! > > I need to do a bit more digging to figure out if it is correct. in the > meantime, for the reasons above -> r-.
Thanks for reviewing! I forgot to mention that this happens on Windows, although it might be a problem on macOS/iOS as well if the scale factor is 1.25x.
alan
Comment 8
2017-06-09 09:33:41 PDT
(In reply to Per Arne Vollan from
comment #7
)
> (In reply to zalan from
comment #6
) > > Comment on
attachment 312395
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=312395&action=review
> > > > > Source/WebCore/ChangeLog:10 > > > + Instead of using the function snapSizeToDevicePixel to compute the bottom, right corder of the > > > + snapped rectangle, we can use the function roundToDevicePixel. > > > > In the ChangeLog entry you should explain the "why" and not the "what". > > > > > Source/WebCore/ChangeLog:12 > > > + Covered by existing tests. > > > > It is clearly a behavior change and unless you unksip some test, I don't > > think the 'covered by existing tests' is correct. Please add a test case for > > this progression. > > > > >> Source/WebCore/platform/graphics/LayoutRect.h:229 > > >> - return FloatRect(FloatPoint(roundToDevicePixel(rect.x(), pixelSnappingFactor), roundToDevicePixel(rect.y(), pixelSnappingFactor)), snapSizeToDevicePixel(rect.size(), rect.location(), pixelSnappingFactor)); > > >> + return FloatRect(FloatPoint(roundToDevicePixel(rect.x(), pixelSnappingFactor), roundToDevicePixel(rect.y(), pixelSnappingFactor)), FloatPoint(roundToDevicePixel(rect.maxX(), pixelSnappingFactor), roundToDevicePixel(rect.maxY(), pixelSnappingFactor))); > > > > > > We need Zalan to look at this! > > > > I need to do a bit more digging to figure out if it is correct. in the > > meantime, for the reasons above -> r-. > > Thanks for reviewing! I forgot to mention that this happens on Windows, > although it might be a problem on macOS/iOS as well if the scale factor is > 1.25x.
We surely have issues with non-integral zoom factors on all platforms.
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