haikuwebkit/LayoutTests/media/modern-media-controls/buttons-container/buttons-container-construct...

35 lines
1.4 KiB
HTML
Raw Permalink Normal View History

[Modern Media Controls] Buttons container https://bugs.webkit.org/show_bug.cgi?id=163238 <rdar://problem/28701864> Patch by Antoine Quint <graouts@apple.com> on 2016-10-11 Reviewed by Dean Jackson. Source/WebCore: We add a new ButtonsContainer class which contains a group of Button objects and positions them based on the provided padding and margin between buttons. Buttons that aren't enabled or marked as dropped are not added to the tree of LayoutNodes, and thus the DOM. Additionally, we fix a few issues we found while working on tests for ButtonsContainer where LayoutNodes would schedule layout callbacks even when they would not do any work during the layout callback due to not resetting the `needsLayout` flag to false and removing any scheduled tasks when a layout was completed. Finally, we fix a few style issues that had not been caught so far and an unused `size` property on IconButton. Tests: media/modern-media-controls/buttons-container/buttons-container-buttons-property.html media/modern-media-controls/buttons-container/buttons-container-constructor.html media/modern-media-controls/buttons-container/buttons-container-layout.html * Modules/modern-media-controls/controls/airplay-button.js: (AirplayButton.prototype.set on): (AirplayButton): * Modules/modern-media-controls/controls/buttons-container.css: (.buttons-container): * Modules/modern-media-controls/controls/buttons-container.js: (ButtonsContainer.prototype.get buttons): (ButtonsContainer.prototype.set buttons): (ButtonsContainer.prototype.layout): * Modules/modern-media-controls/controls/icon-button.js: * Modules/modern-media-controls/controls/layout-node.js: (LayoutNode.prototype.set needsLayout): (LayoutNode.prototype.markDirtyProperty): (LayoutNode.prototype._markNodeManipulation): (LayoutNode.prototype._updateDirtyState): (performScheduledLayout): (elementFromString): * Modules/modern-media-controls/controls/scheduler.js: (const.scheduler.new.prototype.unscheduleLayout): LayoutTests: Adding tests for the new ButtonsContainer class. * media/modern-media-controls/buttons-container/buttons-container-buttons-property-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html: Added. * media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-constructor.html: Added. * media/modern-media-controls/buttons-container/buttons-container-layout-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-layout.html: Added. Canonical link: https://commits.webkit.org/181103@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-11 12:52:28 +00:00
<script src="../../../resources/js-test-pre.js"></script>
[Modern Media Controls] Use tap and pinch gestures on iOS https://bugs.webkit.org/show_bug.cgi?id=165518 Reviewed by Dean Jackson. Source/WebCore: We now use touch events to identify taps and pinches on media controls to respond immediately to user interaction on buttons and enter fullscreen when pinching out. * Modules/modern-media-controls/controls/button.css: (button): * Modules/modern-media-controls/controls/button.js: (Button): (Button.prototype.handleEvent): (Button.prototype.gestureRecognizerStateDidChange): (Button.prototype._notifyDelegateOfActivation): (Button.prototype._handleUIEvent): Deleted. * Modules/modern-media-controls/controls/controls-bar.js: (ControlsBar.prototype.set fadesWhileIdle): (ControlsBar.prototype.gestureRecognizerStateDidChange): * Modules/modern-media-controls/controls/icon-button.js: (IconButton.prototype._updateImage): (IconButton): * Modules/modern-media-controls/controls/ios-inline-media-controls.js: (IOSInlineMediaControls.prototype.gestureRecognizerStateDidChange): * Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js: Added. (GestureRecognizer): (GestureRecognizer.prototype.get state): (GestureRecognizer.prototype.set state): (GestureRecognizer.prototype.get target): (GestureRecognizer.prototype.set target): (GestureRecognizer.prototype.get numberOfTouches): (GestureRecognizer.prototype.get enabled): (GestureRecognizer.prototype.set enabled): (GestureRecognizer.prototype.reset): (GestureRecognizer.prototype.locationInElement): (GestureRecognizer.prototype.locationInClient): (GestureRecognizer.prototype.locationOfTouchInElement): (GestureRecognizer.prototype.touchesBegan): (GestureRecognizer.prototype.touchesMoved): (GestureRecognizer.prototype.touchesEnded): (GestureRecognizer.prototype.touchesCancelled): (GestureRecognizer.prototype.gestureBegan): (GestureRecognizer.prototype.gestureChanged): (GestureRecognizer.prototype.gestureEnded): (GestureRecognizer.prototype.enterPossibleState): (GestureRecognizer.prototype.enterBeganState): (GestureRecognizer.prototype.enterEndedState): (GestureRecognizer.prototype.enterCancelledState): (GestureRecognizer.prototype.enterFailedState): (GestureRecognizer.prototype.enterChangedState): (GestureRecognizer.prototype.enterRecognizedState): (GestureRecognizer.prototype.handleEvent): (GestureRecognizer.prototype._initRecognizer): (GestureRecognizer.prototype._updateBaseListeners): (GestureRecognizer.prototype._removeTrackingListeners): (GestureRecognizer.prototype._updateTargetTouches): (GestureRecognizer.prototype._updateKeyboardModifiers): * Modules/modern-media-controls/gesture-recognizers/pinch.js: Added. (PinchGestureRecognizer): (PinchGestureRecognizer.prototype.get velocity): (PinchGestureRecognizer.prototype.touchesBegan): (PinchGestureRecognizer.prototype.touchesMoved): (PinchGestureRecognizer.prototype.touchesEnded): (PinchGestureRecognizer.prototype.gestureBegan): (PinchGestureRecognizer.prototype.gestureChanged): (PinchGestureRecognizer.prototype.gestureEnded): (PinchGestureRecognizer.prototype.reset): (PinchGestureRecognizer.prototype._recordGesture): (PinchGestureRecognizer.prototype._updateStateWithEvent): (PinchGestureRecognizer.prototype._distance): * Modules/modern-media-controls/gesture-recognizers/tap.js: Added. (TapGestureRecognizer): (TapGestureRecognizer.prototype.touchesBegan): (TapGestureRecognizer.prototype.touchesMoved): (TapGestureRecognizer.prototype.touchesEnded): (TapGestureRecognizer.prototype.reset): (TapGestureRecognizer.prototype.locationInElement): (TapGestureRecognizer.prototype.locationInClient): (TapGestureRecognizer.prototype._clearTimer): (TapGestureRecognizer.prototype._rewindTimer): (TapGestureRecognizer.prototype._timerFired): * Modules/modern-media-controls/js-files: * Modules/modern-media-controls/media/airplay-support.js: (AirplaySupport.prototype.buttonWasClicked): Deleted. * Modules/modern-media-controls/media/controls-visibility-support.js: (ControlsVisibilitySupport): (ControlsVisibilitySupport.prototype.handleEvent): (ControlsVisibilitySupport.prototype.syncControl): Deleted. * Modules/modern-media-controls/media/fullscreen-support.js: (FullscreenSupport): (FullscreenSupport.prototype.iOSInlineMediaControlsRecognizedPinchInGesture): (FullscreenSupport.prototype.buttonWasClicked): Deleted. * Modules/modern-media-controls/media/media-controller-support.js: (MediaControllerSupport): (MediaControllerSupport.prototype.handleEvent): (MediaControllerSupport.prototype.buttonWasClicked): Deleted. * Modules/modern-media-controls/media/mute-support.js: (MuteSupport.prototype.buttonWasClicked): Deleted. * Modules/modern-media-controls/media/pip-support.js: (PiPSupport.prototype.buttonWasClicked): Deleted. * Modules/modern-media-controls/media/playback-support.js: (PlaybackSupport.prototype.buttonWasClicked): Deleted. * Modules/modern-media-controls/media/skip-back-support.js: (SkipBackSupport.prototype.buttonWasClicked): Deleted. * Modules/modern-media-controls/media/start-support.js: (StartSupport.prototype.buttonWasClicked): Deleted. * Modules/modern-media-controls/media/tracks-support.js: (TracksSupport.prototype.buttonWasClicked): Deleted. LayoutTests: With the addition of new gesture recognizer source files, some tests were failing due to linking to only a subset of the modern media controls resources. * media/modern-media-controls/airplay-button/airplay-button.html: * media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html: * media/modern-media-controls/button/button.html: * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html: * media/modern-media-controls/buttons-container/buttons-container-constructor.html: * media/modern-media-controls/buttons-container/buttons-container-layout.html: * media/modern-media-controls/fullscreen-button/fullscreen-button.html: * media/modern-media-controls/icon-button/icon-button-active-state.html: * media/modern-media-controls/icon-button/icon-button.html: * media/modern-media-controls/mute-button/mute-button.html: * media/modern-media-controls/pip-button/pip-button.html: * media/modern-media-controls/placard/placard.html: * media/modern-media-controls/play-pause-button/play-pause-button.html: * media/modern-media-controls/skip-back-button/skip-back-button.html: * media/modern-media-controls/start-button/start-button-styles.html: * media/modern-media-controls/start-button/start-button.html: * media/modern-media-controls/tracks-button/tracks-button.html: Canonical link: https://commits.webkit.org/183118@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-12-07 07:48:23 +00:00
<script src="../resources/media-controls-loader.js" type="text/javascript"></script>
[Modern Media Controls] Buttons container https://bugs.webkit.org/show_bug.cgi?id=163238 <rdar://problem/28701864> Patch by Antoine Quint <graouts@apple.com> on 2016-10-11 Reviewed by Dean Jackson. Source/WebCore: We add a new ButtonsContainer class which contains a group of Button objects and positions them based on the provided padding and margin between buttons. Buttons that aren't enabled or marked as dropped are not added to the tree of LayoutNodes, and thus the DOM. Additionally, we fix a few issues we found while working on tests for ButtonsContainer where LayoutNodes would schedule layout callbacks even when they would not do any work during the layout callback due to not resetting the `needsLayout` flag to false and removing any scheduled tasks when a layout was completed. Finally, we fix a few style issues that had not been caught so far and an unused `size` property on IconButton. Tests: media/modern-media-controls/buttons-container/buttons-container-buttons-property.html media/modern-media-controls/buttons-container/buttons-container-constructor.html media/modern-media-controls/buttons-container/buttons-container-layout.html * Modules/modern-media-controls/controls/airplay-button.js: (AirplayButton.prototype.set on): (AirplayButton): * Modules/modern-media-controls/controls/buttons-container.css: (.buttons-container): * Modules/modern-media-controls/controls/buttons-container.js: (ButtonsContainer.prototype.get buttons): (ButtonsContainer.prototype.set buttons): (ButtonsContainer.prototype.layout): * Modules/modern-media-controls/controls/icon-button.js: * Modules/modern-media-controls/controls/layout-node.js: (LayoutNode.prototype.set needsLayout): (LayoutNode.prototype.markDirtyProperty): (LayoutNode.prototype._markNodeManipulation): (LayoutNode.prototype._updateDirtyState): (performScheduledLayout): (elementFromString): * Modules/modern-media-controls/controls/scheduler.js: (const.scheduler.new.prototype.unscheduleLayout): LayoutTests: Adding tests for the new ButtonsContainer class. * media/modern-media-controls/buttons-container/buttons-container-buttons-property-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html: Added. * media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-constructor.html: Added. * media/modern-media-controls/buttons-container/buttons-container-layout-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-layout.html: Added. Canonical link: https://commits.webkit.org/181103@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-11 12:52:28 +00:00
<body>
<script type="text/javascript">
description("Testing the <code>ButtonsContainer</code> constructor.");
const defaultContainer = new ButtonsContainer;
shouldBeEqualToString("defaultContainer.element.localName", "div");
shouldBeEqualToString("defaultContainer.element.className.trim()", "buttons-container");
shouldBe("defaultContainer.buttonMargin", "16");
shouldBe("defaultContainer.leftMargin", "16");
shouldBe("defaultContainer.rightMargin", "16");
[Modern Media Controls] Turn media/modern-media-controls/start-support tests back on https://bugs.webkit.org/show_bug.cgi?id=182297 Reviewed by Jon Lee and Eric Carlson. Source/WebCore: We identified one cause of flakiness when turning those tests back on and fix it in this patch. There would be cases where the play/pause button would never actually become visible because we would first set it as one of the buttons in the left container in the bottom controls bar before we would identify that we should show the prominent play/pause button, and then once we did, we would add it as a child to the InlineMediaControls. But, because the actual layout of the ButtonsContainer would happen in a rAF due to being a layout() method, we would remove the play/pause button from the InlineMediaControls and set it as a child of the left container even though it wasn't visible. Performing the layout of a ButtonsContainer should really happen immediately when we set the buttons, so in this patch we remove the "buttons" property and clients of ButtonsContainer can simply add or remove children which will be laid out in a row. To support this, we've added two notification methods to LayoutNode, one that indicates when children have changed, didChangeChildren(), which we override in ButtonsContainer to perform a synchronous layout. The other method is willRemoveChild() which we also override in ButtonsContainer, this time to reset the "x" and "visible" properties which we set while performing layout. This fixes flakiness for media/modern-media-controls/start-support/start-support-click-to-start.html, and maybe other modern-media-controls tests that could have been affected by this unexpected behavior. * Modules/modern-media-controls/controls/buttons-container.js: (ButtonsContainer.prototype.willRemoveChild): (ButtonsContainer.prototype.didChangeChildren): (ButtonsContainer.prototype.layout): (ButtonsContainer.prototype.get buttons): Deleted. (ButtonsContainer.prototype.set buttons): Deleted. * Modules/modern-media-controls/controls/inline-media-controls.js: (InlineMediaControls.prototype.layout): (InlineMediaControls.prototype._updateBottomControlsBarLabel): (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren): (InlineMediaControls): * Modules/modern-media-controls/controls/layout-node.js: (LayoutNode.prototype.set children): (LayoutNode.prototype.addChild): (LayoutNode.prototype.removeChild): (LayoutNode.prototype.willRemoveChild): (LayoutNode.prototype.didChangeChildren): * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: (MacOSFullscreenMediaControls.prototype.layout): * Modules/modern-media-controls/media/media-controller.js: Drive-by fix to correctly set the value passed as data-auto-hide-delay on a <video> element. LayoutTests: Update tests to account for the new variable name for the playPauseButton and ensure we only listen to the fullscreen event once to avoid flakiness in cases where we might exit fullscreen before the test completes. We also update other tests that tested the behavior of ButtonsContainer. * media/modern-media-controls/buttons-container/buttons-container-buttons-property-expected.txt: * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html: * media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt: * media/modern-media-controls/buttons-container/buttons-container-constructor.html: * media/modern-media-controls/buttons-container/buttons-container-layout-expected.txt: * media/modern-media-controls/buttons-container/buttons-container-layout.html: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl-expected.txt: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl.html: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled-expected.txt: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled.html: * media/modern-media-controls/pip-support/pip-support-click.html: * media/modern-media-controls/start-support/start-support-click-to-start.html: * media/modern-media-controls/start-support/start-support-fullscreen.html: * media/modern-media-controls/start-support/start-support-lowPowerMode-expected.txt: * media/modern-media-controls/start-support/start-support-lowPowerMode.html: * platform/ios/TestExpectations: * platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/198141@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-31 17:35:15 +00:00
shouldBe("defaultContainer.children", "[]");
[Modern Media Controls] Buttons container https://bugs.webkit.org/show_bug.cgi?id=163238 <rdar://problem/28701864> Patch by Antoine Quint <graouts@apple.com> on 2016-10-11 Reviewed by Dean Jackson. Source/WebCore: We add a new ButtonsContainer class which contains a group of Button objects and positions them based on the provided padding and margin between buttons. Buttons that aren't enabled or marked as dropped are not added to the tree of LayoutNodes, and thus the DOM. Additionally, we fix a few issues we found while working on tests for ButtonsContainer where LayoutNodes would schedule layout callbacks even when they would not do any work during the layout callback due to not resetting the `needsLayout` flag to false and removing any scheduled tasks when a layout was completed. Finally, we fix a few style issues that had not been caught so far and an unused `size` property on IconButton. Tests: media/modern-media-controls/buttons-container/buttons-container-buttons-property.html media/modern-media-controls/buttons-container/buttons-container-constructor.html media/modern-media-controls/buttons-container/buttons-container-layout.html * Modules/modern-media-controls/controls/airplay-button.js: (AirplayButton.prototype.set on): (AirplayButton): * Modules/modern-media-controls/controls/buttons-container.css: (.buttons-container): * Modules/modern-media-controls/controls/buttons-container.js: (ButtonsContainer.prototype.get buttons): (ButtonsContainer.prototype.set buttons): (ButtonsContainer.prototype.layout): * Modules/modern-media-controls/controls/icon-button.js: * Modules/modern-media-controls/controls/layout-node.js: (LayoutNode.prototype.set needsLayout): (LayoutNode.prototype.markDirtyProperty): (LayoutNode.prototype._markNodeManipulation): (LayoutNode.prototype._updateDirtyState): (performScheduledLayout): (elementFromString): * Modules/modern-media-controls/controls/scheduler.js: (const.scheduler.new.prototype.unscheduleLayout): LayoutTests: Adding tests for the new ButtonsContainer class. * media/modern-media-controls/buttons-container/buttons-container-buttons-property-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html: Added. * media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-constructor.html: Added. * media/modern-media-controls/buttons-container/buttons-container-layout-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-layout.html: Added. Canonical link: https://commits.webkit.org/181103@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-11 12:52:28 +00:00
const buttons = [new Button, new Button];
const containerWithParameters = new ButtonsContainer({
[Modern Media Controls] Provide a compact mode for when the controls are small https://bugs.webkit.org/show_bug.cgi?id=167746 <rdar://problem/29565842> Reviewed by Dean Jackson. Source/WebCore: When the macOS inline media controls become too narrow to display both the volume and fullscreen buttons in their right container (width < 242), we switch to a compact mode where the controls bar is shorter and the buttons smaller. To facilitate this, we provide a new subclass of MacOSInlineMediaControls called MacOSCompactInlineMediaControls which changes some of the layout properties of the buttons to have shorter margins around buttons. We also added a new "Compact" LayoutTrait and improved IconService to provide specific icons for this mode for the buttons that can exist in compact mode. To correctly implement the design, we needed to add a way to provide different margins around the left and right edges of the container, so the "padding" property is now split between "leftMargin" and "rightMargin", and to make property naming cleaner, the "margin" property which specifies the space between each button in a container is now called "buttonMargin". We also set the default values for those properties to be 24 (instead of 0) which are the most widely used values, requiring less customization. Tests: media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles.html media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor.html media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles.html media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout.html media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles.html media/modern-media-controls/media-controller/media-controller-toggle-compact-mode.html * Modules/modern-media-controls/controls/buttons-container.js: (ButtonsContainer.prototype.layout): Refactor the "margin" and "padding" properties into "leftMargin", "rightMargin" and "buttonMargin". * Modules/modern-media-controls/controls/icon-button.js: (IconButton.prototype._updateImage): Fix a small bug that would prevent the image source change to occur after changing the "iconName" property should the previous and new icons share the same metrics, which is the case for the "play" and "pause" icons in compact mode. * Modules/modern-media-controls/controls/icon-service.js: Add support for compact variants. (const.iconService.new.IconService.prototype._fileNameAndPlatformForIconNameAndLayoutTraits): (const.iconService.new.IconService): * Modules/modern-media-controls/controls/ios-inline-media-controls.js: Adopt new margin defaults. * Modules/modern-media-controls/controls/layout-item.js: Add the new "Compact" LayoutTrait. * Modules/modern-media-controls/controls/macos-compact-inline-media-controls.css: Added. (.media-controls.mac.inline.compact > .controls-bar): (.media-controls.mac.inline.compact button.play-pause): (.media-controls.mac.inline.compact button.skip-back): (.media-controls.mac.inline.compact .scrubber.slider): (.media-controls.mac.inline.compact button.mute): (.media-controls.mac.inline.compact button.fullscreen): (.media-controls.mac.inline.compact .time-label,): (.media-controls.mac.inline.compact .volume-slider-container): (.media-controls.mac.inline.compact .volume.slider): (.media-controls.mac.inline.compact .scrubber.slider > input::-webkit-slider-thumb): * Modules/modern-media-controls/controls/macos-compact-inline-media-controls.js: Added. (MacOSCompactInlineMediaControls): * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: Adopt new margin defaults. (MacOSFullscreenMediaControls.prototype.layout): * Modules/modern-media-controls/controls/macos-inline-media-controls.js: Adopt new margin defaults and make the _leftContainer and _rightContainer properties public such that the MacOSCompactInlineMediaControls subclass may customize them without accessing a private property. (MacOSInlineMediaControls.prototype.layout): (MacOSInlineMediaControls.prototype.showTracksPanel): * Modules/modern-media-controls/images/macOS/enter-fullscreen-compact@1x.png: Added. * Modules/modern-media-controls/images/macOS/enter-fullscreen-compact@2x.png: Added. * Modules/modern-media-controls/images/macOS/interval-skip-back-compact@1x.png: Added. * Modules/modern-media-controls/images/macOS/interval-skip-back-compact@2x.png: Added. * Modules/modern-media-controls/images/macOS/pause-compact@1x.png: Added. * Modules/modern-media-controls/images/macOS/pause-compact@2x.png: Added. * Modules/modern-media-controls/images/macOS/play-compact@1x.png: Added. * Modules/modern-media-controls/images/macOS/play-compact@2x.png: Added. * Modules/modern-media-controls/images/macOS/volume-compact@1x.png: Added. * Modules/modern-media-controls/images/macOS/volume-compact@2x.png: Added. * Modules/modern-media-controls/js-files: Add the new files so they are concatenated by the build script. * Modules/modern-media-controls/media/media-controller.js: Toggle compact mode if controls are below the 242px width threshold. (MediaController.prototype.get layoutTraits): (MediaController.prototype.handleEvent): (MediaController.prototype._updateControlsIfNeeded): (MediaController.prototype._shouldFadeBetweenControls): (MediaController.prototype._updateControlsSize): (MediaController.prototype._controlsWidth): (MediaController.prototype._controlsClass): (MediaController): * WebCore.xcodeproj/project.pbxproj: Add new files and perform some cleanup so that the project accurately lists all the existing project files and remove some older ones. LayoutTests: Add some new tests for the compact mode and update some tests after the ButtonsContainer "padding" and "margin" properties refactoring. * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html: * media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt: * media/modern-media-controls/buttons-container/buttons-container-constructor.html: * media/modern-media-controls/buttons-container/buttons-container-layout.html: * media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor-expected.txt: * media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor.html: * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles-expected.txt: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles.html: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor-expected.txt: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor.html: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles-expected.txt: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles.html: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout-expected.txt: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout.html: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles-expected.txt: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles.html: Added. * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor-expected.txt: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor.html: * media/modern-media-controls/media-controller/media-controller-toggle-compact-mode-expected.txt: Added. * media/modern-media-controls/media-controller/media-controller-toggle-compact-mode.html: Added. * media/modern-media-controls/resources/media-controls-loader.js: * platform/ios-simulator/TestExpectations: Canonical link: https://commits.webkit.org/184799@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-02 21:25:19 +00:00
buttonMargin: 10,
leftMargin: 20,
rightMargin: 20,
[Modern Media Controls] Turn media/modern-media-controls/start-support tests back on https://bugs.webkit.org/show_bug.cgi?id=182297 Reviewed by Jon Lee and Eric Carlson. Source/WebCore: We identified one cause of flakiness when turning those tests back on and fix it in this patch. There would be cases where the play/pause button would never actually become visible because we would first set it as one of the buttons in the left container in the bottom controls bar before we would identify that we should show the prominent play/pause button, and then once we did, we would add it as a child to the InlineMediaControls. But, because the actual layout of the ButtonsContainer would happen in a rAF due to being a layout() method, we would remove the play/pause button from the InlineMediaControls and set it as a child of the left container even though it wasn't visible. Performing the layout of a ButtonsContainer should really happen immediately when we set the buttons, so in this patch we remove the "buttons" property and clients of ButtonsContainer can simply add or remove children which will be laid out in a row. To support this, we've added two notification methods to LayoutNode, one that indicates when children have changed, didChangeChildren(), which we override in ButtonsContainer to perform a synchronous layout. The other method is willRemoveChild() which we also override in ButtonsContainer, this time to reset the "x" and "visible" properties which we set while performing layout. This fixes flakiness for media/modern-media-controls/start-support/start-support-click-to-start.html, and maybe other modern-media-controls tests that could have been affected by this unexpected behavior. * Modules/modern-media-controls/controls/buttons-container.js: (ButtonsContainer.prototype.willRemoveChild): (ButtonsContainer.prototype.didChangeChildren): (ButtonsContainer.prototype.layout): (ButtonsContainer.prototype.get buttons): Deleted. (ButtonsContainer.prototype.set buttons): Deleted. * Modules/modern-media-controls/controls/inline-media-controls.js: (InlineMediaControls.prototype.layout): (InlineMediaControls.prototype._updateBottomControlsBarLabel): (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren): (InlineMediaControls): * Modules/modern-media-controls/controls/layout-node.js: (LayoutNode.prototype.set children): (LayoutNode.prototype.addChild): (LayoutNode.prototype.removeChild): (LayoutNode.prototype.willRemoveChild): (LayoutNode.prototype.didChangeChildren): * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: (MacOSFullscreenMediaControls.prototype.layout): * Modules/modern-media-controls/media/media-controller.js: Drive-by fix to correctly set the value passed as data-auto-hide-delay on a <video> element. LayoutTests: Update tests to account for the new variable name for the playPauseButton and ensure we only listen to the fullscreen event once to avoid flakiness in cases where we might exit fullscreen before the test completes. We also update other tests that tested the behavior of ButtonsContainer. * media/modern-media-controls/buttons-container/buttons-container-buttons-property-expected.txt: * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html: * media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt: * media/modern-media-controls/buttons-container/buttons-container-constructor.html: * media/modern-media-controls/buttons-container/buttons-container-layout-expected.txt: * media/modern-media-controls/buttons-container/buttons-container-layout.html: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl-expected.txt: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl.html: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled-expected.txt: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled.html: * media/modern-media-controls/pip-support/pip-support-click.html: * media/modern-media-controls/start-support/start-support-click-to-start.html: * media/modern-media-controls/start-support/start-support-fullscreen.html: * media/modern-media-controls/start-support/start-support-lowPowerMode-expected.txt: * media/modern-media-controls/start-support/start-support-lowPowerMode.html: * platform/ios/TestExpectations: * platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/198141@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-31 17:35:15 +00:00
children: buttons,
[Modern Media Controls] Buttons container https://bugs.webkit.org/show_bug.cgi?id=163238 <rdar://problem/28701864> Patch by Antoine Quint <graouts@apple.com> on 2016-10-11 Reviewed by Dean Jackson. Source/WebCore: We add a new ButtonsContainer class which contains a group of Button objects and positions them based on the provided padding and margin between buttons. Buttons that aren't enabled or marked as dropped are not added to the tree of LayoutNodes, and thus the DOM. Additionally, we fix a few issues we found while working on tests for ButtonsContainer where LayoutNodes would schedule layout callbacks even when they would not do any work during the layout callback due to not resetting the `needsLayout` flag to false and removing any scheduled tasks when a layout was completed. Finally, we fix a few style issues that had not been caught so far and an unused `size` property on IconButton. Tests: media/modern-media-controls/buttons-container/buttons-container-buttons-property.html media/modern-media-controls/buttons-container/buttons-container-constructor.html media/modern-media-controls/buttons-container/buttons-container-layout.html * Modules/modern-media-controls/controls/airplay-button.js: (AirplayButton.prototype.set on): (AirplayButton): * Modules/modern-media-controls/controls/buttons-container.css: (.buttons-container): * Modules/modern-media-controls/controls/buttons-container.js: (ButtonsContainer.prototype.get buttons): (ButtonsContainer.prototype.set buttons): (ButtonsContainer.prototype.layout): * Modules/modern-media-controls/controls/icon-button.js: * Modules/modern-media-controls/controls/layout-node.js: (LayoutNode.prototype.set needsLayout): (LayoutNode.prototype.markDirtyProperty): (LayoutNode.prototype._markNodeManipulation): (LayoutNode.prototype._updateDirtyState): (performScheduledLayout): (elementFromString): * Modules/modern-media-controls/controls/scheduler.js: (const.scheduler.new.prototype.unscheduleLayout): LayoutTests: Adding tests for the new ButtonsContainer class. * media/modern-media-controls/buttons-container/buttons-container-buttons-property-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html: Added. * media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-constructor.html: Added. * media/modern-media-controls/buttons-container/buttons-container-layout-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-layout.html: Added. Canonical link: https://commits.webkit.org/181103@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-11 12:52:28 +00:00
cssClassName: "foo"
});
shouldBeEqualToString("containerWithParameters.element.localName", "div");
shouldBeTrue("containerWithParameters.element.classList.contains('buttons-container')");
shouldBeTrue("containerWithParameters.element.classList.contains('foo')");
[Modern Media Controls] Provide a compact mode for when the controls are small https://bugs.webkit.org/show_bug.cgi?id=167746 <rdar://problem/29565842> Reviewed by Dean Jackson. Source/WebCore: When the macOS inline media controls become too narrow to display both the volume and fullscreen buttons in their right container (width < 242), we switch to a compact mode where the controls bar is shorter and the buttons smaller. To facilitate this, we provide a new subclass of MacOSInlineMediaControls called MacOSCompactInlineMediaControls which changes some of the layout properties of the buttons to have shorter margins around buttons. We also added a new "Compact" LayoutTrait and improved IconService to provide specific icons for this mode for the buttons that can exist in compact mode. To correctly implement the design, we needed to add a way to provide different margins around the left and right edges of the container, so the "padding" property is now split between "leftMargin" and "rightMargin", and to make property naming cleaner, the "margin" property which specifies the space between each button in a container is now called "buttonMargin". We also set the default values for those properties to be 24 (instead of 0) which are the most widely used values, requiring less customization. Tests: media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles.html media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor.html media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles.html media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout.html media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles.html media/modern-media-controls/media-controller/media-controller-toggle-compact-mode.html * Modules/modern-media-controls/controls/buttons-container.js: (ButtonsContainer.prototype.layout): Refactor the "margin" and "padding" properties into "leftMargin", "rightMargin" and "buttonMargin". * Modules/modern-media-controls/controls/icon-button.js: (IconButton.prototype._updateImage): Fix a small bug that would prevent the image source change to occur after changing the "iconName" property should the previous and new icons share the same metrics, which is the case for the "play" and "pause" icons in compact mode. * Modules/modern-media-controls/controls/icon-service.js: Add support for compact variants. (const.iconService.new.IconService.prototype._fileNameAndPlatformForIconNameAndLayoutTraits): (const.iconService.new.IconService): * Modules/modern-media-controls/controls/ios-inline-media-controls.js: Adopt new margin defaults. * Modules/modern-media-controls/controls/layout-item.js: Add the new "Compact" LayoutTrait. * Modules/modern-media-controls/controls/macos-compact-inline-media-controls.css: Added. (.media-controls.mac.inline.compact > .controls-bar): (.media-controls.mac.inline.compact button.play-pause): (.media-controls.mac.inline.compact button.skip-back): (.media-controls.mac.inline.compact .scrubber.slider): (.media-controls.mac.inline.compact button.mute): (.media-controls.mac.inline.compact button.fullscreen): (.media-controls.mac.inline.compact .time-label,): (.media-controls.mac.inline.compact .volume-slider-container): (.media-controls.mac.inline.compact .volume.slider): (.media-controls.mac.inline.compact .scrubber.slider > input::-webkit-slider-thumb): * Modules/modern-media-controls/controls/macos-compact-inline-media-controls.js: Added. (MacOSCompactInlineMediaControls): * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: Adopt new margin defaults. (MacOSFullscreenMediaControls.prototype.layout): * Modules/modern-media-controls/controls/macos-inline-media-controls.js: Adopt new margin defaults and make the _leftContainer and _rightContainer properties public such that the MacOSCompactInlineMediaControls subclass may customize them without accessing a private property. (MacOSInlineMediaControls.prototype.layout): (MacOSInlineMediaControls.prototype.showTracksPanel): * Modules/modern-media-controls/images/macOS/enter-fullscreen-compact@1x.png: Added. * Modules/modern-media-controls/images/macOS/enter-fullscreen-compact@2x.png: Added. * Modules/modern-media-controls/images/macOS/interval-skip-back-compact@1x.png: Added. * Modules/modern-media-controls/images/macOS/interval-skip-back-compact@2x.png: Added. * Modules/modern-media-controls/images/macOS/pause-compact@1x.png: Added. * Modules/modern-media-controls/images/macOS/pause-compact@2x.png: Added. * Modules/modern-media-controls/images/macOS/play-compact@1x.png: Added. * Modules/modern-media-controls/images/macOS/play-compact@2x.png: Added. * Modules/modern-media-controls/images/macOS/volume-compact@1x.png: Added. * Modules/modern-media-controls/images/macOS/volume-compact@2x.png: Added. * Modules/modern-media-controls/js-files: Add the new files so they are concatenated by the build script. * Modules/modern-media-controls/media/media-controller.js: Toggle compact mode if controls are below the 242px width threshold. (MediaController.prototype.get layoutTraits): (MediaController.prototype.handleEvent): (MediaController.prototype._updateControlsIfNeeded): (MediaController.prototype._shouldFadeBetweenControls): (MediaController.prototype._updateControlsSize): (MediaController.prototype._controlsWidth): (MediaController.prototype._controlsClass): (MediaController): * WebCore.xcodeproj/project.pbxproj: Add new files and perform some cleanup so that the project accurately lists all the existing project files and remove some older ones. LayoutTests: Add some new tests for the compact mode and update some tests after the ButtonsContainer "padding" and "margin" properties refactoring. * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html: * media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt: * media/modern-media-controls/buttons-container/buttons-container-constructor.html: * media/modern-media-controls/buttons-container/buttons-container-layout.html: * media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor-expected.txt: * media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor.html: * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles-expected.txt: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles.html: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor-expected.txt: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor.html: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles-expected.txt: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles.html: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout-expected.txt: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout.html: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles-expected.txt: Added. * media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles.html: Added. * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor-expected.txt: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor.html: * media/modern-media-controls/media-controller/media-controller-toggle-compact-mode-expected.txt: Added. * media/modern-media-controls/media-controller/media-controller-toggle-compact-mode.html: Added. * media/modern-media-controls/resources/media-controls-loader.js: * platform/ios-simulator/TestExpectations: Canonical link: https://commits.webkit.org/184799@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-02 21:25:19 +00:00
shouldBe("containerWithParameters.buttonMargin", "10");
shouldBe("containerWithParameters.leftMargin", "20");
shouldBe("containerWithParameters.rightMargin", "20");
[Modern Media Controls] Turn media/modern-media-controls/start-support tests back on https://bugs.webkit.org/show_bug.cgi?id=182297 Reviewed by Jon Lee and Eric Carlson. Source/WebCore: We identified one cause of flakiness when turning those tests back on and fix it in this patch. There would be cases where the play/pause button would never actually become visible because we would first set it as one of the buttons in the left container in the bottom controls bar before we would identify that we should show the prominent play/pause button, and then once we did, we would add it as a child to the InlineMediaControls. But, because the actual layout of the ButtonsContainer would happen in a rAF due to being a layout() method, we would remove the play/pause button from the InlineMediaControls and set it as a child of the left container even though it wasn't visible. Performing the layout of a ButtonsContainer should really happen immediately when we set the buttons, so in this patch we remove the "buttons" property and clients of ButtonsContainer can simply add or remove children which will be laid out in a row. To support this, we've added two notification methods to LayoutNode, one that indicates when children have changed, didChangeChildren(), which we override in ButtonsContainer to perform a synchronous layout. The other method is willRemoveChild() which we also override in ButtonsContainer, this time to reset the "x" and "visible" properties which we set while performing layout. This fixes flakiness for media/modern-media-controls/start-support/start-support-click-to-start.html, and maybe other modern-media-controls tests that could have been affected by this unexpected behavior. * Modules/modern-media-controls/controls/buttons-container.js: (ButtonsContainer.prototype.willRemoveChild): (ButtonsContainer.prototype.didChangeChildren): (ButtonsContainer.prototype.layout): (ButtonsContainer.prototype.get buttons): Deleted. (ButtonsContainer.prototype.set buttons): Deleted. * Modules/modern-media-controls/controls/inline-media-controls.js: (InlineMediaControls.prototype.layout): (InlineMediaControls.prototype._updateBottomControlsBarLabel): (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren): (InlineMediaControls): * Modules/modern-media-controls/controls/layout-node.js: (LayoutNode.prototype.set children): (LayoutNode.prototype.addChild): (LayoutNode.prototype.removeChild): (LayoutNode.prototype.willRemoveChild): (LayoutNode.prototype.didChangeChildren): * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: (MacOSFullscreenMediaControls.prototype.layout): * Modules/modern-media-controls/media/media-controller.js: Drive-by fix to correctly set the value passed as data-auto-hide-delay on a <video> element. LayoutTests: Update tests to account for the new variable name for the playPauseButton and ensure we only listen to the fullscreen event once to avoid flakiness in cases where we might exit fullscreen before the test completes. We also update other tests that tested the behavior of ButtonsContainer. * media/modern-media-controls/buttons-container/buttons-container-buttons-property-expected.txt: * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html: * media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt: * media/modern-media-controls/buttons-container/buttons-container-constructor.html: * media/modern-media-controls/buttons-container/buttons-container-layout-expected.txt: * media/modern-media-controls/buttons-container/buttons-container-layout.html: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl-expected.txt: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl.html: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled-expected.txt: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled.html: * media/modern-media-controls/pip-support/pip-support-click.html: * media/modern-media-controls/start-support/start-support-click-to-start.html: * media/modern-media-controls/start-support/start-support-fullscreen.html: * media/modern-media-controls/start-support/start-support-lowPowerMode-expected.txt: * media/modern-media-controls/start-support/start-support-lowPowerMode.html: * platform/ios/TestExpectations: * platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/198141@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-31 17:35:15 +00:00
shouldBe("containerWithParameters.children", "buttons");
[Modern Media Controls] Buttons container https://bugs.webkit.org/show_bug.cgi?id=163238 <rdar://problem/28701864> Patch by Antoine Quint <graouts@apple.com> on 2016-10-11 Reviewed by Dean Jackson. Source/WebCore: We add a new ButtonsContainer class which contains a group of Button objects and positions them based on the provided padding and margin between buttons. Buttons that aren't enabled or marked as dropped are not added to the tree of LayoutNodes, and thus the DOM. Additionally, we fix a few issues we found while working on tests for ButtonsContainer where LayoutNodes would schedule layout callbacks even when they would not do any work during the layout callback due to not resetting the `needsLayout` flag to false and removing any scheduled tasks when a layout was completed. Finally, we fix a few style issues that had not been caught so far and an unused `size` property on IconButton. Tests: media/modern-media-controls/buttons-container/buttons-container-buttons-property.html media/modern-media-controls/buttons-container/buttons-container-constructor.html media/modern-media-controls/buttons-container/buttons-container-layout.html * Modules/modern-media-controls/controls/airplay-button.js: (AirplayButton.prototype.set on): (AirplayButton): * Modules/modern-media-controls/controls/buttons-container.css: (.buttons-container): * Modules/modern-media-controls/controls/buttons-container.js: (ButtonsContainer.prototype.get buttons): (ButtonsContainer.prototype.set buttons): (ButtonsContainer.prototype.layout): * Modules/modern-media-controls/controls/icon-button.js: * Modules/modern-media-controls/controls/layout-node.js: (LayoutNode.prototype.set needsLayout): (LayoutNode.prototype.markDirtyProperty): (LayoutNode.prototype._markNodeManipulation): (LayoutNode.prototype._updateDirtyState): (performScheduledLayout): (elementFromString): * Modules/modern-media-controls/controls/scheduler.js: (const.scheduler.new.prototype.unscheduleLayout): LayoutTests: Adding tests for the new ButtonsContainer class. * media/modern-media-controls/buttons-container/buttons-container-buttons-property-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-buttons-property.html: Added. * media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-constructor.html: Added. * media/modern-media-controls/buttons-container/buttons-container-layout-expected.txt: Added. * media/modern-media-controls/buttons-container/buttons-container-layout.html: Added. Canonical link: https://commits.webkit.org/181103@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-11 12:52:28 +00:00
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>