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

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

Issue 15864004: Move create() methods from StylePropertySet to MutableStylePropertySet. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/Document.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 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 bool Attr::isId() const 183 bool Attr::isId() const
184 { 184 {
185 return qualifiedName().matches(document()->idAttributeName()); 185 return qualifiedName().matches(document()->idAttributeName());
186 } 186 }
187 187
188 CSSStyleDeclaration* Attr::style() 188 CSSStyleDeclaration* Attr::style()
189 { 189 {
190 // This function only exists to support the Obj-C bindings. 190 // This function only exists to support the Obj-C bindings.
191 if (!m_element || !m_element->isStyledElement()) 191 if (!m_element || !m_element->isStyledElement())
192 return 0; 192 return 0;
193 m_style = StylePropertySet::create(); 193 m_style = MutableStylePropertySet::create();
194 static_cast<StyledElement*>(m_element)->collectStyleForPresentationAttribute (qualifiedName(), value(), static_cast<MutableStylePropertySet*>(m_style.get())) ; 194 static_cast<StyledElement*>(m_element)->collectStyleForPresentationAttribute (qualifiedName(), value(), static_cast<MutableStylePropertySet*>(m_style.get())) ;
195 return m_style->ensureCSSStyleDeclaration(); 195 return m_style->ensureCSSStyleDeclaration();
196 } 196 }
197 197
198 const AtomicString& Attr::value() const 198 const AtomicString& Attr::value() const
199 { 199 {
200 if (m_element) 200 if (m_element)
201 return m_element->getAttribute(qualifiedName()); 201 return m_element->getAttribute(qualifiedName());
202 return m_standaloneValue; 202 return m_standaloneValue;
203 } 203 }
(...skipping 14 matching lines...) Expand all
218 } 218 }
219 219
220 void Attr::attachToElement(Element* element) 220 void Attr::attachToElement(Element* element)
221 { 221 {
222 ASSERT(!m_element); 222 ASSERT(!m_element);
223 m_element = element; 223 m_element = element;
224 m_standaloneValue = nullAtom; 224 m_standaloneValue = nullAtom;
225 } 225 }
226 226
227 } 227 }
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698