Title: [257837] trunk/Source/WebCore
Revision
257837
Author
carlo...@webkit.org
Date
2020-03-04 00:56:15 -0800 (Wed, 04 Mar 2020)

Log Message

[GTK][WPE] Use restore view icon for exit fullscreen button in media controls
https://bugs.webkit.org/show_bug.cgi?id=208511

Reviewed by Xabier Rodriguez-Calvar.

We currently use view fullscreen for both entering and leaving.

* Modules/mediacontrols/mediaControlsAdwaita.css:
(video::-webkit-media-controls-fullscreen-button.exit):
(audio::-webkit-media-controls-fullscreen-button,): Deleted.
(audio::-webkit-media-controls-fullscreen-button.hidden,): Deleted.
* Modules/mediacontrols/mediaControlsAdwaita.js:
(Controller.prototype.handleFullscreenChange):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (257836 => 257837)


--- trunk/Source/WebCore/ChangeLog	2020-03-04 08:54:57 UTC (rev 257836)
+++ trunk/Source/WebCore/ChangeLog	2020-03-04 08:56:15 UTC (rev 257837)
@@ -1,5 +1,21 @@
 2020-03-04  Carlos Garcia Campos  <cgar...@igalia.com>
 
+        [GTK][WPE] Use restore view icon for exit fullscreen button in media controls
+        https://bugs.webkit.org/show_bug.cgi?id=208511
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        We currently use view fullscreen for both entering and leaving.
+
+        * Modules/mediacontrols/mediaControlsAdwaita.css:
+        (video::-webkit-media-controls-fullscreen-button.exit):
+        (audio::-webkit-media-controls-fullscreen-button,): Deleted.
+        (audio::-webkit-media-controls-fullscreen-button.hidden,): Deleted.
+        * Modules/mediacontrols/mediaControlsAdwaita.js:
+        (Controller.prototype.handleFullscreenChange):
+
+2020-03-04  Carlos Garcia Campos  <cgar...@igalia.com>
+
         [GTK][WPE] Stop adding volume-box class to volume box element
         https://bugs.webkit.org/show_bug.cgi?id=208510
 

Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.css (257836 => 257837)


--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.css	2020-03-04 08:54:57 UTC (rev 257836)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.css	2020-03-04 08:56:15 UTC (rev 257837)
@@ -411,7 +411,6 @@
     background-color: rgba(230, 230, 230, 0.15);
 }
 
-audio::-webkit-media-controls-fullscreen-button,
 video::-webkit-media-controls-fullscreen-button {
     display: flex;
     flex: none;
@@ -438,7 +437,19 @@
         </svg>");
 }
 
-audio::-webkit-media-controls-fullscreen-button.hidden,
+video::-webkit-media-controls-fullscreen-button.exit {
+    background-image: url("data:image/svg+xml;utf-8, \
+        <svg xmlns='http://www.w3.org/2000/svg' width='16.014' height='16.01'> \
+          <g color='#000' fill='#FFFFFF'> \
+            <path d='M12 1.006l-2 .008.018 4.996H15v-2h-2.99z' style='line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none' font-weight='400' font-family='sans-serif' white-space='normal' overflow='visible'/> \
+            <path d='M14.979 0a1 1 0 0 0-.688.305l-3.984 4a1 1 0 1 0 1.416 1.41l3.986-4A1 1 0 0 0 14.979 0zM1.014 6.01a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-8a1 1 0 0 0-1-1zm1 2h6v6h-6z' style='line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none' font-weight='400' font-family='sans-serif' white-space='normal' overflow='visible'/> \
+            <path d='M1.014 8.01a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2z' style='line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none' font-weight='400' font-family='sans-serif' white-space='normal' overflow='visible' fill-rule='evenodd'/> \
+            <path d='M15 5.01h1v1h-1zM10 .01h1v1h-1zM9.014 15.01h1v1h-1zM.014 15.01h1v1h-1z' style='marker:none' overflow='visible'/> \
+            <path d='M11 .01c.554 0 1 .446 1 1s-.446 1-1 1-1-.446-1-1 .446-1 1-1zM15 4.01c.554 0 1 .446 1 1s-.446 1-1 1-1-.446-1-1 .446-1 1-1z' style='marker:none' overflow='visible'/> \
+          </g> \
+        </svg>");
+}
+
 video::-webkit-media-controls-fullscreen-button.hidden {
     display: none !important;
 }

Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.js (257836 => 257837)


--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.js	2020-03-04 08:54:57 UTC (rev 257836)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.js	2020-03-04 08:56:15 UTC (rev 257837)
@@ -49,6 +49,7 @@
     },
     HideControlsDelay: 4 * 1000,
     ClassNames: {
+        exit: 'exit',
         hidden: 'hidden',
         hiding: 'hiding',
         muteBox: 'mute-box',
@@ -590,9 +591,11 @@
         this.updateControls();
 
         if (this.isFullScreen()) {
+            this.controls.fullscreenButton.classList.add(this.ClassNames.exit);
             this.controls.fullscreenButton.setAttribute('aria-label', 'Exit Full Screen');
             this.host.enteredFullscreen();
         } else {
+            this.controls.fullscreenButton.classList.remove(this.ClassNames.exit);
             this.controls.fullscreenButton.setAttribute('aria-label', 'Display Full Screen');
             this.host.exitedFullscreen();
         }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to