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

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

Issue 2811793004: Rename EqualIgnoringCase*() to DeprecatedEqualIgnoringCase*() (Closed)
Patch Set: 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 2931 matching lines...) Expand 10 before | Expand all | Expand 10 after
2942 if (!exception_state.HadException() && node && node->IsTextNode()) 2942 if (!exception_state.HadException() && node && node->IsTextNode())
2943 MergeWithNextTextNode(ToText(node), exception_state); 2943 MergeWithNextTextNode(ToText(node), exception_state);
2944 2944
2945 if (!exception_state.HadException() && prev && prev->IsTextNode()) 2945 if (!exception_state.HadException() && prev && prev->IsTextNode())
2946 MergeWithNextTextNode(ToText(prev), exception_state); 2946 MergeWithNextTextNode(ToText(prev), exception_state);
2947 } 2947 }
2948 2948
2949 Node* Element::InsertAdjacent(const String& where, 2949 Node* Element::InsertAdjacent(const String& where,
2950 Node* new_child, 2950 Node* new_child,
2951 ExceptionState& exception_state) { 2951 ExceptionState& exception_state) {
2952 if (EqualIgnoringCase(where, "beforeBegin")) { 2952 if (DeprecatedEqualIgnoringCase(where, "beforeBegin")) {
2953 if (ContainerNode* parent = this->parentNode()) { 2953 if (ContainerNode* parent = this->parentNode()) {
2954 parent->InsertBefore(new_child, this, exception_state); 2954 parent->InsertBefore(new_child, this, exception_state);
2955 if (!exception_state.HadException()) 2955 if (!exception_state.HadException())
2956 return new_child; 2956 return new_child;
2957 } 2957 }
2958 return nullptr; 2958 return nullptr;
2959 } 2959 }
2960 2960
2961 if (EqualIgnoringCase(where, "afterBegin")) { 2961 if (DeprecatedEqualIgnoringCase(where, "afterBegin")) {
2962 InsertBefore(new_child, FirstChild(), exception_state); 2962 InsertBefore(new_child, FirstChild(), exception_state);
2963 return exception_state.HadException() ? nullptr : new_child; 2963 return exception_state.HadException() ? nullptr : new_child;
2964 } 2964 }
2965 2965
2966 if (EqualIgnoringCase(where, "beforeEnd")) { 2966 if (DeprecatedEqualIgnoringCase(where, "beforeEnd")) {
2967 AppendChild(new_child, exception_state); 2967 AppendChild(new_child, exception_state);
2968 return exception_state.HadException() ? nullptr : new_child; 2968 return exception_state.HadException() ? nullptr : new_child;
2969 } 2969 }
2970 2970
2971 if (EqualIgnoringCase(where, "afterEnd")) { 2971 if (DeprecatedEqualIgnoringCase(where, "afterEnd")) {
2972 if (ContainerNode* parent = this->parentNode()) { 2972 if (ContainerNode* parent = this->parentNode()) {
2973 parent->InsertBefore(new_child, nextSibling(), exception_state); 2973 parent->InsertBefore(new_child, nextSibling(), exception_state);
2974 if (!exception_state.HadException()) 2974 if (!exception_state.HadException())
2975 return new_child; 2975 return new_child;
2976 } 2976 }
2977 return nullptr; 2977 return nullptr;
2978 } 2978 }
2979 2979
2980 exception_state.ThrowDOMException( 2980 exception_state.ThrowDOMException(
2981 kSyntaxError, "The value provided ('" + where + 2981 kSyntaxError, "The value provided ('" + where +
(...skipping 28 matching lines...) Expand all
3010 if (auto* data = ResizeObserverData()) { 3010 if (auto* data = ResizeObserverData()) {
3011 for (auto& observation : data->Values()) 3011 for (auto& observation : data->Values())
3012 observation->ElementSizeChanged(); 3012 observation->ElementSizeChanged();
3013 } 3013 }
3014 } 3014 }
3015 3015
3016 // Step 1 of http://domparsing.spec.whatwg.org/#insertadjacenthtml() 3016 // Step 1 of http://domparsing.spec.whatwg.org/#insertadjacenthtml()
3017 static Element* ContextElementForInsertion(const String& where, 3017 static Element* ContextElementForInsertion(const String& where,
3018 Element* element, 3018 Element* element,
3019 ExceptionState& exception_state) { 3019 ExceptionState& exception_state) {
3020 if (EqualIgnoringCase(where, "beforeBegin") || 3020 if (DeprecatedEqualIgnoringCase(where, "beforeBegin") ||
3021 EqualIgnoringCase(where, "afterEnd")) { 3021 DeprecatedEqualIgnoringCase(where, "afterEnd")) {
3022 Element* parent = element->parentElement(); 3022 Element* parent = element->parentElement();
3023 if (!parent) { 3023 if (!parent) {
3024 exception_state.ThrowDOMException(kNoModificationAllowedError, 3024 exception_state.ThrowDOMException(kNoModificationAllowedError,
3025 "The element has no parent."); 3025 "The element has no parent.");
3026 return nullptr; 3026 return nullptr;
3027 } 3027 }
3028 return parent; 3028 return parent;
3029 } 3029 }
3030 if (EqualIgnoringCase(where, "afterBegin") || 3030 if (DeprecatedEqualIgnoringCase(where, "afterBegin") ||
3031 EqualIgnoringCase(where, "beforeEnd")) 3031 DeprecatedEqualIgnoringCase(where, "beforeEnd"))
3032 return element; 3032 return element;
3033 exception_state.ThrowDOMException( 3033 exception_state.ThrowDOMException(
3034 kSyntaxError, "The value provided ('" + where + 3034 kSyntaxError, "The value provided ('" + where +
3035 "') is not one of 'beforeBegin', 'afterBegin', " 3035 "') is not one of 'beforeBegin', 'afterBegin', "
3036 "'beforeEnd', or 'afterEnd'."); 3036 "'beforeEnd', or 'afterEnd'.");
3037 return nullptr; 3037 return nullptr;
3038 } 3038 }
3039 3039
3040 Element* Element::insertAdjacentElement(const String& where, 3040 Element* Element::insertAdjacentElement(const String& where,
3041 Element* new_child, 3041 Element* new_child,
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
3654 void Element::requestPointerLock() { 3654 void Element::requestPointerLock() {
3655 if (GetDocument().GetPage()) 3655 if (GetDocument().GetPage())
3656 GetDocument().GetPage()->GetPointerLockController().RequestPointerLock( 3656 GetDocument().GetPage()->GetPointerLockController().RequestPointerLock(
3657 this); 3657 this);
3658 } 3658 }
3659 3659
3660 SpellcheckAttributeState Element::GetSpellcheckAttributeState() const { 3660 SpellcheckAttributeState Element::GetSpellcheckAttributeState() const {
3661 const AtomicString& value = FastGetAttribute(spellcheckAttr); 3661 const AtomicString& value = FastGetAttribute(spellcheckAttr);
3662 if (value == g_null_atom) 3662 if (value == g_null_atom)
3663 return kSpellcheckAttributeDefault; 3663 return kSpellcheckAttributeDefault;
3664 if (EqualIgnoringCase(value, "true") || EqualIgnoringCase(value, "")) 3664 if (DeprecatedEqualIgnoringCase(value, "true") ||
3665 DeprecatedEqualIgnoringCase(value, ""))
3665 return kSpellcheckAttributeTrue; 3666 return kSpellcheckAttributeTrue;
3666 if (EqualIgnoringCase(value, "false")) 3667 if (DeprecatedEqualIgnoringCase(value, "false"))
3667 return kSpellcheckAttributeFalse; 3668 return kSpellcheckAttributeFalse;
3668 3669
3669 return kSpellcheckAttributeDefault; 3670 return kSpellcheckAttributeDefault;
3670 } 3671 }
3671 3672
3672 bool Element::IsSpellCheckingEnabled() const { 3673 bool Element::IsSpellCheckingEnabled() const {
3673 for (const Element* element = this; element; 3674 for (const Element* element = this; element;
3674 element = element->ParentOrShadowHostElement()) { 3675 element = element->ParentOrShadowHostElement()) {
3675 switch (element->GetSpellcheckAttributeState()) { 3676 switch (element->GetSpellcheckAttributeState()) {
3676 case kSpellcheckAttributeTrue: 3677 case kSpellcheckAttributeTrue:
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
4342 } 4343 }
4343 4344
4344 DEFINE_TRACE_WRAPPERS(Element) { 4345 DEFINE_TRACE_WRAPPERS(Element) {
4345 if (HasRareData()) { 4346 if (HasRareData()) {
4346 visitor->TraceWrappers(GetElementRareData()); 4347 visitor->TraceWrappers(GetElementRareData());
4347 } 4348 }
4348 ContainerNode::TraceWrappers(visitor); 4349 ContainerNode::TraceWrappers(visitor);
4349 } 4350 }
4350 4351
4351 } // namespace blink 4352 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698