| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. | 2 * Copyright (C) 2007 Apple Inc. |
| 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 4 * Copyright (C) 2008 Collabora Ltd. | 4 * Copyright (C) 2008 Collabora Ltd. |
| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 Color RenderThemeChromiumDefault::platformActiveSelectionForegroundColor() const | 148 Color RenderThemeChromiumDefault::platformActiveSelectionForegroundColor() const |
| 149 { | 149 { |
| 150 return m_activeSelectionForegroundColor; | 150 return m_activeSelectionForegroundColor; |
| 151 } | 151 } |
| 152 | 152 |
| 153 Color RenderThemeChromiumDefault::platformInactiveSelectionForegroundColor() con
st | 153 Color RenderThemeChromiumDefault::platformInactiveSelectionForegroundColor() con
st |
| 154 { | 154 { |
| 155 return m_inactiveSelectionForegroundColor; | 155 return m_inactiveSelectionForegroundColor; |
| 156 } | 156 } |
| 157 | 157 |
| 158 #if ENABLE(DATALIST_ELEMENT) | |
| 159 IntSize RenderThemeChromiumDefault::sliderTickSize() const | 158 IntSize RenderThemeChromiumDefault::sliderTickSize() const |
| 160 { | 159 { |
| 161 return IntSize(1, 6); | 160 return IntSize(1, 6); |
| 162 } | 161 } |
| 163 | 162 |
| 164 int RenderThemeChromiumDefault::sliderTickOffsetFromTrackCenter() const | 163 int RenderThemeChromiumDefault::sliderTickOffsetFromTrackCenter() const |
| 165 { | 164 { |
| 166 return -16; | 165 return -16; |
| 167 } | 166 } |
| 168 #endif | |
| 169 | 167 |
| 170 void RenderThemeChromiumDefault::adjustSliderThumbSize(RenderStyle* style, Eleme
nt* element) const | 168 void RenderThemeChromiumDefault::adjustSliderThumbSize(RenderStyle* style, Eleme
nt* element) const |
| 171 { | 169 { |
| 172 IntSize size = WebKit::Platform::current()->themeEngine()->getSize(WebKit::W
ebThemeEngine::PartSliderThumb); | 170 IntSize size = WebKit::Platform::current()->themeEngine()->getSize(WebKit::W
ebThemeEngine::PartSliderThumb); |
| 173 | 171 |
| 174 if (style->appearance() == SliderThumbHorizontalPart) { | 172 if (style->appearance() == SliderThumbHorizontalPart) { |
| 175 style->setWidth(Length(size.width(), Fixed)); | 173 style->setWidth(Length(size.width(), Fixed)); |
| 176 style->setHeight(Length(size.height(), Fixed)); | 174 style->setHeight(Length(size.height(), Fixed)); |
| 177 } else if (style->appearance() == SliderThumbVerticalPart) { | 175 } else if (style->appearance() == SliderThumbVerticalPart) { |
| 178 style->setWidth(Length(size.height(), Fixed)); | 176 style->setWidth(Length(size.height(), Fixed)); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 } | 312 } |
| 315 | 313 |
| 316 bool RenderThemeChromiumDefault::paintSliderTrack(RenderObject* o, const PaintIn
fo& i, const IntRect& rect) | 314 bool RenderThemeChromiumDefault::paintSliderTrack(RenderObject* o, const PaintIn
fo& i, const IntRect& rect) |
| 317 { | 315 { |
| 318 WebKit::WebThemeEngine::ExtraParams extraParams; | 316 WebKit::WebThemeEngine::ExtraParams extraParams; |
| 319 WebKit::WebCanvas* canvas = i.context->platformContext()->canvas(); | 317 WebKit::WebCanvas* canvas = i.context->platformContext()->canvas(); |
| 320 extraParams.slider.vertical = o->style()->appearance() == SliderVerticalPart
; | 318 extraParams.slider.vertical = o->style()->appearance() == SliderVerticalPart
; |
| 321 | 319 |
| 322 WebKit::Platform::current()->themeEngine()->paint(canvas, WebKit::WebThemeEn
gine::PartSliderTrack, getWebThemeState(this, o), WebKit::WebRect(rect), &extraP
arams); | 320 WebKit::Platform::current()->themeEngine()->paint(canvas, WebKit::WebThemeEn
gine::PartSliderTrack, getWebThemeState(this, o), WebKit::WebRect(rect), &extraP
arams); |
| 323 | 321 |
| 324 #if ENABLE(DATALIST_ELEMENT) | |
| 325 paintSliderTicks(o, i, rect); | 322 paintSliderTicks(o, i, rect); |
| 326 #endif | |
| 327 | 323 |
| 328 return false; | 324 return false; |
| 329 } | 325 } |
| 330 | 326 |
| 331 bool RenderThemeChromiumDefault::paintSliderThumb(RenderObject* o, const PaintIn
fo& i, const IntRect& rect) | 327 bool RenderThemeChromiumDefault::paintSliderThumb(RenderObject* o, const PaintIn
fo& i, const IntRect& rect) |
| 332 { | 328 { |
| 333 WebKit::WebThemeEngine::ExtraParams extraParams; | 329 WebKit::WebThemeEngine::ExtraParams extraParams; |
| 334 WebKit::WebCanvas* canvas = i.context->platformContext()->canvas(); | 330 WebKit::WebCanvas* canvas = i.context->platformContext()->canvas(); |
| 335 extraParams.slider.vertical = o->style()->appearance() == SliderThumbVertica
lPart; | 331 extraParams.slider.vertical = o->style()->appearance() == SliderThumbVertica
lPart; |
| 336 extraParams.slider.inDrag = isPressed(o); | 332 extraParams.slider.inDrag = isPressed(o); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 WebKit::Platform::current()->themeEngine()->paint(canvas, WebKit::WebThemeEn
gine::PartProgressBar, getWebThemeState(this, o), WebKit::WebRect(rect), &extraP
arams); | 374 WebKit::Platform::current()->themeEngine()->paint(canvas, WebKit::WebThemeEn
gine::PartProgressBar, getWebThemeState(this, o), WebKit::WebRect(rect), &extraP
arams); |
| 379 return false; | 375 return false; |
| 380 } | 376 } |
| 381 | 377 |
| 382 bool RenderThemeChromiumDefault::shouldOpenPickerWithF4Key() const | 378 bool RenderThemeChromiumDefault::shouldOpenPickerWithF4Key() const |
| 383 { | 379 { |
| 384 return true; | 380 return true; |
| 385 } | 381 } |
| 386 | 382 |
| 387 } // namespace WebCore | 383 } // namespace WebCore |
| OLD | NEW |