Title: [289730] trunk/Source/WebCore
Revision
289730
Author
[email protected]
Date
2022-02-14 04:20:41 -0800 (Mon, 14 Feb 2022)

Log Message

Don't throw exception when controls are removed
https://bugs.webkit.org/show_bug.cgi?id=236456

Reviewed by Xabier Rodriguez-Calvar.

In mediaControlsBase.js, when media controls are removed, calling controlsAreHidden() can cause
an exception because the panel has no parentElement.

This patch is authored by Eugene Mutavchi <[email protected]>
See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/775

* Modules/mediacontrols/mediaControlsBase.js: Return false if there's no parent.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (289729 => 289730)


--- trunk/Source/WebCore/ChangeLog	2022-02-14 11:29:16 UTC (rev 289729)
+++ trunk/Source/WebCore/ChangeLog	2022-02-14 12:20:41 UTC (rev 289730)
@@ -1,3 +1,18 @@
+2022-02-14  Enrique Ocaña González  <[email protected]>
+
+        Don't throw exception when controls are removed
+        https://bugs.webkit.org/show_bug.cgi?id=236456
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        In mediaControlsBase.js, when media controls are removed, calling controlsAreHidden() can cause
+        an exception because the panel has no parentElement.
+
+        This patch is authored by Eugene Mutavchi <[email protected]>
+        See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/775
+
+        * Modules/mediacontrols/mediaControlsBase.js: Return false if there's no parent.
+
 2022-02-14  Alejandro G. Castro  <[email protected]>
 
         [GTK] [WPE] Fix problem when the buffer object is released before we try to send it to the compositor

Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js (289729 => 289730)


--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js	2022-02-14 11:29:16 UTC (rev 289729)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsBase.js	2022-02-14 12:20:41 UTC (rev 289730)
@@ -1035,6 +1035,8 @@
             return false;
 
         var panel = this.controls.panel;
+        if (!panel.parentElement)
+            return true;
         return (!panel.classList.contains(this.ClassNames.show) || panel.classList.contains(this.ClassNames.hidden))
             && (panel.parentElement.querySelector(':hover') !== panel);
     },
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to