Title: [213670] trunk
- Revision
- 213670
- Author
- commit-qu...@webkit.org
- Date
- 2017-03-09 14:17:57 -0800 (Thu, 09 Mar 2017)
Log Message
[Modern Media Controls] iOS: long press on play button shows the Copy menu
https://bugs.webkit.org/show_bug.cgi?id=169355
<rdar://problem/30928998>
Patch by Antoine Quint <grao...@apple.com> on 2017-03-09
Reviewed by Dean Jackson.
Source/WebCore:
Disable built-in UI behavior that shows a magnifier or a copy callout when pressing
on an element for a long time. These do not make sense for media controls.
Test: media/modern-media-controls/audio/audio-controls-styles.html
* Modules/modern-media-controls/controls/media-controls.css:
(:host):
LayoutTests:
Add a test to check that the expected properties are set as they should to disable
built-in UI behavior that shows a magnifier or a copy callout when pressing on an
element for a long time.
* media/modern-media-controls/audio/audio-controls-styles-expected.txt: Added.
* media/modern-media-controls/audio/audio-controls-styles.html: Added.
* platform/mac/TestExpectations:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (213669 => 213670)
--- trunk/LayoutTests/ChangeLog 2017-03-09 22:17:13 UTC (rev 213669)
+++ trunk/LayoutTests/ChangeLog 2017-03-09 22:17:57 UTC (rev 213670)
@@ -1,3 +1,19 @@
+2017-03-09 Antoine Quint <grao...@apple.com>
+
+ [Modern Media Controls] iOS: long press on play button shows the Copy menu
+ https://bugs.webkit.org/show_bug.cgi?id=169355
+ <rdar://problem/30928998>
+
+ Reviewed by Dean Jackson.
+
+ Add a test to check that the expected properties are set as they should to disable
+ built-in UI behavior that shows a magnifier or a copy callout when pressing on an
+ element for a long time.
+
+ * media/modern-media-controls/audio/audio-controls-styles-expected.txt: Added.
+ * media/modern-media-controls/audio/audio-controls-styles.html: Added.
+ * platform/mac/TestExpectations:
+
2017-03-09 Ryan Haddad <ryanhad...@apple.com>
Rebaseline js/dom/global-constructors-attributes.html.
Added: trunk/LayoutTests/media/modern-media-controls/audio/audio-controls-styles-expected.txt (0 => 213670)
--- trunk/LayoutTests/media/modern-media-controls/audio/audio-controls-styles-expected.txt (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/audio/audio-controls-styles-expected.txt 2017-03-09 22:17:57 UTC (rev 213670)
@@ -0,0 +1,12 @@
+Testing media elements disable built-in browser UI features to copy content.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS getComputedStyle(audio).WebkitUserSelect is "none"
+PASS getComputedStyle(audio).WebkitTouchCallout is "none"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/media/modern-media-controls/audio/audio-controls-styles.html (0 => 213670)
--- trunk/LayoutTests/media/modern-media-controls/audio/audio-controls-styles.html (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/audio/audio-controls-styles.html 2017-03-09 22:17:57 UTC (rev 213670)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<script src=""
+<body>
+<script type="text/_javascript_">
+
+description("Testing media elements disable built-in browser UI features to copy content.");
+
+const audio = document.body.appendChild(document.createElement("audio"));
+audio.controls = true;
+
+shouldBeEqualToString("getComputedStyle(audio).WebkitUserSelect", "none");
+shouldBeEqualToString("getComputedStyle(audio).WebkitTouchCallout", "none");
+
+debug("");
+audio.remove();
+
+</script>
+<script src=""
+</body>
Modified: trunk/LayoutTests/platform/mac/TestExpectations (213669 => 213670)
--- trunk/LayoutTests/platform/mac/TestExpectations 2017-03-09 22:17:13 UTC (rev 213669)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2017-03-09 22:17:57 UTC (rev 213670)
@@ -1481,6 +1481,7 @@
media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle.html [ Skip ]
media/modern-media-controls/media-controller/media-controller-ios-do-not-hide-controls-when-tapping-button.html [ Skip ]
media/modern-media-controls/media-controller/media-controller-tight-padding.html [ Skip ]
+media/modern-media-controls/audio/audio-controls-styles.html [ Skip ]
webkit.org/b/167266 media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html [ Pass Failure ]
Modified: trunk/Source/WebCore/ChangeLog (213669 => 213670)
--- trunk/Source/WebCore/ChangeLog 2017-03-09 22:17:13 UTC (rev 213669)
+++ trunk/Source/WebCore/ChangeLog 2017-03-09 22:17:57 UTC (rev 213670)
@@ -1,3 +1,19 @@
+2017-03-09 Antoine Quint <grao...@apple.com>
+
+ [Modern Media Controls] iOS: long press on play button shows the Copy menu
+ https://bugs.webkit.org/show_bug.cgi?id=169355
+ <rdar://problem/30928998>
+
+ Reviewed by Dean Jackson.
+
+ Disable built-in UI behavior that shows a magnifier or a copy callout when pressing
+ on an element for a long time. These do not make sense for media controls.
+
+ Test: media/modern-media-controls/audio/audio-controls-styles.html
+
+ * Modules/modern-media-controls/controls/media-controls.css:
+ (:host):
+
2017-03-09 Alex Christensen <achristen...@webkit.org>
[Content Extensions] Introduce if-top-url and unless-top-url
Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css (213669 => 213670)
--- trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css 2017-03-09 22:17:13 UTC (rev 213669)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css 2017-03-09 22:17:57 UTC (rev 213670)
@@ -23,6 +23,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+:host {
+ /* We always want to prevent iOS dialogs and the magnifier UI to be shown. */
+ -webkit-user-select: none !important;
+ -webkit-touch-callout: none !important;
+}
+
:host(audio) {
width: 200px;
min-width: 200px !important;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes