| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   97     if (cssValueId == CSSValueButtonface) |   97     if (cssValueId == CSSValueButtonface) | 
|   98         return defaultButtonGrayColor; |   98         return defaultButtonGrayColor; | 
|   99     if (cssValueId == CSSValueMenu) |   99     if (cssValueId == CSSValueMenu) | 
|  100         return defaultMenuColor; |  100         return defaultMenuColor; | 
|  101     return RenderTheme::systemColor(cssValueId); |  101     return RenderTheme::systemColor(cssValueId); | 
|  102 } |  102 } | 
|  103  |  103  | 
|  104 String RenderThemeChromiumDefault::extraDefaultStyleSheet() |  104 String RenderThemeChromiumDefault::extraDefaultStyleSheet() | 
|  105 { |  105 { | 
|  106 #if !OS(WINDOWS) |  106 #if !OS(WINDOWS) | 
|  107     return RenderThemeChromiumSkia::extraDefaultStyleSheet() + |  107     return RenderTheme::extraDefaultStyleSheet() + | 
|  108            String(themeChromiumLinuxUserAgentStyleSheet, sizeof(themeChromiumLin
     uxUserAgentStyleSheet)); |  108         RenderThemeChromiumSkia::extraDefaultStyleSheet() + | 
 |  109         String(themeChromiumLinuxUserAgentStyleSheet, sizeof(themeChromiumLinuxU
     serAgentStyleSheet)); | 
|  109 #else |  110 #else | 
|  110     return RenderThemeChromiumSkia::extraDefaultStyleSheet(); |  111     return RenderTheme::extraDefaultStyleSheet() + | 
 |  112         RenderThemeChromiumSkia::extraDefaultStyleSheet(); | 
|  111 #endif |  113 #endif | 
|  112 } |  114 } | 
|  113  |  115  | 
|  114 bool RenderThemeChromiumDefault::controlSupportsTints(const RenderObject* o) con
     st |  116 bool RenderThemeChromiumDefault::controlSupportsTints(const RenderObject* o) con
     st | 
