OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 virtual RenderStyle* textBaseStyle() const; | 77 virtual RenderStyle* textBaseStyle() const; |
78 | 78 |
79 bool textShouldBeTruncated() const; | 79 bool textShouldBeTruncated() const; |
80 | 80 |
81 HTMLElement* innerSpinButtonElement() const; | 81 HTMLElement* innerSpinButtonElement() const; |
82 | 82 |
83 bool m_shouldDrawCapsLockIndicator; | 83 bool m_shouldDrawCapsLockIndicator; |
84 LayoutUnit m_desiredInnerTextLogicalHeight; | 84 LayoutUnit m_desiredInnerTextLogicalHeight; |
85 }; | 85 }; |
86 | 86 |
87 inline RenderTextControlSingleLine* toRenderTextControlSingleLine(RenderObject*
object) | 87 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTextControlSingleLine, isTextField()); |
88 { | |
89 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTextField()); | |
90 return static_cast<RenderTextControlSingleLine*>(object); | |
91 } | |
92 | |
93 // This will catch anyone doing an unnecessary cast. | |
94 void toRenderTextControlSingleLine(const RenderTextControlSingleLine*); | |
95 | 88 |
96 // ---------------------------- | 89 // ---------------------------- |
97 | 90 |
98 class RenderTextControlInnerBlock : public RenderBlockFlow { | 91 class RenderTextControlInnerBlock : public RenderBlockFlow { |
99 public: | 92 public: |
100 RenderTextControlInnerBlock(Element* element) : RenderBlockFlow(element) { } | 93 RenderTextControlInnerBlock(Element* element) : RenderBlockFlow(element) { } |
101 virtual int inlineBlockBaseline(LineDirectionMode direction) const OVERRIDE
{ return lastLineBoxBaseline(direction); } | 94 virtual int inlineBlockBaseline(LineDirectionMode direction) const OVERRIDE
{ return lastLineBoxBaseline(direction); } |
102 | 95 |
103 private: | 96 private: |
104 virtual bool isIntristicallyScrollable(ScrollbarOrientation orientation) con
st OVERRIDE | 97 virtual bool isIntristicallyScrollable(ScrollbarOrientation orientation) con
st OVERRIDE |
105 { | 98 { |
106 return orientation == HorizontalScrollbar; | 99 return orientation == HorizontalScrollbar; |
107 } | 100 } |
108 virtual bool scrollsOverflowX() const OVERRIDE { return hasOverflowClip(); } | 101 virtual bool scrollsOverflowX() const OVERRIDE { return hasOverflowClip(); } |
109 virtual bool scrollsOverflowY() const OVERRIDE { return false; } | 102 virtual bool scrollsOverflowY() const OVERRIDE { return false; } |
110 virtual bool hasLineIfEmpty() const OVERRIDE { return true; } | 103 virtual bool hasLineIfEmpty() const OVERRIDE { return true; } |
111 }; | 104 }; |
112 | 105 |
113 } | 106 } |
114 | 107 |
115 #endif | 108 #endif |
OLD | NEW |