Title: [290133] trunk/Source/WebCore
Revision
290133
Author
peng.l...@apple.com
Date
2022-02-18 09:32:52 -0800 (Fri, 18 Feb 2022)

Log Message

[iOS][Modern Media Controls] Add an alternative overflow icon
https://bugs.webkit.org/show_bug.cgi?id=236729

Reviewed by Devin Rousso.

Add a new overflow icon. By default, the media controls will use the
original overflow icon. So this patch does not change the appearance of
the media controls.

* Modules/modern-media-controls/controls/icon-service.js:
* Modules/modern-media-controls/controls/layout-traits.js:
(LayoutTraits.prototype.overflowButtonHasCircle):
* Modules/modern-media-controls/controls/overflow-button.js:
(OverflowButton):
* Modules/modern-media-controls/images/iOS/OverflowCircle.svg: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (290132 => 290133)


--- trunk/Source/WebCore/ChangeLog	2022-02-18 17:29:54 UTC (rev 290132)
+++ trunk/Source/WebCore/ChangeLog	2022-02-18 17:32:52 UTC (rev 290133)
@@ -1,3 +1,21 @@
+2022-02-18  Peng Liu  <peng.l...@apple.com>
+
+        [iOS][Modern Media Controls] Add an alternative overflow icon
+        https://bugs.webkit.org/show_bug.cgi?id=236729
+
+        Reviewed by Devin Rousso.
+
+        Add a new overflow icon. By default, the media controls will use the
+        original overflow icon. So this patch does not change the appearance of
+        the media controls.
+
+        * Modules/modern-media-controls/controls/icon-service.js:
+        * Modules/modern-media-controls/controls/layout-traits.js:
+        (LayoutTraits.prototype.overflowButtonHasCircle):
+        * Modules/modern-media-controls/controls/overflow-button.js:
+        (OverflowButton):
+        * Modules/modern-media-controls/images/iOS/OverflowCircle.svg: Added.
+
 2022-02-18  Xabier Rodriguez Calvar  <calva...@igalia.com>
 
         [EME][GStreamer][Thunder] Add video/x-h265 caps to Thunder decryptor

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/icon-service.js (290132 => 290133)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/icon-service.js	2022-02-18 17:29:54 UTC (rev 290132)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/icon-service.js	2022-02-18 17:32:52 UTC (rev 290133)
@@ -35,6 +35,7 @@
     InvalidCircle   : { name: "InvalidCircle", type: "pdf", label: UIString("Invalid") },
     InvalidPlacard  : { name: "invalid-placard", type: "png", label: UIString("Invalid") },
     Overflow        : { name: "Overflow", type: "svg", label: UIString("More\u2026") },
+    OverflowCircle  : { name: "OverflowCircle", type: "svg", label: UIString("More\u2026") },
     Pause           : { name: "Pause", type: "svg", label: UIString("Pause") },
     PiPPlacard      : { name: "pip-placard", type: "png", label: UIString("Picture in Picture") },
     Play            : { name: "Play", type: "svg", label: UIString("Play") },

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js (290132 => 290133)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js	2022-02-18 17:29:54 UTC (rev 290132)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js	2022-02-18 17:32:52 UTC (rev 290133)
@@ -91,6 +91,11 @@
         throw "Derived class must implement this function.";
     }
 
