Title: [209451] trunk
Revision
209451
Author
[email protected]
Date
2016-12-06 23:48:23 -0800 (Tue, 06 Dec 2016)

Log Message

[Modern Media Controls] Use tap and pinch gestures on iOS
https://bugs.webkit.org/show_bug.cgi?id=165518

Reviewed by Dean Jackson.

Source/WebCore:

We now use touch events to identify taps and pinches on media controls to respond immediately
to user interaction on buttons and enter fullscreen when pinching out.

* Modules/modern-media-controls/controls/button.css:
(button):
* Modules/modern-media-controls/controls/button.js:
(Button):
(Button.prototype.handleEvent):
(Button.prototype.gestureRecognizerStateDidChange):
(Button.prototype._notifyDelegateOfActivation):
(Button.prototype._handleUIEvent): Deleted.
* Modules/modern-media-controls/controls/controls-bar.js:
(ControlsBar.prototype.set fadesWhileIdle):
(ControlsBar.prototype.gestureRecognizerStateDidChange):
* Modules/modern-media-controls/controls/icon-button.js:
(IconButton.prototype._updateImage):
(IconButton):
* Modules/modern-media-controls/controls/ios-inline-media-controls.js:
(IOSInlineMediaControls.prototype.gestureRecognizerStateDidChange):
* Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js: Added.
(GestureRecognizer):
(GestureRecognizer.prototype.get state):
(GestureRecognizer.prototype.set state):
(GestureRecognizer.prototype.get target):
(GestureRecognizer.prototype.set target):
(GestureRecognizer.prototype.get numberOfTouches):
(GestureRecognizer.prototype.get enabled):
(GestureRecognizer.prototype.set enabled):
(GestureRecognizer.prototype.reset):
(GestureRecognizer.prototype.locationInElement):
(GestureRecognizer.prototype.locationInClient):
(GestureRecognizer.prototype.locationOfTouchInElement):
(GestureRecognizer.prototype.touchesBegan):
(GestureRecognizer.prototype.touchesMoved):
(GestureRecognizer.prototype.touchesEnded):
(GestureRecognizer.prototype.touchesCancelled):
(GestureRecognizer.prototype.gestureBegan):
(GestureRecognizer.prototype.gestureChanged):
(GestureRecognizer.prototype.gestureEnded):
(GestureRecognizer.prototype.enterPossibleState):
(GestureRecognizer.prototype.enterBeganState):
(GestureRecognizer.prototype.enterEndedState):
(GestureRecognizer.prototype.enterCancelledState):
(GestureRecognizer.prototype.enterFailedState):
(GestureRecognizer.prototype.enterChangedState):
(GestureRecognizer.prototype.enterRecognizedState):
(GestureRecognizer.prototype.handleEvent):
(GestureRecognizer.prototype._initRecognizer):
(GestureRecognizer.prototype._updateBaseListeners):
(GestureRecognizer.prototype._removeTrackingListeners):
(GestureRecognizer.prototype._updateTargetTouches):
(GestureRecognizer.prototype._updateKeyboardModifiers):
* Modules/modern-media-controls/gesture-recognizers/pinch.js: Added.
(PinchGestureRecognizer):
(PinchGestureRecognizer.prototype.get velocity):
(PinchGestureRecognizer.prototype.touchesBegan):
(PinchGestureRecognizer.prototype.touchesMoved):
(PinchGestureRecognizer.prototype.touchesEnded):
(PinchGestureRecognizer.prototype.gestureBegan):
(PinchGestureRecognizer.prototype.gestureChanged):
(PinchGestureRecognizer.prototype.gestureEnded):
(PinchGestureRecognizer.prototype.reset):
(PinchGestureRecognizer.prototype._recordGesture):
(PinchGestureRecognizer.prototype._updateStateWithEvent):
(PinchGestureRecognizer.prototype._distance):
* Modules/modern-media-controls/gesture-recognizers/tap.js: Added.
(TapGestureRecognizer):
(TapGestureRecognizer.prototype.touchesBegan):
(TapGestureRecognizer.prototype.touchesMoved):
(TapGestureRecognizer.prototype.touchesEnded):
(TapGestureRecognizer.prototype.reset):
(TapGestureRecognizer.prototype.locationInElement):
(TapGestureRecognizer.prototype.locationInClient):
(TapGestureRecognizer.prototype._clearTimer):
(TapGestureRecognizer.prototype._rewindTimer):
(TapGestureRecognizer.prototype._timerFired):
* Modules/modern-media-controls/js-files:
* Modules/modern-media-controls/media/airplay-support.js:
(AirplaySupport.prototype.buttonWasClicked): Deleted.
* Modules/modern-media-controls/media/controls-visibility-support.js:
(ControlsVisibilitySupport):
(ControlsVisibilitySupport.prototype.handleEvent):
(ControlsVisibilitySupport.prototype.syncControl): Deleted.
* Modules/modern-media-controls/media/fullscreen-support.js:
(FullscreenSupport):
(FullscreenSupport.prototype.iOSInlineMediaControlsRecognizedPinchInGesture):
(FullscreenSupport.prototype.buttonWasClicked): Deleted.
* Modules/modern-media-controls/media/media-controller-support.js:
(MediaControllerSupport):
(MediaControllerSupport.prototype.handleEvent):
(MediaControllerSupport.prototype.buttonWasClicked): Deleted.
* Modules/modern-media-controls/media/mute-support.js:
(MuteSupport.prototype.buttonWasClicked): Deleted.
* Modules/modern-media-controls/media/pip-support.js:
(PiPSupport.prototype.buttonWasClicked): Deleted.
* Modules/modern-media-controls/media/playback-support.js:
(PlaybackSupport.prototype.buttonWasClicked): Deleted.
* Modules/modern-media-controls/media/skip-back-support.js:
(SkipBackSupport.prototype.buttonWasClicked): Deleted.
* Modules/modern-media-controls/media/start-support.js:
(StartSupport.prototype.buttonWasClicked): Deleted.
* Modules/modern-media-controls/media/tracks-support.js:
(TracksSupport.prototype.buttonWasClicked): Deleted.

LayoutTests:

With the addition of new gesture recognizer source files, some tests were failing
due to linking to only a subset of the modern media controls resources.

* media/modern-media-controls/airplay-button/airplay-button.html:
* media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html:
* media/modern-media-controls/button/button.html:
* media/modern-media-controls/buttons-container/buttons-container-buttons-property.html:
* media/modern-media-controls/buttons-container/buttons-container-constructor.html:
* media/modern-media-controls/buttons-container/buttons-container-layout.html:
* media/modern-media-controls/fullscreen-button/fullscreen-button.html:
* media/modern-media-controls/icon-button/icon-button-active-state.html:
* media/modern-media-controls/icon-button/icon-button.html:
* media/modern-media-controls/mute-button/mute-button.html:
* media/modern-media-controls/pip-button/pip-button.html:
* media/modern-media-controls/placard/placard.html:
* media/modern-media-controls/play-pause-button/play-pause-button.html:
* media/modern-media-controls/skip-back-button/skip-back-button.html:
* media/modern-media-controls/start-button/start-button-styles.html:
* media/modern-media-controls/start-button/start-button.html:
* media/modern-media-controls/tracks-button/tracks-button.html:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (209450 => 209451)


