OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 static bool hasValidAvgCharWidth(AtomicString family); | 57 static bool hasValidAvgCharWidth(AtomicString family); |
58 virtual float getAvgCharWidth(AtomicString family); | 58 virtual float getAvgCharWidth(AtomicString family); |
59 virtual LayoutUnit preferredContentLogicalWidth(float charWidth) const = 0; | 59 virtual LayoutUnit preferredContentLogicalWidth(float charWidth) const = 0; |
60 virtual LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, Layout
Unit nonContentHeight) const = 0; | 60 virtual LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, Layout
Unit nonContentHeight) const = 0; |
61 virtual RenderStyle* textBaseStyle() const = 0; | 61 virtual RenderStyle* textBaseStyle() const = 0; |
62 | 62 |
63 virtual void updateFromElement(); | 63 virtual void updateFromElement(); |
64 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; | 64 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; |
65 virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren, Subt
reeLayoutScope&); | 65 virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren, Subt
reeLayoutScope&); |
66 | 66 |
| 67 // We need to override this function because we don't want overflow:hidden o
n an <input> |
| 68 // to affect the baseline calculation. This is necessary because we are an i
nline-block |
| 69 // element as an implementation detail which would normally be affected by t
his. |
| 70 virtual int inlineBlockBaseline(LineDirectionMode direction) const OVERRIDE
{ return lastLineBoxBaseline(direction); } |
| 71 |
67 private: | 72 private: |
68 virtual const char* renderName() const { return "RenderTextControl"; } | 73 virtual const char* renderName() const { return "RenderTextControl"; } |
69 virtual bool isTextControl() const { return true; } | 74 virtual bool isTextControl() const { return true; } |
70 virtual bool supportsPartialLayout() const OVERRIDE { return false; } | 75 virtual bool supportsPartialLayout() const OVERRIDE { return false; } |
71 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const OVERRIDE; | 76 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const OVERRIDE; |
72 virtual void computePreferredLogicalWidths() OVERRIDE; | 77 virtual void computePreferredLogicalWidths() OVERRIDE; |
73 virtual void removeLeftoverAnonymousBlock(RenderBlock*) { } | 78 virtual void removeLeftoverAnonymousBlock(RenderBlock*) { } |
74 virtual bool avoidsFloats() const { return true; } | 79 virtual bool avoidsFloats() const { return true; } |
75 virtual bool canHaveGeneratedChildren() const OVERRIDE { return false; } | 80 virtual bool canHaveGeneratedChildren() const OVERRIDE { return false; } |
76 virtual bool canBeReplacedWithInlineRunIn() const OVERRIDE; | 81 virtual bool canBeReplacedWithInlineRunIn() const OVERRIDE; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 121 } |
117 virtual int firstLineBoxBaseline() const OVERRIDE { return RenderBlock::firs
tLineBoxBaseline(); } | 122 virtual int firstLineBoxBaseline() const OVERRIDE { return RenderBlock::firs
tLineBoxBaseline(); } |
118 virtual int inlineBlockBaseline(LineDirectionMode direction) const OVERRIDE
{ return lastLineBoxBaseline(direction); } | 123 virtual int inlineBlockBaseline(LineDirectionMode direction) const OVERRIDE
{ return lastLineBoxBaseline(direction); } |
119 virtual bool supportsPartialLayout() const OVERRIDE { return false; } | 124 virtual bool supportsPartialLayout() const OVERRIDE { return false; } |
120 }; | 125 }; |
121 | 126 |
122 | 127 |
123 } // namespace WebCore | 128 } // namespace WebCore |
124 | 129 |
125 #endif // RenderTextControl_h | 130 #endif // RenderTextControl_h |
OLD | NEW |