Changeset 185397 in webkit
- Timestamp:
- Jun 9, 2015, 5:53:13 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
Modules/mediacontrols/mediaControlsApple.js (modified) (1 diff)
-
Modules/mediacontrols/mediaControlsiOS.css (modified) (1 diff)
-
Modules/mediacontrols/mediaControlsiOS.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r185396 r185397 1 2015-06-09 Dean Jackson <dino@apple.com> 2 3 MediaControls: Reenable resize of controls on pinch zoom 4 https://bugs.webkit.org/show_bug.cgi?id=145824 5 <rdar://problem/21212778> 6 7 Reviewed by Darin Adler. 8 9 Reinstate the code that updated the scaling of the 10 controls in response to changes in page scale. 11 This time around we have to change both the controls 12 panel, and its blurry background. 13 14 * Modules/mediacontrols/mediaControlsApple.js: 15 (Controller.prototype.set pageScaleFactor): Deleted a comment. 16 * Modules/mediacontrols/mediaControlsiOS.css: 17 (video::-webkit-media-controls-panel-background): Set the background to pin 18 to the bottom of its view. 19 * Modules/mediacontrols/mediaControlsiOS.js: 20 (ControllerIOS.prototype.get pageScaleFactor): Basic getter, copied from mediaControlsApple. 21 (ControllerIOS.prototype.set pageScaleFactor): The setter that reacts to the page scale 22 and applies an inverse scaling on the control panel using a transform, and adjusts the 23 height on the background similarly. 24 1 25 2015-06-09 Andreas Kling <akling@apple.com> 2 26 -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
r185258 r185397 2035 2035 2036 2036 this._pageScaleFactor = newScaleFactor; 2037 2038 // FIXME: this should react to the scale change by2039 // unscaling the controls panel. However, this2040 // hits a bug with the backdrop blur layer getting2041 // too big and moving to a tiled layer.2042 // https://bugs.webkit.org/show_bug.cgi?id=1423172043 2037 }, 2044 2038 -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css
r184611 r185397 121 121 opacity: 0; 122 122 pointer-events: none; 123 bottom: 0; 124 position: absolute; 123 125 } 124 126 -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js
r184963 r185397 25 25 /* Enums */ 26 26 ControllerIOS.StartPlaybackControls = 2; 27 28 27 29 28 ControllerIOS.prototype = { … … 618 617 }, 619 618 619 get pageScaleFactor() 620 { 621 return this._pageScaleFactor; 622 }, 623 624 set pageScaleFactor(newScaleFactor) 625 { 626 if (!newScaleFactor || this._pageScaleFactor === newScaleFactor) 627 return; 628 629 this._pageScaleFactor = newScaleFactor; 630 631 var scaleValue = 1 / newScaleFactor; 632 var scaleTransform = "scale(" + scaleValue + ")"; 633 if (this.controls.startPlaybackButton) 634 this.controls.startPlaybackButton.style.webkitTransform = scaleTransform; 635 if (this.controls.panel) { 636 var bottomAligment = -2 * scaleValue; 637 this.controls.panel.style.bottom = bottomAligment + "px"; 638 this.controls.panel.style.paddingBottom = -(newScaleFactor * bottomAligment) + "px"; 639 this.controls.panel.style.width = Math.round(newScaleFactor * 100) + "%"; 640 this.controls.panel.style.webkitTransform = scaleTransform; 641 642 this.controls.panelBackground.style.height = (50 * scaleValue) + "px"; 643 644 this.setNeedsTimelineMetricsUpdate(); 645 this.updateProgress(); 646 this.scheduleUpdateLayoutForDisplayedWidth(); 647 } 648 }, 620 649 621 650 };
Note:
See TracChangeset
for help on using the changeset viewer.