Changeset 295309 in webkit
- Timestamp:
- Jun 6, 2022, 5:35:58 PM (4 years ago)
- Location:
- branches/safari-613-branch
- Files:
-
- 11 edited
-
LayoutTests/media/modern-media-controls/button/button-icon-name.html (modified) (2 diffs)
-
LayoutTests/media/modern-media-controls/button/button.html (modified) (1 diff)
-
LayoutTests/media/modern-media-controls/buttons-container/buttons-container-buttons-property.html (modified) (2 diffs)
-
LayoutTests/media/modern-media-controls/buttons-container/buttons-container-constructor.html (modified) (2 diffs)
-
LayoutTests/media/modern-media-controls/buttons-container/buttons-container-layout.html (modified) (1 diff)
-
Source/WebCore/Modules/modern-media-controls/controls/auto-hide-controller.js (modified) (1 diff)
-
Source/WebCore/Modules/modern-media-controls/controls/button.js (modified) (1 diff)
-
Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js (modified) (1 diff)
-
Source/WebCore/Modules/modern-media-controls/controls/macos-layout-traits.js (modified) (1 diff)
-
Source/WebCore/Modules/modern-media-controls/controls/range-button.js (modified) (1 diff)
-
Source/WebCore/Modules/modern-media-controls/media/media-document-controller.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-613-branch/LayoutTests/media/modern-media-controls/button/button-icon-name.html
r279309 r295309 9 9 description("Testing the <code>Button</code> class <code>iconName</code> property."); 10 10 11 const layoutDelegate = { };11 const layoutDelegate = { layoutTraits: new MacOSLayoutTraits(LayoutTraits.Mode.Inline) }; 12 12 13 13 const button = new Button({ layoutDelegate }); … … 19 19 debug(""); 20 20 debug("Setting an iconName with invalid layout traits should throw"); 21 layoutDelegate.layoutTraits = null; 21 22 shouldThrow(function() { button.iconName = Icons.Pause }); 22 23 shouldBeEqualToString("button.iconName", ""); -
branches/safari-613-branch/LayoutTests/media/modern-media-controls/button/button.html
r217890 r295309 18 18 description("Testing the <code>Button</code> class."); 19 19 20 const button = new Button; 20 const layoutDelegate = { layoutTraits: new MacOSLayoutTraits(LayoutTraits.Mode.Inline) }; 21 22 const button = new Button({ layoutDelegate }); 21 23 document.body.appendChild(button.element); 22 24 -
branches/safari-613-branch/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-buttons-property.html
r227904 r295309 9 9 window.jsTestIsAsync = true; 10 10 11 const layoutDelegate = { layoutTraits: new MacOSLayoutTraits(LayoutTraits.Mode.Inline) }; 12 11 13 const container = new ButtonsContainer({ 12 14 leftMargin: 20, … … 15 17 }); 16 18 17 container.children = [new Button, new Button, new Button]; 19 container.children = [ 20 new Button({ layoutDelegate }), 21 new Button({ layoutDelegate }), 22 new Button({ layoutDelegate }), 23 ]; 18 24 19 25 scheduler.frameDidFire = function() -
branches/safari-613-branch/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-constructor.html
r227904 r295309 5 5 6 6 description("Testing the <code>ButtonsContainer</code> constructor."); 7 8 const layoutDelegate = { layoutTraits: new MacOSLayoutTraits(LayoutTraits.Mode.Inline) }; 7 9 8 10 const defaultContainer = new ButtonsContainer; … … 14 16 shouldBe("defaultContainer.children", "[]"); 15 17 16 const buttons = [new Button, new Button]; 18 const buttons = [ 19 new Button({ layoutDelegate }), 20 new Button({ layoutDelegate }), 21 ]; 22 17 23 const containerWithParameters = new ButtonsContainer({ 18 24 buttonMargin: 10, -
branches/safari-613-branch/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-layout.html
r227904 r295309 6 6 description("Testing <code>ButtonsContainer</code> layout."); 7 7 8 const tenPtWideButton = new Button; 8 const layoutDelegate = { layoutTraits: new MacOSLayoutTraits(LayoutTraits.Mode.Inline) }; 9 10 const tenPtWideButton = new Button({ layoutDelegate }); 9 11 tenPtWideButton.width = 10; 10 12 11 const twentyPtWideButton = new Button ;13 const twentyPtWideButton = new Button({ layoutDelegate }); 12 14 twentyPtWideButton.width = 20; 13 15 14 const thirtyPtWideButton = new Button ;16 const thirtyPtWideButton = new Button({ layoutDelegate }); 15 17 thirtyPtWideButton.width = 30; 16 18 17 19 // Should be disregarded by the container. 18 const disabledButton = new Button ;20 const disabledButton = new Button({ layoutDelegate }); 19 21 disabledButton.width = 15; 20 22 disabledButton.enabled = false; 21 23 22 24 // Should be disregarded by the container. 23 const droppedButton = new Button ;25 const droppedButton = new Button({ layoutDelegate }); 24 26 droppedButton.width = 25; 25 27 droppedButton.dropped = true; -
branches/safari-613-branch/Source/WebCore/Modules/modern-media-controls/controls/auto-hide-controller.js
r274293 r295309 42 42 this._mediaControls.element.addEventListener("pointerout", this); 43 43 44 if ( GestureRecognizer.SupportsTouches)44 if (this._mediaControls.layoutTraits.supportsTouches()) 45 45 this._tapGestureRecognizer = new TapGestureRecognizer(this._mediaControls.element, this); 46 46 -
branches/safari-613-branch/Source/WebCore/Modules/modern-media-controls/controls/button.js
r282273 r295309 49 49 this._enabled = true; 50 50 51 if ( GestureRecognizer.SupportsTouches)51 if (this.layoutTraits.supportsTouches()) 52 52 this._tapGestureRecognizer = new TapGestureRecognizer(this.element, this); 53 53 else -
branches/safari-613-branch/Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js
r280534 r295309 92 92 } 93 93 94 supportsTouches() 95 { 96 // Can be overridden by subclasses. 97 98 return GestureRecognizer.SupportsTouches; 99 } 100 94 101 additionalControlScaleFactor() 95 102 { -
branches/safari-613-branch/Source/WebCore/Modules/modern-media-controls/controls/macos-layout-traits.js
r280534 r295309 82 82 return true; 83 83 } 84 85 supportsTouches() 86 { 87 return false; 88 } 84 89 85 90 toString() -
branches/safari-613-branch/Source/WebCore/Modules/modern-media-controls/controls/range-button.js
r283051 r295309 42 42 this._indicator.visible = false; 43 43 44 if ( GestureRecognizer.SupportsTouches)44 if (this.layoutTraits.supportsTouches()) 45 45 this._tapGestureRecognizer.enabled = false; 46 46 else -
branches/safari-613-branch/Source/WebCore/Modules/modern-media-controls/media/media-document-controller.js
r245942 r295309 43 43 let deviceType = window.navigator.platform; 44 44 if (deviceType == "MacIntel") 45 deviceType = GestureRecognizer.SupportsTouches? "ipad" : "mac";45 deviceType = mediaController.layoutTraits.supportsTouches() ? "ipad" : "mac"; 46 46 47 47 media.classList.add(deviceType);
Note:
See TracChangeset
for help on using the changeset viewer.