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

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

Issue 16194013: Mouse press should focus on any types of form controls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 | 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 *
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 virtual void adjustRepaintRect(const RenderObject*, IntRect&); 112 virtual void adjustRepaintRect(const RenderObject*, IntRect&);
113 113
114 // This method is called whenever a relevant state changes on a particular t hemed object, e.g., the mouse becomes pressed 114 // This method is called whenever a relevant state changes on a particular t hemed object, e.g., the mouse becomes pressed
115 // or a control becomes disabled. 115 // or a control becomes disabled.
116 virtual bool stateChanged(RenderObject*, ControlState) const; 116 virtual bool stateChanged(RenderObject*, ControlState) const;
117 117
118 // This method is called whenever the theme changes on the system in order t o flush cached resources from the 118 // This method is called whenever the theme changes on the system in order t o flush cached resources from the
119 // old theme. 119 // old theme.
120 virtual void themeChanged() { } 120 virtual void themeChanged() { }
121 121
122 // A method asking if the theme is able to draw the focus ring. 122 bool shouldDrawCommonFocusRing(RenderObject*) const;
123 virtual bool supportsFocusRing(const RenderStyle*) const;
124 123
125 // A method asking if the theme's controls actually care about redrawing whe n hovered. 124 // A method asking if the theme's controls actually care about redrawing whe n hovered.
126 virtual bool supportsHover(const RenderStyle*) const { return false; } 125 virtual bool supportsHover(const RenderStyle*) const { return false; }
127 126
128 // A method asking if the platform is able to show datalist suggestions for a given input type. 127 // A method asking if the platform is able to show datalist suggestions for a given input type.
129 virtual bool supportsDataListUI(const AtomicString&) const; 128 virtual bool supportsDataListUI(const AtomicString&) const;
130 129
131 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 130 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
132 // A method asking if the platform is able to show a calendar picker for a g iven input type. 131 // A method asking if the platform is able to show a calendar picker for a g iven input type.
133 virtual bool supportsCalendarPicker(const AtomicString&) const; 132 virtual bool supportsCalendarPicker(const AtomicString&) const;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 virtual Color platformActiveSelectionBackgroundColor() const; 224 virtual Color platformActiveSelectionBackgroundColor() const;
226 virtual Color platformInactiveSelectionBackgroundColor() const; 225 virtual Color platformInactiveSelectionBackgroundColor() const;
227 virtual Color platformActiveSelectionForegroundColor() const; 226 virtual Color platformActiveSelectionForegroundColor() const;
228 virtual Color platformInactiveSelectionForegroundColor() const; 227 virtual Color platformInactiveSelectionForegroundColor() const;
229 228
230 virtual Color platformActiveListBoxSelectionBackgroundColor() const; 229 virtual Color platformActiveListBoxSelectionBackgroundColor() const;
231 virtual Color platformInactiveListBoxSelectionBackgroundColor() const; 230 virtual Color platformInactiveListBoxSelectionBackgroundColor() const;
232 virtual Color platformActiveListBoxSelectionForegroundColor() const; 231 virtual Color platformActiveListBoxSelectionForegroundColor() const;
233 virtual Color platformInactiveListBoxSelectionForegroundColor() const; 232 virtual Color platformInactiveListBoxSelectionForegroundColor() const;
234 233
234 // A method asking if the theme is able to draw the focus ring.
235 virtual bool supportsFocusRing(const RenderStyle*) const;
235 virtual bool supportsSelectionForegroundColors() const { return true; } 236 virtual bool supportsSelectionForegroundColors() const { return true; }
236 virtual bool supportsListBoxSelectionForegroundColors() const { return true; } 237 virtual bool supportsListBoxSelectionForegroundColors() const { return true; }
237 238
238 #if !USE(NEW_THEME) 239 #if !USE(NEW_THEME)
239 // Methods for each appearance value. 240 // Methods for each appearance value.
240 virtual void adjustCheckboxStyle(StyleResolver*, RenderStyle*, Element*) con st; 241 virtual void adjustCheckboxStyle(StyleResolver*, RenderStyle*, Element*) con st;
241 virtual bool paintCheckbox(RenderObject*, const PaintInfo&, const IntRect&) { return true; } 242 virtual bool paintCheckbox(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
242 virtual void setCheckboxSize(RenderStyle*) const { } 243 virtual void setCheckboxSize(RenderStyle*) const { }
243 244
244 virtual void adjustRadioStyle(StyleResolver*, RenderStyle*, Element*) const; 245 virtual void adjustRadioStyle(StyleResolver*, RenderStyle*, Element*) const;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 static const RGBA32 defaultTapHighlightColor = 0x66000000; 354 static const RGBA32 defaultTapHighlightColor = 0x66000000;
354 355
355 #if USE(NEW_THEME) 356 #if USE(NEW_THEME)
356 Theme* m_theme; // The platform-specific theme. 357 Theme* m_theme; // The platform-specific theme.
357 #endif 358 #endif
358 }; 359 };
359 360
360 } // namespace WebCore 361 } // namespace WebCore
361 362
362 #endif // RenderTheme_h 363 #endif // RenderTheme_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698