| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 | 87 |
| 88 void HTMLScriptElement::removedFromDocument() | 88 void HTMLScriptElement::removedFromDocument() |
| 89 { | 89 { |
| 90 HTMLElement::removedFromDocument(); | 90 HTMLElement::removedFromDocument(); |
| 91 ScriptElement::removedFromDocument(); | 91 ScriptElement::removedFromDocument(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void HTMLScriptElement::setText(const String &value) | 94 void HTMLScriptElement::setText(const String &value) |
| 95 { | 95 { |
| 96 RefPtr<Node> protectFromMutationEvents(this); |
| 97 |
| 96 ExceptionCode ec = 0; | 98 ExceptionCode ec = 0; |
| 97 int numChildren = childNodeCount(); | 99 int numChildren = childNodeCount(); |
| 98 | 100 |
| 99 if (numChildren == 1 && firstChild()->isTextNode()) { | 101 if (numChildren == 1 && firstChild()->isTextNode()) { |
| 100 static_cast<Text*>(firstChild())->setData(value, ec); | 102 static_cast<Text*>(firstChild())->setData(value, ec); |
| 101 return; | 103 return; |
| 102 } | 104 } |
| 103 | 105 |
| 104 if (numChildren > 0) | 106 if (numChildren > 0) |
| 105 removeChildren(); | 107 removeChildren(); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 184 |
| 183 dispatchEvent(Event::create(eventNames().loadEvent, false, false)); | 185 dispatchEvent(Event::create(eventNames().loadEvent, false, false)); |
| 184 } | 186 } |
| 185 | 187 |
| 186 PassRefPtr<Element> HTMLScriptElement::cloneElementWithoutAttributesAndChildren(
) | 188 PassRefPtr<Element> HTMLScriptElement::cloneElementWithoutAttributesAndChildren(
) |
| 187 { | 189 { |
| 188 return adoptRef(new HTMLScriptElement(tagQName(), document(), false, already
Started())); | 190 return adoptRef(new HTMLScriptElement(tagQName(), document(), false, already
Started())); |
| 189 } | 191 } |
| 190 | 192 |
| 191 } | 193 } |
| OLD | NEW |