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

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

Issue 124643003: Remove Attr.isId and Attr.ownerElement. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bump unused use counter slot number due to conflict. Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Attr.h ('k') | Source/core/dom/Attr.idl » ('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 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 if (m_element) 181 if (m_element)
182 elementAttribute().setValue(newValue); 182 elementAttribute().setValue(newValue);
183 else 183 else
184 m_standaloneValue = newValue; 184 m_standaloneValue = newValue;
185 185
186 if (m_element) 186 if (m_element)
187 m_element->attributeChanged(qualifiedName(), newValue); 187 m_element->attributeChanged(qualifiedName(), newValue);
188 } 188 }
189 189
190 bool Attr::isId() const
191 {
192 return qualifiedName().matches(HTMLNames::idAttr);
193 }
194
195 const AtomicString& Attr::value() const 190 const AtomicString& Attr::value() const
196 { 191 {
197 if (m_element) 192 if (m_element)
198 return m_element->getAttribute(qualifiedName()); 193 return m_element->getAttribute(qualifiedName());
199 return m_standaloneValue; 194 return m_standaloneValue;
200 } 195 }
201 196
202 Attribute& Attr::elementAttribute() 197 Attribute& Attr::elementAttribute()
203 { 198 {
204 ASSERT(m_element); 199 ASSERT(m_element);
(...skipping 10 matching lines...) Expand all
215 } 210 }
216 211
217 void Attr::attachToElement(Element* element) 212 void Attr::attachToElement(Element* element)
218 { 213 {
219 ASSERT(!m_element); 214 ASSERT(!m_element);
220 m_element = element; 215 m_element = element;
221 m_standaloneValue = nullAtom; 216 m_standaloneValue = nullAtom;
222 } 217 }
223 218
224 } 219 }
OLDNEW
« no previous file with comments | « Source/core/dom/Attr.h ('k') | Source/core/dom/Attr.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698