Title: [169527] trunk/Source/WebCore
Revision
169527
Author
calva...@igalia.com
Date
2014-06-02 01:31:26 -0700 (Mon, 02 Jun 2014)

Log Message

[GTK] media controls should prevent 'click' events from reaching the page
https://bugs.webkit.org/show_bug.cgi?id=133402

Reviewed by Eric Carlson.

When handling events, we events we need to return true in order
that the superclass gets the value and prevents the execution of
the default event handler in the page.

Test: media/media-controls-cancel-events.html

* Modules/mediacontrols/mediaControlsGtk.js:
(ControllerGtk.prototype.handleMuteButtonMouseOver):
(ControllerGtk.prototype.handleVolumeBoxMouseOut):
(ControllerGtk.prototype.handleCaptionButtonClicked):
(ControllerGtk.prototype.handleCaptionButtonMouseOver):
(ControllerGtk.prototype.handleCaptionButtonShowMenu):
(ControllerGtk.prototype.handleCaptionButtonMouseOut):
(ControllerGtk.prototype.handleCaptionMouseOut): Return true to
prevent forwarding the event execution.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (169526 => 169527)


--- trunk/Source/WebCore/ChangeLog	2014-06-02 07:32:13 UTC (rev 169526)
+++ trunk/Source/WebCore/ChangeLog	2014-06-02 08:31:26 UTC (rev 169527)
@@ -1,3 +1,26 @@
+2014-06-02  Xabier Rodriguez Calvar  <calva...@igalia.com>
+
+        [GTK] media controls should prevent 'click' events from reaching the page
+        https://bugs.webkit.org/show_bug.cgi?id=133402
+
+        Reviewed by Eric Carlson.
+
+        When handling events, we events we need to return true in order
+        that the superclass gets the value and prevents the execution of
+        the default event handler in the page.
+
+        Test: media/media-controls-cancel-events.html
+
+        * Modules/mediacontrols/mediaControlsGtk.js:
+        (ControllerGtk.prototype.handleMuteButtonMouseOver):
+        (ControllerGtk.prototype.handleVolumeBoxMouseOut):
+        (ControllerGtk.prototype.handleCaptionButtonClicked):
+        (ControllerGtk.prototype.handleCaptionButtonMouseOver):
+        (ControllerGtk.prototype.handleCaptionButtonShowMenu):
+        (ControllerGtk.prototype.handleCaptionButtonMouseOut):
+        (ControllerGtk.prototype.handleCaptionMouseOut): Return true to
+        prevent forwarding the event execution.
+
 2014-06-02  Yusuke Suzuki  <utatane....@gmail.com>
 
         CSS JIT: add support for the "not" pseudo class

Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js (169526 => 169527)


--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js	2014-06-02 07:32:13 UTC (rev 169526)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js	2014-06-02 08:31:26 UTC (rev 169527)
@@ -121,11 +121,13 @@
             this.controls.panel.classList.remove(this.ClassNames.down);
         }
         this.controls.volumeBox.classList.remove(this.ClassNames.hiding);
+        return true;
     },
 
     handleVolumeBoxMouseOut: function(event)
     {
         this.controls.volumeBox.classList.add(this.ClassNames.hiding);
+        return true;
     },
 
     addControls: function()
@@ -165,6 +167,7 @@
     handleCaptionButtonClicked: function(event)
     {
         this.handleCaptionButtonShowMenu(event)
+        return true;
     },
 
     buildCaptionMenu: function()
@@ -212,6 +215,7 @@
     handleCaptionButtonMouseOver: function(event)
     {
         this.handleCaptionButtonShowMenu(event);
+        return true;
     },
 
     handleCaptionButtonShowMenu: function(event)
@@ -220,12 +224,14 @@
             this.buildCaptionMenu();
         if (!contains(this.captionMenu.captionMenuTreeElements, event.relatedTarget))
             this.showCaptionMenu();
+        return true;
     },
 
     handleCaptionButtonMouseOut: function(event)
     {
         if (this.captionMenu && !contains(this.captionMenu.captionMenuTreeElements, event.relatedTarget))
             this.hideCaptionMenu();
+        return true;
     },
 
     handleCaptionMouseOut: function(event)
@@ -233,6 +239,7 @@
         if (event.relatedTarget != this.controls.captionButton &&
             !contains(this.captionMenu.captionMenuTreeElements, event.relatedTarget))
             this.hideCaptionMenu();
+        return true;
     },
 };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to