[GTK][WPE] Use restore view icon for exit fullscreen button in media controls
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Mar 2020 08:56:15 +0000 (08:56 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Mar 2020 08:56:15 +0000 (08:56 +0000)
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257837 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.css
Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.js

index e799bb0..7969d2b 100644 (file)
@@ -1,5 +1,21 @@
 2020-03-04  Carlos Garcia Campos  <cgarcia@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  <cgarcia@igalia.com>
+
         [GTK][WPE] Stop adding volume-box class to volume box element
         https://bugs.webkit.org/show_bug.cgi?id=208510
 
index 1f7b8c7..5bb419a 100644 (file)
@@ -411,7 +411,6 @@ video::-webkit-media-controls-closed-captions-container li.selected {
     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 @@ video::-webkit-media-controls-fullscreen-button {
         </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;
 }
index 4b14981..be493e4 100644 (file)
@@ -49,6 +49,7 @@ Controller.prototype = {
     },
     HideControlsDelay: 4 * 1000,
     ClassNames: {
+        exit: 'exit',
         hidden: 'hidden',
         hiding: 'hiding',
         muteBox: 'mute-box',
@@ -590,9 +591,11 @@ Controller.prototype = {
         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();
         }