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

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

Issue 2224063003: LayoutTheme: Clean up popupInternalPadding* functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 WebKit project. 2 * This file is part of the WebKit project.
3 * 3 *
4 * Copyright (C) 2006 Apple Computer, Inc. 4 * Copyright (C) 2006 Apple Computer, Inc.
5 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 5 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
6 * Copyright (C) 2007 Holger Hans Peter Freyther 6 * Copyright (C) 2007 Holger Hans Peter Freyther
7 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 7 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
8 * Copyright (C) 2008, 2009 Google, Inc. 8 * Copyright (C) 2008, 2009 Google, Inc.
9 * All rights reserved. 9 * All rights reserved.
10 * Copyright (C) 2009 Kenneth Rohde Christiansen 10 * Copyright (C) 2009 Kenneth Rohde Christiansen
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // In short, we either go down the MenuList code path or the MenuListButton 102 // In short, we either go down the MenuList code path or the MenuListButton
103 // codepath. We never go down both. And in both cases, they layout the 103 // codepath. We never go down both. And in both cases, they layout the
104 // entire menulist. 104 // entire menulist.
105 void adjustMenuListStyle(ComputedStyle&, Element*) const override; 105 void adjustMenuListStyle(ComputedStyle&, Element*) const override;
106 void adjustMenuListButtonStyle(ComputedStyle&, Element*) const override; 106 void adjustMenuListButtonStyle(ComputedStyle&, Element*) const override;
107 107
108 double animationRepeatIntervalForProgressBar() const override; 108 double animationRepeatIntervalForProgressBar() const override;
109 double animationDurationForProgressBar() const override; 109 double animationDurationForProgressBar() const override;
110 110
111 // These methods define the padding for the MenuList's inner block. 111 // These methods define the padding for the MenuList's inner block.
112 int popupInternalPaddingLeft(const ComputedStyle&) const override; 112 int popupInternalPaddingStart(const ComputedStyle&) const override;
113 int popupInternalPaddingRight(const ComputedStyle&) const override; 113 int popupInternalPaddingEnd(const ComputedStyle&) const override;
114 int popupInternalPaddingTop(const ComputedStyle&) const override; 114 int popupInternalPaddingTop(const ComputedStyle&) const override;
115 int popupInternalPaddingBottom(const ComputedStyle&) const override; 115 int popupInternalPaddingBottom(const ComputedStyle&) const override;
116 116
117 // Provide a way to pass the default font size from the Settings object 117 // Provide a way to pass the default font size from the Settings object
118 // to the layout theme. FIXME: http://b/1129186 A cleaner way would be 118 // to the layout theme. FIXME: http://b/1129186 A cleaner way would be
119 // to remove the default font size from this object and have callers 119 // to remove the default font size from this object and have callers
120 // that need the value to get it directly from the appropriate Settings 120 // that need the value to get it directly from the appropriate Settings
121 // object. 121 // object.
122 static void setDefaultFontSize(int); 122 static void setDefaultFontSize(int);
123 123
124 static void setSelectionColors(unsigned activeBackgroundColor, unsigned acti veForegroundColor, unsigned inactiveBackgroundColor, unsigned inactiveForeground Color); 124 static void setSelectionColors(unsigned activeBackgroundColor, unsigned acti veForegroundColor, unsigned inactiveBackgroundColor, unsigned inactiveForeground Color);
125 125
126 protected: 126 protected:
127 LayoutThemeDefault(); 127 LayoutThemeDefault();
128 ~LayoutThemeDefault() override; 128 ~LayoutThemeDefault() override;
129 bool shouldUseFallbackTheme(const ComputedStyle&) const override; 129 bool shouldUseFallbackTheme(const ComputedStyle&) const override;
130 130
131 IntRect determinateProgressValueRectFor(LayoutProgress*, const IntRect&) con st; 131 IntRect determinateProgressValueRectFor(LayoutProgress*, const IntRect&) con st;
132 IntRect indeterminateProgressValueRectFor(LayoutProgress*, const IntRect&) c onst; 132 IntRect indeterminateProgressValueRectFor(LayoutProgress*, const IntRect&) c onst;
133 133
134 private: 134 private:
135 ThemePainter& painter() override { return m_painter; } 135 ThemePainter& painter() override { return m_painter; }
136 136
137 int menuListInternalPadding(const ComputedStyle&, int paddingType) const; 137 int menuListInternalPadding(const ComputedStyle&, int padding) const;
138 138
139 static const RGBA32 defaultTapHighlightColor = 0x2e000000; // 18% black. 139 static const RGBA32 defaultTapHighlightColor = 0x2e000000; // 18% black.
140 static double m_caretBlinkInterval; 140 static double m_caretBlinkInterval;
141 141
142 static unsigned m_activeSelectionBackgroundColor; 142 static unsigned m_activeSelectionBackgroundColor;
143 static unsigned m_activeSelectionForegroundColor; 143 static unsigned m_activeSelectionForegroundColor;
144 static unsigned m_inactiveSelectionBackgroundColor; 144 static unsigned m_inactiveSelectionBackgroundColor;
145 static unsigned m_inactiveSelectionForegroundColor; 145 static unsigned m_inactiveSelectionForegroundColor;
146 146
147 ThemePainterDefault m_painter; 147 ThemePainterDefault m_painter;
148 }; 148 };
149 149
150 } // namespace blink 150 } // namespace blink
151 151
152 #endif // LayoutThemeDefault_h 152 #endif // LayoutThemeDefault_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTheme.h ('k') | third_party/WebKit/Source/core/layout/LayoutThemeDefault.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698