Changeset 142191 in webkit
- Timestamp:
- Feb 7, 2013, 3:42:12 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r142190 r142191 1 2013-02-07 Dean Jackson <dino@apple.com> 2 3 Use new speech bubble artwork for captions menu button 4 https://bugs.webkit.org/show_bug.cgi?id=109215 5 6 Reviewed by Eric Carlson. 7 8 Rather than call into RenderTheme to display this button, embed artwork 9 into the CSS. This means we can remove some uncalled methods in 10 RenderTheme. 11 12 * css/mediaControlsQuickTime.css: 13 (video::-webkit-media-controls-toggle-closed-captions-button): New background image using SVG. 14 * rendering/RenderTheme.cpp: 15 (WebCore::RenderTheme::paint): Don't call the specific painter for the CC button. 16 * rendering/RenderTheme.h: Remove unused function. 17 * rendering/RenderThemeMac.h: Ditto. 18 * rendering/RenderThemeMac.mm: Ditto. 19 1 20 2013-02-07 Michelangelo De Simone <michelangelo@webkit.org> 2 21 -
trunk/Source/WebCore/css/mediaControlsQuickTime.css
r142003 r142191 239 239 -webkit-box-ordinal-group: 3; /* between mute and fullscreen */ 240 240 border: none !important; 241 background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130 105"><g fill="rgb(224,224,224)"><path d="M98.766,43.224c0-23.163-21.775-41.94-48.637-41.94c-26.859,0-48.635,18.777-48.635,41.94c0,18.266,13.546,33.796,32.444,39.549c1.131,8.356,26.037,24.255,22.864,19.921c-4.462-6.096-5.159-13.183-5.07-17.566C77.85,84.397,98.766,65.923,98.766,43.224z"/><polygon points="128.044,84 100.956,84 114.5,98"/></g></svg>'); 242 background-repeat: no-repeat; 243 background-size: 16px 16px; 241 244 } 242 245 -
trunk/Source/WebCore/rendering/RenderTheme.cpp
r142071 r142191 342 342 case MediaReturnToRealtimeButtonPart: 343 343 return paintMediaReturnToRealtimeButton(o, paintInfo, r); 344 case MediaToggleClosedCaptionsButtonPart:345 return paintMediaToggleClosedCaptionsButton(o, paintInfo, r);346 344 case MediaSliderPart: 347 345 return paintMediaSliderTrack(o, paintInfo, r); -
trunk/Source/WebCore/rendering/RenderTheme.h
r140863 r142191 339 339 virtual bool paintMediaRewindButton(RenderObject*, const PaintInfo&, const IntRect&) { return true; } 340 340 virtual bool paintMediaReturnToRealtimeButton(RenderObject*, const PaintInfo&, const IntRect&) { return true; } 341 virtual bool paintMediaToggleClosedCaptionsButton(RenderObject*, const PaintInfo&, const IntRect&) { return true; }342 341 virtual bool paintMediaControlsBackground(RenderObject*, const PaintInfo&, const IntRect&) { return true; } 343 342 virtual bool paintMediaCurrentTime(RenderObject*, const PaintInfo&, const IntRect&) { return true; } -
trunk/Source/WebCore/rendering/RenderThemeMac.h
r134520 r142191 52 52 virtual bool paintMediaRewindButton(RenderObject*, const PaintInfo&, const IntRect&); 53 53 virtual bool paintMediaReturnToRealtimeButton(RenderObject*, const PaintInfo&, const IntRect&); 54 virtual bool paintMediaToggleClosedCaptionsButton(RenderObject*, const PaintInfo&, const IntRect&);55 54 virtual bool paintMediaControlsBackground(RenderObject*, const PaintInfo&, const IntRect&); 56 55 virtual bool paintMediaCurrentTime(RenderObject*, const PaintInfo&, const IntRect&); -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r136613 r142191 284 284 } 285 285 286 bool RenderThemeMac::paintMediaToggleClosedCaptionsButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)287 {288 Node* node = o->node();289 if (!node)290 return false;291 if (!node->isMediaControlElement())292 return false;293 294 LocalCurrentGraphicsContext localContext(paintInfo.context);295 wkDrawMediaUIPart(mediaControlElementType(node), mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));296 return false;297 }298 299 286 bool RenderThemeMac::paintMediaControlsBackground(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r) 300 287 {
Note:
See TracChangeset
for help on using the changeset viewer.