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

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

Issue 129173004: Update rendering classes to use OVERRIDE / FINAL when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 11 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
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.h ('k') | Source/core/rendering/RenderCombineText.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 18 matching lines...) Expand all
29 class RenderTextFragment; 29 class RenderTextFragment;
30 30
31 // RenderButtons are just like normal flexboxes except that they will generate a n anonymous block child. 31 // RenderButtons are just like normal flexboxes except that they will generate a n anonymous block child.
32 // For inputs, they will also generate an anonymous RenderText and keep its styl e and content up 32 // For inputs, they will also generate an anonymous RenderText and keep its styl e and content up
33 // to date as the button changes. 33 // to date as the button changes.
34 class RenderButton FINAL : public RenderFlexibleBox { 34 class RenderButton FINAL : public RenderFlexibleBox {
35 public: 35 public:
36 explicit RenderButton(Element*); 36 explicit RenderButton(Element*);
37 virtual ~RenderButton(); 37 virtual ~RenderButton();
38 38
39 virtual const char* renderName() const { return "RenderButton"; } 39 virtual const char* renderName() const OVERRIDE { return "RenderButton"; }
40 virtual bool isRenderButton() const { return true; } 40 virtual bool isRenderButton() const OVERRIDE { return true; }
41 41
42 virtual bool canBeSelectionLeaf() const OVERRIDE { return node() && node()-> rendererIsEditable(); } 42 virtual bool canBeSelectionLeaf() const OVERRIDE { return node() && node()-> rendererIsEditable(); }
43 43
44 virtual void addChild(RenderObject* newChild, RenderObject *beforeChild = 0) ; 44 virtual void addChild(RenderObject* newChild, RenderObject *beforeChild = 0) OVERRIDE;
45 virtual void removeChild(RenderObject*); 45 virtual void removeChild(RenderObject*) OVERRIDE;
46 virtual void removeLeftoverAnonymousBlock(RenderBlock*) { } 46 virtual void removeLeftoverAnonymousBlock(RenderBlock*) OVERRIDE { }
47 virtual bool createsAnonymousWrapper() const { return true; } 47 virtual bool createsAnonymousWrapper() const OVERRIDE { return true; }
48 48
49 void setupInnerStyle(RenderStyle*); 49 void setupInnerStyle(RenderStyle*);
50 50
51 // <button> should allow whitespace even though RenderFlexibleBox doesn't. 51 // <button> should allow whitespace even though RenderFlexibleBox doesn't.
52 virtual bool canHaveWhitespaceChildren() const OVERRIDE { return true; } 52 virtual bool canHaveWhitespaceChildren() const OVERRIDE { return true; }
53 53
54 virtual bool canHaveGeneratedChildren() const OVERRIDE; 54 virtual bool canHaveGeneratedChildren() const OVERRIDE;
55 virtual bool hasControlClip() const { return true; } 55 virtual bool hasControlClip() const OVERRIDE { return true; }
56 virtual LayoutRect controlClipRect(const LayoutPoint&) const; 56 virtual LayoutRect controlClipRect(const LayoutPoint&) const OVERRIDE;
57 57
58 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode) const OVERRIDE; 58 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode) const OVERRIDE;
59 59
60 private: 60 private:
61 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle); 61 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle) O VERRIDE;
62 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 62 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE;
63 63
64 virtual bool hasLineIfEmpty() const { return node() && node()->hasTagName(HT MLNames::inputTag); } 64 virtual bool hasLineIfEmpty() const OVERRIDE { return node() && node()->hasT agName(HTMLNames::inputTag); }
65 65
66 RenderBlock* m_inner; 66 RenderBlock* m_inner;
67 }; 67 };
68 68
69 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderButton, isRenderButton()); 69 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderButton, isRenderButton());
70 70
71 } // namespace WebCore 71 } // namespace WebCore
72 72
73 #endif // RenderButton_h 73 #endif // RenderButton_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.h ('k') | Source/core/rendering/RenderCombineText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698