Bug 180358 - <video> and scale() transforms yield shrunk small or clipped controls
Summary: <video> and scale() transforms yield shrunk small or clipped controls
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-04 08:49 PST by Antoine Quint
Modified: 2017-12-05 00:22 PST (History)
4 users (show)

See Also:


Attachments
Patch (7.93 KB, patch)
2017-12-04 08:55 PST, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2017-12-04 08:49:29 PST
If a <video> element is transformed, directly or through a parent, with a scale() command, its controls will appear clipped, when scale > 1, or shrunk, when scale < 0.
Comment 1 Antoine Quint 2017-12-04 08:50:04 PST
<rdar://problem/34436124>
Comment 2 Antoine Quint 2017-12-04 08:55:51 PST
Created attachment 328349 [details]
Patch
Comment 3 Dean Jackson 2017-12-04 14:12:18 PST
Comment on attachment 328349 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=328349&action=review

> Source/WebCore/Modules/modern-media-controls/media/media-controller.js:226
> +        while (node && node instanceof HTMLElement) {
> +            transform = transform.multiply(new WebKitCSSMatrix(getComputedStyle(node).transform));
> +            node = node.parentNode;

What happens if any of these transforms change after the calculation?
Comment 4 Antoine Quint 2017-12-04 14:25:30 PST
(In reply to Dean Jackson from comment #3)
> Comment on attachment 328349 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=328349&action=review
> 
> > Source/WebCore/Modules/modern-media-controls/media/media-controller.js:226
> > +        while (node && node instanceof HTMLElement) {
> > +            transform = transform.multiply(new WebKitCSSMatrix(getComputedStyle(node).transform));
> > +            node = node.parentNode;
> 
> What happens if any of these transforms change after the calculation?

Nothing, it doesn't change the metrics of the elements.
Comment 5 WebKit Commit Bot 2017-12-04 14:49:29 PST
Comment on attachment 328349 [details]
Patch

Clearing flags on attachment: 328349

Committed r225495: <https://trac.webkit.org/changeset/225495>
Comment 6 WebKit Commit Bot 2017-12-04 14:49:30 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Simon Fraser (smfr) 2017-12-04 14:52:54 PST
Comment on attachment 328349 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=328349&action=review

> Source/WebCore/Modules/modern-media-controls/media/media-controller.js:225
> +            transform = transform.multiply(new WebKitCSSMatrix(getComputedStyle(node).transform));

Why not DOMMatrix? WebKitCSSMatrix should go away eventually.
Comment 8 Antoine Quint 2017-12-05 00:22:20 PST
Committed r225521: <https://trac.webkit.org/changeset/225521>
Comment 9 Antoine Quint 2017-12-05 00:22:56 PST
(In reply to Simon Fraser (smfr) from comment #7)
> Comment on attachment 328349 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=328349&action=review
> 
> > Source/WebCore/Modules/modern-media-controls/media/media-controller.js:225
> > +            transform = transform.multiply(new WebKitCSSMatrix(getComputedStyle(node).transform));
> 
> Why not DOMMatrix? WebKitCSSMatrix should go away eventually.

This was fixed in a follow-up commit (r225521).