| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 if (match(tagImpl, scriptTag)) | 98 if (match(tagImpl, scriptTag)) |
| 99 return scriptTag.localName(); | 99 return scriptTag.localName(); |
| 100 if (match(tagImpl, videoTag)) | 100 if (match(tagImpl, videoTag)) |
| 101 return videoTag.localName(); | 101 return videoTag.localName(); |
| 102 ASSERT_NOT_REACHED(); | 102 ASSERT_NOT_REACHED(); |
| 103 return emptyString(); | 103 return emptyString(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 static bool mediaAttributeMatches(const MediaValuesCached& mediaValues, const St
ring& attributeValue) | 106 static bool mediaAttributeMatches(const MediaValuesCached& mediaValues, const St
ring& attributeValue) |
| 107 { | 107 { |
| 108 RefPtrWillBeRawPtr<MediaQuerySet> mediaQueries = MediaQuerySet::createOffMai
nThread(attributeValue); | 108 RawPtr<MediaQuerySet> mediaQueries = MediaQuerySet::createOffMainThread(attr
ibuteValue); |
| 109 MediaQueryEvaluator mediaQueryEvaluator(mediaValues); | 109 MediaQueryEvaluator mediaQueryEvaluator(mediaValues); |
| 110 return mediaQueryEvaluator.eval(mediaQueries.get()); | 110 return mediaQueryEvaluator.eval(mediaQueries.get()); |
| 111 } | 111 } |
| 112 | 112 |
| 113 class TokenPreloadScanner::StartTagScanner { | 113 class TokenPreloadScanner::StartTagScanner { |
| 114 STACK_ALLOCATED(); | 114 STACK_ALLOCATED(); |
| 115 public: | 115 public: |
| 116 StartTagScanner(const StringImpl* tagImpl, PassRefPtrWillBeRawPtr<MediaValue
sCached> mediaValues) | 116 StartTagScanner(const StringImpl* tagImpl, RawPtr<MediaValuesCached> mediaVa
lues) |
| 117 : m_tagImpl(tagImpl) | 117 : m_tagImpl(tagImpl) |
| 118 , m_linkIsStyleSheet(false) | 118 , m_linkIsStyleSheet(false) |
| 119 , m_linkTypeIsMissingOrSupportedStyleSheet(true) | 119 , m_linkTypeIsMissingOrSupportedStyleSheet(true) |
| 120 , m_linkIsPreconnect(false) | 120 , m_linkIsPreconnect(false) |
| 121 , m_linkIsPreload(false) | 121 , m_linkIsPreload(false) |
| 122 , m_linkIsImport(false) | 122 , m_linkIsImport(false) |
| 123 , m_matchedMediaAttribute(true) | 123 , m_matchedMediaAttribute(true) |
| 124 , m_inputIsImage(false) | 124 , m_inputIsImage(false) |
| 125 , m_sourceSize(0) | 125 , m_sourceSize(0) |
| 126 , m_sourceSizeSet(false) | 126 , m_sourceSizeSet(false) |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 bool m_linkIsImport; | 434 bool m_linkIsImport; |
| 435 bool m_matchedMediaAttribute; | 435 bool m_matchedMediaAttribute; |
| 436 bool m_inputIsImage; | 436 bool m_inputIsImage; |
| 437 String m_imgSrcUrl; | 437 String m_imgSrcUrl; |
| 438 String m_srcsetAttributeValue; | 438 String m_srcsetAttributeValue; |
| 439 String m_asAttributeValue; | 439 String m_asAttributeValue; |
| 440 float m_sourceSize; | 440 float m_sourceSize; |
| 441 bool m_sourceSizeSet; | 441 bool m_sourceSizeSet; |
| 442 FetchRequest::DeferOption m_defer; | 442 FetchRequest::DeferOption m_defer; |
| 443 CrossOriginAttributeValue m_crossOrigin; | 443 CrossOriginAttributeValue m_crossOrigin; |
| 444 RefPtrWillBeMember<MediaValuesCached> m_mediaValues; | 444 Member<MediaValuesCached> m_mediaValues; |
| 445 bool m_referrerPolicySet; | 445 bool m_referrerPolicySet; |
| 446 ReferrerPolicy m_referrerPolicy; | 446 ReferrerPolicy m_referrerPolicy; |
| 447 IntegrityMetadataSet m_integrityMetadata; | 447 IntegrityMetadataSet m_integrityMetadata; |
| 448 }; | 448 }; |
| 449 | 449 |
| 450 TokenPreloadScanner::TokenPreloadScanner(const KURL& documentURL, PassOwnPtr<Cac
hedDocumentParameters> documentParameters, const MediaValuesCached::MediaValuesC
achedData& mediaValuesCachedData) | 450 TokenPreloadScanner::TokenPreloadScanner(const KURL& documentURL, PassOwnPtr<Cac
hedDocumentParameters> documentParameters, const MediaValuesCached::MediaValuesC
achedData& mediaValuesCachedData) |
| 451 : m_documentURL(documentURL) | 451 : m_documentURL(documentURL) |
| 452 , m_inStyle(false) | 452 , m_inStyle(false) |
| 453 , m_inPicture(false) | 453 , m_inPicture(false) |
| 454 , m_isAppCacheEnabled(false) | 454 , m_isAppCacheEnabled(false) |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 ASSERT(isMainThread()); | 692 ASSERT(isMainThread()); |
| 693 ASSERT(document); | 693 ASSERT(document); |
| 694 doHtmlPreloadScanning = !document->settings() || document->settings()->doHtm
lPreloadScanning(); | 694 doHtmlPreloadScanning = !document->settings() || document->settings()->doHtm
lPreloadScanning(); |
| 695 defaultViewportMinWidth = document->viewportDefaultMinWidth(); | 695 defaultViewportMinWidth = document->viewportDefaultMinWidth(); |
| 696 viewportMetaZeroValuesQuirk = document->settings() && document->settings()->
viewportMetaZeroValuesQuirk(); | 696 viewportMetaZeroValuesQuirk = document->settings() && document->settings()->
viewportMetaZeroValuesQuirk(); |
| 697 viewportMetaEnabled = document->settings() && document->settings()->viewport
MetaEnabled(); | 697 viewportMetaEnabled = document->settings() && document->settings()->viewport
MetaEnabled(); |
| 698 referrerPolicy = ReferrerPolicyDefault; | 698 referrerPolicy = ReferrerPolicyDefault; |
| 699 } | 699 } |
| 700 | 700 |
| 701 } // namespace blink | 701 } // namespace blink |
| OLD | NEW |