|  115 { |  117 { | 
|  116     return isEnabled(o); |  118     return isEnabled(o); | 
|  117 } |  119 } | 
|  118  |  120  | 
|  119 Color RenderThemeChromiumDefault::activeListBoxSelectionBackgroundColor() const |  121 Color RenderThemeChromiumDefault::activeListBoxSelectionBackgroundColor() const | 
|  120 { |  122 { | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
|  149 Color RenderThemeChromiumDefault::platformActiveSelectionForegroundColor() const |  151 Color RenderThemeChromiumDefault::platformActiveSelectionForegroundColor() const | 
|  150 { |  152 { | 
|  151     return m_activeSelectionForegroundColor; |  153     return m_activeSelectionForegroundColor; | 
|  152 } |  154 } | 
|  153  |  155  | 
|  154 Color RenderThemeChromiumDefault::platformInactiveSelectionForegroundColor() con
     st |  156 Color RenderThemeChromiumDefault::platformInactiveSelectionForegroundColor() con
     st | 
|  155 { |  157 { | 
|  156     return m_inactiveSelectionForegroundColor; |  158     return m_inactiveSelectionForegroundColor; | 
|  157 } |  159 } | 
|  158  |  160  | 
|  159 #if ENABLE(DATALIST_ELEMENT) |  | 
|  160 IntSize RenderThemeChromiumDefault::sliderTickSize() const |  161 IntSize RenderThemeChromiumDefault::sliderTickSize() const | 
|  161 { |  162 { | 
|  162     return IntSize(1, 6); |  163     return IntSize(1, 6); | 
|  163 } |  164 } | 
|  164  |  165  | 
|  165 int RenderThemeChromiumDefault::sliderTickOffsetFromTrackCenter() const |  166 int RenderThemeChromiumDefault::sliderTickOffsetFromTrackCenter() const | 
|  166 { |  167 { | 
|  167     return -16; |  168     return -16; | 
|  168 } |  169 } | 
|  169 #endif |  | 
|  170  |  170  | 
|  171 void RenderThemeChromiumDefault::adjustSliderThumbSize(RenderStyle* style, Eleme
     nt* element) const |  171 void RenderThemeChromiumDefault::adjustSliderThumbSize(RenderStyle* style, Eleme
     nt* element) const | 
|  172 { |  172 { | 
|  173     IntSize size = WebKit::Platform::current()->themeEngine()->getSize(WebKit::W
     ebThemeEngine::PartSliderThumb); |  173     IntSize size = WebKit::Platform::current()->themeEngine()->getSize(WebKit::W
     ebThemeEngine::PartSliderThumb); | 
|  174     float zoomLevel = style->effectiveZoom(); |  174     float zoomLevel = style->effectiveZoom(); | 
|  175     if (style->appearance() == SliderThumbHorizontalPart) { |  175     if (style->appearance() == SliderThumbHorizontalPart) { | 
|  176         style->setWidth(Length(size.width() * zoomLevel, Fixed)); |  176         style->setWidth(Length(size.width() * zoomLevel, Fixed)); | 
|  177         style->setHeight(Length(size.height() * zoomLevel, Fixed)); |  177         style->setHeight(Length(size.height() * zoomLevel, Fixed)); | 
|  178     } else if (style->appearance() == SliderThumbVerticalPart) { |  178     } else if (style->appearance() == SliderThumbVerticalPart) { | 
|  179         style->setWidth(Length(size.height() * zoomLevel, Fixed)); |  179         style->setWidth(Length(size.height() * zoomLevel, Fixed)); | 
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  330     WebKit::Platform::current()->themeEngine()->paint(canvas, WebKit::WebThemeEn
     gine::PartMenuList, getWebThemeState(this, o), WebKit::WebRect(rect), &extraPara
     ms); |  330     WebKit::Platform::current()->themeEngine()->paint(canvas, WebKit::WebThemeEn
     gine::PartMenuList, getWebThemeState(this, o), WebKit::WebRect(rect), &extraPara
     ms); | 
|  331     return false; |  331     return false; | 
|  332 } |  332 } | 
|  333  |  333  | 
|  334 bool RenderThemeChromiumDefault::paintSliderTrack(RenderObject* o, const PaintIn
     fo& i, const IntRect& rect) |  334 bool RenderThemeChromiumDefault::paintSliderTrack(RenderObject* o, const PaintIn
     fo& i, const IntRect& rect) | 
|  335 { |  335 { | 
|  336     WebKit::WebThemeEngine::ExtraParams extraParams; |  336     WebKit::WebThemeEngine::ExtraParams extraParams; | 
|  337     WebKit::WebCanvas* canvas = i.context->canvas(); |  337     WebKit::WebCanvas* canvas = i.context->canvas(); | 
|  338     extraParams.slider.vertical = o->style()->appearance() == SliderVerticalPart
     ; |  338     extraParams.slider.vertical = o->style()->appearance() == SliderVerticalPart
     ; | 
|  339  |  339  | 
|  340 #if ENABLE(DATALIST_ELEMENT) |  | 
|  341     paintSliderTicks(o, i, rect); |  340     paintSliderTicks(o, i, rect); | 
|  342 #endif |  | 
|  343  |  341  | 
|  344     float zoomLevel = o->style()->effectiveZoom(); |  342     float zoomLevel = o->style()->effectiveZoom(); | 
|  345     GraphicsContextStateSaver stateSaver(*i.context); |  343     GraphicsContextStateSaver stateSaver(*i.context); | 
|  346     IntRect unzoomedRect = rect; |  344     IntRect unzoomedRect = rect; | 
|  347     if (zoomLevel != 1) { |  345     if (zoomLevel != 1) { | 
|  348         unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel); |  346         unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel); | 
|  349         unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel); |  347         unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel); | 
|  350         i.context->translate(unzoomedRect.x(), unzoomedRect.y()); |  348         i.context->translate(unzoomedRect.x(), unzoomedRect.y()); | 
|  351         i.context->scale(FloatSize(zoomLevel, zoomLevel)); |  349         i.context->scale(FloatSize(zoomLevel, zoomLevel)); | 
|  352         i.context->translate(-unzoomedRect.x(), -unzoomedRect.y()); |  350         i.context->translate(-unzoomedRect.x(), -unzoomedRect.y()); | 
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  418     WebKit::Platform::current()->themeEngine()->paint(canvas, WebKit::WebThemeEn
     gine::PartProgressBar, getWebThemeState(this, o), WebKit::WebRect(rect), &extraP
     arams); |  416     WebKit::Platform::current()->themeEngine()->paint(canvas, WebKit::WebThemeEn
     gine::PartProgressBar, getWebThemeState(this, o), WebKit::WebRect(rect), &extraP
     arams); | 
|  419     return false; |  417     return false; | 
|  420 } |  418 } | 
|  421  |  419  | 
|  422 bool RenderThemeChromiumDefault::shouldOpenPickerWithF4Key() const |  420 bool RenderThemeChromiumDefault::shouldOpenPickerWithF4Key() const | 
|  423 { |  421 { | 
|  424     return true; |  422     return true; | 
|  425 } |  423 } | 
|  426  |  424  | 
|  427 } // namespace WebCore |  425 } // namespace WebCore | 
| OLD | NEW |