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

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

Issue 9567036: Merge 109362 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 void HTMLScriptElement::insertedIntoDocument() 82 void HTMLScriptElement::insertedIntoDocument()
83 { 83 {
84 HTMLElement::insertedIntoDocument(); 84 HTMLElement::insertedIntoDocument();
85 ScriptElement::insertedIntoDocument(); 85 ScriptElement::insertedIntoDocument();
86 } 86 }
87 87
88 void HTMLScriptElement::setText(const String &value) 88 void HTMLScriptElement::setText(const String &value)
89 { 89 {
90 RefPtr<Node> protectFromMutationEvents(this);
91
90 ExceptionCode ec = 0; 92 ExceptionCode ec = 0;
91 int numChildren = childNodeCount(); 93 int numChildren = childNodeCount();
92 94
93 if (numChildren == 1 && firstChild()->isTextNode()) { 95 if (numChildren == 1 && firstChild()->isTextNode()) {
94 static_cast<Text*>(firstChild())->setData(value, ec); 96 static_cast<Text*>(firstChild())->setData(value, ec);
95 return; 97 return;
96 } 98 }
97 99
98 if (numChildren > 0) 100 if (numChildren > 0)
99 removeChildren(); 101 removeChildren();
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 178
177 dispatchEvent(Event::create(eventNames().loadEvent, false, false)); 179 dispatchEvent(Event::create(eventNames().loadEvent, false, false));
178 } 180 }
179 181
180 PassRefPtr<Element> HTMLScriptElement::cloneElementWithoutAttributesAndChildren( ) 182 PassRefPtr<Element> HTMLScriptElement::cloneElementWithoutAttributesAndChildren( )
181 { 183 {
182 return adoptRef(new HTMLScriptElement(tagQName(), document(), false, already Started())); 184 return adoptRef(new HTMLScriptElement(tagQName(), document(), false, already Started()));
183 } 185 }
184 186
185 } 187 }
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