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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.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, 2010 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2010 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 --reduced_length; 227 --reduced_length;
228 } 228 }
229 while (reduced_length && 229 while (reduced_length &&
230 IsHTMLSpace<UChar>(string[offset + reduced_length - 1])) 230 IsHTMLSpace<UChar>(string[offset + reduced_length - 1]))
231 --reduced_length; 231 --reduced_length;
232 232
233 return string.Substring(offset, reduced_length); 233 return string.Substring(offset, reduced_length);
234 } 234 }
235 235
236 void CSSPreloadScanner::EmitRule(const SegmentedString& source) { 236 void CSSPreloadScanner::EmitRule(const SegmentedString& source) {
237 if (EqualIgnoringCase(rule_, "import")) { 237 if (DeprecatedEqualIgnoringCase(rule_, "import")) {
238 String url = ParseCSSStringOrURL(rule_value_.ToString()); 238 String url = ParseCSSStringOrURL(rule_value_.ToString());
239 TextPosition position = 239 TextPosition position =
240 TextPosition(source.CurrentLine(), source.CurrentColumn()); 240 TextPosition(source.CurrentLine(), source.CurrentColumn());
241 auto request = PreloadRequest::CreateIfNeeded( 241 auto request = PreloadRequest::CreateIfNeeded(
242 FetchInitiatorTypeNames::css, position, url, 242 FetchInitiatorTypeNames::css, position, url,
243 *predicted_base_element_url_, Resource::kCSSStyleSheet, 243 *predicted_base_element_url_, Resource::kCSSStyleSheet,
244 referrer_policy_, PreloadRequest::kBaseUrlIsReferrer); 244 referrer_policy_, PreloadRequest::kBaseUrlIsReferrer);
245 if (request) { 245 if (request) {
246 // FIXME: Should this be including the charset in the preload request? 246 // FIXME: Should this be including the charset in the preload request?
247 requests_->push_back(std::move(request)); 247 requests_->push_back(std::move(request));
248 } 248 }
249 state_ = kInitial; 249 state_ = kInitial;
250 } else if (EqualIgnoringCase(rule_, "charset")) 250 } else if (DeprecatedEqualIgnoringCase(rule_, "charset"))
251 state_ = kInitial; 251 state_ = kInitial;
252 else 252 else
253 state_ = kDoneParsingImportRules; 253 state_ = kDoneParsingImportRules;
254 rule_.Clear(); 254 rule_.Clear();
255 rule_value_.Clear(); 255 rule_value_.Clear();
256 } 256 }
257 257
258 CSSPreloaderResourceClient::CSSPreloaderResourceClient( 258 CSSPreloaderResourceClient::CSSPreloaderResourceClient(
259 Resource* resource, 259 Resource* resource,
260 HTMLResourcePreloader* preloader) 260 HTMLResourcePreloader* preloader)
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 resource_.Clear(); 362 resource_.Clear();
363 } 363 }
364 364
365 DEFINE_TRACE(CSSPreloaderResourceClient) { 365 DEFINE_TRACE(CSSPreloaderResourceClient) {
366 visitor->Trace(preloader_); 366 visitor->Trace(preloader_);
367 visitor->Trace(resource_); 367 visitor->Trace(resource_);
368 StyleSheetResourceClient::Trace(visitor); 368 StyleSheetResourceClient::Trace(visitor);
369 } 369 }
370 370
371 } // namespace blink 371 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698