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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 } | 855 } |
856 } | 856 } |
857 | 857 |
858 template <typename Token> | 858 template <typename Token> |
859 void TokenPreloadScanner::updatePredictedBaseURL(const Token& token) { | 859 void TokenPreloadScanner::updatePredictedBaseURL(const Token& token) { |
860 ASSERT(m_predictedBaseElementURL.isEmpty()); | 860 ASSERT(m_predictedBaseElementURL.isEmpty()); |
861 if (const typename Token::Attribute* hrefAttribute = | 861 if (const typename Token::Attribute* hrefAttribute = |
862 token.getAttributeItem(hrefAttr)) { | 862 token.getAttributeItem(hrefAttr)) { |
863 KURL url(m_documentURL, stripLeadingAndTrailingHTMLSpaces( | 863 KURL url(m_documentURL, stripLeadingAndTrailingHTMLSpaces( |
864 hrefAttribute->value8BitIfNecessary())); | 864 hrefAttribute->value8BitIfNecessary())); |
865 m_predictedBaseElementURL = url.isValid() ? url.copy() : KURL(); | 865 m_predictedBaseElementURL = |
| 866 url.isValid() && !url.protocolIsData() ? url.copy() : KURL(); |
866 } | 867 } |
867 } | 868 } |
868 | 869 |
869 HTMLPreloadScanner::HTMLPreloadScanner( | 870 HTMLPreloadScanner::HTMLPreloadScanner( |
870 const HTMLParserOptions& options, | 871 const HTMLParserOptions& options, |
871 const KURL& documentURL, | 872 const KURL& documentURL, |
872 std::unique_ptr<CachedDocumentParameters> documentParameters, | 873 std::unique_ptr<CachedDocumentParameters> documentParameters, |
873 const MediaValuesCached::MediaValuesCachedData& mediaValuesCachedData) | 874 const MediaValuesCached::MediaValuesCachedData& mediaValuesCachedData) |
874 : m_scanner(documentURL, | 875 : m_scanner(documentURL, |
875 std::move(documentParameters), | 876 std::move(documentParameters), |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 defaultViewportMinWidth = document->viewportDefaultMinWidth(); | 926 defaultViewportMinWidth = document->viewportDefaultMinWidth(); |
926 viewportMetaZeroValuesQuirk = | 927 viewportMetaZeroValuesQuirk = |
927 document->settings() && | 928 document->settings() && |
928 document->settings()->getViewportMetaZeroValuesQuirk(); | 929 document->settings()->getViewportMetaZeroValuesQuirk(); |
929 viewportMetaEnabled = | 930 viewportMetaEnabled = |
930 document->settings() && document->settings()->getViewportMetaEnabled(); | 931 document->settings() && document->settings()->getViewportMetaEnabled(); |
931 referrerPolicy = document->getReferrerPolicy(); | 932 referrerPolicy = document->getReferrerPolicy(); |
932 } | 933 } |
933 | 934 |
934 } // namespace blink | 935 } // namespace blink |
OLD | NEW |