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

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

Issue 14413014: Remove -webkit-appearance:default-button. This was only used in Safari. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005 Apple Computer 2 * Copyright (C) 2005 Apple Computer
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public License 14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to 15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA. 17 * Boston, MA 02110-1301, USA.
18 * 18 *
19 */ 19 */
20 20
21 #ifndef RenderButton_h 21 #ifndef RenderButton_h
22 #define RenderButton_h 22 #define RenderButton_h
23 23
24 #include "core/platform/Timer.h"
25 #include "core/rendering/RenderFlexibleBox.h" 24 #include "core/rendering/RenderFlexibleBox.h"
26 #include <wtf/OwnPtr.h>
27 25
28 namespace WebCore { 26 namespace WebCore {
29 27
30 class RenderTextFragment; 28 class RenderTextFragment;
31 29
32 // RenderButtons are just like normal flexboxes except that they will generate a n anonymous block child. 30 // RenderButtons are just like normal flexboxes except that they will generate a n anonymous block child.
33 // For inputs, they will also generate an anonymous RenderText and keep its styl e and content up 31 // For inputs, they will also generate an anonymous RenderText and keep its styl e and content up
34 // to date as the button changes. 32 // to date as the button changes.
35 class RenderButton FINAL : public RenderFlexibleBox { 33 class RenderButton FINAL : public RenderFlexibleBox {
36 public: 34 public:
(...skipping 21 matching lines...) Expand all
58 String text() const; 56 String text() const;
59 57
60 private: 58 private:
61 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle); 59 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
62 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 60 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
63 61
64 virtual bool hasLineIfEmpty() const { return node() && node()->toInputElemen t(); } 62 virtual bool hasLineIfEmpty() const { return node() && node()->toInputElemen t(); }
65 63
66 virtual bool requiresForcedStyleRecalcPropagation() const { return true; } 64 virtual bool requiresForcedStyleRecalcPropagation() const { return true; }
67 65
68 void timerFired(Timer<RenderButton>*);
69
70 RenderTextFragment* m_buttonText; 66 RenderTextFragment* m_buttonText;
71 RenderBlock* m_inner; 67 RenderBlock* m_inner;
72
73 OwnPtr<Timer<RenderButton> > m_timer;
74 bool m_default;
75 }; 68 };
76 69
77 inline RenderButton* toRenderButton(RenderObject* object) 70 inline RenderButton* toRenderButton(RenderObject* object)
78 { 71 {
79 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderButton()); 72 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderButton());
80 return static_cast<RenderButton*>(object); 73 return static_cast<RenderButton*>(object);
81 } 74 }
82 75
83 inline const RenderButton* toRenderButton(const RenderObject* object) 76 inline const RenderButton* toRenderButton(const RenderObject* object)
84 { 77 {
85 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderButton()); 78 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderButton());
86 return static_cast<const RenderButton*>(object); 79 return static_cast<const RenderButton*>(object);
87 } 80 }
88 81
89 // This will catch anyone doing an unnecessary cast. 82 // This will catch anyone doing an unnecessary cast.
90 void toRenderButton(const RenderButton*); 83 void toRenderButton(const RenderButton*);
91 84
92 } // namespace WebCore 85 } // namespace WebCore
93 86
94 #endif // RenderButton_h 87 #endif // RenderButton_h
OLDNEW
« no previous file with comments | « Source/core/platform/mac/WebCoreSystemInterface.h ('k') | Source/core/rendering/RenderButton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698