Changeset 176090 in webkit
- Timestamp:
- Nov 13, 2014, 2:10:33 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r176084 r176090 1 2014-11-13 Eric Carlson <eric.carlson@apple.com> 2 3 [iOS] update optimized fullscreen media controls artwork 4 https://bugs.webkit.org/show_bug.cgi?id=138705 5 6 Reviewed by Dean Jackson. 7 8 * Modules/mediacontrols/MediaControlsHost.cpp: 9 (WebCore::MediaControlsHost::mediaUIImageData): Remove one button. 10 * Modules/mediacontrols/MediaControlsHost.idl: 11 12 * Modules/mediacontrols/mediaControlsApple.js: 13 (Controller.prototype.controlsAreHidden): Add parentheses to fix the logic. 14 15 * Modules/mediacontrols/mediaControlsiOS.js: 16 (ControllerIOS.prototype.shouldHaveStartPlaybackButton): The big play button should not be 17 visible during playback. 18 (ControllerIOS.prototype.createControls): No longer necessary to insert style dynamically, 19 (ControllerIOS.prototype.setPlaying): Call the base class first so "isPlaying" is set before 20 calling updateControls, which calls shouldHaveStartPlaybackButton. 21 22 * platform/ios/WebCoreSystemInterfaceIOS.h: Update constants. 23 24 * rendering/RenderThemeIOS.mm: 25 (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Add button style to the media controls sheet. 26 1 27 2014-11-13 Benjamin Poulain <bpoulain@apple.com> 2 28 -
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
r175750 r176090 319 319 return wkGetMediaUIImageData(wkMediaUIPartOptimizedFullscreenButton); 320 320 321 if (partID == "optimized-fullscreen-button-hilited")322 return wkGetMediaUIImageData(wkMediaUIPartOptimizedFullscreenButtonHilited);323 324 321 if (partID == "optimized-fullscreen-placeholder") 325 322 return wkGetMediaUIImageData(wkMediaUIPartOptimizedFullscreenPlaceholder); -
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl
r175750 r176090 38 38 enum MediaUIPartID { 39 39 "optimized-fullscreen-button", 40 "optimized-fullscreen-button-hilited",41 40 "optimized-fullscreen-placeholder" 42 41 }; -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
r175596 r176090 1049 1049 controlsAreHidden: function() 1050 1050 { 1051 return !this.isAudio() && !this.controls.panel.classList.contains(this.ClassNames.show) || this.controls.panel.classList.contains(this.ClassNames.hidden);1051 return !this.isAudio() && (!this.controls.panel.classList.contains(this.ClassNames.show) || this.controls.panel.classList.contains(this.ClassNames.hidden)); 1052 1052 }, 1053 1053 -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js
r175812 r176090 65 65 shouldHaveStartPlaybackButton: function() { 66 66 var allowsInline = this.host.mediaPlaybackAllowsInline; 67 68 if (this.isPlaying) 69 return false; 67 70 68 71 if (this.isAudio() && allowsInline) … … 148 151 inlinePlaybackPlaceholder.classList.add(this.ClassNames.hidden); 149 152 inlinePlaybackPlaceholder.setAttribute('aria-label', this.UIString('Display Optimized Full Screen')); 150 151 var buttonImageSVG = "background-image: url('" + this.host.mediaUIImageData("optimized-fullscreen-button") + "')";152 document.styleSheets[0].insertRule('video::-webkit-media-controls-optimized-fullscreen-button { ' + buttonImageSVG + '; }', 0);153 154 buttonImageSVG = "background-image: url('" + this.host.mediaUIImageData("optimized-fullscreen-button-hilited") + "')";155 document.styleSheets[0].insertRule('video::-webkit-media-controls-optimized-fullscreen-button:active { ' + buttonImageSVG + '; }', 0);156 153 157 154 var wirelessTargetPicker = this.controls.wirelessTargetPicker = document.createElement('button'); … … 544 541 setPlaying: function(isPlaying) 545 542 { 543 Controller.prototype.setPlaying.call(this, isPlaying); 546 544 this.updateControls(); 547 Controller.prototype.setPlaying.call(this, isPlaying);548 545 }, 549 546 -
trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.h
r175750 r176090 78 78 typedef enum { 79 79 wkMediaUIPartOptimizedFullscreenButton = 0, 80 wkMediaUIPartOptimizedFullscreenButtonHilited,81 80 wkMediaUIPartOptimizedFullscreenPlaceholder 82 81 } wkMediaUIPart; -
trunk/Source/WebCore/rendering/RenderThemeIOS.mm
r174875 r176090 1252 1252 { 1253 1253 #if ENABLE(MEDIA_CONTROLS_SCRIPT) 1254 if (m_mediaControlsStyleSheet.isEmpty()) 1255 m_mediaControlsStyleSheet = [NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@"mediaControlsiOS" ofType:@"css"] encoding:NSUTF8StringEncoding error:nil]; 1254 if (m_mediaControlsStyleSheet.isEmpty()) { 1255 StringBuilder builder; 1256 builder.append([NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@"mediaControlsiOS" ofType:@"css"] encoding:NSUTF8StringEncoding error:nil]); 1257 builder.append(wkGetMediaUIImageData(wkMediaUIPartOptimizedFullscreenButton)); 1258 m_mediaControlsStyleSheet = builder.toString(); 1259 } 1256 1260 return m_mediaControlsStyleSheet; 1257 1261 #else
Note:
See TracChangeset
for help on using the changeset viewer.