| OLD | NEW |
| 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 514 |
| 515 bool ShouldPreload(WTF::Optional<Resource::Type>& type) const { | 515 bool ShouldPreload(WTF::Optional<Resource::Type>& type) const { |
| 516 if (url_to_load_.IsEmpty()) | 516 if (url_to_load_.IsEmpty()) |
| 517 return false; | 517 return false; |
| 518 if (!matched_) | 518 if (!matched_) |
| 519 return false; | 519 return false; |
| 520 if (Match(tag_impl_, linkTag)) | 520 if (Match(tag_impl_, linkTag)) |
| 521 return ShouldPreloadLink(type); | 521 return ShouldPreloadLink(type); |
| 522 if (Match(tag_impl_, inputTag) && !input_is_image_) | 522 if (Match(tag_impl_, inputTag) && !input_is_image_) |
| 523 return false; | 523 return false; |
| 524 ScriptType script_type = ScriptType::kClassic; |
| 524 if (Match(tag_impl_, scriptTag) && | 525 if (Match(tag_impl_, scriptTag) && |
| 525 !ScriptLoader::IsValidScriptTypeAndLanguage( | 526 !ScriptLoader::IsValidScriptTypeAndLanguage( |
| 526 type_attribute_value_, language_attribute_value_, | 527 type_attribute_value_, language_attribute_value_, |
| 527 ScriptLoader::kAllowLegacyTypeInTypeAttribute)) { | 528 ScriptLoader::kAllowLegacyTypeInTypeAttribute, script_type)) { |
| 528 return false; | 529 return false; |
| 529 } | 530 } |
| 530 return true; | 531 return true; |
| 531 } | 532 } |
| 532 | 533 |
| 533 void SetCrossOrigin(const String& cors_setting) { | 534 void SetCrossOrigin(const String& cors_setting) { |
| 534 cross_origin_ = GetCrossOriginAttributeValue(cors_setting); | 535 cross_origin_ = GetCrossOriginAttributeValue(cors_setting); |
| 535 } | 536 } |
| 536 | 537 |
| 537 void SetNonce(const String& nonce) { nonce_ = nonce; } | 538 void SetNonce(const String& nonce) { nonce_ = nonce; } |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 default_viewport_min_width = document->ViewportDefaultMinWidth(); | 936 default_viewport_min_width = document->ViewportDefaultMinWidth(); |
| 936 viewport_meta_zero_values_quirk = | 937 viewport_meta_zero_values_quirk = |
| 937 document->GetSettings() && | 938 document->GetSettings() && |
| 938 document->GetSettings()->GetViewportMetaZeroValuesQuirk(); | 939 document->GetSettings()->GetViewportMetaZeroValuesQuirk(); |
| 939 viewport_meta_enabled = document->GetSettings() && | 940 viewport_meta_enabled = document->GetSettings() && |
| 940 document->GetSettings()->GetViewportMetaEnabled(); | 941 document->GetSettings()->GetViewportMetaEnabled(); |
| 941 referrer_policy = document->GetReferrerPolicy(); | 942 referrer_policy = document->GetReferrerPolicy(); |
| 942 } | 943 } |
| 943 | 944 |
| 944 } // namespace blink | 945 } // namespace blink |
| OLD | NEW |