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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ 3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/
4 * Copyright (C) 2010 Google Inc. All Rights Reserved. 4 * Copyright (C) 2010 Google Inc. All Rights Reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 SecurityPolicy::ReferrerPolicyFromString( 365 SecurityPolicy::ReferrerPolicyFromString(
366 attribute_value, kDoNotSupportReferrerPolicyLegacyKeywords, 366 attribute_value, kDoNotSupportReferrerPolicyLegacyKeywords,
367 &referrer_policy_); 367 &referrer_policy_);
368 } 368 }
369 } 369 }
370 370
371 template <typename NameType> 371 template <typename NameType>
372 void ProcessInputAttribute(const NameType& attribute_name, 372 void ProcessInputAttribute(const NameType& attribute_name,
373 const String& attribute_value) { 373 const String& attribute_value) {
374 // FIXME - Don't set type multiple times. 374 // FIXME - Don't set type multiple times.
375 if (Match(attribute_name, srcAttr)) 375 if (Match(attribute_name, srcAttr)) {
376 SetUrlToLoad(attribute_value, kDisallowURLReplacement); 376 SetUrlToLoad(attribute_value, kDisallowURLReplacement);
377 else if (Match(attribute_name, typeAttr)) 377 } else if (Match(attribute_name, typeAttr)) {
378 input_is_image_ = 378 input_is_image_ =
379 EqualIgnoringCase(attribute_value, InputTypeNames::image); 379 DeprecatedEqualIgnoringCase(attribute_value, InputTypeNames::image);
380 }
380 } 381 }
381 382
382 template <typename NameType> 383 template <typename NameType>
383 void ProcessSourceAttribute(const NameType& attribute_name, 384 void ProcessSourceAttribute(const NameType& attribute_name,
384 const String& attribute_value) { 385 const String& attribute_value) {
385 if (Match(attribute_name, srcsetAttr) && 386 if (Match(attribute_name, srcsetAttr) &&
386 srcset_image_candidate_.IsEmpty()) { 387 srcset_image_candidate_.IsEmpty()) {
387 srcset_attribute_value_ = attribute_value; 388 srcset_attribute_value_ = attribute_value;
388 srcset_image_candidate_ = BestFitSourceForSrcsetAttribute( 389 srcset_image_candidate_ = BestFitSourceForSrcsetAttribute(
389 media_values_->DevicePixelRatio(), source_size_, attribute_value); 390 media_values_->DevicePixelRatio(), source_size_, attribute_value);
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 if (!name_attribute) 675 if (!name_attribute)
675 return; 676 return;
676 677
677 String name_attribute_value(name_attribute->Value()); 678 String name_attribute_value(name_attribute->Value());
678 const typename Token::Attribute* content_attribute = 679 const typename Token::Attribute* content_attribute =
679 token.GetAttributeItem(contentAttr); 680 token.GetAttributeItem(contentAttr);
680 if (!content_attribute) 681 if (!content_attribute)
681 return; 682 return;
682 683
683 String content_attribute_value(content_attribute->Value()); 684 String content_attribute_value(content_attribute->Value());
684 if (EqualIgnoringCase(name_attribute_value, "viewport")) { 685 if (DeprecatedEqualIgnoringCase(name_attribute_value, "viewport")) {
685 HandleMetaViewport(content_attribute_value, document_parameters, 686 HandleMetaViewport(content_attribute_value, document_parameters,
686 media_values, viewport); 687 media_values, viewport);
687 return; 688 return;
688 } 689 }
689 690
690 if (EqualIgnoringCase(name_attribute_value, "referrer")) { 691 if (DeprecatedEqualIgnoringCase(name_attribute_value, "referrer")) {
691 HandleMetaReferrer(content_attribute_value, document_parameters, 692 HandleMetaReferrer(content_attribute_value, document_parameters,
692 css_scanner); 693 css_scanner);
693 } 694 }
694 } 695 }
695 696
696 // This method returns true for script source strings which will likely use 697 // This method returns true for script source strings which will likely use
697 // document.write to insert an external script. These scripts will be flagged 698 // document.write to insert an external script. These scripts will be flagged
698 // for evaluation via the DocumentWriteEvaluator, so it also dismisses scripts 699 // for evaluation via the DocumentWriteEvaluator, so it also dismisses scripts
699 // that will likely fail evaluation. These includes scripts that are too long, 700 // that will likely fail evaluation. These includes scripts that are too long,
700 // have looping constructs, or use non-determinism. Note that flagging occurs 701 // have looping constructs, or use non-determinism. Note that flagging occurs
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 if (!predicted_base_element_url_.IsEmpty()) 813 if (!predicted_base_element_url_.IsEmpty())
813 return; 814 return;
814 UpdatePredictedBaseURL(token); 815 UpdatePredictedBaseURL(token);
815 return; 816 return;
816 } 817 }
817 if (Match(tag_impl, metaTag)) { 818 if (Match(tag_impl, metaTag)) {
818 const typename Token::Attribute* equiv_attribute = 819 const typename Token::Attribute* equiv_attribute =
819 token.GetAttributeItem(http_equivAttr); 820 token.GetAttributeItem(http_equivAttr);
820 if (equiv_attribute) { 821 if (equiv_attribute) {
821 String equiv_attribute_value(equiv_attribute->Value()); 822 String equiv_attribute_value(equiv_attribute->Value());
822 if (EqualIgnoringCase(equiv_attribute_value, 823 if (DeprecatedEqualIgnoringCase(equiv_attribute_value,
823 "content-security-policy")) { 824 "content-security-policy")) {
824 *is_csp_meta_tag = true; 825 *is_csp_meta_tag = true;
825 } else if (EqualIgnoringCase(equiv_attribute_value, "accept-ch")) { 826 } else if (DeprecatedEqualIgnoringCase(equiv_attribute_value,
827 "accept-ch")) {
826 const typename Token::Attribute* content_attribute = 828 const typename Token::Attribute* content_attribute =
827 token.GetAttributeItem(contentAttr); 829 token.GetAttributeItem(contentAttr);
828 if (content_attribute) 830 if (content_attribute)
829 client_hints_preferences_.UpdateFromAcceptClientHintsHeader( 831 client_hints_preferences_.UpdateFromAcceptClientHintsHeader(
830 content_attribute->Value(), nullptr); 832 content_attribute->Value(), nullptr);
831 } 833 }
832 return; 834 return;
833 } 835 }
834 836
835 HandleMetaNameAttribute(token, document_parameters_.get(), 837 HandleMetaNameAttribute(token, document_parameters_.get(),
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 default_viewport_min_width = document->ViewportDefaultMinWidth(); 935 default_viewport_min_width = document->ViewportDefaultMinWidth();
934 viewport_meta_zero_values_quirk = 936 viewport_meta_zero_values_quirk =
935 document->GetSettings() && 937 document->GetSettings() &&
936 document->GetSettings()->GetViewportMetaZeroValuesQuirk(); 938 document->GetSettings()->GetViewportMetaZeroValuesQuirk();
937 viewport_meta_enabled = document->GetSettings() && 939 viewport_meta_enabled = document->GetSettings() &&
938 document->GetSettings()->GetViewportMetaEnabled(); 940 document->GetSettings()->GetViewportMetaEnabled();
939 referrer_policy = document->GetReferrerPolicy(); 941 referrer_policy = document->GetReferrerPolicy();
940 } 942 }
941 943
942 } // namespace blink 944 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698