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

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

Issue 72683003: Auto-generate InputTypeNames source from InputTypeNames.in. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 */ 20 */
21 21
22 #include "config.h" 22 #include "config.h"
23 #include "core/rendering/RenderTheme.h" 23 #include "core/rendering/RenderTheme.h"
24 24
25 #include "CSSValueKeywords.h" 25 #include "CSSValueKeywords.h"
26 #include "HTMLNames.h" 26 #include "HTMLNames.h"
27 #include "InputTypeNames.h"
27 #include "RuntimeEnabledFeatures.h" 28 #include "RuntimeEnabledFeatures.h"
28 #include "core/dom/Document.h" 29 #include "core/dom/Document.h"
29 #include "core/dom/shadow/ElementShadow.h" 30 #include "core/dom/shadow/ElementShadow.h"
30 #include "core/editing/FrameSelection.h" 31 #include "core/editing/FrameSelection.h"
31 #include "core/fileapi/FileList.h" 32 #include "core/fileapi/FileList.h"
32 #include "core/html/HTMLCollection.h" 33 #include "core/html/HTMLCollection.h"
33 #include "core/html/HTMLDataListElement.h" 34 #include "core/html/HTMLDataListElement.h"
34 #include "core/html/HTMLInputElement.h" 35 #include "core/html/HTMLInputElement.h"
35 #include "core/html/HTMLMeterElement.h" 36 #include "core/html/HTMLMeterElement.h"
36 #include "core/html/HTMLOptionElement.h" 37 #include "core/html/HTMLOptionElement.h"
37 #include "core/html/forms/InputTypeNames.h"
38 #include "core/html/parser/HTMLParserIdioms.h" 38 #include "core/html/parser/HTMLParserIdioms.h"
39 #include "core/html/shadow/MediaControlElements.h" 39 #include "core/html/shadow/MediaControlElements.h"
40 #include "core/html/shadow/ShadowElementNames.h" 40 #include "core/html/shadow/ShadowElementNames.h"
41 #include "core/html/shadow/SpinButtonElement.h" 41 #include "core/html/shadow/SpinButtonElement.h"
42 #include "core/html/shadow/TextControlInnerElements.h" 42 #include "core/html/shadow/TextControlInnerElements.h"
43 #include "core/page/FocusController.h" 43 #include "core/page/FocusController.h"
44 #include "core/frame/Frame.h" 44 #include "core/frame/Frame.h"
45 #include "core/page/Page.h" 45 #include "core/page/Page.h"
46 #include "core/page/Settings.h" 46 #include "core/page/Settings.h"
47 #include "core/platform/graphics/GraphicsContextStateSaver.h" 47 #include "core/platform/graphics/GraphicsContextStateSaver.h"
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 return StringTruncator::centerTruncate(string, width, font, StringTruncator: :EnableRoundingHacks); 1165 return StringTruncator::centerTruncate(string, width, font, StringTruncator: :EnableRoundingHacks);
1166 } 1166 }
1167 1167
1168 bool RenderTheme::shouldOpenPickerWithF4Key() const 1168 bool RenderTheme::shouldOpenPickerWithF4Key() const
1169 { 1169 {
1170 return false; 1170 return false;
1171 } 1171 }
1172 1172
1173 bool RenderTheme::supportsDataListUI(const AtomicString& type) const 1173 bool RenderTheme::supportsDataListUI(const AtomicString& type) const
1174 { 1174 {
1175 return type == InputTypeNames::text() || type == InputTypeNames::search() || type == InputTypeNames::url() 1175 return type == InputTypeNames::text || type == InputTypeNames::search || typ e == InputTypeNames::url
1176 || type == InputTypeNames::telephone() || type == InputTypeNames::email( ) || type == InputTypeNames::number() 1176 || type == InputTypeNames::tel || type == InputTypeNames::email || type == InputTypeNames::number
1177 || type == InputTypeNames::color() 1177 || type == InputTypeNames::color
1178 || type == InputTypeNames::date() 1178 || type == InputTypeNames::date
1179 || type == InputTypeNames::datetime() 1179 || type == InputTypeNames::datetime
1180 || type == InputTypeNames::datetimelocal() 1180 || type == InputTypeNames::datetime_local
1181 || type == InputTypeNames::month() 1181 || type == InputTypeNames::month
1182 || type == InputTypeNames::week() 1182 || type == InputTypeNames::week
1183 || type == InputTypeNames::time() 1183 || type == InputTypeNames::time
1184 || type == InputTypeNames::range(); 1184 || type == InputTypeNames::range;
1185 } 1185 }
1186 1186
1187 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 1187 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1188 bool RenderTheme::supportsCalendarPicker(const AtomicString& type) const 1188 bool RenderTheme::supportsCalendarPicker(const AtomicString& type) const
1189 { 1189 {
1190 return type == InputTypeNames::date() 1190 return type == InputTypeNames::date
1191 || type == InputTypeNames::datetime() 1191 || type == InputTypeNames::datetime
1192 || type == InputTypeNames::datetimelocal() 1192 || type == InputTypeNames::datetime_local
1193 || type == InputTypeNames::month() 1193 || type == InputTypeNames::month
1194 || type == InputTypeNames::week(); 1194 || type == InputTypeNames::week;
1195 } 1195 }
1196 #endif 1196 #endif
1197 1197
1198 bool RenderTheme::shouldUseFallbackTheme(RenderStyle*) const 1198 bool RenderTheme::shouldUseFallbackTheme(RenderStyle*) const
1199 { 1199 {
1200 return false; 1200 return false;
1201 } 1201 }
1202 1202
1203 void RenderTheme::adjustStyleUsingFallbackTheme(RenderStyle* style, Element* e) 1203 void RenderTheme::adjustStyleUsingFallbackTheme(RenderStyle* style, Element* e)
1204 { 1204 {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 1314
1315 // padding - not honored by WinIE, needs to be removed. 1315 // padding - not honored by WinIE, needs to be removed.
1316 style->resetPadding(); 1316 style->resetPadding();
1317 1317
1318 // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme) 1318 // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme)
1319 // for now, we will not honor it. 1319 // for now, we will not honor it.
1320 style->resetBorder(); 1320 style->resetBorder();
1321 } 1321 }
1322 1322
1323 } // namespace WebCore 1323 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698