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

Side by Side Diff: Source/core/paint/ThemePainter.h

Issue 1319893002: Make classes and structures in core/paint fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 *
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 22
23 #ifndef ThemePainter_h 23 #ifndef ThemePainter_h
24 #define ThemePainter_h 24 #define ThemePainter_h
25 25
26 #include "platform/ThemeTypes.h" 26 #include "platform/ThemeTypes.h"
27 #include "wtf/Allocator.h"
27 28
28 namespace blink { 29 namespace blink {
29 30
30 class IntRect; 31 class IntRect;
31 class LayoutObject; 32 class LayoutObject;
32 33
33 struct PaintInfo; 34 struct PaintInfo;
34 35
35 class ThemePainter { 36 class ThemePainter {
37 DISALLOW_ALLOCATION();
36 public: 38 public:
37 // This method is called to paint the widget as a background of the LayoutOb ject. A widget's foreground, e.g., the 39 // This method is called to paint the widget as a background of the LayoutOb ject. A widget's foreground, e.g., the
38 // text of a button, is always rendered by the engine itself. The boolean r eturn value indicates 40 // text of a button, is always rendered by the engine itself. The boolean r eturn value indicates
39 // whether the CSS border/background should also be painted. 41 // whether the CSS border/background should also be painted.
40 bool paint(LayoutObject*, const PaintInfo&, const IntRect&); 42 bool paint(LayoutObject*, const PaintInfo&, const IntRect&);
41 bool paintBorderOnly(LayoutObject*, const PaintInfo&, const IntRect&); 43 bool paintBorderOnly(LayoutObject*, const PaintInfo&, const IntRect&);
42 bool paintDecorations(LayoutObject*, const PaintInfo&, const IntRect&); 44 bool paintDecorations(LayoutObject*, const PaintInfo&, const IntRect&);
43 45
44 virtual bool paintCapsLockIndicator(LayoutObject*, const PaintInfo&, const I ntRect&) { return 0; } 46 virtual bool paintCapsLockIndicator(LayoutObject*, const PaintInfo&, const I ntRect&) { return 0; }
45 void paintSliderTicks(LayoutObject*, const PaintInfo&, const IntRect&); 47 void paintSliderTicks(LayoutObject*, const PaintInfo&, const IntRect&);
(...skipping 20 matching lines...) Expand all
66 virtual bool paintSearchFieldResultsDecoration(LayoutObject*, const PaintInf o&, const IntRect&) { return true; } 68 virtual bool paintSearchFieldResultsDecoration(LayoutObject*, const PaintInf o&, const IntRect&) { return true; }
67 69
68 bool paintUsingFallbackTheme(LayoutObject*, const PaintInfo&, const IntRect& ); 70 bool paintUsingFallbackTheme(LayoutObject*, const PaintInfo&, const IntRect& );
69 bool paintCheckboxUsingFallbackTheme(LayoutObject*, const PaintInfo&, const IntRect&); 71 bool paintCheckboxUsingFallbackTheme(LayoutObject*, const PaintInfo&, const IntRect&);
70 bool paintRadioUsingFallbackTheme(LayoutObject*, const PaintInfo&, const Int Rect&); 72 bool paintRadioUsingFallbackTheme(LayoutObject*, const PaintInfo&, const Int Rect&);
71 }; 73 };
72 74
73 } // namespace blink 75 } // namespace blink
74 76
75 #endif // ThemePainter_h 77 #endif // ThemePainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698