| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |