Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: Source/WebCore/html/HTMLScriptElement.cpp

Issue 9569046: Merge 109362 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/html/HTMLOptionElement.cpp ('k') | Source/WebCore/html/HTMLTableElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/WebCore/html/HTMLOptionElement.cpp ('k') | Source/WebCore/html/HTMLTableElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698