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

Side by Side Diff: Source/core/rendering/RenderThemeChromiumWin.cpp

Issue 14859003: Remove the compile time flag for DATALIST Element. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebasing after r150849 Created 7 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
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumWin.h ('k') | no next file » | 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 WebKit project. 2 * This file is part of the WebKit project.
3 * 3 *
4 * Copyright (C) 2006 Apple Computer, Inc. 4 * Copyright (C) 2006 Apple Computer, Inc.
5 * Copyright (C) 2008, 2009 Google, Inc. 5 * Copyright (C) 2008, 2009 Google, Inc.
6 * Copyright (C) 2009 Kenneth Rohde Christiansen 6 * Copyright (C) 2009 Kenneth Rohde Christiansen
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 Color RenderThemeChromiumWin::systemColor(int cssValueId) const 257 Color RenderThemeChromiumWin::systemColor(int cssValueId) const
258 { 258 {
259 int sysColorIndex = cssValueIdToSysColorIndex(cssValueId); 259 int sysColorIndex = cssValueIdToSysColorIndex(cssValueId);
260 if (isRunningLayoutTest() || (sysColorIndex == -1)) 260 if (isRunningLayoutTest() || (sysColorIndex == -1))
261 return RenderTheme::systemColor(cssValueId); 261 return RenderTheme::systemColor(cssValueId);
262 262
263 COLORREF color = GetSysColor(sysColorIndex); 263 COLORREF color = GetSysColor(sysColorIndex);
264 return Color(GetRValue(color), GetGValue(color), GetBValue(color)); 264 return Color(GetRValue(color), GetGValue(color), GetBValue(color));
265 } 265 }
266 266
267 #if ENABLE(DATALIST_ELEMENT)
268 IntSize RenderThemeChromiumWin::sliderTickSize() const 267 IntSize RenderThemeChromiumWin::sliderTickSize() const
269 { 268 {
270 return IntSize(1, 3); 269 return IntSize(1, 3);
271 } 270 }
272 271
273 int RenderThemeChromiumWin::sliderTickOffsetFromTrackCenter() const 272 int RenderThemeChromiumWin::sliderTickOffsetFromTrackCenter() const
274 { 273 {
275 return 11; 274 return 11;
276 } 275 }
277 #endif
278 276
279 void RenderThemeChromiumWin::adjustSliderThumbSize(RenderStyle* style, Element* element) const 277 void RenderThemeChromiumWin::adjustSliderThumbSize(RenderStyle* style, Element* element) const
280 { 278 {
281 // These sizes match what WinXP draws for various menus. 279 // These sizes match what WinXP draws for various menus.
282 const int sliderThumbAlongAxis = 11; 280 const int sliderThumbAlongAxis = 11;
283 const int sliderThumbAcrossAxis = 21; 281 const int sliderThumbAcrossAxis = 21;
284 if (style->appearance() == SliderThumbHorizontalPart) { 282 if (style->appearance() == SliderThumbHorizontalPart) {
285 style->setWidth(Length(sliderThumbAlongAxis, Fixed)); 283 style->setWidth(Length(sliderThumbAlongAxis, Fixed));
286 style->setHeight(Length(sliderThumbAcrossAxis, Fixed)); 284 style->setHeight(Length(sliderThumbAcrossAxis, Fixed));
287 } else if (style->appearance() == SliderThumbVerticalPart) { 285 } else if (style->appearance() == SliderThumbVerticalPart) {
(...skipping 28 matching lines...) Expand all
316 } 314 }
317 315
318 bool RenderThemeChromiumWin::paintSliderTrack(RenderObject* o, const PaintInfo& i, const IntRect& r) 316 bool RenderThemeChromiumWin::paintSliderTrack(RenderObject* o, const PaintInfo& i, const IntRect& r)
319 { 317 {
320 const ThemeData& themeData = getThemeData(o); 318 const ThemeData& themeData = getThemeData(o);
321 319
322 ThemePainter painter(i.context, r); 320 ThemePainter painter(i.context, r);
323 WebKit::WebCanvas* canvas = painter.context()->canvas(); 321 WebKit::WebCanvas* canvas = painter.context()->canvas();
324 WebKit::Platform::current()->themeEngine()->paintTrackbar(canvas, themeData. m_part, themeData.m_state, themeData.m_classicState, WebKit::WebRect(painter.dra wRect())); 322 WebKit::Platform::current()->themeEngine()->paintTrackbar(canvas, themeData. m_part, themeData.m_state, themeData.m_classicState, WebKit::WebRect(painter.dra wRect()));
325 323
326 #if ENABLE(DATALIST_ELEMENT)
327 paintSliderTicks(o, i, r); 324 paintSliderTicks(o, i, r);
328 #endif
329 325
330 return false; 326 return false;
331 } 327 }
332 328
333 bool RenderThemeChromiumWin::paintSliderThumb(RenderObject* o, const PaintInfo& i, const IntRect& r) 329 bool RenderThemeChromiumWin::paintSliderThumb(RenderObject* o, const PaintInfo& i, const IntRect& r)
334 { 330 {
335 const ThemeData& themeData = getThemeData(o); 331 const ThemeData& themeData = getThemeData(o);
336 332
337 ThemePainter painter(i.context, r); 333 ThemePainter painter(i.context, r);
338 WebKit::WebCanvas* canvas = painter.context()->canvas(); 334 WebKit::WebCanvas* canvas = painter.context()->canvas();
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 WebKit::Platform::current()->themeEngine()->paintProgressBar(canvas, WebKit: :WebRect(r), WebKit::WebRect(valueRect), renderProgress->isDeterminate(), animat edSeconds); 648 WebKit::Platform::current()->themeEngine()->paintProgressBar(canvas, WebKit: :WebRect(r), WebKit::WebRect(valueRect), renderProgress->isDeterminate(), animat edSeconds);
653 return false; 649 return false;
654 } 650 }
655 651
656 bool RenderThemeChromiumWin::shouldOpenPickerWithF4Key() const 652 bool RenderThemeChromiumWin::shouldOpenPickerWithF4Key() const
657 { 653 {
658 return true; 654 return true;
659 } 655 }
660 656
661 } // namespace WebCore 657 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumWin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698