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

Side by Side Diff: Source/core/rendering/RenderThemeChromiumSkia.h

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Fixed Linux compilation (hopefuly Windows too), addressing some reviewer's suggestions. Created 7 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 * 10 *
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 virtual void setRadioSize(RenderStyle*) const; 74 virtual void setRadioSize(RenderStyle*) const;
75 75
76 virtual void adjustButtonStyle(RenderStyle*, Element*) const; 76 virtual void adjustButtonStyle(RenderStyle*, Element*) const;
77 77
78 virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&); 78 virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&);
79 79
80 virtual void adjustSearchFieldStyle(RenderStyle*, Element*) const; 80 virtual void adjustSearchFieldStyle(RenderStyle*, Element*) const;
81 virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect &); 81 virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect &);
82 82
83 virtual void adjustSearchFieldCancelButtonStyle(RenderStyle*, Element*) cons t; 83 virtual void adjustSearchFieldCancelButtonStyle(RenderStyle*, Element*) cons t;
84 virtual bool paintSearchFieldCancelButton(RenderObject*, const PaintInfo&, c onst IntRect&); 84 virtual bool paintSearchFieldCancelButton(RenderObject*, PaintInfo&, const I ntRect&);
85 85
86 virtual void adjustSearchFieldDecorationStyle(RenderStyle*, Element*) const; 86 virtual void adjustSearchFieldDecorationStyle(RenderStyle*, Element*) const;
87 87
88 virtual void adjustSearchFieldResultsDecorationStyle(RenderStyle*, Element*) const; 88 virtual void adjustSearchFieldResultsDecorationStyle(RenderStyle*, Element*) const;
89 virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInf o&, const IntRect&); 89 virtual bool paintSearchFieldResultsDecoration(RenderObject*, PaintInfo&, co nst IntRect&);
90 90
91 virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const In tRect&); 91 virtual bool paintMediaSliderTrack(RenderObject*, PaintInfo&, const IntRect& );
92 virtual bool paintMediaVolumeSliderTrack(RenderObject*, const PaintInfo&, co nst IntRect&); 92 virtual bool paintMediaVolumeSliderTrack(RenderObject*, PaintInfo&, const In tRect&);
93 virtual void adjustSliderThumbSize(RenderStyle*, Element*) const; 93 virtual void adjustSliderThumbSize(RenderStyle*, Element*) const;
94 virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const In tRect&); 94 virtual bool paintMediaSliderThumb(RenderObject*, PaintInfo&, const IntRect& );
95 virtual bool paintMediaToggleClosedCaptionsButton(RenderObject*, const Paint Info&, const IntRect&); 95 virtual bool paintMediaToggleClosedCaptionsButton(RenderObject*, PaintInfo&, const IntRect&);
96 virtual bool paintMediaVolumeSliderThumb(RenderObject*, const PaintInfo&, co nst IntRect&); 96 virtual bool paintMediaVolumeSliderThumb(RenderObject*, PaintInfo&, const In tRect&);
97 virtual bool paintMediaPlayButton(RenderObject*, const PaintInfo&, const Int Rect&); 97 virtual bool paintMediaPlayButton(RenderObject*, PaintInfo&, const IntRect&) ;
98 virtual bool paintMediaMuteButton(RenderObject*, const PaintInfo&, const Int Rect&); 98 virtual bool paintMediaMuteButton(RenderObject*, PaintInfo&, const IntRect&) ;
99 virtual String formatMediaControlsTime(float time) const; 99 virtual String formatMediaControlsTime(float time) const;
100 virtual String formatMediaControlsCurrentTime(float currentTime, float durat ion) const; 100 virtual String formatMediaControlsCurrentTime(float currentTime, float durat ion) const;
101 virtual bool paintMediaFullscreenButton(RenderObject*, const PaintInfo&, con st IntRect&); 101 virtual bool paintMediaFullscreenButton(RenderObject*, PaintInfo&, const Int Rect&);
102 102
103 // MenuList refers to an unstyled menulist (meaning a menulist without 103 // MenuList refers to an unstyled menulist (meaning a menulist without
104 // background-color or border set) and MenuListButton refers to a styled 104 // background-color or border set) and MenuListButton refers to a styled
105 // menulist (a menulist with background-color or border set). They have 105 // menulist (a menulist with background-color or border set). They have
106 // this distinction to support showing aqua style themes whenever they 106 // this distinction to support showing aqua style themes whenever they
107 // possibly can, which is something we don't want to replicate. 107 // possibly can, which is something we don't want to replicate.
108 // 108 //
109 // In short, we either go down the MenuList code path or the MenuListButton 109 // In short, we either go down the MenuList code path or the MenuListButton
110 // codepath. We never go down both. And in both cases, they render the 110 // codepath. We never go down both. And in both cases, they render the
111 // entire menulist. 111 // entire menulist.
(...skipping 25 matching lines...) Expand all
137 virtual double caretBlinkIntervalInternal() const; 137 virtual double caretBlinkIntervalInternal() const;
138 138
139 virtual int menuListArrowPadding() const; 139 virtual int menuListArrowPadding() const;
140 140
141 IntRect determinateProgressValueRectFor(RenderProgress*, const IntRect&) con st; 141 IntRect determinateProgressValueRectFor(RenderProgress*, const IntRect&) con st;
142 IntRect indeterminateProgressValueRectFor(RenderProgress*, const IntRect&) c onst; 142 IntRect indeterminateProgressValueRectFor(RenderProgress*, const IntRect&) c onst;
143 IntRect progressValueRectFor(RenderProgress*, const IntRect&) const; 143 IntRect progressValueRectFor(RenderProgress*, const IntRect&) const;
144 144
145 class DirectionFlippingScope { 145 class DirectionFlippingScope {
146 public: 146 public:
147 DirectionFlippingScope(RenderObject*, const PaintInfo&, const IntRect&); 147 DirectionFlippingScope(RenderObject*, PaintInfo&, const IntRect&);
148 ~DirectionFlippingScope(); 148 ~DirectionFlippingScope();
149 149
150 private: 150 private:
151 bool m_needsFlipping; 151 bool m_needsFlipping;
152 const PaintInfo& m_paintInfo; 152 PaintInfo& m_paintInfo;
153 }; 153 };
154 154
155 private: 155 private:
156 virtual bool shouldShowPlaceholderWhenFocused() const OVERRIDE; 156 virtual bool shouldShowPlaceholderWhenFocused() const OVERRIDE;
157 157
158 int menuListInternalPadding(RenderStyle*, int paddingType) const; 158 int menuListInternalPadding(RenderStyle*, int paddingType) const;
159 bool paintMediaButtonInternal(GraphicsContext*, const IntRect&, Image*); 159 bool paintMediaButtonInternal(GraphicsContext*, const IntRect&, Image*);
160 IntRect convertToPaintingRect(RenderObject* inputRenderer, const RenderObjec t* partRenderer, LayoutRect partRect, const IntRect& localOffset) const; 160 IntRect convertToPaintingRect(RenderObject* inputRenderer, const RenderObjec t* partRenderer, LayoutRect partRect, const IntRect& localOffset) const;
161 161
162 static const RGBA32 defaultTapHighlightColor = 0x2e000000; // 18% black. 162 static const RGBA32 defaultTapHighlightColor = 0x2e000000; // 18% black.
163 }; 163 };
164 164
165 } // namespace WebCore 165 } // namespace WebCore
166 166
167 #endif // RenderThemeChromiumSkia_h 167 #endif // RenderThemeChromiumSkia_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698