Changeset 272438 in webkit
- Timestamp:
- Feb 5, 2021, 2:31:52 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r272436 r272438 1 2021-02-05 Devin Rousso <drousso@apple.com> 2 3 [macOS] REGRESSION(r272352): missing track for videos that haven't fully loaded 4 https://bugs.webkit.org/show_bug.cgi?id=221500 5 6 Reviewed by Eric Carlson. 7 8 r272352 removed the `.track.fill` that was used as a "background" for the slider. For videos 9 that aren't fully loaded and are buffering, that "background" is necessary to indicate where 10 the slider is as the `.track.secondary` only represents what's been buffered not the entire 11 length of the video/slider. 12 13 * Modules/modern-media-controls/controls/slider.js: 14 (Slider.prototype.commit): 15 * Modules/modern-media-controls/controls/slider.css: 16 (.slider > .custom-slider > .fill.primary): Added. 17 (.slider > .custom-slider > .fill.track): Added. 18 (.slider > .custom-slider > .fill.secondary): Added. 19 (.slider > .custom-slider > .primary): Deleted. 20 (.slider > .custom-slider > .secondary): Deleted. 21 Add back the background fill track removed in r272352, but adjust it so that it only draws 22 after the knob so that on macOS it doesn't draw in the space around the knob. 23 24 * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: 25 (MacOSFullscreenMediaControls): 26 * Modules/modern-media-controls/controls/macos-inline-media-controls.js: 27 (MacOSInlineMediaControls): 28 Remove the `secondaryValue` calls since the background fill track has been added back. 29 1 30 2021-02-05 Sam Weinig <weinig@apple.com> 2 31 -
trunk/Source/WebCore/Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js
r272375 r272438 48 48 this.volumeSlider = new Slider("volume"); 49 49 this.volumeSlider.width = 60; 50 this.volumeSlider.secondaryValue = 1;51 50 52 51 this._leftContainer = new ButtonsContainer({ -
trunk/Source/WebCore/Modules/modern-media-controls/controls/macos-inline-media-controls.js
r272352 r272438 41 41 this.volumeSlider = new Slider("volume"); 42 42 this.volumeSlider.width = 60; 43 this.volumeSlider.secondaryValue = 1;44 43 45 44 this._volumeSliderContainer = new LayoutNode(`<div class="volume-slider-container"></div>`); -
trunk/Source/WebCore/Modules/modern-media-controls/controls/slider.css
r272352 r272438 51 51 } 52 52 53 .slider > .custom-slider > . primary {53 .slider > .custom-slider > .fill.primary { 54 54 left: 0; 55 55 background-color: rgba(255, 255, 255, 0.45); … … 58 58 } 59 59 60 .slider > .custom-slider > .secondary { 61 background-color: rgba(255, 255, 255, 0.18); 60 .slider > .custom-slider > .fill.track { 61 right: 0; 62 background-color: rgba(255, 255, 255, 0.1); 63 border-top-right-radius: 4.5px; 64 border-bottom-right-radius: 4.5px; 65 } 66 67 .slider > .custom-slider > .fill.secondary { 68 background-color: rgba(255, 255, 255, 0.08); 62 69 border-top-right-radius: 4.5px; 63 70 border-bottom-right-radius: 4.5px; -
trunk/Source/WebCore/Modules/modern-media-controls/controls/slider.js
r272352 r272438 33 33 this._container = new LayoutNode(`<div class="custom-slider"></div>`); 34 34 this._primaryFill = new LayoutNode(`<div class="primary fill"></div>`); 35 this._trackFill = new LayoutNode(`<div class="track fill"></div>`); 35 36 this._secondaryFill = new LayoutNode(`<div class="secondary fill"></div>`); 36 37 this._knob = new LayoutNode(`<div class="knob ${knobStyle}"></div>`); 37 this._container.children = [this._primaryFill, this._ secondaryFill, this._knob];38 this._container.children = [this._primaryFill, this._trackFill, this._secondaryFill, this._knob]; 38 39 39 40 this._input = new LayoutNode(`<input type="range" min="0" max="1" step="0.001" />`); … … 147 148 let scrubberCenterX = (scrubberWidth / 2) + Math.round((this.width - scrubberWidth) * this.value); 148 149 this._primaryFill.element.style.width = `${scrubberCenterX - (scrubberWidth / 2) - scrubberBorder}px`; 150 this._trackFill.element.style.left = `${scrubberCenterX + (scrubberWidth / 2) + scrubberBorder}px`; 149 151 this._secondaryFill.element.style.left = `${scrubberCenterX + (scrubberWidth / 2) + scrubberBorder}px`; 150 152 this._secondaryFill.element.style.right = `${(1 - this._secondaryValue) * 100}%`;
Note:
See TracChangeset
for help on using the changeset viewer.