| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 return static_cast<const RenderTextControl*>(object); | 93 return static_cast<const RenderTextControl*>(object); |
| 94 } | 94 } |
| 95 | 95 |
| 96 // This will catch anyone doing an unnecessary cast. | 96 // This will catch anyone doing an unnecessary cast. |
| 97 void toRenderTextControl(const RenderTextControl*); | 97 void toRenderTextControl(const RenderTextControl*); |
| 98 | 98 |
| 99 // Renderer for our inner container, for <search> and others. | 99 // Renderer for our inner container, for <search> and others. |
| 100 // We can't use RenderFlexibleBox directly, because flexboxes have a different | 100 // We can't use RenderFlexibleBox directly, because flexboxes have a different |
| 101 // baseline definition, and then inputs of different types wouldn't line up | 101 // baseline definition, and then inputs of different types wouldn't line up |
| 102 // anymore. | 102 // anymore. |
| 103 class RenderTextControlInnerContainer : public RenderFlexibleBox { | 103 class RenderTextControlInnerContainer FINAL : public RenderFlexibleBox { |
| 104 public: | 104 public: |
| 105 explicit RenderTextControlInnerContainer(Element* element) | 105 explicit RenderTextControlInnerContainer(Element* element) |
| 106 : RenderFlexibleBox(element) | 106 : RenderFlexibleBox(element) |
| 107 { } | 107 { } |
| 108 virtual ~RenderTextControlInnerContainer() { } | 108 virtual ~RenderTextControlInnerContainer() { } |
| 109 | 109 |
| 110 virtual int baselinePosition(FontBaseline baseline, bool firstLine, LineDire
ctionMode direction, LinePositionMode position) const OVERRIDE | 110 virtual int baselinePosition(FontBaseline baseline, bool firstLine, LineDire
ctionMode direction, LinePositionMode position) const OVERRIDE |
| 111 { | 111 { |
| 112 return RenderBlock::baselinePosition(baseline, firstLine, direction, pos
ition); | 112 return RenderBlock::baselinePosition(baseline, firstLine, direction, pos
ition); |
| 113 } | 113 } |
| 114 virtual int firstLineBoxBaseline() const OVERRIDE { return RenderBlock::firs
tLineBoxBaseline(); } | 114 virtual int firstLineBoxBaseline() const OVERRIDE { return RenderBlock::firs
tLineBoxBaseline(); } |
| 115 virtual int inlineBlockBaseline(LineDirectionMode direction) const OVERRIDE
{ return RenderBlock::inlineBlockBaseline(direction); } | 115 virtual int inlineBlockBaseline(LineDirectionMode direction) const OVERRIDE
{ return RenderBlock::inlineBlockBaseline(direction); } |
| 116 | 116 |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 | 119 |
| 120 } // namespace WebCore | 120 } // namespace WebCore |
| 121 | 121 |
| 122 #endif // RenderTextControl_h | 122 #endif // RenderTextControl_h |
| OLD | NEW |