--- trunk/LayoutTests/ChangeLog	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/ChangeLog	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,3 +1,31 @@
+2016-12-06  Antoine Quint  <[email protected]>
+
+        [Modern Media Controls] Use tap and pinch gestures on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=165518
+
+        Reviewed by Dean Jackson.
+
+        With the addition of new gesture recognizer source files, some tests were failing
+        due to linking to only a subset of the modern media controls resources.
+
+        * media/modern-media-controls/airplay-button/airplay-button.html:
+        * media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html:
+        * media/modern-media-controls/button/button.html:
+        * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html:
+        * media/modern-media-controls/buttons-container/buttons-container-constructor.html:
+        * media/modern-media-controls/buttons-container/buttons-container-layout.html:
+        * media/modern-media-controls/fullscreen-button/fullscreen-button.html:
+        * media/modern-media-controls/icon-button/icon-button-active-state.html:
+        * media/modern-media-controls/icon-button/icon-button.html:
+        * media/modern-media-controls/mute-button/mute-button.html:
+        * media/modern-media-controls/pip-button/pip-button.html:
+        * media/modern-media-controls/placard/placard.html:
+        * media/modern-media-controls/play-pause-button/play-pause-button.html:
+        * media/modern-media-controls/skip-back-button/skip-back-button.html:
+        * media/modern-media-controls/start-button/start-button-styles.html:
+        * media/modern-media-controls/start-button/start-button.html:
+        * media/modern-media-controls/tracks-button/tracks-button.html:
+
 2016-12-06  Ryan Haddad  <[email protected]>
 
         Marking http/tests/security/module-incorrect-mime-types.html as flaky on ios-simulator-wk2.

