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