| OLD | NEW |
| 1 /** | 1 /** |
| 2 * This file is part of the theme implementation for form controls in WebCore. | 2 * This file is part of the theme implementation for form controls in WebCore. |
| 3 * | 3 * |
| 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. | 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "core/platform/graphics/StringTruncator.h" | 44 #include "core/platform/graphics/StringTruncator.h" |
| 45 #include "core/rendering/PaintInfo.h" | 45 #include "core/rendering/PaintInfo.h" |
| 46 #include "core/rendering/RenderMeter.h" | 46 #include "core/rendering/RenderMeter.h" |
| 47 #include "core/rendering/RenderView.h" | 47 #include "core/rendering/RenderView.h" |
| 48 #include "core/rendering/style/RenderStyle.h" | 48 #include "core/rendering/style/RenderStyle.h" |
| 49 | 49 |
| 50 #if ENABLE(INPUT_SPEECH) | 50 #if ENABLE(INPUT_SPEECH) |
| 51 #include "core/rendering/RenderInputSpeech.h" | 51 #include "core/rendering/RenderInputSpeech.h" |
| 52 #endif | 52 #endif |
| 53 | 53 |
| 54 #if ENABLE(DATALIST_ELEMENT) | |
| 55 #include "core/dom/ElementShadow.h" | 54 #include "core/dom/ElementShadow.h" |
| 56 #include "core/html/HTMLCollection.h" | 55 #include "core/html/HTMLCollection.h" |
| 57 #include "core/html/HTMLDataListElement.h" | 56 #include "core/html/HTMLDataListElement.h" |
| 58 #include "core/html/HTMLOptionElement.h" | 57 #include "core/html/HTMLOptionElement.h" |
| 59 #include "core/html/parser/HTMLParserIdioms.h" | 58 #include "core/html/parser/HTMLParserIdioms.h" |
| 60 #endif | |
| 61 | 59 |
| 62 // The methods in this file are shared by all themes on every platform. | 60 // The methods in this file are shared by all themes on every platform. |
| 63 | 61 |
| 64 namespace WebCore { | 62 namespace WebCore { |
| 65 | 63 |
| 66 using namespace HTMLNames; | 64 using namespace HTMLNames; |
| 67 | 65 |
| 68 static Color& customFocusRingColor() | 66 static Color& customFocusRingColor() |
| 69 { | 67 { |
| 70 DEFINE_STATIC_LOCAL(Color, color, ()); | 68 DEFINE_STATIC_LOCAL(Color, color, ()); |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 bool RenderTheme::supportsMeter(ControlPart) const | 887 bool RenderTheme::supportsMeter(ControlPart) const |
| 890 { | 888 { |
| 891 return false; | 889 return false; |
| 892 } | 890 } |
| 893 | 891 |
| 894 bool RenderTheme::paintMeter(RenderObject*, const PaintInfo&, const IntRect&) | 892 bool RenderTheme::paintMeter(RenderObject*, const PaintInfo&, const IntRect&) |
| 895 { | 893 { |
| 896 return true; | 894 return true; |
| 897 } | 895 } |
| 898 | 896 |
| 899 #if ENABLE(DATALIST_ELEMENT) | |
| 900 LayoutUnit RenderTheme::sliderTickSnappingThreshold() const | 897 LayoutUnit RenderTheme::sliderTickSnappingThreshold() const |
| 901 { | 898 { |
| 902 return 0; | 899 return 0; |
| 903 } | 900 } |
| 904 | 901 |
| 905 void RenderTheme::paintSliderTicks(RenderObject* o, const PaintInfo& paintInfo,
const IntRect& rect) | 902 void RenderTheme::paintSliderTicks(RenderObject* o, const PaintInfo& paintInfo,
const IntRect& rect) |
| 906 { | 903 { |
| 907 Node* node = o->node(); | 904 Node* node = o->node(); |
| 908 if (!node) | 905 if (!node) |
| 909 return; | 906 return; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 double tickFraction = (parsedValue - min) / (max - min); | 973 double tickFraction = (parsedValue - min) / (max - min); |
| 977 double tickRatio = isHorizontal && o->style()->isLeftToRightDirection()
? tickFraction : 1.0 - tickFraction; | 974 double tickRatio = isHorizontal && o->style()->isLeftToRightDirection()
? tickFraction : 1.0 - tickFraction; |
| 978 double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tic
kRatio); | 975 double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tic
kRatio); |
| 979 if (isHorizontal) | 976 if (isHorizontal) |
| 980 tickRect.setX(tickPosition); | 977 tickRect.setX(tickPosition); |
| 981 else | 978 else |
| 982 tickRect.setY(tickPosition); | 979 tickRect.setY(tickPosition); |
| 983 paintInfo.context->fillRect(tickRect); | 980 paintInfo.context->fillRect(tickRect); |
| 984 } | 981 } |
| 985 } | 982 } |
| 986 #endif | |
| 987 | 983 |
| 988 double RenderTheme::animationRepeatIntervalForProgressBar(RenderProgress*) const | 984 double RenderTheme::animationRepeatIntervalForProgressBar(RenderProgress*) const |
| 989 { | 985 { |
| 990 return 0; | 986 return 0; |
| 991 } | 987 } |
| 992 | 988 |
| 993 double RenderTheme::animationDurationForProgressBar(RenderProgress*) const | 989 double RenderTheme::animationDurationForProgressBar(RenderProgress*) const |
| 994 { | 990 { |
| 995 return 0; | 991 return 0; |
| 996 } | 992 } |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1196 | 1192 |
| 1197 return StringTruncator::centerTruncate(string, width, font, StringTruncator:
:EnableRoundingHacks); | 1193 return StringTruncator::centerTruncate(string, width, font, StringTruncator:
:EnableRoundingHacks); |
| 1198 } | 1194 } |
| 1199 | 1195 |
| 1200 bool RenderTheme::shouldOpenPickerWithF4Key() const | 1196 bool RenderTheme::shouldOpenPickerWithF4Key() const |
| 1201 { | 1197 { |
| 1202 return false; | 1198 return false; |
| 1203 } | 1199 } |
| 1204 | 1200 |
| 1205 } // namespace WebCore | 1201 } // namespace WebCore |
| OLD | NEW |