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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp

Issue 2476943002: Ensure video poster preloads use the crossorigin attribute (Closed)
Patch Set: add tests Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/preload/preload-video-cors.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 m_matched &= MIMETypeRegistry::isSupportedImagePrefixedMIMEType( 401 m_matched &= MIMETypeRegistry::isSupportedImagePrefixedMIMEType(
402 ContentType(attributeValue).type()); 402 ContentType(attributeValue).type());
403 } 403 }
404 } 404 }
405 405
406 template <typename NameType> 406 template <typename NameType>
407 void processVideoAttribute(const NameType& attributeName, 407 void processVideoAttribute(const NameType& attributeName,
408 const String& attributeValue) { 408 const String& attributeValue) {
409 if (match(attributeName, posterAttr)) 409 if (match(attributeName, posterAttr))
410 setUrlToLoad(attributeValue, DisallowURLReplacement); 410 setUrlToLoad(attributeValue, DisallowURLReplacement);
411 else if (match(attributeName, crossoriginAttr))
412 setCrossOrigin(attributeValue);
411 } 413 }
412 414
413 template <typename NameType> 415 template <typename NameType>
414 void processAttribute(const NameType& attributeName, 416 void processAttribute(const NameType& attributeName,
415 const String& attributeValue) { 417 const String& attributeValue) {
416 if (match(attributeName, charsetAttr)) 418 if (match(attributeName, charsetAttr))
417 m_charset = attributeValue; 419 m_charset = attributeValue;
418 420
419 if (match(m_tagImpl, scriptTag)) 421 if (match(m_tagImpl, scriptTag))
420 processScriptAttribute(attributeName, attributeValue); 422 processScriptAttribute(attributeName, attributeValue);
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 defaultViewportMinWidth = document->viewportDefaultMinWidth(); 903 defaultViewportMinWidth = document->viewportDefaultMinWidth();
902 viewportMetaZeroValuesQuirk = 904 viewportMetaZeroValuesQuirk =
903 document->settings() && 905 document->settings() &&
904 document->settings()->viewportMetaZeroValuesQuirk(); 906 document->settings()->viewportMetaZeroValuesQuirk();
905 viewportMetaEnabled = 907 viewportMetaEnabled =
906 document->settings() && document->settings()->viewportMetaEnabled(); 908 document->settings() && document->settings()->viewportMetaEnabled();
907 referrerPolicy = document->getReferrerPolicy(); 909 referrerPolicy = document->getReferrerPolicy();
908 } 910 }
909 911
910 } // namespace blink 912 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/preload/preload-video-cors.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698