Ensure iOS layout traits are used for media controls in modern compatibility mode
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2019 07:11:11 +0000 (07:11 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2019 07:11:11 +0000 (07:11 +0000)
commita05acfdf86484db23b3dbd2b1d22f835ff8e3996
tree53cf7bca15822cdec253973685b3d09e7d4d901d
parentd8bb397069a167051c93bfb9330a7bcc828d2529
Ensure iOS layout traits are used for media controls in modern compatibility mode
https://bugs.webkit.org/show_bug.cgi?id=196812
<rdar://problem/47460637>

Reviewed by Dean Jackson.

Source/WebCore:

Test: media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html

Instead of looking at the UA string, check whether we support touches which is the correct indicator of whether we should
be using the iOS layout traits for media controls.

* Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype.get layoutTraits):

LayoutTests:

Add a new test that enforces modern compatibility mode and checks that the iOS controls are used.

* media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode-expected.txt: Added.
* media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/modern-media-controls/media/media-controller.js