| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 Color RenderThemeChromiumWin::systemColor(int cssValueId) const | 258 Color RenderThemeChromiumWin::systemColor(int cssValueId) const |
| 259 { | 259 { |
| 260 int sysColorIndex = cssValueIdToSysColorIndex(cssValueId); | 260 int sysColorIndex = cssValueIdToSysColorIndex(cssValueId); |
| 261 if (isRunningLayoutTest() || (sysColorIndex == -1)) | 261 if (isRunningLayoutTest() || (sysColorIndex == -1)) |
| 262 return RenderTheme::systemColor(cssValueId); | 262 return RenderTheme::systemColor(cssValueId); |
| 263 | 263 |
| 264 COLORREF color = GetSysColor(sysColorIndex); | 264 COLORREF color = GetSysColor(sysColorIndex); |
| 265 return Color(GetRValue(color), GetGValue(color), GetBValue(color)); | 265 return Color(GetRValue(color), GetGValue(color), GetBValue(color)); |
| 266 } | 266 } |
| 267 | 267 |
| 268 #if ENABLE(DATALIST_ELEMENT) | |
| 269 IntSize RenderThemeChromiumWin::sliderTickSize() const | 268 IntSize RenderThemeChromiumWin::sliderTickSize() const |
| 270 { | 269 { |
| 271 return IntSize(1, 3); | 270 return IntSize(1, 3); |
| 272 } | 271 } |
| 273 | 272 |
| 274 int RenderThemeChromiumWin::sliderTickOffsetFromTrackCenter() const | 273 int RenderThemeChromiumWin::sliderTickOffsetFromTrackCenter() const |
| 275 { | 274 { |
| 276 return 11; | 275 return 11; |
| 277 } | 276 } |
| 278 #endif | |
| 279 | 277 |
| 280 void RenderThemeChromiumWin::adjustSliderThumbSize(RenderStyle* style, Element*
element) const | 278 void RenderThemeChromiumWin::adjustSliderThumbSize(RenderStyle* style, Element*
element) const |
| 281 { | 279 { |
| 282 // These sizes match what WinXP draws for various menus. | 280 // These sizes match what WinXP draws for various menus. |
| 283 const int sliderThumbAlongAxis = 11; | 281 const int sliderThumbAlongAxis = 11; |
| 284 const int sliderThumbAcrossAxis = 21; | 282 const int sliderThumbAcrossAxis = 21; |
| 285 if (style->appearance() == SliderThumbHorizontalPart) { | 283 if (style->appearance() == SliderThumbHorizontalPart) { |
| 286 style->setWidth(Length(sliderThumbAlongAxis, Fixed)); | 284 style->setWidth(Length(sliderThumbAlongAxis, Fixed)); |
| 287 style->setHeight(Length(sliderThumbAcrossAxis, Fixed)); | 285 style->setHeight(Length(sliderThumbAcrossAxis, Fixed)); |
| 288 } else if (style->appearance() == SliderThumbVerticalPart) { | 286 } else if (style->appearance() == SliderThumbVerticalPart) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 317 } | 315 } |
| 318 | 316 |
| 319 bool RenderThemeChromiumWin::paintSliderTrack(RenderObject* o, const PaintInfo&
i, const IntRect& r) | 317 bool RenderThemeChromiumWin::paintSliderTrack(RenderObject* o, const PaintInfo&
i, const IntRect& r) |
| 320 { | 318 { |
| 321 const ThemeData& themeData = getThemeData(o); | 319 const ThemeData& themeData = getThemeData(o); |
| 322 | 320 |
| 323 ThemePainter painter(i.context, r); | 321 ThemePainter painter(i.context, r); |
| 324 WebKit::WebCanvas* canvas = painter.context()->canvas(); | 322 WebKit::WebCanvas* canvas = painter.context()->canvas(); |
| 325 WebKit::Platform::current()->themeEngine()->paintTrackbar(canvas, themeData.
m_part, themeData.m_state, themeData.m_classicState, WebKit::WebRect(painter.dra
wRect())); | 323 WebKit::Platform::current()->themeEngine()->paintTrackbar(canvas, themeData.
m_part, themeData.m_state, themeData.m_classicState, WebKit::WebRect(painter.dra
wRect())); |
| 326 | 324 |
| 327 #if ENABLE(DATALIST_ELEMENT) | |
| 328 paintSliderTicks(o, i, r); | 325 paintSliderTicks(o, i, r); |
| 329 #endif | |
| 330 | 326 |
| 331 return false; | 327 return false; |
| 332 } | 328 } |
| 333 | 329 |
| 334 bool RenderThemeChromiumWin::paintSliderThumb(RenderObject* o, const PaintInfo&
i, const IntRect& r) | 330 bool RenderThemeChromiumWin::paintSliderThumb(RenderObject* o, const PaintInfo&
i, const IntRect& r) |
| 335 { | 331 { |
| 336 const ThemeData& themeData = getThemeData(o); | 332 const ThemeData& themeData = getThemeData(o); |
| 337 | 333 |
| 338 ThemePainter painter(i.context, r); | 334 ThemePainter painter(i.context, r); |
| 339 WebKit::WebCanvas* canvas = painter.context()->canvas(); | 335 WebKit::WebCanvas* canvas = painter.context()->canvas(); |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 WebKit::Platform::current()->themeEngine()->paintProgressBar(canvas, WebKit:
:WebRect(r), WebKit::WebRect(valueRect), renderProgress->isDeterminate(), animat
edSeconds); | 649 WebKit::Platform::current()->themeEngine()->paintProgressBar(canvas, WebKit:
:WebRect(r), WebKit::WebRect(valueRect), renderProgress->isDeterminate(), animat
edSeconds); |
| 654 return false; | 650 return false; |
| 655 } | 651 } |
| 656 | 652 |
| 657 bool RenderThemeChromiumWin::shouldOpenPickerWithF4Key() const | 653 bool RenderThemeChromiumWin::shouldOpenPickerWithF4Key() const |
| 658 { | 654 { |
| 659 return true; | 655 return true; |
| 660 } | 656 } |
| 661 | 657 |
| 662 } // namespace WebCore | 658 } // namespace WebCore |
| OLD | NEW |