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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 m_matched &= mediaAttributeMatches(*m_mediaValues, attributeValue); | 349 m_matched &= mediaAttributeMatches(*m_mediaValues, attributeValue); |
350 } else if (match(attributeName, crossoriginAttr)) { | 350 } else if (match(attributeName, crossoriginAttr)) { |
351 setCrossOrigin(attributeValue); | 351 setCrossOrigin(attributeValue); |
352 } else if (match(attributeName, nonceAttr)) { | 352 } else if (match(attributeName, nonceAttr)) { |
353 setNonce(attributeValue); | 353 setNonce(attributeValue); |
354 } else if (match(attributeName, asAttr)) { | 354 } else if (match(attributeName, asAttr)) { |
355 m_asAttributeValue = attributeValue; | 355 m_asAttributeValue = attributeValue; |
356 } else if (match(attributeName, typeAttr)) { | 356 } else if (match(attributeName, typeAttr)) { |
357 m_matched &= MIMETypeRegistry::isSupportedStyleSheetMIMEType( | 357 m_matched &= MIMETypeRegistry::isSupportedStyleSheetMIMEType( |
358 ContentType(attributeValue).type()); | 358 ContentType(attributeValue).type()); |
| 359 } else if (!m_referrerPolicySet && |
| 360 match(attributeName, referrerpolicyAttr) && |
| 361 !attributeValue.isNull()) { |
| 362 m_referrerPolicySet = true; |
| 363 SecurityPolicy::referrerPolicyFromString(attributeValue, |
| 364 &m_referrerPolicy); |
359 } | 365 } |
360 } | 366 } |
361 | 367 |
362 template <typename NameType> | 368 template <typename NameType> |
363 void processInputAttribute(const NameType& attributeName, | 369 void processInputAttribute(const NameType& attributeName, |
364 const String& attributeValue) { | 370 const String& attributeValue) { |
365 // FIXME - Don't set type multiple times. | 371 // FIXME - Don't set type multiple times. |
366 if (match(attributeName, srcAttr)) | 372 if (match(attributeName, srcAttr)) |
367 setUrlToLoad(attributeValue, DisallowURLReplacement); | 373 setUrlToLoad(attributeValue, DisallowURLReplacement); |
368 else if (match(attributeName, typeAttr)) | 374 else if (match(attributeName, typeAttr)) |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 defaultViewportMinWidth = document->viewportDefaultMinWidth(); | 898 defaultViewportMinWidth = document->viewportDefaultMinWidth(); |
893 viewportMetaZeroValuesQuirk = | 899 viewportMetaZeroValuesQuirk = |
894 document->settings() && | 900 document->settings() && |
895 document->settings()->viewportMetaZeroValuesQuirk(); | 901 document->settings()->viewportMetaZeroValuesQuirk(); |
896 viewportMetaEnabled = | 902 viewportMetaEnabled = |
897 document->settings() && document->settings()->viewportMetaEnabled(); | 903 document->settings() && document->settings()->viewportMetaEnabled(); |
898 referrerPolicy = document->getReferrerPolicy(); | 904 referrerPolicy = document->getReferrerPolicy(); |
899 } | 905 } |
900 | 906 |
901 } // namespace blink | 907 } // namespace blink |
OLD | NEW |