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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 protected: | 51 protected: |
52 explicit LayoutTheme(Theme*); | 52 explicit LayoutTheme(Theme*); |
53 | 53 |
54 public: | 54 public: |
55 virtual ~LayoutTheme() {} | 55 virtual ~LayoutTheme() {} |
56 | 56 |
57 static LayoutTheme& theme(); | 57 static LayoutTheme& theme(); |
58 | 58 |
59 virtual ThemePainter& painter() = 0; | 59 virtual ThemePainter& painter() = 0; |
60 | 60 |
| 61 // This function is called after associated WebThemeEngine instance |
| 62 // was replaced. This is called only in tests. |
| 63 virtual void didChangeThemeEngine() {} |
| 64 |
61 static void setSizeIfAuto(ComputedStyle&, const IntSize&); | 65 static void setSizeIfAuto(ComputedStyle&, const IntSize&); |
62 | 66 |
63 // This method is called whenever style has been computed for an element and | 67 // This method is called whenever style has been computed for an element and |
64 // the appearance property has been set to a value other than "none". | 68 // the appearance property has been set to a value other than "none". |
65 // The theme should map in all of the appropriate metrics and defaults given | 69 // The theme should map in all of the appropriate metrics and defaults given |
66 // the contents of the style. This includes sophisticated operations like | 70 // the contents of the style. This includes sophisticated operations like |
67 // selection of control size based off the font, the disabling of appearance | 71 // selection of control size based off the font, the disabling of appearance |
68 // when certain other properties like "border" are set, or if the appearance | 72 // when certain other properties like "border" are set, or if the appearance |
69 // is not supported by the theme. | 73 // is not supported by the theme. |
70 void adjustStyle(ComputedStyle&, Element*); | 74 void adjustStyle(ComputedStyle&, Element*); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 static const RGBA32 defaultTapHighlightColor = 0x66000000; | 290 static const RGBA32 defaultTapHighlightColor = 0x66000000; |
287 | 291 |
288 static const RGBA32 defaultCompositionBackgroundColor = 0xFFFFDD55; | 292 static const RGBA32 defaultCompositionBackgroundColor = 0xFFFFDD55; |
289 | 293 |
290 Theme* m_platformTheme; // The platform-specific theme. | 294 Theme* m_platformTheme; // The platform-specific theme. |
291 }; | 295 }; |
292 | 296 |
293 } // namespace blink | 297 } // namespace blink |
294 | 298 |
295 #endif // LayoutTheme_h | 299 #endif // LayoutTheme_h |
OLD | NEW |