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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTheme.h

Issue 1690493002: Switch to LayoutThemeMobile when emulating mobile device in DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more mac compile Created 4 years, 10 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 30 matching lines...) Expand all
41 class Theme; 41 class Theme;
42 class ThemePainter; 42 class ThemePainter;
43 43
44 class CORE_EXPORT LayoutTheme : public RefCounted<LayoutTheme> { 44 class CORE_EXPORT LayoutTheme : public RefCounted<LayoutTheme> {
45 protected: 45 protected:
46 LayoutTheme(); 46 LayoutTheme();
47 47
48 public: 48 public:
49 virtual ~LayoutTheme() { } 49 virtual ~LayoutTheme() { }
50 50
51 // This function is to be implemented in your platform-specific theme implem entation to hand back the
52 // appropriate platform theme.
53 static LayoutTheme& theme(); 51 static LayoutTheme& theme();
54 52
55 virtual ThemePainter& painter() = 0; 53 virtual ThemePainter& painter() = 0;
56 54
57 static void setSizeIfAuto(ComputedStyle&, const IntSize&); 55 static void setSizeIfAuto(ComputedStyle&, const IntSize&);
58 56
59 // This method is called whenever style has been computed for an element and the appearance 57 // This method is called whenever style has been computed for an element and the appearance
60 // property has been set to a value other than "none". The theme should map in all of the appropriate 58 // property has been set to a value other than "none". The theme should map in all of the appropriate
61 // metrics and defaults given the contents of the style. This includes soph isticated operations like 59 // metrics and defaults given the contents of the style. This includes soph isticated operations like
62 // selection of control size based off the font, the disabling of appearance when certain other properties like 60 // selection of control size based off the font, the disabling of appearance when certain other properties like
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 static bool isIndeterminate(const LayoutObject&); 231 static bool isIndeterminate(const LayoutObject&);
234 static bool isEnabled(const LayoutObject&); 232 static bool isEnabled(const LayoutObject&);
235 static bool isFocused(const LayoutObject&); 233 static bool isFocused(const LayoutObject&);
236 static bool isPressed(const LayoutObject&); 234 static bool isPressed(const LayoutObject&);
237 static bool isSpinUpButtonPartPressed(const LayoutObject&); 235 static bool isSpinUpButtonPartPressed(const LayoutObject&);
238 static bool isHovered(const LayoutObject&); 236 static bool isHovered(const LayoutObject&);
239 static bool isSpinUpButtonPartHovered(const LayoutObject&); 237 static bool isSpinUpButtonPartHovered(const LayoutObject&);
240 static bool isReadOnlyControl(const LayoutObject&); 238 static bool isReadOnlyControl(const LayoutObject&);
241 239
242 private: 240 private:
241 // This function is to be implemented in your platform-specific theme implem entation to hand back the
242 // appropriate platform theme.
243 static LayoutTheme& nativeTheme();
244
243 Color m_customFocusRingColor; 245 Color m_customFocusRingColor;
244 bool m_hasCustomFocusRingColor; 246 bool m_hasCustomFocusRingColor;
245 247
246 // This color is expected to be drawn on a semi-transparent overlay, 248 // This color is expected to be drawn on a semi-transparent overlay,
247 // making it more transparent than its alpha value indicates. 249 // making it more transparent than its alpha value indicates.
248 static const RGBA32 defaultTapHighlightColor = 0x66000000; 250 static const RGBA32 defaultTapHighlightColor = 0x66000000;
249 251
250 static const RGBA32 defaultCompositionBackgroundColor = 0xFFFFDD55; 252 static const RGBA32 defaultCompositionBackgroundColor = 0xFFFFDD55;
251 253
252 #if USE(NEW_THEME) 254 #if USE(NEW_THEME)
253 Theme* m_platformTheme; // The platform-specific theme. 255 Theme* m_platformTheme; // The platform-specific theme.
254 #endif 256 #endif
255 }; 257 };
256 258
257 } // namespace blink 259 } // namespace blink
258 260
259 #endif // LayoutTheme_h 261 #endif // LayoutTheme_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698