Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(727)

Side by Side Diff: Source/core/rendering/RenderTheme.cpp

Issue 14859003: Remove the compile time flag for DATALIST Element. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add <datalist> display:none rule in RenderTheme::extraDefaultStyleSheet depending on the runtime fl… Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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/shadow/ElementShadow.h" 54 #include "core/dom/shadow/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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 bool RenderTheme::supportsMeter(ControlPart) const 881 bool RenderTheme::supportsMeter(ControlPart) const
884 { 882 {
885 return false; 883 return false;
886 } 884 }
887 885
888 bool RenderTheme::paintMeter(RenderObject*, const PaintInfo&, const IntRect&) 886 bool RenderTheme::paintMeter(RenderObject*, const PaintInfo&, const IntRect&)
889 { 887 {
890 return true; 888 return true;
891 } 889 }
892 890
893 #if ENABLE(DATALIST_ELEMENT)
894 LayoutUnit RenderTheme::sliderTickSnappingThreshold() const 891 LayoutUnit RenderTheme::sliderTickSnappingThreshold() const
895 { 892 {
896 return 0; 893 return 0;
897 } 894 }
898 895
899 void RenderTheme::paintSliderTicks(RenderObject* o, const PaintInfo& paintInfo, const IntRect& rect) 896 void RenderTheme::paintSliderTicks(RenderObject* o, const PaintInfo& paintInfo, const IntRect& rect)
900 { 897 {
901 Node* node = o->node(); 898 Node* node = o->node();
902 if (!node) 899 if (!node)
903 return; 900 return;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 double tickFraction = (parsedValue - min) / (max - min); 967 double tickFraction = (parsedValue - min) / (max - min);
971 double tickRatio = isHorizontal && o->style()->isLeftToRightDirection() ? tickFraction : 1.0 - tickFraction; 968 double tickRatio = isHorizontal && o->style()->isLeftToRightDirection() ? tickFraction : 1.0 - tickFraction;
972 double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tic kRatio); 969 double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tic kRatio);
973 if (isHorizontal) 970 if (isHorizontal)
974 tickRect.setX(tickPosition); 971 tickRect.setX(tickPosition);
975 else 972 else
976 tickRect.setY(tickPosition); 973 tickRect.setY(tickPosition);
977 paintInfo.context->fillRect(tickRect); 974 paintInfo.context->fillRect(tickRect);
978 } 975 }
979 } 976 }
980 #endif
981 977
982 double RenderTheme::animationRepeatIntervalForProgressBar(RenderProgress*) const 978 double RenderTheme::animationRepeatIntervalForProgressBar(RenderProgress*) const
983 { 979 {
984 return 0; 980 return 0;
985 } 981 }
986 982
987 double RenderTheme::animationDurationForProgressBar(RenderProgress*) const 983 double RenderTheme::animationDurationForProgressBar(RenderProgress*) const
988 { 984 {
989 return 0; 985 return 0;
990 } 986 }
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 1182
1187 return StringTruncator::centerTruncate(string, width, font, StringTruncator: :EnableRoundingHacks); 1183 return StringTruncator::centerTruncate(string, width, font, StringTruncator: :EnableRoundingHacks);
1188 } 1184 }
1189 1185
1190 bool RenderTheme::shouldOpenPickerWithF4Key() const 1186 bool RenderTheme::shouldOpenPickerWithF4Key() const
1191 { 1187 {
1192 return false; 1188 return false;
1193 } 1189 }
1194 1190
1195 } // namespace WebCore 1191 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698