| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 virtual void updateFromElement(); | 64 virtual void updateFromElement(); |
| 65 virtual void computeLogicalHeight(); | 65 virtual void computeLogicalHeight(); |
| 66 virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren); | 66 virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren); |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 virtual const char* renderName() const { return "RenderTextControl"; } | 69 virtual const char* renderName() const { return "RenderTextControl"; } |
| 70 virtual bool isTextControl() const { return true; } | 70 virtual bool isTextControl() const { return true; } |
| 71 virtual void computePreferredLogicalWidths(); | 71 virtual void computePreferredLogicalWidths(); |
| 72 virtual void removeLeftoverAnonymousBlock(RenderBlock*) { } | 72 virtual void removeLeftoverAnonymousBlock(RenderBlock*) { } |
| 73 virtual bool avoidsFloats() const { return true; } | 73 virtual bool avoidsFloats() const { return true; } |
| 74 virtual bool canHaveGeneratedChildren() const OVERRIDE { return false; } |
| 74 | 75 |
| 75 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&); | 76 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&); |
| 76 | 77 |
| 77 virtual bool canBeProgramaticallyScrolled() const { return true; } | 78 virtual bool canBeProgramaticallyScrolled() const { return true; } |
| 78 | 79 |
| 79 virtual bool requiresForcedStyleRecalcPropagation() const { return true; } | 80 virtual bool requiresForcedStyleRecalcPropagation() const { return true; } |
| 80 | 81 |
| 81 static bool isSelectableElement(HTMLElement*, Node*); | 82 static bool isSelectableElement(HTMLElement*, Node*); |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 inline RenderTextControl* toRenderTextControl(RenderObject* object) | 85 inline RenderTextControl* toRenderTextControl(RenderObject* object) |
| 85 { | 86 { |
| 86 ASSERT(!object || object->isTextControl()); | 87 ASSERT(!object || object->isTextControl()); |
| 87 return static_cast<RenderTextControl*>(object); | 88 return static_cast<RenderTextControl*>(object); |
| 88 } | 89 } |
| 89 | 90 |
| 90 inline const RenderTextControl* toRenderTextControl(const RenderObject* object) | 91 inline const RenderTextControl* toRenderTextControl(const RenderObject* object) |
| 91 { | 92 { |
| 92 ASSERT(!object || object->isTextControl()); | 93 ASSERT(!object || object->isTextControl()); |
| 93 return static_cast<const RenderTextControl*>(object); | 94 return static_cast<const RenderTextControl*>(object); |
| 94 } | 95 } |
| 95 | 96 |
| 96 // This will catch anyone doing an unnecessary cast. | 97 // This will catch anyone doing an unnecessary cast. |
| 97 void toRenderTextControl(const RenderTextControl*); | 98 void toRenderTextControl(const RenderTextControl*); |
| 98 | 99 |
| 99 } // namespace WebCore | 100 } // namespace WebCore |
| 100 | 101 |
| 101 #endif // RenderTextControl_h | 102 #endif // RenderTextControl_h |
| OLD | NEW |