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

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

Issue 2697923005: Remove unnecessary override of Node#cloneNode in ShadowRoot's WebIDL (Closed)
Patch Set: updated {mac,win} global-interface-listing-expected.txt Created 3 years, 10 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 | « third_party/WebKit/Source/core/dom/Attr.h ('k') | third_party/WebKit/Source/core/dom/Comment.h » ('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 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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2012 Apple Inc. All rights
7 * reserved. 7 * reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 else 88 else
89 m_standaloneValueOrAttachedLocalName = value; 89 m_standaloneValueOrAttachedLocalName = value;
90 } 90 }
91 91
92 void Attr::setNodeValue(const String& v) { 92 void Attr::setNodeValue(const String& v) {
93 // Attr uses AtomicString type for its value to save memory as there 93 // Attr uses AtomicString type for its value to save memory as there
94 // is duplication among Elements' attributes values. 94 // is duplication among Elements' attributes values.
95 setValue(v.isNull() ? emptyAtom : AtomicString(v)); 95 setValue(v.isNull() ? emptyAtom : AtomicString(v));
96 } 96 }
97 97
98 Node* Attr::cloneNode(bool /*deep*/) { 98 Node* Attr::cloneNode(bool /*deep*/, ExceptionState&) {
99 return new Attr(document(), m_name, value()); 99 return new Attr(document(), m_name, value());
100 } 100 }
101 101
102 void Attr::detachFromElementWithValue(const AtomicString& value) { 102 void Attr::detachFromElementWithValue(const AtomicString& value) {
103 DCHECK(m_element); 103 DCHECK(m_element);
104 m_standaloneValueOrAttachedLocalName = value; 104 m_standaloneValueOrAttachedLocalName = value;
105 m_element = nullptr; 105 m_element = nullptr;
106 } 106 }
107 107
108 void Attr::attachToElement(Element* element, 108 void Attr::attachToElement(Element* element,
109 const AtomicString& attachedLocalName) { 109 const AtomicString& attachedLocalName) {
110 DCHECK(!m_element); 110 DCHECK(!m_element);
111 m_element = element; 111 m_element = element;
112 m_standaloneValueOrAttachedLocalName = attachedLocalName; 112 m_standaloneValueOrAttachedLocalName = attachedLocalName;
113 } 113 }
114 114
115 DEFINE_TRACE(Attr) { 115 DEFINE_TRACE(Attr) {
116 visitor->trace(m_element); 116 visitor->trace(m_element);
117 Node::trace(visitor); 117 Node::trace(visitor);
118 } 118 }
119 119
120 DEFINE_TRACE_WRAPPERS(Attr) { 120 DEFINE_TRACE_WRAPPERS(Attr) {
121 visitor->traceWrappers(m_element); 121 visitor->traceWrappers(m_element);
122 Node::traceWrappers(visitor); 122 Node::traceWrappers(visitor);
123 } 123 }
124 124
125 } // namespace blink 125 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Attr.h ('k') | third_party/WebKit/Source/core/dom/Comment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698