Modified: trunk/LayoutTests/media/modern-media-controls/airplay-button/airplay-button.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/airplay-button/airplay-button.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/airplay-button/airplay-button.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,14 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
@@ -16,8 +7,6 @@
 
 description("Testing the <code>AirplayButton</code> class.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 const airplayButton = new AirplayButton({ layoutTraits: LayoutTraits.macOS });
 
 shouldBeEqualToString("airplayButton.element.localName", "button");

Modified: trunk/LayoutTests/media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,13 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
@@ -15,8 +7,6 @@
 
 description("Testing the <code>AspectRatioButton</code> class.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 const scaleToFillButton = new AspectRatioButton({ layoutTraits: LayoutTraits.macOS });
 
 shouldBeEqualToString("scaleToFillButton.element.localName", "button");

Modified: trunk/LayoutTests/media/modern-media-controls/button/button.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/button/button.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/button/button.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,9 +1,6 @@
 <link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
@@ -21,7 +18,7 @@
 debug("Responds to click events");
 button.uiDelegate = {
 
-    buttonWasClicked: function(aButton)
+    buttonWasPressed: function(aButton)
     {
         clickedButton = aButton;
         shouldBeTrue("clickedButton === button");

Modified: trunk/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-buttons-property.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-buttons-property.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-buttons-property.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,11 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 

Modified: trunk/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-constructor.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-constructor.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-constructor.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,11 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 

Modified: trunk/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-layout.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-layout.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-layout.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,11 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 

Modified: trunk/LayoutTests/media/modern-media-controls/fullscreen-button/fullscreen-button.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/fullscreen-button/fullscreen-button.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/fullscreen-button/fullscreen-button.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,13 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
@@ -15,8 +7,6 @@
 
 description("Testing the <code>FullscreenButton</code> class.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 const enterFullscreenButton = new FullscreenButton({ layoutTraits: LayoutTraits.macOS });
 
 shouldBeEqualToString("enterFullscreenButton.element.localName", "button");

Modified: trunk/LayoutTests/media/modern-media-controls/icon-button/icon-button-active-state.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/icon-button/icon-button-active-state.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/icon-button/icon-button-active-state.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,12 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
@@ -14,8 +7,6 @@
 
 window.jsTestIsAsync = true;
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 const iconButton = new IconButton({ layoutDelegate: { layoutTraits: LayoutTraits.macOS } });
 iconButton.iconName = Icons.Pause;
 document.body.appendChild(iconButton.element);

Modified: trunk/LayoutTests/media/modern-media-controls/icon-button/icon-button.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/icon-button/icon-button.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/icon-button/icon-button.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,12 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
@@ -14,8 +7,6 @@
 
 description("Testing the <code>IconButton</code> class.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 const layoutDelegate = {};
 
 const iconButton = new IconButton({ layoutDelegate });

Modified: trunk/LayoutTests/media/modern-media-controls/mute-button/mute-button.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/mute-button/mute-button.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/mute-button/mute-button.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,13 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
@@ -15,8 +7,6 @@
 
 description("Testing the <code>MuteButton</code> class.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 const muteButton = new MuteButton({ layoutTraits: LayoutTraits.macOS });
 
 shouldBeEqualToString("muteButton.element.localName", "button");

Modified: trunk/LayoutTests/media/modern-media-controls/pip-button/pip-button.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/pip-button/pip-button.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/pip-button/pip-button.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,13 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
@@ -15,8 +7,6 @@
 
 description("Testing the <code>PiPButton</code> class.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 const pipButton = new PiPButton({ layoutTraits: LayoutTraits.macOS });
 
 shouldBeEqualToString("pipButton.element.localName", "button");

Modified: trunk/LayoutTests/media/modern-media-controls/placard/placard.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/placard/placard.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/placard/placard.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,21 +1,10 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
 description("Testing the <code>Placard</code> class.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 debug("Placard with all parameters");
 const placard = new Placard({
     iconName: Icons.AirplayPlacard,

Modified: trunk/LayoutTests/media/modern-media-controls/play-pause-button/play-pause-button.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/play-pause-button/play-pause-button.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/play-pause-button/play-pause-button.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,13 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
@@ -15,8 +7,6 @@
 
 description("Testing the <code>PlayPauseButton</code> class.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 const playButton = new PlayPauseButton({ layoutTraits: LayoutTraits.macOS });
 
 shouldBeEqualToString("playButton.element.localName", "button");

Modified: trunk/LayoutTests/media/modern-media-controls/skip-back-button/skip-back-button.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/skip-back-button/skip-back-button.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/skip-back-button/skip-back-button.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,13 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
@@ -15,8 +7,6 @@
 
 description("Testing the <code>SkipBackButton</code> class.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 const skipBackButton = new SkipBackButton({ layoutTraits: LayoutTraits.macOS });
 
 shouldBeEqualToString("skipBackButton.element.localName", "button");

Modified: trunk/LayoutTests/media/modern-media-controls/start-button/start-button-styles.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/start-button/start-button-styles.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/start-button/start-button-styles.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,13 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <style type="text/css" media="screen">
 
 #container {
@@ -25,8 +17,6 @@
 
 description("Testing the <code>StartButton</code> class.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 const startButton = new StartButton({ layoutTraits: LayoutTraits.macOS });
 document.getElementById("container").appendChild(startButton.element);
 

Modified: trunk/LayoutTests/media/modern-media-controls/start-button/start-button.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/start-button/start-button.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/start-button/start-button.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,20 +1,10 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
 description("Testing the <code>StartButton</code> class.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 const startButton = new StartButton({ layoutTraits: LayoutTraits.macOS });
 
 shouldBeEqualToString("startButton.element.localName", "button");

Modified: trunk/LayoutTests/media/modern-media-controls/tracks-button/tracks-button.html (209450 => 209451)


--- trunk/LayoutTests/media/modern-media-controls/tracks-button/tracks-button.html	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/LayoutTests/media/modern-media-controls/tracks-button/tracks-button.html	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,13 +1,5 @@
-<link rel="stylesheet" href="" type="text/css" media="screen">
-<link rel="stylesheet" href="" type="text/css" media="screen">
 <script src=""
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
-<script src="" type="text/_javascript_"></script>
+<script src="" type="text/_javascript_"></script>
 <body>
 <script type="text/_javascript_">
 
@@ -15,8 +7,6 @@
 
 description("Testing the <code>TracksButton</code> class.");
 
-iconService.directoryPath = "../../../../Source/WebCore/Modules/modern-media-controls/images";
-
 const tracksButton = new TracksButton({ layoutTraits: LayoutTraits.macOS });
 
 shouldBeEqualToString("tracksButton.element.localName", "button");

Modified: trunk/Source/WebCore/ChangeLog (209450 => 209451)


--- trunk/Source/WebCore/ChangeLog	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/ChangeLog	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,3 +1,114 @@
+2016-12-06  Antoine Quint  <[email protected]>
+
+        [Modern Media Controls] Use tap and pinch gestures on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=165518
+
+        Reviewed by Dean Jackson.
+
+        We now use touch events to identify taps and pinches on media controls to respond immediately
+        to user interaction on buttons and enter fullscreen when pinching out.
+
+        * Modules/modern-media-controls/controls/button.css:
+        (button):
+        * Modules/modern-media-controls/controls/button.js:
+        (Button):
+        (Button.prototype.handleEvent):
+        (Button.prototype.gestureRecognizerStateDidChange):
+        (Button.prototype._notifyDelegateOfActivation):
+        (Button.prototype._handleUIEvent): Deleted.
+        * Modules/modern-media-controls/controls/controls-bar.js:
+        (ControlsBar.prototype.set fadesWhileIdle):
+        (ControlsBar.prototype.gestureRecognizerStateDidChange):
+        * Modules/modern-media-controls/controls/icon-button.js:
+        (IconButton.prototype._updateImage):
+        (IconButton):
+        * Modules/modern-media-controls/controls/ios-inline-media-controls.js:
+        (IOSInlineMediaControls.prototype.gestureRecognizerStateDidChange):
+        * Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js: Added.
+        (GestureRecognizer):
+        (GestureRecognizer.prototype.get state):
+        (GestureRecognizer.prototype.set state):
+        (GestureRecognizer.prototype.get target):
+        (GestureRecognizer.prototype.set target):
+        (GestureRecognizer.prototype.get numberOfTouches):
+        (GestureRecognizer.prototype.get enabled):
+        (GestureRecognizer.prototype.set enabled):
+        (GestureRecognizer.prototype.reset):
+        (GestureRecognizer.prototype.locationInElement):
+        (GestureRecognizer.prototype.locationInClient):
+        (GestureRecognizer.prototype.locationOfTouchInElement):
+        (GestureRecognizer.prototype.touchesBegan):
+        (GestureRecognizer.prototype.touchesMoved):
+        (GestureRecognizer.prototype.touchesEnded):
+        (GestureRecognizer.prototype.touchesCancelled):
+        (GestureRecognizer.prototype.gestureBegan):
+        (GestureRecognizer.prototype.gestureChanged):
+        (GestureRecognizer.prototype.gestureEnded):
+        (GestureRecognizer.prototype.enterPossibleState):
+        (GestureRecognizer.prototype.enterBeganState):
+        (GestureRecognizer.prototype.enterEndedState):
+        (GestureRecognizer.prototype.enterCancelledState):
+        (GestureRecognizer.prototype.enterFailedState):
+        (GestureRecognizer.prototype.enterChangedState):
+        (GestureRecognizer.prototype.enterRecognizedState):
+        (GestureRecognizer.prototype.handleEvent):
+        (GestureRecognizer.prototype._initRecognizer):
+        (GestureRecognizer.prototype._updateBaseListeners):
+        (GestureRecognizer.prototype._removeTrackingListeners):
+        (GestureRecognizer.prototype._updateTargetTouches):
+        (GestureRecognizer.prototype._updateKeyboardModifiers):
+        * Modules/modern-media-controls/gesture-recognizers/pinch.js: Added.
+        (PinchGestureRecognizer):
+        (PinchGestureRecognizer.prototype.get velocity):
+        (PinchGestureRecognizer.prototype.touchesBegan):
+        (PinchGestureRecognizer.prototype.touchesMoved):
+        (PinchGestureRecognizer.prototype.touchesEnded):
+        (PinchGestureRecognizer.prototype.gestureBegan):
+        (PinchGestureRecognizer.prototype.gestureChanged):
+        (PinchGestureRecognizer.prototype.gestureEnded):
+        (PinchGestureRecognizer.prototype.reset):
+        (PinchGestureRecognizer.prototype._recordGesture):
+        (PinchGestureRecognizer.prototype._updateStateWithEvent):
+        (PinchGestureRecognizer.prototype._distance):
+        * Modules/modern-media-controls/gesture-recognizers/tap.js: Added.
+        (TapGestureRecognizer):
+        (TapGestureRecognizer.prototype.touchesBegan):
+        (TapGestureRecognizer.prototype.touchesMoved):
+        (TapGestureRecognizer.prototype.touchesEnded):
+        (TapGestureRecognizer.prototype.reset):
+        (TapGestureRecognizer.prototype.locationInElement):
+        (TapGestureRecognizer.prototype.locationInClient):
+        (TapGestureRecognizer.prototype._clearTimer):
+        (TapGestureRecognizer.prototype._rewindTimer):
+        (TapGestureRecognizer.prototype._timerFired):
+        * Modules/modern-media-controls/js-files:
+        * Modules/modern-media-controls/media/airplay-support.js:
+        (AirplaySupport.prototype.buttonWasClicked): Deleted.
+        * Modules/modern-media-controls/media/controls-visibility-support.js:
+        (ControlsVisibilitySupport):
+        (ControlsVisibilitySupport.prototype.handleEvent):
+        (ControlsVisibilitySupport.prototype.syncControl): Deleted.
+        * Modules/modern-media-controls/media/fullscreen-support.js:
+        (FullscreenSupport):
+        (FullscreenSupport.prototype.iOSInlineMediaControlsRecognizedPinchInGesture):
+        (FullscreenSupport.prototype.buttonWasClicked): Deleted.
+        * Modules/modern-media-controls/media/media-controller-support.js:
+        (MediaControllerSupport):
+        (MediaControllerSupport.prototype.handleEvent):
+        (MediaControllerSupport.prototype.buttonWasClicked): Deleted.
+        * Modules/modern-media-controls/media/mute-support.js:
+        (MuteSupport.prototype.buttonWasClicked): Deleted.
+        * Modules/modern-media-controls/media/pip-support.js:
+        (PiPSupport.prototype.buttonWasClicked): Deleted.
+        * Modules/modern-media-controls/media/playback-support.js:
+        (PlaybackSupport.prototype.buttonWasClicked): Deleted.
+        * Modules/modern-media-controls/media/skip-back-support.js:
+        (SkipBackSupport.prototype.buttonWasClicked): Deleted.
+        * Modules/modern-media-controls/media/start-support.js:
+        (StartSupport.prototype.buttonWasClicked): Deleted.
+        * Modules/modern-media-controls/media/tracks-support.js:
+        (TracksSupport.prototype.buttonWasClicked): Deleted.
+
 2016-12-06  Dean Jackson  <[email protected]>
 
         Apply styling to media documents with modern controls

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/button.css (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/button.css	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/button.css	2016-12-07 07:48:23 UTC (rev 209451)
@@ -29,4 +29,6 @@
     left: 0;
     border: 0;
     -webkit-appearance: none;
+    -webkit-user-select: none;
+    -webkit-tap-highlight-color: transparent;
 }

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/button.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/button.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/button.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -35,7 +35,10 @@
 
         this._enabled = true;
 
-        this.element.addEventListener("click", this);
+        if (GestureRecognizer.SupportsTouches)
+            this._tapGestureRecognizer = new TapGestureRecognizer(this.element, this);
+        else
+            this.element.addEventListener("click", this);
     }
 
     // Public
@@ -59,16 +62,22 @@
 
     handleEvent(event)
     {
-        if (event.currentTarget === this.element)
-            this._handleUIEvent(event);
+        if (event.type === "click" && event.currentTarget === this.element)
+            this._notifyDelegateOfActivation();
     }
 
+    gestureRecognizerStateDidChange(recognizer)
+    {
+        if (this._tapGestureRecognizer === recognizer && recognizer.state === GestureRecognizer.States.Recognized)
+            this._notifyDelegateOfActivation();
+    }
+
     // Private
 
-    _handleUIEvent(event)
+    _notifyDelegateOfActivation()
     {
-        if (this._enabled && event.type === "click" && this.uiDelegate && typeof this.uiDelegate.buttonWasClicked === "function")
-            this.uiDelegate.buttonWasClicked(this);
+        if (this._enabled && this.uiDelegate && typeof this.uiDelegate.buttonWasPressed === "function")
+            this.uiDelegate.buttonWasPressed(this);
     }
 
 }

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/controls-bar.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/controls-bar.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/controls-bar.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -37,6 +37,9 @@
         this.userInteractionEnabled = true;
 
         this.autoHideDelay = ControlsBar.DefaultAutoHideDelay;
+
+        if (GestureRecognizer.SupportsTouches)
+            this._tapGestureRecognizer = new TapGestureRecognizer(this._mediaControls.element, this);
     }
 
     // Public
@@ -81,16 +84,18 @@
 
         this._fadesWhileIdle = flag;
 
-        if (flag) {
-            this._mediaControls.element.addEventListener("mousemove", this);
-            this._mediaControls.element.addEventListener("mouseleave", this);
-            this.element.addEventListener("mouseenter", this);
-            this.element.addEventListener("mouseleave", this);
-        } else {
-            this._mediaControls.element.removeEventListener("mousemove", this);
-            this._mediaControls.element.removeEventListener("mouseleave", this);
-            this.element.removeEventListener("mouseenter", this);
-            this.element.removeEventListener("mouseleave", this);
+        if (!GestureRecognizer.SupportsTouches) {
+            if (flag) {
+                this._mediaControls.element.addEventListener("mousemove", this);
+                this._mediaControls.element.addEventListener("mouseleave", this);
+                this.element.addEventListener("mouseenter", this);
+                this.element.addEventListener("mouseleave", this);
+            } else {
+                this._mediaControls.element.removeEventListener("mousemove", this);
+                this._mediaControls.element.removeEventListener("mouseleave", this);
+                this.element.removeEventListener("mouseenter", this);
+                this.element.removeEventListener("mouseleave", this);
+            }
         }
 
         if (flag && !this.faded)
@@ -156,6 +161,21 @@
         }
     }
 
+    gestureRecognizerStateDidChange(recognizer)
+    {
+        if (this._tapGestureRecognizer !== recognizer || recognizer.state !== GestureRecognizer.States.Recognized)
+            return;
+
+        if (this.faded)
+            this.faded = false;
+        else {
+            const tapLocation = recognizer.locationInClient();
+            const tappedElement = document.elementFromPoint(tapLocation.x, tapLocation.y);
+            if (!this.element.contains(tappedElement))
+                this.faded = true;
+        }
+    }
+
     commitProperty(propertyName)
     {
         if (propertyName === "translation")

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/icon-button.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/icon-button.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/icon-button.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -107,8 +107,6 @@
         this.height = this._image.height / window.devicePixelRatio;
 
         this.needsLayout = true;
-        if (this.layoutDelegate)
-            this.layoutDelegate.needsLayout = true;
     }
 
 }

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/ios-inline-media-controls.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/ios-inline-media-controls.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/ios-inline-media-controls.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -35,8 +35,6 @@
         this.element.classList.add("ios");
         this.element.classList.add("inline");
 
-        this.element.appendChild(this.startButton.element);
-
         this._leftContainer = new ButtonsContainer({
             buttons: [this.playPauseButton, this.skipBackButton],
             cssClassName: "left",
@@ -52,8 +50,24 @@
         });
 
         this.controlsBar.children = [this._leftContainer, this._rightContainer];
+
+        this._pinchGestureRecognizer = new PinchGestureRecognizer(this.element, this);
     }
 
+    // Protected
+
+    gestureRecognizerStateDidChange(recognizer)
+    {
+        if (this._pinchGestureRecognizer !== recognizer)
+            return;
+
+        if (recognizer.state !== GestureRecognizer.States.Ended && recognizer.state !== GestureRecognizer.States.Changed)
+            return;
+
+        if (recognizer.scale > IOSInlineMediaControls.MinimumScaleToEnterFullscreen && this.delegate && typeof this.delegate.iOSInlineMediaControlsRecognizedPinchInGesture === "function")
+            this.delegate.iOSInlineMediaControlsRecognizedPinchInGesture();
+    }
+
     // Public
 
     layout()
@@ -95,3 +109,5 @@
     }
 
 }
+
+IOSInlineMediaControls.MinimumScaleToEnterFullscreen = 1.5;

Added: trunk/Source/WebCore/Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js (0 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js	                        (rev 0)
+++ trunk/Source/WebCore/Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -0,0 +1,379 @@
+
+class GestureRecognizer
+{
+
+    constructor(target = null, delegate = null)
+    {
+        this._targetTouches = [];
+
+        this.modifierKeys = {
+            alt : false,
+            ctrl : false,
+            meta : false,
+            shift : false
+        };
+
+        this._state = GestureRecognizer.States.Possible;
+        this._enabled = true;
+
+        this.target = target;
+        this.delegate = delegate;
+    }
+
+    // Public
+
+    get state()
+    {
+        return this._state;
+    }
+
+    set state(state)
+    {
+        if (this._state === state && state !== GestureRecognizer.States.Changed)
+            return;
+
+        this._state = state;
+        if (this.delegate && typeof this.delegate.gestureRecognizerStateDidChange === "function")
+            this.delegate.gestureRecognizerStateDidChange(this);
+    }
+
+    get target()
+    {
+        return this._target;
+    }
+
+    set target(target)
+    {
+        if (!target || this._target === target)
+            return;
+
+        this._target = target;
+        this._initRecognizer();
+    }
+
+    get numberOfTouches()
+    {
+        return this._targetTouches.length;
+    }
+
+    get enabled()
+    {
+        return this._enabled;
+    }
+    
+    set enabled(enabled)
+    {
+        if (this._enabled === enabled)
+            return;
+
+        this._enabled = enabled;
+
+        if (!enabled) {
+            if (this.numberOfTouches === 0) {
+                this._removeTrackingListeners();
+                this.reset();
+            } else
+                this.enterCancelledState();
+        }
+
+        this._updateBaseListeners();
+    }
+
+    reset()
+    {
+        // Implemented by subclasses.
+    }
+
+    locationInElement(element)
+    {
+        const p = new DOMPoint;
+        const touches = this._targetTouches;
+        const count = touches.length;
+        for (let i = 0; i < count; ++i) {
+            const touch = touches[i];
+            p.x += touch.pageX;
+            p.y += touch.pageY;
+        }
+        p.x /= count;
+        p.y /= count;
+
+        if (!element)
+            return p;
+
+        // FIXME: are WebKitPoint and DOMPoint interchangeable?
+        const wkPoint = window.webkitConvertPointFromPageToNode(element, new WebKitPoint(p.x, p.y));
+        return new DOMPoint(wkPoint.x, wkPoint.y);
+    }
+
+    locationInClient()
+    {
+        const p = new DOMPoint;
+        const touches = this._targetTouches;
+        const count = touches.length;
+        for (let i = 0; i < count; ++i) {
+            const touch = touches[i];
+            p.x += touch.clientX;
+            p.y += touch.clientY;
+        }
+        p.x /= count;
+        p.y /= count;
+
+        return p;
+    }
+
+    locationOfTouchInElement(touchIndex, element)
+    {
+        const touch = this._targetTouches[touchIndex];
+        if (!touch)
+            return new DOMPoint;
+
+        const touchLocation = new DOMPoint(touch.pageX, touch.pageY);
+        if (!element)
+            return touchLocation;
+
+        // FIXME: are WebKitPoint and DOMPoint interchangeable?
+        const wkPoint = window.webkitConvertPointFromPageToNode(element, new WebKitPoint(touchLocation.x, touchLocation.y));
+        return new DOMPoint(wkPoint.x, wkPoint.y);
+    }
+
+    touchesBegan(event)
+    {
+        if (event.currentTarget !== this._target)
+            return;
+
+        window.addEventListener(GestureRecognizer.Events.TouchMove, this, true);
+        window.addEventListener(GestureRecognizer.Events.TouchEnd, this, true);
+        window.addEventListener(GestureRecognizer.Events.TouchCancel, this, true);
+        this.enterPossibleState();
+    }
+
+    touchesMoved(event)
+    {
+        // Implemented by subclasses.
+    }
+
+    touchesEnded(event)
+    {
+        // Implemented by subclasses.
+    }
+
+    touchesCancelled(event)
+    {
+        // Implemented by subclasses.
+    }
+
+    gestureBegan(event)
+    {
+        if (event.currentTarget !== this._target)
+            return;
+
+        window.addEventListener(GestureRecognizer.Events.GestureChange, this, true);
+        window.addEventListener(GestureRecognizer.Events.GestureEnd, this, true);
+        this.enterPossibleState();
+    }
+
+    gestureChanged(event)
+    {
+        // Implemented by subclasses.
+    }
+
+    gestureEnded(event)
+    {
+        // Implemented by subclasses.
+    }
+
+    enterPossibleState()
+    {
+        this.state = GestureRecognizer.States.Possible;
+    }
+
+    enterBeganState()
+    {
+        if (this.delegate && typeof this.delegate.gestureRecognizerShouldBegin === "function" && !this.delegate.gestureRecognizerShouldBegin(this)) {
+            this.enterFailedState();
+            return;
+        }
+        this.state = GestureRecognizer.States.Began;
+    }
+
+    enterEndedState()
+    {
+        this.state = GestureRecognizer.States.Ended;
+        this._removeTrackingListeners();
+        this.reset();
+    }
+
+    enterCancelledState()
+    {
+        this.state = GestureRecognizer.States.Cancelled;
+        this._removeTrackingListeners();
+        this.reset();
+    }
+
+    enterFailedState()
+    {
+        this.state = GestureRecognizer.States.Failed;
+        this._removeTrackingListeners();
+        this.reset();
+    }
+
+    enterChangedState()
+    {
+        this.state = GestureRecognizer.States.Changed;
+    }
+
+    enterRecognizedState()
+    {
+        this.state = GestureRecognizer.States.Recognized;
+    }
+
+    // Protected
+
+    handleEvent(event)
+    {
+        this._updateTargetTouches(event);
+        this._updateKeyboardModifiers(event);
+
+        switch (event.type) {
+        case GestureRecognizer.Events.TouchStart:
+            this.touchesBegan(event);
+            break;
+        case GestureRecognizer.Events.TouchMove:
+            this.touchesMoved(event);
+            break;
+        case GestureRecognizer.Events.TouchEnd:
+            this.touchesEnded(event);
+            break;
+        case GestureRecognizer.Events.TouchCancel:
+            this.touchesCancelled(event);
+            break;
+        case GestureRecognizer.Events.GestureStart:
+            this.gestureBegan(event);
+            break;
+        case GestureRecognizer.Events.GestureChange:
+            this.gestureChanged(event);
+            break;
+        case GestureRecognizer.Events.GestureEnd:
+            this.gestureEnded(event);
+            break;
+        }
+    }
+
+    // Private
+
+    _initRecognizer()
+    {
+        this.reset();
+        this.state = GestureRecognizer.States.Possible;
+
+        this._updateBaseListeners();
+    }
+
+    _updateBaseListeners()
+    {
+        if (!this._target)
+            return;
+
+        if (this._enabled) {
+            this._target.addEventListener(GestureRecognizer.Events.TouchStart, this);
+            if (GestureRecognizer.SupportsGestures)
+                this._target.addEventListener(GestureRecognizer.Events.GestureStart, this);
+        } else {
+            this._target.removeEventListener(GestureRecognizer.Events.TouchStart, this);
+            if (GestureRecognizer.SupportsGestures)
+                this._target.removeEventListener(GestureRecognizer.Events.GestureStart, this);
+        }
+    }
+
+    _removeTrackingListeners()
+    {
+        window.removeEventListener(GestureRecognizer.Events.TouchMove, this, true);
+        window.removeEventListener(GestureRecognizer.Events.TouchEnd, this, true);
+        window.removeEventListener(GestureRecognizer.Events.GestureChange, this, true);
+        window.removeEventListener(GestureRecognizer.Events.GestureEnd, this, true);
+    }
+
+    _updateTargetTouches(event)
+    {
+        if (!GestureRecognizer.SupportsTouches) {
+            if (event.type === GestureRecognizer.Events.TouchEnd)
+                this._targetTouches = [];
+            else
+                this._targetTouches = [event]
+            return;
+        }
+
+        if (!(event instanceof TouchEvent))
+            return;
+
+        // With a touchstart event, event.targetTouches is accurate so 
+        // we simply add all of those.
+        if (event.type === GestureRecognizer.Events.TouchStart) {
+            this._targetTouches = [];
+            let touches = event.targetTouches;
+            for (let i = 0, count = touches.length; i < count; ++i)
+                this._targetTouches.push(touches[i]);
+            return;
+        }
+
+        // With a touchmove event, the target is window so event.targetTouches is
+        // inaccurate so we add all touches that we knew about previously.
+        if (event.type === GestureRecognizer.Events.TouchMove) {
+            let targetIdentifiers = this._targetTouches.map(function(touch) {
+                return touch.identifier;
+            });
+
+            this._targetTouches = [];
+            let touches = event.touches;
+            for (let i = 0, count = touches.length; i < count; ++i) {
+                let touch = touches[i];
+                if (targetIdentifiers.indexOf(touch.identifier) !== -1)
+                    this._targetTouches.push(touch);
+            }
+            return;
+        }
+
+        // With a touchend or touchcancel event, we only keep the existing touches
+        // that are also found in event.touches.
+        let allTouches = event.touches;
+        let existingIdentifiers = [];
+        for (let i = 0, count = allTouches.length; i < count; ++i)
+            existingIdentifiers.push(allTouches[i].identifier);
+
+        this._targetTouches = this._targetTouches.filter(function(touch) {
+            return existingIdentifiers.indexOf(touch.identifier) !== -1;
+        });
+    }
+
+    _updateKeyboardModifiers(event)
+    {
+        this.modifierKeys.alt = event.altKey;
+        this.modifierKeys.ctrl = event.ctrlKey;
+        this.modifierKeys.meta = event.metaKey;
+        this.modifierKeys.shift = event.shiftKey;
+    }
+    
+}
+
+GestureRecognizer.SupportsTouches = "createTouch" in document;
+GestureRecognizer.SupportsGestures = !!window.GestureEvent;
+
+GestureRecognizer.States = {
+    Possible   : "possible",
+    Began      : "began",
+    Changed    : "changed",
+    Ended      : "ended",
+    Cancelled  : "cancelled",
+    Failed     : "failed",
+    Recognized : "ended"
+};
+
+GestureRecognizer.Events = {
+    TouchStart     : GestureRecognizer.SupportsTouches ? "touchstart" : "mousedown",
+    TouchMove      : GestureRecognizer.SupportsTouches ? "touchmove" : "mousemove",
+    TouchEnd       : GestureRecognizer.SupportsTouches ? "touchend" : "mouseup",
+    TouchCancel    : "touchcancel",
+    GestureStart   : "gesturestart",
+    GestureChange  : "gesturechange",
+    GestureEnd     : "gestureend"
+};

Added: trunk/Source/WebCore/Modules/modern-media-controls/gesture-recognizers/pinch.js (0 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/gesture-recognizers/pinch.js	                        (rev 0)
+++ trunk/Source/WebCore/Modules/modern-media-controls/gesture-recognizers/pinch.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -0,0 +1,205 @@
+
+const MAXIMUM_TIME_FOR_RECORDING_GESTURES = 100;
+const MAXIMUM_DECELERATION_TIME = 500;
+
+class PinchGestureRecognizer extends GestureRecognizer
+{
+
+    constructor(target, delegate)
+    {
+        super(target, delegate);
+
+        this.scaleThreshold = 0;
+        this._scaledMinimumAmount = false;
+    }
+
+    // Public
+
+    get velocity()
+    {
+        const lastGesture = this._gestures[this._gestures.length - 1];
+        if (!lastGesture)
+            return this._velocity;
+
+        const elapsedTime = Date.now() - (lastGesture.timeStamp + MAXIMUM_TIME_FOR_RECORDING_GESTURES);
+        if (elapsedTime <= 0)
+            return this._velocity;
+
+        const f = Math.max((MAXIMUM_DECELERATION_TIME - elapsedTime) / MAXIMUM_DECELERATION_TIME, 0);
+        return this._velocity * f;
+    }
+
+    // Protected
+
+    touchesBegan(event)
+    {
+        if (event.currentTarget !== this.target)
+            return;
+
+        // Additional setup for when the the platform doesn't natively
+        // provide us with gesture events.
+        if (!GestureRecognizer.SupportsGestures) {
+            // A pinch gesture can only be performed with 2 fingers, anything more
+            // and we failed our gesture.
+            if (this.numberOfTouches > 2) {
+                this.enterFailedState();
+                return;
+            }
+
+            // We can only start tracking touches with 2 fingers. 
+            if (this.numberOfTouches !== 2)
+                return;
+
+            this._startDistance = this._distance();
+
+            // We manually add a start value so that we always have 2 entries in the
+            // _gestures array so that we don't have to check for the existence of 2
+            // entries when computing velocity.
+            this._recordGesture(1);
+
+            this._scaledMinimumAmount = false;
+            this._updateStateWithEvent(event);
+        } else if (this.numberOfTouches !== 2) {
+            // When we support gesture events, we only care about the case where we're
+            // using two fingers.
+            return;
+        }
+
+        super.touchesBegan(event);
+    }
+
+    touchesMoved(event)
+    {
+        // This method only needs to be overriden in the case where the platform
+        // doesn't natively provide us with gesture events.
+        if (GestureRecognizer.SupportsGestures)
+            return;
+
+        if (this.numberOfTouches !== 2)
+            return;
+
+        this._updateStateWithEvent(event);
+    }
+
+    touchesEnded(event)
+    {
+        // This method only needs to be overriden in the case where the platform
+        // doesn't natively provide us with gesture events.
+        if (GestureRecognizer.SupportsGestures)
+            return;
+
+        // If we don't have the required number of touches or have not event
+        // obtained 2 fingers, then there's nothing for us to do.
+        if (this.numberOfTouches >= 2 || !this._startDistance)
+            return;
+
+        if (this._scaledMinimumAmount)
+            this.enterEndedState();
+        else
+            this.enterFailedState();
+    }
+
+    gestureBegan(event)
+    {
+        super.gestureBegan(event);
+
+        // We manually add a start value so that we always have 2 entries in the
+        // _gestures array so that we don't have to check for the existence of 2
+        // entries when computing velocity.
+        this._recordGesture(event.scale);
+
+        this._scaledMinimumAmount = false;
+        this._updateStateWithEvent(event);
+
+        event.preventDefault();
+    }
+
+    gestureChanged(event)
+    {
+        event.preventDefault();
+
+        this._updateStateWithEvent(event);
+    }
+
+    gestureEnded(event)
+    {
+        if (this._scaledMinimumAmount)
+            this.enterEndedState();
+        else
+            this.enterFailedState();
+    }
+
+    reset()
+    {
+        this.scale = 1;
+        this._velocity = 0;
+        this._gestures = [];
+        delete this._startDistance;
+    }
+
+    // Private
+
+    _recordGesture(scale)
+    {
+        const currentTime = Date.now();
+        const count = this._gestures.push({
+            scale: scale,
+            timeStamp: currentTime
+        });
+
+        // We want to keep at least two gestures at all times.
+        if (count <= 2)
+            return;
+
+        const scaleDirection = this._gestures[count - 1].scale >= this._gestures[count - 2].scale;
+        let i = count - 3;
+        for (; i >= 0; --i) {
+            let gesture = this._gestures[i];
+            if (currentTime - gesture.timeStamp > MAXIMUM_TIME_FOR_RECORDING_GESTURES ||
+                this._gestures[i + 1].scale >= gesture.scale !== scaleDirection)
+                break;
+        }
+
+        if (i > 0)
+            this._gestures = this._gestures.slice(i + 1);
+    }
+
+    _updateStateWithEvent(event)
+    {
+        const scaleSinceStart = GestureRecognizer.SupportsGestures ? event.scale : this._distance() / this._startDistance;
+
+        if (!this._scaledMinimumAmount) {
+            if (Math.abs(1 - scaleSinceStart) >= this.scaleThreshold) {
+                this._scaledMinimumAmount = true;
+                this.scale = 1;
+                this.enterBeganState();
+            }
+            return;
+        }
+
+        this._recordGesture(scaleSinceStart);
+
+        const oldestGesture = this._gestures[0];
+        const ds = scaleSinceStart - oldestGesture.scale;
+        const dt = Date.now() - oldestGesture.timeStamp;
+        this._velocity = (dt === 0) ? 0 : ds / dt * 1000;
+
+        this.scale *= scaleSinceStart / this._gestures[this._gestures.length - 2].scale;
+
+        this.enterChangedState();
+    }
+
+    _distance()
+    {
+        console.assert(this.numberOfTouches === 2);
+
+        const firstTouch = this._targetTouches[0]
+        const firstTouchPoint = new DOMPoint(firstTouch.pageX, firstTouch.pageY);
+
+        const secondTouch = this._targetTouches[1];
+        const secondTouchPoint = new DOMPoint(secondTouch.pageX, secondTouch.pageY);
+
+        return Math.sqrt(Math.pow(firstTouchPoint.x - secondTouchPoint.x, 2) + Math.pow(firstTouchPoint.y - secondTouchPoint.y, 2));
+    }
+
+}

Added: trunk/Source/WebCore/Modules/modern-media-controls/gesture-recognizers/tap.js (0 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/gesture-recognizers/tap.js	                        (rev 0)
+++ trunk/Source/WebCore/Modules/modern-media-controls/gesture-recognizers/tap.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -0,0 +1,109 @@
+
+const MOVE_TOLERANCE = GestureRecognizer.SupportsTouches ? 40 : 0;
+const WAITING_FOR_NEXT_TAP_TO_START_TIMEOUT = 350;
+const WAITING_FOR_TAP_COMPLETION_TIMEOUT = 750;
+
+class TapGestureRecognizer extends GestureRecognizer
+{
+
+    constructor(target, delegate)
+    {
+        super(target, delegate);
+
+        this.numberOfTapsRequired = 1;
+        this.numberOfTouchesRequired = 1;
+        this.allowsRightMouseButton = false;
+    }
+
+    // Protected
+
+    touchesBegan(event)
+    {
+        if (event.currentTarget !== this.target)
+            return;
+
+        if (event.button === 2 && !this.allowsRightMouseButton)
+            return;
+
+        super.touchesBegan(event);
+
+        if (this.numberOfTouches !== this.numberOfTouchesRequired) {
+            this.enterFailedState();
+            return;
+        }
+
+        this._startPoint = super.locationInElement();
+        this._startClientPoint = super.locationInClient();
+
+        this._rewindTimer(WAITING_FOR_TAP_COMPLETION_TIMEOUT);
+    }
+
+    touchesMoved(event)
+    {
+        event.preventDefault();
+
+        const touchLocation = super.locationInElement();
+        const distance = Math.sqrt(Math.pow(this._startPoint.x - touchLocation.x, 2) + Math.pow(this._startPoint.y - touchLocation.y, 2));
+        if (distance > MOVE_TOLERANCE)
+            this.enterFailedState();
+    }
+
+    touchesEnded(event)
+    {
+        this._taps++;
+
+        if (this._taps === this.numberOfTapsRequired) {
+            // We call prevent default here to override the potential double-tap-to-zoom
+            // behavior of the browser.
+            event.preventDefault();
+
+            this.enterRecognizedState();
+            this.reset();
+        }
+
+        this._rewindTimer(WAITING_FOR_NEXT_TAP_TO_START_TIMEOUT);
+    }
+
+    reset()
+    {
+        this._taps = 0;
+        this._clearTimer();
+    }
+
+    locationInElement(element)
+    {
+        const p = this._startPoint || new DOMPoint;
+
+        if (!element)
+            return p;
+
+        // FIXME: are WebKitPoint and DOMPoint interchangeable?
+        const wkPoint = window.webkitConvertPointFromPageToNode(element, new WebKitPoint(p.x, p.y));
+        return new DOMPoint(wkPoint.x, wkPoint.y);
+    }
+
+    locationInClient()
+    {
+        return this._startClientPoint || new DOMPoint;
+    }
+
+    // Private
+
+    _clearTimer()
+    {
+        window.clearTimeout(this._timerId);
+        delete this._timerId;
+    }
+
+    _rewindTimer(timeout)
+    {
+        this._clearTimer();
+        this._timerId = window.setTimeout(this._timerFired.bind(this), timeout);
+    }
+
+    _timerFired()
+    {
+        this.enterFailedState();
+    }
+
+}

Modified: trunk/Source/WebCore/Modules/modern-media-controls/js-files (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/js-files	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/js-files	2016-12-07 07:48:23 UTC (rev 209451)
@@ -1,3 +1,6 @@
+gesture-recognizers/gesture-recognizer.js
+gesture-recognizers/tap.js
+gesture-recognizers/pinch.js
 controls/scheduler.js
 controls/layout-node.js
 controls/layout-item.js

Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/airplay-support.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/media/airplay-support.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/airplay-support.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -38,7 +38,7 @@
         return ["webkitplaybacktargetavailabilitychanged", "webkitcurrentplaybacktargetiswirelesschanged"];
     }
 
-    buttonWasClicked(control)
+    buttonWasPressed(control)
     {
         this.mediaController.media.webkitShowPlaybackTargetPicker();
     }

Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/controls-visibility-support.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/media/controls-visibility-support.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/controls-visibility-support.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -30,8 +30,10 @@
     {
         super(mediaController);
 
-        this._controlsAttributeObserver = new MutationObserver(this.syncControl.bind(this));
+        this._controlsAttributeObserver = new MutationObserver(this._updateControls.bind(this));
         this._controlsAttributeObserver.observe(mediaController.media, { attributes: true, attributeFilter: ["controls"] });
+
+        this._updateControls();
     }
 
     // Protected
@@ -46,8 +48,15 @@
         return ["loadedmetadata", "play", "pause"];
     }
 
-    syncControl()
+    handleEvent()
     {
+        this._updateControls();
+    }
+
+    // Private
+
+    _updateControls()
+    {
         const media = this.mediaController.media;
         const isVideo = media instanceof HTMLVideoElement;
         let shouldShowControls = this.mediaController.media.controls;

Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/fullscreen-support.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/media/fullscreen-support.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/fullscreen-support.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -30,6 +30,9 @@
     {
         super(mediaController);
 
+        if (mediaController.controls instanceof IOSInlineMediaControls)
+            mediaController.controls.delegate = this;
+
         const videoTracks = mediaController.media.videoTracks;
         for (let eventType of ["change", "addtrack", "removetrack"])
             videoTracks.addEventListener(eventType, this);
@@ -58,7 +61,7 @@
         return ["loadedmetadata", "error"];
     }
 
-    buttonWasClicked(control)
+    buttonWasPressed(control)
     {
         const media = this.mediaController.media;
         if (media.webkitDisplayingFullscreen)
@@ -67,6 +70,11 @@
             media.webkitEnterFullscreen();
     }
 
+    iOSInlineMediaControlsRecognizedPinchInGesture()
+    {
+        this.mediaController.media.webkitEnterFullscreen();
+    }
+    
     syncControl()
     {
         const control = this.control;

Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller-support.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller-support.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller-support.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -33,11 +33,11 @@
         for (let eventType of this.mediaEvents)
             mediaController.media.addEventListener(eventType, this);
 
-        this.syncControl();
-
         if (!this.control)
             return;
 
+        this.syncControl();
+
         this.control.uiDelegate = this;
     }
 
@@ -66,7 +66,7 @@
         return [];
     }
 
-    buttonWasClicked(control)
+    buttonWasPressed(control)
     {
         // Implemented by subclasses.
     }
@@ -74,7 +74,8 @@
     handleEvent(event)
     {
         // Implemented by subclasses.
-        this.syncControl();
+        if (this.control)
+            this.syncControl();
     }
 
     syncControl()

Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/mute-support.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/media/mute-support.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/mute-support.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -38,7 +38,7 @@
         return ["volumechange"];
     }
 
-    buttonWasClicked(control)
+    buttonWasPressed(control)
     {
         const media = this.mediaController.media;
         media.muted = !media.muted;

Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/pip-support.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/media/pip-support.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/pip-support.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -41,7 +41,7 @@
         return ["loadedmetadata", "error", "webkitpresentationmodechanged", "webkitcurrentplaybacktargetiswirelesschanged"];
     }
 
-    buttonWasClicked(control)
+    buttonWasPressed(control)
     {
         const media = this.mediaController.media;
         media.webkitSetPresentationMode(media.webkitPresentationMode === PiPMode ? InlineMode : PiPMode);

Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/playback-support.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/media/playback-support.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/playback-support.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -38,7 +38,7 @@
         return ["play", "pause"];
     }
 
-    buttonWasClicked(control)
+    buttonWasPressed(control)
     {
         const media = this.mediaController.media;
         if (media.paused)

Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/skip-back-support.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/media/skip-back-support.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/skip-back-support.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -35,7 +35,7 @@
         return this.mediaController.controls.skipBackButton;
     }
 
-    buttonWasClicked(control)
+    buttonWasPressed(control)
     {
         const media = this.mediaController.media;
         media.currentTime = Math.max(media.currentTime - SkipBackSeconds, media.seekable.start(0));

Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/start-support.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/media/start-support.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/start-support.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -38,7 +38,7 @@
         return ["loadedmetadata", "play", "error", "webkitfullscreenchange"];
     }
 
-    buttonWasClicked(control)
+    buttonWasPressed(control)
     {
         this.mediaController.media.play();
     }

Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/tracks-support.js (209450 => 209451)


--- trunk/Source/WebCore/Modules/modern-media-controls/media/tracks-support.js	2016-12-07 06:07:42 UTC (rev 209450)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/tracks-support.js	2016-12-07 07:48:23 UTC (rev 209451)
@@ -68,7 +68,7 @@
         return ["loadedmetadata"];
     }
 
-    buttonWasClicked(control)
+    buttonWasPressed(control)
     {
         this.mediaController.controls.showTracksPanel();
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to