+    overflowButtonHasCircle()
+    {
+        return false;
+    }
+
     additionalControlScaleFactor()
     {
         return 1;

Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/overflow-button.js (290132 => 290133)


--- trunk/Source/WebCore/Modules/modern-media-controls/controls/overflow-button.js	2022-02-18 17:29:54 UTC (rev 290132)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/overflow-button.js	2022-02-18 17:32:52 UTC (rev 290133)
@@ -30,7 +30,7 @@
     {
         super({
             cssClassName: "overflow",
-            iconName: Icons.Overflow,
+            iconName: layoutDelegate?.layoutTraits?.overflowButtonHasCircle() ? Icons.OverflowCircle : Icons.Overflow,
             layoutDelegate,
         });
 

Added: trunk/Source/WebCore/Modules/modern-media-controls/images/iOS/OverflowCircle.svg (0 => 290133)


--- trunk/Source/WebCore/Modules/modern-media-controls/images/iOS/OverflowCircle.svg	                        (rev 0)
+++ trunk/Source/WebCore/Modules/modern-media-controls/images/iOS/OverflowCircle.svg	2022-02-18 17:32:52 UTC (rev 290133)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+<path d="M 7.964844 15.925781 C 9.054688 15.925781 10.082031 15.71875 11.042969 15.304688 C 12.003906 14.890625 12.851562 14.316406 13.585938 13.578125 C 14.316406 12.84375 14.894531 11.996094 15.308594 11.035156 C 15.726562 10.074219 15.9375 9.050781 15.9375 7.964844 C 15.9375 6.875 15.726562 5.851562 15.308594 4.890625 C 14.894531 3.929688 14.316406 3.082031 13.578125 2.347656 C 12.84375 1.609375 11.996094 1.035156 11.035156 0.621094 C 10.074219 0.207031 9.046875 0 7.953125 0 C 6.867188 0 5.84375 0.207031 4.882812 0.621094 C 3.921875 1.035156 3.078125 1.609375 2.347656 2.347656 C 1.617188 3.082031 1.042969 3.929688 0.625 4.890625 C 0.207031 5.851562 0 6.875 0 7.964844 C 0 9.050781 0.207031 10.074219 0.625 11.035156 C 1.042969 11.996094 1.617188 12.84375 2.351562 13.578125 C 3.085938 14.316406 3.929688 14.890625 4.890625 15.304688 C 5.851562 15.71875 6.875 15.925781 7.964844 15.925781 Z M 7.964844 14.601562 C 7.042969 14.601562 6.183594 14.433594 5.382812 14.089844 C 4.5820
 31 13.75 3.878906 13.273438 3.273438 12.664062 C 2.667969 12.058594 2.191406 11.351562 1.851562 10.546875 C 1.507812 9.742188 1.335938 8.882812 1.335938 7.964844 C 1.335938 7.042969 1.507812 6.183594 1.847656 5.378906 C 2.1875 4.574219 2.660156 3.867188 3.265625 3.261719 C 3.871094 2.652344 4.574219 2.175781 5.375 1.835938 C 6.175781 1.492188 7.035156 1.324219 7.953125 1.324219 C 8.878906 1.324219 9.742188 1.492188 10.542969 1.835938 C 11.347656 2.175781 12.050781 2.652344 12.660156 3.261719 C 13.265625 3.867188 13.742188 4.574219 14.085938 5.378906 C 14.433594 6.183594 14.605469 7.042969 14.605469 7.964844 C 14.605469 8.882812 14.433594 9.742188 14.09375 10.546875 C 13.75 11.351562 13.277344 12.058594 12.671875 12.664062 C 12.066406 13.273438 11.359375 13.75 10.558594 14.089844 C 9.753906 14.433594 8.886719 14.601562 7.964844 14.601562 Z M 4.320312 9.101562 C 4.628906 9.101562 4.894531 8.988281 5.117188 8.765625 C 5.339844 8.542969 5.453125 8.273438 5.453125 7.960938 C 5.453125 7.6
 44531 5.339844 7.378906 5.117188 7.15625 C 4.894531 6.933594 4.628906 6.820312 4.320312 6.820312 C 4.007812 6.820312 3.738281 6.933594 3.515625 7.15625 C 3.289062 7.378906 3.179688 7.644531 3.179688 7.960938 C 3.179688 8.273438 3.289062 8.542969 3.515625 8.765625 C 3.738281 8.988281 4.007812 9.101562 4.320312 9.101562 Z M 7.964844 9.101562 C 8.277344 9.101562 8.542969 8.988281 8.765625 8.765625 C 8.984375 8.542969 9.097656 8.273438 9.097656 7.960938 C 9.097656 7.644531 8.984375 7.378906 8.765625 7.15625 C 8.542969 6.933594 8.277344 6.820312 7.964844 6.820312 C 7.648438 6.820312 7.378906 6.933594 7.15625 7.15625 C 6.933594 7.378906 6.820312 7.644531 6.820312 7.960938 C 6.820312 8.273438 6.933594 8.542969 7.15625 8.765625 C 7.378906 8.988281 7.648438 9.101562 7.964844 9.101562 Z M 11.605469 9.101562 C 11.917969 9.101562 12.1875 8.988281 12.40625 8.765625 C 12.628906 8.542969 12.738281 8.273438 12.738281 7.960938 C 12.738281 7.644531 12.628906 7.378906 12.40625 7.15625 C 12.1875 6.9335
 94 11.917969 6.820312 11.605469 6.820312 C 11.292969 6.820312 11.023438 6.933594 10.796875 7.15625 C 10.574219 7.378906 10.464844 7.644531 10.464844 7.960938 C 10.464844 8.273438 10.574219 8.542969 10.796875 8.765625 C 11.023438 8.988281 11.292969 9.101562 11.605469 9.101562 Z M 11.605469 9.101562 "/>
+</svg>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to