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

Side by Side Diff: third_party/WebKit/Source/core/html/TextControlElement.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 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 } 641 }
642 642
643 const AtomicString& TextControlElement::autocapitalize() const { 643 const AtomicString& TextControlElement::autocapitalize() const {
644 DEFINE_STATIC_LOCAL(const AtomicString, off, ("off")); 644 DEFINE_STATIC_LOCAL(const AtomicString, off, ("off"));
645 DEFINE_STATIC_LOCAL(const AtomicString, none, ("none")); 645 DEFINE_STATIC_LOCAL(const AtomicString, none, ("none"));
646 DEFINE_STATIC_LOCAL(const AtomicString, characters, ("characters")); 646 DEFINE_STATIC_LOCAL(const AtomicString, characters, ("characters"));
647 DEFINE_STATIC_LOCAL(const AtomicString, words, ("words")); 647 DEFINE_STATIC_LOCAL(const AtomicString, words, ("words"));
648 DEFINE_STATIC_LOCAL(const AtomicString, sentences, ("sentences")); 648 DEFINE_STATIC_LOCAL(const AtomicString, sentences, ("sentences"));
649 649
650 const AtomicString& value = FastGetAttribute(autocapitalizeAttr); 650 const AtomicString& value = FastGetAttribute(autocapitalizeAttr);
651 if (EqualIgnoringCase(value, none) || EqualIgnoringCase(value, off)) 651 if (DeprecatedEqualIgnoringCase(value, none) ||
652 DeprecatedEqualIgnoringCase(value, off))
652 return none; 653 return none;
653 if (EqualIgnoringCase(value, characters)) 654 if (DeprecatedEqualIgnoringCase(value, characters))
654 return characters; 655 return characters;
655 if (EqualIgnoringCase(value, words)) 656 if (DeprecatedEqualIgnoringCase(value, words))
656 return words; 657 return words;
657 if (EqualIgnoringCase(value, sentences)) 658 if (DeprecatedEqualIgnoringCase(value, sentences))
658 return sentences; 659 return sentences;
659 660
660 // Invalid or missing value. 661 // Invalid or missing value.
661 return DefaultAutocapitalize(); 662 return DefaultAutocapitalize();
662 } 663 }
663 664
664 void TextControlElement::setAutocapitalize(const AtomicString& autocapitalize) { 665 void TextControlElement::setAutocapitalize(const AtomicString& autocapitalize) {
665 setAttribute(autocapitalizeAttr, autocapitalize); 666 setAttribute(autocapitalizeAttr, autocapitalize);
666 } 667 }
667 668
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 } 930 }
930 931
931 String TextControlElement::DirectionForFormData() const { 932 String TextControlElement::DirectionForFormData() const {
932 for (const HTMLElement* element = this; element; 933 for (const HTMLElement* element = this; element;
933 element = Traversal<HTMLElement>::FirstAncestor(*element)) { 934 element = Traversal<HTMLElement>::FirstAncestor(*element)) {
934 const AtomicString& dir_attribute_value = 935 const AtomicString& dir_attribute_value =
935 element->FastGetAttribute(dirAttr); 936 element->FastGetAttribute(dirAttr);
936 if (dir_attribute_value.IsNull()) 937 if (dir_attribute_value.IsNull())
937 continue; 938 continue;
938 939
939 if (EqualIgnoringCase(dir_attribute_value, "rtl") || 940 if (DeprecatedEqualIgnoringCase(dir_attribute_value, "rtl") ||
940 EqualIgnoringCase(dir_attribute_value, "ltr")) 941 DeprecatedEqualIgnoringCase(dir_attribute_value, "ltr"))
941 return dir_attribute_value; 942 return dir_attribute_value;
942 943
943 if (EqualIgnoringCase(dir_attribute_value, "auto")) { 944 if (DeprecatedEqualIgnoringCase(dir_attribute_value, "auto")) {
944 bool is_auto; 945 bool is_auto;
945 TextDirection text_direction = 946 TextDirection text_direction =
946 element->DirectionalityIfhasDirAutoAttribute(is_auto); 947 element->DirectionalityIfhasDirAutoAttribute(is_auto);
947 return text_direction == TextDirection::kRtl ? "rtl" : "ltr"; 948 return text_direction == TextDirection::kRtl ? "rtl" : "ltr";
948 } 949 }
949 } 950 }
950 951
951 return "ltr"; 952 return "ltr";
952 } 953 }
953 954
954 HTMLElement* TextControlElement::InnerEditorElement() const { 955 HTMLElement* TextControlElement::InnerEditorElement() const {
955 return ToHTMLElementOrDie( 956 return ToHTMLElementOrDie(
956 UserAgentShadowRoot()->GetElementById(ShadowElementNames::InnerEditor())); 957 UserAgentShadowRoot()->GetElementById(ShadowElementNames::InnerEditor()));
957 } 958 }
958 959
959 void TextControlElement::CopyNonAttributePropertiesFromElement( 960 void TextControlElement::CopyNonAttributePropertiesFromElement(
960 const Element& source) { 961 const Element& source) {
961 const TextControlElement& source_element = 962 const TextControlElement& source_element =
962 static_cast<const TextControlElement&>(source); 963 static_cast<const TextControlElement&>(source);
963 last_change_was_user_edit_ = source_element.last_change_was_user_edit_; 964 last_change_was_user_edit_ = source_element.last_change_was_user_edit_;
964 HTMLFormControlElement::CopyNonAttributePropertiesFromElement(source); 965 HTMLFormControlElement::CopyNonAttributePropertiesFromElement(source);
965 } 966 }
966 967
967 } // namespace blink 968 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/LinkRelAttribute.cpp ('k') | third_party/WebKit/Source/core/html/forms/ColorInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698