Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: Source/core/paint/ThemePainter.cpp

Issue 1115203003: De-virtualize media control painting methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Mac doesn't want cast button Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/ThemePainter.h ('k') | Source/core/paint/ThemePainterDefault.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * This file is part of the theme implementation for form controls in WebCore. 2 * This file is part of the theme implementation for form controls in WebCore.
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 14 matching lines...) Expand all
25 #include "core/InputTypeNames.h" 25 #include "core/InputTypeNames.h"
26 #include "core/html/HTMLDataListElement.h" 26 #include "core/html/HTMLDataListElement.h"
27 #include "core/html/HTMLDataListOptionsCollection.h" 27 #include "core/html/HTMLDataListOptionsCollection.h"
28 #include "core/html/HTMLInputElement.h" 28 #include "core/html/HTMLInputElement.h"
29 #include "core/html/HTMLOptionElement.h" 29 #include "core/html/HTMLOptionElement.h"
30 #include "core/html/parser/HTMLParserIdioms.h" 30 #include "core/html/parser/HTMLParserIdioms.h"
31 #include "core/html/shadow/ShadowElementNames.h" 31 #include "core/html/shadow/ShadowElementNames.h"
32 #include "core/layout/LayoutMeter.h" 32 #include "core/layout/LayoutMeter.h"
33 #include "core/layout/LayoutTheme.h" 33 #include "core/layout/LayoutTheme.h"
34 #include "core/layout/LayoutView.h" 34 #include "core/layout/LayoutView.h"
35 #include "core/paint/MediaControlsPainter.h"
35 #include "core/paint/PaintInfo.h" 36 #include "core/paint/PaintInfo.h"
36 #include "core/style/ComputedStyle.h" 37 #include "core/style/ComputedStyle.h"
37 #include "platform/graphics/GraphicsContextStateSaver.h" 38 #include "platform/graphics/GraphicsContextStateSaver.h"
38 #include "public/platform/Platform.h" 39 #include "public/platform/Platform.h"
39 #include "public/platform/WebFallbackThemeEngine.h" 40 #include "public/platform/WebFallbackThemeEngine.h"
40 #include "public/platform/WebRect.h" 41 #include "public/platform/WebRect.h"
41 42
42 #if USE(NEW_THEME) 43 #if USE(NEW_THEME)
43 #include "platform/Theme.h" 44 #include "platform/Theme.h"
44 #endif 45 #endif
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 case ProgressBarPart: 107 case ProgressBarPart:
107 return paintProgressBar(o, paintInfo, r); 108 return paintProgressBar(o, paintInfo, r);
108 case SliderHorizontalPart: 109 case SliderHorizontalPart:
109 case SliderVerticalPart: 110 case SliderVerticalPart:
110 return paintSliderTrack(o, paintInfo, r); 111 return paintSliderTrack(o, paintInfo, r);
111 case SliderThumbHorizontalPart: 112 case SliderThumbHorizontalPart:
112 case SliderThumbVerticalPart: 113 case SliderThumbVerticalPart:
113 return paintSliderThumb(o, paintInfo, r); 114 return paintSliderThumb(o, paintInfo, r);
114 case MediaEnterFullscreenButtonPart: 115 case MediaEnterFullscreenButtonPart:
115 case MediaExitFullscreenButtonPart: 116 case MediaExitFullscreenButtonPart:
116 return paintMediaFullscreenButton(o, paintInfo, r); 117 return MediaControlsPainter::paintMediaFullscreenButton(o, paintInfo, r) ;
117 case MediaPlayButtonPart: 118 case MediaPlayButtonPart:
118 return paintMediaPlayButton(o, paintInfo, r); 119 return MediaControlsPainter::paintMediaPlayButton(o, paintInfo, r);
119 case MediaOverlayPlayButtonPart: 120 case MediaOverlayPlayButtonPart:
120 return paintMediaOverlayPlayButton(o, paintInfo, r); 121 return MediaControlsPainter::paintMediaOverlayPlayButton(o, paintInfo, r );
121 case MediaMuteButtonPart: 122 case MediaMuteButtonPart:
122 return paintMediaMuteButton(o, paintInfo, r); 123 return MediaControlsPainter::paintMediaMuteButton(o, paintInfo, r);
123 case MediaToggleClosedCaptionsButtonPart: 124 case MediaToggleClosedCaptionsButtonPart:
124 return paintMediaToggleClosedCaptionsButton(o, paintInfo, r); 125 return MediaControlsPainter::paintMediaToggleClosedCaptionsButton(o, pai ntInfo, r);
125 case MediaSliderPart: 126 case MediaSliderPart:
126 return paintMediaSliderTrack(o, paintInfo, r); 127 return MediaControlsPainter::paintMediaSlider(o, paintInfo, r);
127 case MediaSliderThumbPart: 128 case MediaSliderThumbPart:
128 return paintMediaSliderThumb(o, paintInfo, r); 129 return MediaControlsPainter::paintMediaSliderThumb(o, paintInfo, r);
129 case MediaVolumeSliderContainerPart: 130 case MediaVolumeSliderContainerPart:
130 return paintMediaVolumeSliderContainer(o, paintInfo, r); 131 return true;
131 case MediaVolumeSliderPart: 132 case MediaVolumeSliderPart:
132 return paintMediaVolumeSliderTrack(o, paintInfo, r); 133 return MediaControlsPainter::paintMediaVolumeSlider(o, paintInfo, r);
133 case MediaVolumeSliderThumbPart: 134 case MediaVolumeSliderThumbPart:
134 return paintMediaVolumeSliderThumb(o, paintInfo, r); 135 return MediaControlsPainter::paintMediaVolumeSliderThumb(o, paintInfo, r );
135 case MediaFullScreenVolumeSliderPart: 136 case MediaFullScreenVolumeSliderPart:
136 return paintMediaFullScreenVolumeSliderTrack(o, paintInfo, r);
137 case MediaFullScreenVolumeSliderThumbPart: 137 case MediaFullScreenVolumeSliderThumbPart:
138 return paintMediaFullScreenVolumeSliderThumb(o, paintInfo, r);
139 case MediaTimeRemainingPart: 138 case MediaTimeRemainingPart:
140 return paintMediaTimeRemaining(o, paintInfo, r);
141 case MediaCurrentTimePart: 139 case MediaCurrentTimePart:
142 return paintMediaCurrentTime(o, paintInfo, r);
143 case MediaControlsBackgroundPart: 140 case MediaControlsBackgroundPart:
144 return paintMediaControlsBackground(o, paintInfo, r); 141 return true;
145 case MediaCastOffButtonPart: 142 case MediaCastOffButtonPart:
146 return paintMediaCastButton(o, paintInfo, r);
147 case MediaOverlayCastOffButtonPart: 143 case MediaOverlayCastOffButtonPart:
148 return paintMediaCastButton(o, paintInfo, r); 144 return paintMediaCastButton(o, paintInfo, r);
149 case MenulistButtonPart: 145 case MenulistButtonPart:
150 case TextFieldPart: 146 case TextFieldPart:
151 case TextAreaPart: 147 case TextAreaPart:
152 return true; 148 return true;
153 case SearchFieldPart: 149 case SearchFieldPart:
154 return paintSearchField(o, paintInfo, r); 150 return paintSearchField(o, paintInfo, r);
155 case SearchFieldCancelButtonPart: 151 case SearchFieldCancelButtonPart:
156 return paintSearchFieldCancelButton(o, paintInfo, r); 152 return paintSearchFieldCancelButton(o, paintInfo, r);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 i.context->translate(unzoomedRect.x(), unzoomedRect.y()); 369 i.context->translate(unzoomedRect.x(), unzoomedRect.y());
374 i.context->scale(zoomLevel, zoomLevel); 370 i.context->scale(zoomLevel, zoomLevel);
375 i.context->translate(-unzoomedRect.x(), -unzoomedRect.y()); 371 i.context->translate(-unzoomedRect.x(), -unzoomedRect.y());
376 } 372 }
377 373
378 Platform::current()->fallbackThemeEngine()->paint(canvas, WebFallbackThemeEn gine::PartRadio, getWebFallbackThemeState(o), WebRect(unzoomedRect), &extraParam s); 374 Platform::current()->fallbackThemeEngine()->paint(canvas, WebFallbackThemeEn gine::PartRadio, getWebFallbackThemeState(o), WebRect(unzoomedRect), &extraParam s);
379 return false; 375 return false;
380 } 376 }
381 377
382 } // namespace blink 378 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/ThemePainter.h ('k') | Source/core/paint/ThemePainterDefault.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698