Changeset 88753 in webkit
- Timestamp:
- Jun 13, 2011 7:19:43 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r88751 r88753 1 2011-06-13 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 Reviewed by Kent Tamura. 4 5 [EFL] Support for painting thumb of media slider 6 https://bugs.webkit.org/show_bug.cgi?id=62174 7 8 Implement paintMediaSliderThumb() function to show thumb of media slider. 9 adjustSliderThumbSize() should be implemented in order to call paintMediaSliderThumb(). 10 11 * platform/efl/RenderThemeEfl.cpp: 12 (WebCore::RenderThemeEfl::RenderThemeEfl): 13 (WebCore::RenderThemeEfl::adjustSliderThumbSize): 14 (WebCore::RenderThemeEfl::paintMediaSliderTrack): 15 (WebCore::RenderThemeEfl::paintMediaSliderThumb): 16 (WebCore::RenderThemeEfl::paintMediaCurrentTime): 17 * platform/efl/RenderThemeEfl.h: 18 1 19 2011-06-13 Keishi Hattori <keishi@webkit.org> 2 20 -
trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp
r88405 r88753 61 61 // TODO: as objects are webpage/user defined and they can be very large. 62 62 #define RENDER_THEME_EFL_PART_CACHE_MAX 32 63 64 static const int sliderThumbWidth = 12; 65 static const int sliderThumbHeight = 12; 66 67 #if ENABLE(VIDEO) 68 static const int mediaSliderHeight = 14; 69 static const int mediaSliderThumbWidth = 12; 70 static const int mediaSliderThumbHeight = 12; 71 #endif 63 72 64 73 void RenderThemeEfl::adjustSizeConstraints(RenderStyle* style, FormType type) const … … 693 702 , m_searchTextBackgroundColor(0, 0, 0, 0) 694 703 , m_searchTextForegroundColor(0, 0, 0) 704 , m_sliderThumbColor(255, 0, 0) // red color. 695 705 #if ENABLE(VIDEO) 696 , m_panelColor(220, 220, 195) // light tannish color. 697 , m_sliderColor(Color::white) 698 , m_mediaSliderHeight(14) 706 , m_mediaPanelColor(220, 220, 195) // light tannish color. 707 , m_mediaSliderColor(Color::white) 699 708 #endif 700 709 , m_canvas(0) … … 839 848 } 840 849 850 void RenderThemeEfl::adjustSliderThumbSize(RenderObject* o) const 851 { 852 ControlPart part = o->style()->appearance(); 853 if (part == SliderThumbVerticalPart || part == SliderThumbHorizontalPart) { 854 o->style()->setWidth(Length(sliderThumbHeight, Fixed)); 855 o->style()->setHeight(Length(sliderThumbWidth, Fixed)); 856 } 857 #if ENABLE(VIDEO) 858 else if (part == MediaSliderThumbPart) { 859 o->style()->setWidth(Length(mediaSliderThumbWidth, Fixed)); 860 o->style()->setHeight(Length(mediaSliderThumbHeight, Fixed)); 861 } 862 #endif 863 } 864 841 865 bool RenderThemeEfl::paintSliderThumb(RenderObject* object, const PaintInfo& info, const IntRect& rect) 842 866 { … … 1180 1204 GraphicsContext* context = info.context; 1181 1205 1182 context->fillRect(FloatRect(rect), m_ panelColor, ColorSpaceDeviceRGB);1183 context->fillRect(FloatRect(IntRect(rect.x(), rect.y() + (rect.height() - m _mediaSliderHeight) / 2,1184 rect.width(), m _mediaSliderHeight)), m_sliderColor, ColorSpaceDeviceRGB);1206 context->fillRect(FloatRect(rect), m_mediaPanelColor, ColorSpaceDeviceRGB); 1207 context->fillRect(FloatRect(IntRect(rect.x(), rect.y() + (rect.height() - mediaSliderHeight) / 2, 1208 rect.width(), mediaSliderHeight)), m_mediaSliderColor, ColorSpaceDeviceRGB); 1185 1209 1186 1210 RenderStyle* style = object->style(); … … 1223 1247 sliderTopRight.move(0, rangeRect.height()); 1224 1248 1225 context->fillRect(FloatRect(rect), m_ panelColor, ColorSpaceDeviceRGB);1249 context->fillRect(FloatRect(rect), m_mediaPanelColor, ColorSpaceDeviceRGB); 1226 1250 } 1227 1251 context->restore(); … … 1231 1255 bool RenderThemeEfl::paintMediaSliderThumb(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1232 1256 { 1257 info.context->fillRoundedRect(rect, IntSize(3, 3), IntSize(3, 3), IntSize(3, 3), IntSize(3, 3), m_sliderThumbColor, ColorSpaceDeviceRGB); 1258 return true; 1259 } 1260 1261 bool RenderThemeEfl::paintMediaVolumeSliderContainer(RenderObject*, const PaintInfo& info, const IntRect& rect) 1262 { 1233 1263 notImplemented(); 1234 1264 return false; 1235 1265 } 1236 1266 1237 bool RenderThemeEfl::paintMediaVolumeSlider Container(RenderObject*, const PaintInfo& info, const IntRect& rect)1267 bool RenderThemeEfl::paintMediaVolumeSliderTrack(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1238 1268 { 1239 1269 notImplemented(); … … 1241 1271 } 1242 1272 1243 bool RenderThemeEfl::paintMediaVolumeSliderT rack(RenderObject* object, const PaintInfo& info, const IntRect& rect)1273 bool RenderThemeEfl::paintMediaVolumeSliderThumb(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1244 1274 { 1245 1275 notImplemented(); … … 1247 1277 } 1248 1278 1249 bool RenderThemeEfl::paintMediaVolumeSliderThumb(RenderObject* object, const PaintInfo& info, const IntRect& rect)1250 {1251 notImplemented();1252 return false;1253 }1254 1255 1279 bool RenderThemeEfl::paintMediaCurrentTime(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1256 1280 { 1257 info.context->fillRect(FloatRect(rect), m_ panelColor, ColorSpaceDeviceRGB);1281 info.context->fillRect(FloatRect(rect), m_mediaPanelColor, ColorSpaceDeviceRGB); 1258 1282 return true; 1259 1283 } -
trunk/Source/WebCore/platform/efl/RenderThemeEfl.h
r88333 r88753 157 157 158 158 virtual void adjustSliderThumbStyle(CSSStyleSelector*, RenderStyle*, Element*) const; 159 160 virtual void adjustSliderThumbSize(RenderObject*) const; 161 159 162 virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&); 160 163 … … 213 216 Color m_searchTextBackgroundColor; 214 217 Color m_searchTextForegroundColor; 215 #if ENABLE(VIDEO) 216 Color m_panelColor; 217 Color m_sliderColor; 218 const int m_mediaSliderHeight; 218 Color m_sliderThumbColor; 219 220 #if ENABLE(VIDEO) 221 Color m_mediaPanelColor; 222 Color m_mediaSliderColor; 219 223 #endif 220 224 Ecore_Evas* m_canvas;
Note: See TracChangeset
for help on using the changeset viewer.