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

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

Issue 2405633002: Reformat comments in core/layout (Closed)
Patch Set: Created 4 years, 2 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 Apple Computer, Inc. 4 * Copyright (C) 2005 Apple Computer, Inc.
5 * Copyright (C) 2008, 2009 Google, Inc. 5 * Copyright (C) 2008, 2009 Google, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 ~LayoutThemeMac() override; 97 ~LayoutThemeMac() override;
98 98
99 void adjustMenuListStyle(ComputedStyle&, Element*) const override; 99 void adjustMenuListStyle(ComputedStyle&, Element*) const override;
100 void adjustMenuListButtonStyle(ComputedStyle&, Element*) const override; 100 void adjustMenuListButtonStyle(ComputedStyle&, Element*) const override;
101 void adjustSearchFieldStyle(ComputedStyle&) const override; 101 void adjustSearchFieldStyle(ComputedStyle&) const override;
102 void adjustSearchFieldCancelButtonStyle(ComputedStyle&) const override; 102 void adjustSearchFieldCancelButtonStyle(ComputedStyle&) const override;
103 103
104 public: 104 public:
105 // Constants and methods shared with ThemePainterMac 105 // Constants and methods shared with ThemePainterMac
106 106
107 // Get the control size based off the font. Used by some of the controls (like buttons). 107 // Get the control size based off the font. Used by some of the controls (like
108 // buttons).
108 NSControlSize controlSizeForFont(const ComputedStyle&) const; 109 NSControlSize controlSizeForFont(const ComputedStyle&) const;
109 NSControlSize controlSizeForSystemFont(const ComputedStyle&) const; 110 NSControlSize controlSizeForSystemFont(const ComputedStyle&) const;
110 void setControlSize(NSCell*, 111 void setControlSize(NSCell*,
111 const IntSize* sizes, 112 const IntSize* sizes,
112 const IntSize& minSize, 113 const IntSize& minSize,
113 float zoomLevel = 1.0f); 114 float zoomLevel = 1.0f);
114 void setSizeFromFont(ComputedStyle&, const IntSize* sizes) const; 115 void setSizeFromFont(ComputedStyle&, const IntSize* sizes) const;
115 IntSize sizeForFont(const ComputedStyle&, const IntSize* sizes) const; 116 IntSize sizeForFont(const ComputedStyle&, const IntSize* sizes) const;
116 IntSize sizeForSystemFont(const ComputedStyle&, const IntSize* sizes) const; 117 IntSize sizeForSystemFont(const ComputedStyle&, const IntSize* sizes) const;
117 void setFontFromControlSize(ComputedStyle&, NSControlSize) const; 118 void setFontFromControlSize(ComputedStyle&, NSControlSize) const;
(...skipping 13 matching lines...) Expand all
131 132
132 const IntSize* searchFieldSizes() const; 133 const IntSize* searchFieldSizes() const;
133 const IntSize* cancelButtonSizes() const; 134 const IntSize* cancelButtonSizes() const;
134 void setSearchCellState(const LayoutObject&, const IntRect&); 135 void setSearchCellState(const LayoutObject&, const IntRect&);
135 void setSearchFieldSize(ComputedStyle&) const; 136 void setSearchFieldSize(ComputedStyle&) const;
136 137
137 NSPopUpButtonCell* popupButton() const; 138 NSPopUpButtonCell* popupButton() const;
138 NSSearchFieldCell* search() const; 139 NSSearchFieldCell* search() const;
139 NSTextFieldCell* textField() const; 140 NSTextFieldCell* textField() const;
140 141
141 // A view associated to the contained document. Subclasses may not have such a view and return a fake. 142 // A view associated to the contained document. Subclasses may not have such a
143 // view and return a fake.
142 NSView* documentViewFor(const LayoutObject&) const; 144 NSView* documentViewFor(const LayoutObject&) const;
143 145
144 void updateActiveState(NSCell*, const LayoutObject&); 146 void updateActiveState(NSCell*, const LayoutObject&);
145 147
146 // We estimate the animation rate of a Mac OS X progress bar is 33 fps. 148 // We estimate the animation rate of a Mac OS X progress bar is 33 fps.
147 // Hard code the value here because we haven't found API for it. 149 // Hard code the value here because we haven't found API for it.
148 static constexpr double progressAnimationFrameRate = 0.033; 150 static constexpr double progressAnimationFrameRate = 0.033;
149 // Mac OS X progress bar animation seems to have 256 frames. 151 // Mac OS X progress bar animation seems to have 256 frames.
150 static constexpr double progressAnimationNumFrames = 256; 152 static constexpr double progressAnimationNumFrames = 256;
151 153
152 static constexpr float baseFontSize = 11.0f; 154 static constexpr float baseFontSize = 11.0f;
153 static constexpr float menuListBaseArrowHeight = 4.0f; 155 static constexpr float menuListBaseArrowHeight = 4.0f;
154 static constexpr float menuListBaseArrowWidth = 5.0f; 156 static constexpr float menuListBaseArrowWidth = 5.0f;
155 static constexpr float menuListBaseSpaceBetweenArrows = 2.0f; 157 static constexpr float menuListBaseSpaceBetweenArrows = 2.0f;
156 static const int menuListArrowPaddingStart = 4; 158 static const int menuListArrowPaddingStart = 4;
157 static const int menuListArrowPaddingEnd = 4; 159 static const int menuListArrowPaddingEnd = 4;
158 static const int sliderThumbWidth = 15; 160 static const int sliderThumbWidth = 15;
159 static const int sliderThumbHeight = 15; 161 static const int sliderThumbHeight = 15;
160 static const int sliderThumbShadowBlur = 1; 162 static const int sliderThumbShadowBlur = 1;
161 static const int sliderThumbBorderWidth = 1; 163 static const int sliderThumbBorderWidth = 1;
162 static const int sliderTrackWidth = 5; 164 static const int sliderTrackWidth = 5;
163 static const int sliderTrackBorderWidth = 1; 165 static const int sliderTrackBorderWidth = 1;
164 166
165 protected: 167 protected:
166 void adjustMediaSliderThumbSize(ComputedStyle&) const; 168 void adjustMediaSliderThumbSize(ComputedStyle&) const;
167 String extraFullscreenStyleSheet() override; 169 String extraFullscreenStyleSheet() override;
168 170
169 // Controls color values returned from platformFocusRingColor(). systemColor() will be used when false. 171 // Controls color values returned from platformFocusRingColor(). systemColor()
172 // will be used when false.
170 bool usesTestModeFocusRingColor() const; 173 bool usesTestModeFocusRingColor() const;
171 174
172 bool shouldUseFallbackTheme(const ComputedStyle&) const override; 175 bool shouldUseFallbackTheme(const ComputedStyle&) const override;
173 176
174 void adjustProgressBarBounds(ComputedStyle&) const override; 177 void adjustProgressBarBounds(ComputedStyle&) const override;
175 178
176 private: 179 private:
177 const int* progressBarHeights() const; 180 const int* progressBarHeights() const;
178 const int* progressBarMargins(NSControlSize) const; 181 const int* progressBarMargins(NSControlSize) const;
179 String fileListNameForWidth(Locale&, 182 String fileListNameForWidth(Locale&,
(...skipping 14 matching lines...) Expand all
194 mutable HashMap<int, RGBA32> m_systemColorCache; 197 mutable HashMap<int, RGBA32> m_systemColorCache;
195 198
196 RetainPtr<BlinkLayoutThemeNotificationObserver> m_notificationObserver; 199 RetainPtr<BlinkLayoutThemeNotificationObserver> m_notificationObserver;
197 200
198 ThemePainterMac m_painter; 201 ThemePainterMac m_painter;
199 }; 202 };
200 203
201 } // namespace blink 204 } // namespace blink
202 205
203 #endif // LayoutThemeMac_h 206 #endif // LayoutThemeMac_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeDefault.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutThemeMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698