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

Side by Side Diff: Source/core/dom/Attr.cpp

Issue 688933002: Make textContent trigger single DOMSubtreeModified event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test Created 6 years, 1 month 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
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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2012 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2012 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 treeScope().adoptIfNeeded(*textNode); 99 treeScope().adoptIfNeeded(*textNode);
100 setFirstChild(textNode.get()); 100 setFirstChild(textNode.get());
101 setLastChild(textNode.get()); 101 setLastChild(textNode.get());
102 } 102 }
103 } 103 }
104 104
105 void Attr::setValue(const AtomicString& value) 105 void Attr::setValue(const AtomicString& value)
106 { 106 {
107 EventQueueScope scope; 107 EventQueueScope scope;
108 m_ignoreChildrenChanged++; 108 m_ignoreChildrenChanged++;
109 removeChildren(); 109 removeChildren(false);
110 if (m_element) 110 if (m_element)
111 elementAttribute().setValue(value); 111 elementAttribute().setValue(value);
112 else 112 else
113 m_standaloneValueOrAttachedLocalName = value; 113 m_standaloneValueOrAttachedLocalName = value;
114 createTextChild(); 114 createTextChild();
115 m_ignoreChildrenChanged--; 115 m_ignoreChildrenChanged--;
116 116
117 QualifiedName name = qualifiedName(); 117 QualifiedName name = qualifiedName();
118 invalidateNodeListCachesInAncestors(&name, m_element); 118 invalidateNodeListCachesInAncestors(&name, m_element);
119 } 119 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 m_standaloneValueOrAttachedLocalName = attachedLocalName; 218 m_standaloneValueOrAttachedLocalName = attachedLocalName;
219 } 219 }
220 220
221 void Attr::trace(Visitor* visitor) 221 void Attr::trace(Visitor* visitor)
222 { 222 {
223 visitor->trace(m_element); 223 visitor->trace(m_element);
224 ContainerNode::trace(visitor); 224 ContainerNode::trace(visitor);
225 } 225 }
226 226
227 } 227 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698