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

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

Issue 33983003: Introduce DEFINE_RENDER_OBJECT_TYPE_CASTS to replace manual toRenderFoo, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 2 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 30 matching lines...) Expand all
41 virtual float getAvgCharWidth(AtomicString family); 41 virtual float getAvgCharWidth(AtomicString family);
42 virtual LayoutUnit preferredContentLogicalWidth(float charWidth) const; 42 virtual LayoutUnit preferredContentLogicalWidth(float charWidth) const;
43 virtual LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, Layout Unit nonContentHeight) const OVERRIDE; 43 virtual LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, Layout Unit nonContentHeight) const OVERRIDE;
44 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const; 44 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const;
45 45
46 virtual RenderStyle* textBaseStyle() const; 46 virtual RenderStyle* textBaseStyle() const;
47 virtual PassRefPtr<RenderStyle> createInnerTextStyle(const RenderStyle* star tStyle) const; 47 virtual PassRefPtr<RenderStyle> createInnerTextStyle(const RenderStyle* star tStyle) const;
48 virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren, Subt reeLayoutScope&); 48 virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren, Subt reeLayoutScope&);
49 }; 49 };
50 50
51 inline RenderTextControlMultiLine* toRenderTextControlMultiLine(RenderObject* ob ject) 51 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTextControlMultiLine, isTextArea());
52 {
53 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTextArea());
54 return static_cast<RenderTextControlMultiLine*>(object);
55 }
56
57 // This will catch anyone doing an unnecessary cast.
58 void toRenderTextControlMultiLine(const RenderTextControlMultiLine*);
59 52
60 } 53 }
61 54
62 #endif 55 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTextControl.h ('k') | Source/core/rendering/RenderTextControlSingleLine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698