Changeset 181882 in webkit
- Timestamp:
- Mar 23, 2015, 5:44:22 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r181879 r181882 1 2015-03-23 Dean Jackson <dino@apple.com> 2 3 Timelines are sharing the same canvas background 4 https://bugs.webkit.org/show_bug.cgi?id=142994 5 <rdar://problem/20209466> 6 7 Reviewed by Brent Fulgham. 8 9 Since each MediaControl lives in an isolated world, we 10 can't rely on a global variable to provide a unique 11 identifier for a named canvas. The fix is to expose 12 WebCore's UUID generator, and have each canvas use 13 that for a name. 14 15 * Modules/mediacontrols/MediaControlsHost.cpp: 16 (WebCore::MediaControlsHost::generateUUID): New method on the 17 MediaControlsHost that generates a UUID. 18 * Modules/mediacontrols/MediaControlsHost.h: 19 * Modules/mediacontrols/MediaControlsHost.idl: 20 21 * Modules/mediacontrols/mediaControlsApple.js: Remove the global 22 variable unique ID that wasn't working, and instead get 23 an ID from the MediaControlsHost. 24 (Controller.prototype.createControls): 25 * Modules/mediacontrols/mediaControlsiOS.js: 26 (ControllerIOS): 27 1 28 2015-03-23 Brent Fulgham <bfulgham@apple.com> 2 29 -
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
r180416 r181882 39 39 #include "TextTrack.h" 40 40 #include "TextTrackList.h" 41 #include "UUID.h" 41 42 #include <runtime/JSCJSValueInlines.h> 42 43 … … 293 294 } 294 295 295 } 296 297 #endif 296 String MediaControlsHost::generateUUID() const 297 { 298 return createCanonicalUUIDString(); 299 } 300 301 } 302 303 #endif -
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.h
r177622 r181882 81 81 void setControlsDependOnPageScaleFactor(bool v); 82 82 83 String generateUUID() const; 84 83 85 private: 84 86 MediaControlsHost(HTMLMediaElement*); -
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl
r177622 r181882 63 63 void enterFullscreenOptimized(); 64 64 DOMString mediaUIImageData(MediaUIPartID partID); 65 66 DOMString generateUUID(); 65 67 }; -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
r181428 r181882 46 46 47 47 /* Globals */ 48 Controller.gLastTimelineId = 0;49 48 Controller.gWirelessImage = 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 245"><g fill="#1060FE"><path d="M193.6,6.3v121.6H6.4V6.3H193.6 M199.1,0.7H0.9v132.7h198.2V0.7L199.1,0.7z"/><path d="M43.5,139.3c15.8,8,35.3,12.7,56.5,12.7s40.7-4.7,56.5-12.7H43.5z"/></g><g text-anchor="middle" font-family="Helvetica Neue"><text x="100" y="204" fill="white" font-size="24">##DEVICE_TYPE##</text><text x="100" y="234" fill="#5C5C5C" font-size="21">##DEVICE_NAME##</text></g></svg>'; 50 49 Controller.gSimulateWirelessPlaybackTarget = false; // Used for testing when there are no wireless targets. … … 363 362 timeline.step = .01; 364 363 365 this.timelineContextName = "_webkit-media-controls-timeline-" + Controller.gLastTimelineId;364 this.timelineContextName = "_webkit-media-controls-timeline-" + this.host.generateUUID(); 366 365 timeline.style.backgroundImage = '-webkit-canvas(' + this.timelineContextName + ')'; 367 366 … … 411 410 this.listenFor(volume, 'input', this.handleVolumeSliderInput); 412 411 413 this.volumeContextName = "_webkit-media-controls-volume-" + Controller.gLastTimelineId;412 this.volumeContextName = "_webkit-media-controls-volume-" + this.host.generateUUID(); 414 413 volume.style.backgroundImage = '-webkit-canvas(' + this.volumeContextName + ')'; 415 Controller.gLastTimelineId++;416 414 417 415 var captionButton = this.controls.captionButton = document.createElement('button'); -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js
r181347 r181882 9 9 this._pageScaleFactor = 1; 10 10 11 this.timelineContextName = "_webkit-media-controls-timeline-" + ControllerIOS.gLastTimelineId++;11 this.timelineContextName = "_webkit-media-controls-timeline-" + host.generateUUID(); 12 12 13 13 Controller.call(this, root, video, host); … … 30 30 ControllerIOS.StartPlaybackControls = 2; 31 31 32 /* Globals */33 ControllerIOS.gLastTimelineId = 0;34 32 35 33 ControllerIOS.prototype = {
Note:
See TracChangeset
for help on using the changeset viewer.