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

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

Issue 351213002: Change RenderObject::style(bool) to accept an enum instead (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed enum to OwnOrFirstLineStyle, rebased and got rid of duplicate state on the stack in RootInl… Created 6 years, 5 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.cpp ('k') | Source/core/rendering/RenderButton.cpp » ('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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 void setupInnerStyle(RenderStyle*); 48 void setupInnerStyle(RenderStyle*);
49 49
50 // <button> should allow whitespace even though RenderFlexibleBox doesn't. 50 // <button> should allow whitespace even though RenderFlexibleBox doesn't.
51 virtual bool canHaveWhitespaceChildren() const OVERRIDE { return true; } 51 virtual bool canHaveWhitespaceChildren() const OVERRIDE { return true; }
52 52
53 virtual bool canHaveGeneratedChildren() const OVERRIDE; 53 virtual bool canHaveGeneratedChildren() const OVERRIDE;
54 virtual bool hasControlClip() const OVERRIDE { return true; } 54 virtual bool hasControlClip() const OVERRIDE { return true; }
55 virtual LayoutRect controlClipRect(const LayoutPoint&) const OVERRIDE; 55 virtual LayoutRect controlClipRect(const LayoutPoint&) const OVERRIDE;
56 56
57 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode) const OVERRIDE; 57 virtual int baselinePosition(FontBaseline, OwnOrFirstLineStyle, LineDirectio nMode, LinePositionMode) const OVERRIDE;
58 58
59 private: 59 private:
60 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O VERRIDE; 60 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O VERRIDE;
61 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE; 61 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE;
62 62
63 virtual bool hasLineIfEmpty() const OVERRIDE { return isHTMLInputElement(nod e()); } 63 virtual bool hasLineIfEmpty() const OVERRIDE { return isHTMLInputElement(nod e()); }
64 64
65 RenderBlock* m_inner; 65 RenderBlock* m_inner;
66 }; 66 };
67 67
68 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderButton, isRenderButton()); 68 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderButton, isRenderButton());
69 69
70 } // namespace WebCore 70 } // namespace WebCore
71 71
72 #endif // RenderButton_h 72 #endif // RenderButton_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.cpp ('k') | Source/core/rendering/RenderButton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698