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

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

Issue 2806263002: Rename blink::AtomicString::Lower() to DeprecatedLower(). (Closed)
Patch Set: Update a comment Created 3 years, 8 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
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 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * (C) 2007 Eric Seidel (eric@webkit.org) 9 * (C) 2007 Eric Seidel (eric@webkit.org)
10 * 10 *
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 ExceptionState& exception_state) { 1236 ExceptionState& exception_state) {
1237 if (!Document::IsValidName(local_name)) { 1237 if (!Document::IsValidName(local_name)) {
1238 exception_state.ThrowDOMException( 1238 exception_state.ThrowDOMException(
1239 kInvalidCharacterError, 1239 kInvalidCharacterError,
1240 "'" + local_name + "' is not a valid attribute name."); 1240 "'" + local_name + "' is not a valid attribute name.");
1241 return; 1241 return;
1242 } 1242 }
1243 1243
1244 SynchronizeAttribute(local_name); 1244 SynchronizeAttribute(local_name);
1245 const AtomicString& case_adjusted_local_name = 1245 const AtomicString& case_adjusted_local_name =
1246 ShouldIgnoreAttributeCase() ? local_name.Lower() : local_name; 1246 ShouldIgnoreAttributeCase() ? local_name.DeprecatedLower() : local_name;
1247 1247
1248 if (!GetElementData()) { 1248 if (!GetElementData()) {
1249 SetAttributeInternal( 1249 SetAttributeInternal(
1250 kNotFound, 1250 kNotFound,
1251 QualifiedName(g_null_atom, case_adjusted_local_name, g_null_atom), 1251 QualifiedName(g_null_atom, case_adjusted_local_name, g_null_atom),
1252 value, kNotInSynchronizationOfLazyAttribute); 1252 value, kNotInSynchronizationOfLazyAttribute);
1253 return; 1253 return;
1254 } 1254 }
1255 1255
1256 AttributeCollection attributes = GetElementData()->Attributes(); 1256 AttributeCollection attributes = GetElementData()->Attributes();
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
2622 WillModifyAttribute(name, g_null_atom, value); 2622 WillModifyAttribute(name, g_null_atom, value);
2623 EnsureUniqueElementData().Attributes().Append(name, value); 2623 EnsureUniqueElementData().Attributes().Append(name, value);
2624 if (!in_synchronization_of_lazy_attribute) 2624 if (!in_synchronization_of_lazy_attribute)
2625 DidAddAttribute(name, value); 2625 DidAddAttribute(name, value);
2626 } 2626 }
2627 2627
2628 void Element::removeAttribute(const AtomicString& name) { 2628 void Element::removeAttribute(const AtomicString& name) {
2629 if (!GetElementData()) 2629 if (!GetElementData())
2630 return; 2630 return;
2631 2631
2632 AtomicString local_name = ShouldIgnoreAttributeCase() ? name.Lower() : name; 2632 AtomicString local_name =
2633 ShouldIgnoreAttributeCase() ? name.DeprecatedLower() : name;
2633 size_t index = GetElementData()->Attributes().FindIndex(local_name, false); 2634 size_t index = GetElementData()->Attributes().FindIndex(local_name, false);
2634 if (index == kNotFound) { 2635 if (index == kNotFound) {
2635 if (UNLIKELY(local_name == styleAttr) && 2636 if (UNLIKELY(local_name == styleAttr) &&
2636 GetElementData()->style_attribute_is_dirty_ && IsStyledElement()) 2637 GetElementData()->style_attribute_is_dirty_ && IsStyledElement())
2637 RemoveAllInlineStyleProperties(); 2638 RemoveAllInlineStyleProperties();
2638 return; 2639 return;
2639 } 2640 }
2640 2641
2641 RemoveAttributeInternal(index, kNotInSynchronizationOfLazyAttribute); 2642 RemoveAttributeInternal(index, kNotInSynchronizationOfLazyAttribute);
2642 } 2643 }
(...skipping 24 matching lines...) Expand all
2667 if (!attribute) 2668 if (!attribute)
2668 return nullptr; 2669 return nullptr;
2669 return EnsureAttr(attribute->GetName()); 2670 return EnsureAttr(attribute->GetName());
2670 } 2671 }
2671 2672
2672 bool Element::hasAttribute(const AtomicString& local_name) const { 2673 bool Element::hasAttribute(const AtomicString& local_name) const {
2673 if (!GetElementData()) 2674 if (!GetElementData())
2674 return false; 2675 return false;
2675 SynchronizeAttribute(local_name); 2676 SynchronizeAttribute(local_name);
2676 return GetElementData()->Attributes().FindIndex( 2677 return GetElementData()->Attributes().FindIndex(
2677 ShouldIgnoreAttributeCase() ? local_name.Lower() : local_name, 2678 ShouldIgnoreAttributeCase() ? local_name.DeprecatedLower()
2679 : local_name,
2678 false) != kNotFound; 2680 false) != kNotFound;
2679 } 2681 }
2680 2682
2681 bool Element::hasAttributeNS(const AtomicString& namespace_uri, 2683 bool Element::hasAttributeNS(const AtomicString& namespace_uri,
2682 const AtomicString& local_name) const { 2684 const AtomicString& local_name) const {
2683 if (!GetElementData()) 2685 if (!GetElementData())
2684 return false; 2686 return false;
2685 QualifiedName q_name(g_null_atom, local_name, namespace_uri); 2687 QualifiedName q_name(g_null_atom, local_name, namespace_uri);
2686 SynchronizeAttribute(q_name); 2688 SynchronizeAttribute(q_name);
2687 return GetElementData()->Attributes().Find(q_name); 2689 return GetElementData()->Attributes().Find(q_name);
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after
4340 } 4342 }
4341 4343
4342 DEFINE_TRACE_WRAPPERS(Element) { 4344 DEFINE_TRACE_WRAPPERS(Element) {
4343 if (HasRareData()) { 4345 if (HasRareData()) {
4344 visitor->TraceWrappers(GetElementRareData()); 4346 visitor->TraceWrappers(GetElementRareData());
4345 } 4347 }
4346 ContainerNode::TraceWrappers(visitor); 4348 ContainerNode::TraceWrappers(visitor);
4347 } 4349 }
4348 4350
4349 } // namespace blink 4351 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698