Changeset 181899 in webkit
- Timestamp:
- Mar 24, 2015, 12:53:17 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (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
r181898 r181899 1 2015-03-24 Dean Jackson <dino@apple.com> 2 3 MediaControls: Scrubber and Time displays have the incorrect blending 4 https://bugs.webkit.org/show_bug.cgi?id=143011 5 <rdar://problem/20245251> 6 7 Reviewed by Eric Carlson. 8 9 The scrubber in media controls should use plus-darker blending. Then 10 the scrubber itself should use a slightly transparent black (55% opacity) 11 when drawing. 12 13 * Modules/mediacontrols/mediaControlsiOS.css: 14 (audio::-webkit-media-controls-timeline): Add the blend mode. 15 * Modules/mediacontrols/mediaControlsiOS.js: 16 (ControllerIOS.prototype.drawTimelineBackground): Start drawing with 17 transparency. I changed the order of rendering to make it 18 more clear we draw the three parts in left to right order. 19 1 20 2015-03-24 David Hyatt <hyatt@apple.com> 2 21 -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css
r181123 r181899 362 362 box-sizing: content-box !important; 363 363 -webkit-transform: translate3d(0, 0, 0); 364 mix-blend-mode: plus-darker; 364 365 } 365 366 -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js
r181882 r181899 248 248 var midY = height / 2; 249 249 250 // 1. Draw the outline with a clip path that subtracts the 251 // middle of a lozenge. This produces a better result than 252 // stroking when we come to filling the parts below. 253 ctx.save(); 254 ctx.beginPath(); 255 this.addRoundedRect(ctx, 1, midY - 3, width - 2, 6, 3); 256 this.addRoundedRect(ctx, 2, midY - 2, width - 4, 4, 2); 257 ctx.closePath(); 258 ctx.clip("evenodd"); 259 ctx.fillStyle = "black"; 260 ctx.fillRect(0, 0, width, height); 261 ctx.restore(); 262 263 // 2. Draw the buffered part and played parts, using 250 // 1. Draw the buffered part and played parts, using 264 251 // solid rectangles that are clipped to the outside of 265 252 // the lozenge. … … 269 256 ctx.closePath(); 270 257 ctx.clip(); 271 ctx.fillStyle = "black";272 ctx.fillRect(0, 0, Math.round(width * buffered) + 2, height);273 258 ctx.fillStyle = "white"; 274 259 ctx.fillRect(0, 0, Math.round(width * played) + 2, height); 260 ctx.fillStyle = "rgba(0, 0, 0, 0.55)"; 261 ctx.fillRect(Math.round(width * played) + 2, 0, Math.round(width * (buffered - played)) + 2, height); 262 ctx.restore(); 263 264 // 2. Draw the outline with a clip path that subtracts the 265 // middle of a lozenge. This produces a better result than 266 // stroking. 267 ctx.save(); 268 ctx.beginPath(); 269 this.addRoundedRect(ctx, 1, midY - 3, width - 2, 6, 3); 270 this.addRoundedRect(ctx, 2, midY - 2, width - 4, 4, 2); 271 ctx.closePath(); 272 ctx.clip("evenodd"); 273 ctx.fillStyle = "rgba(0, 0, 0, 0.55)"; 274 ctx.fillRect(Math.round(width * buffered) + 2, 0, width, height); 275 275 ctx.restore(); 276 276 },
Note:
See TracChangeset
for help on using the changeset viewer.