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 20 matching lines...) Expand all Loading... |
31 | 31 |
32 namespace WebCore { | 32 namespace WebCore { |
33 | 33 |
34 RenderTextControlMultiLine::RenderTextControlMultiLine(Node* node, bool placehol
derVisible) | 34 RenderTextControlMultiLine::RenderTextControlMultiLine(Node* node, bool placehol
derVisible) |
35 : RenderTextControl(node, placeholderVisible) | 35 : RenderTextControl(node, placeholderVisible) |
36 { | 36 { |
37 } | 37 } |
38 | 38 |
39 RenderTextControlMultiLine::~RenderTextControlMultiLine() | 39 RenderTextControlMultiLine::~RenderTextControlMultiLine() |
40 { | 40 { |
41 if (node()) | 41 if (node() && node()->inDocument()) |
42 static_cast<HTMLTextAreaElement*>(node())->rendererWillBeDestroyed(); | 42 static_cast<HTMLTextAreaElement*>(node())->rendererWillBeDestroyed(); |
43 } | 43 } |
44 | 44 |
45 void RenderTextControlMultiLine::subtreeHasChanged() | 45 void RenderTextControlMultiLine::subtreeHasChanged() |
46 { | 46 { |
47 RenderTextControl::subtreeHasChanged(); | 47 RenderTextControl::subtreeHasChanged(); |
48 HTMLTextAreaElement* textArea = static_cast<HTMLTextAreaElement*>(node()); | 48 HTMLTextAreaElement* textArea = static_cast<HTMLTextAreaElement*>(node()); |
49 textArea->setFormControlValueMatchesRenderer(false); | 49 textArea->setFormControlValueMatchesRenderer(false); |
50 textArea->setNeedsValidityCheck(); | 50 textArea->setNeedsValidityCheck(); |
51 | 51 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 { | 151 { |
152 int inset = borderTop() + paddingTop(); | 152 int inset = borderTop() + paddingTop(); |
153 if (HTMLElement* innerText = innerTextElement()) { | 153 if (HTMLElement* innerText = innerTextElement()) { |
154 if (RenderBox* innerTextRenderer = innerText->renderBox()) | 154 if (RenderBox* innerTextRenderer = innerText->renderBox()) |
155 inset += innerTextRenderer->paddingTop(); | 155 inset += innerTextRenderer->paddingTop(); |
156 } | 156 } |
157 return inset; | 157 return inset; |
158 } | 158 } |
159 | 159 |
160 } | 160 } |
OLD | NEW |