| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 return imgTag.localName(); | 115 return imgTag.localName(); |
| 116 if (match(tagImpl, inputTag)) | 116 if (match(tagImpl, inputTag)) |
| 117 return inputTag.localName(); | 117 return inputTag.localName(); |
| 118 if (match(tagImpl, linkTag)) | 118 if (match(tagImpl, linkTag)) |
| 119 return linkTag.localName(); | 119 return linkTag.localName(); |
| 120 if (match(tagImpl, scriptTag)) | 120 if (match(tagImpl, scriptTag)) |
| 121 return scriptTag.localName(); | 121 return scriptTag.localName(); |
| 122 if (match(tagImpl, videoTag)) | 122 if (match(tagImpl, videoTag)) |
| 123 return videoTag.localName(); | 123 return videoTag.localName(); |
| 124 NOTREACHED(); | 124 NOTREACHED(); |
| 125 return emptyString(); | 125 return emptyString; |
| 126 } | 126 } |
| 127 | 127 |
| 128 static bool mediaAttributeMatches(const MediaValuesCached& mediaValues, | 128 static bool mediaAttributeMatches(const MediaValuesCached& mediaValues, |
| 129 const String& attributeValue) { | 129 const String& attributeValue) { |
| 130 MediaQuerySet* mediaQueries = MediaQuerySet::create(attributeValue); | 130 MediaQuerySet* mediaQueries = MediaQuerySet::create(attributeValue); |
| 131 MediaQueryEvaluator mediaQueryEvaluator(mediaValues); | 131 MediaQueryEvaluator mediaQueryEvaluator(mediaValues); |
| 132 return mediaQueryEvaluator.eval(mediaQueries); | 132 return mediaQueryEvaluator.eval(mediaQueries); |
| 133 } | 133 } |
| 134 | 134 |
| 135 class TokenPreloadScanner::StartTagScanner { | 135 class TokenPreloadScanner::StartTagScanner { |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 String url = stripLeadingAndTrailingHTMLSpaces(value); | 436 String url = stripLeadingAndTrailingHTMLSpaces(value); |
| 437 if (url.isEmpty()) | 437 if (url.isEmpty()) |
| 438 return; | 438 return; |
| 439 m_urlToLoad = url; | 439 m_urlToLoad = url; |
| 440 } | 440 } |
| 441 | 441 |
| 442 const String& charset() const { | 442 const String& charset() const { |
| 443 // FIXME: Its not clear that this if is needed, the loader probably ignores | 443 // FIXME: Its not clear that this if is needed, the loader probably ignores |
| 444 // charset for image requests anyway. | 444 // charset for image requests anyway. |
| 445 if (match(m_tagImpl, imgTag) || match(m_tagImpl, videoTag)) | 445 if (match(m_tagImpl, imgTag) || match(m_tagImpl, videoTag)) |
| 446 return emptyString(); | 446 return emptyString; |
| 447 return m_charset; | 447 return m_charset; |
| 448 } | 448 } |
| 449 | 449 |
| 450 WTF::Optional<Resource::Type> resourceTypeForLinkPreload() const { | 450 WTF::Optional<Resource::Type> resourceTypeForLinkPreload() const { |
| 451 DCHECK(m_linkIsPreload); | 451 DCHECK(m_linkIsPreload); |
| 452 return LinkLoader::getResourceTypeFromAsAttribute(m_asAttributeValue); | 452 return LinkLoader::getResourceTypeFromAsAttribute(m_asAttributeValue); |
| 453 } | 453 } |
| 454 | 454 |
| 455 Resource::Type resourceType() const { | 455 Resource::Type resourceType() const { |
| 456 if (match(m_tagImpl, scriptTag)) { | 456 if (match(m_tagImpl, scriptTag)) { |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 defaultViewportMinWidth = document->viewportDefaultMinWidth(); | 922 defaultViewportMinWidth = document->viewportDefaultMinWidth(); |
| 923 viewportMetaZeroValuesQuirk = | 923 viewportMetaZeroValuesQuirk = |
| 924 document->settings() && | 924 document->settings() && |
| 925 document->settings()->getViewportMetaZeroValuesQuirk(); | 925 document->settings()->getViewportMetaZeroValuesQuirk(); |
| 926 viewportMetaEnabled = | 926 viewportMetaEnabled = |
| 927 document->settings() && document->settings()->getViewportMetaEnabled(); | 927 document->settings() && document->settings()->getViewportMetaEnabled(); |
| 928 referrerPolicy = document->getReferrerPolicy(); | 928 referrerPolicy = document->getReferrerPolicy(); |
| 929 } | 929 } |
| 930 | 930 |
| 931 } // namespace blink | 931 } // namespace blink |
| OLD | NEW |