| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 LinkRelAttribute::LinkRelAttribute(const String& rel) | 39 LinkRelAttribute::LinkRelAttribute(const String& rel) |
| 40 : m_iconType(InvalidIcon) | 40 : m_iconType(InvalidIcon) |
| 41 , m_isStyleSheet(false) | 41 , m_isStyleSheet(false) |
| 42 , m_isAlternate(false) | 42 , m_isAlternate(false) |
| 43 , m_isDNSPrefetch(false) | 43 , m_isDNSPrefetch(false) |
| 44 , m_isPreconnect(false) | 44 , m_isPreconnect(false) |
| 45 , m_isLinkPrefetch(false) | 45 , m_isLinkPrefetch(false) |
| 46 , m_isLinkSubresource(false) | 46 , m_isLinkSubresource(false) |
| 47 , m_isLinkPreload(false) |
| 47 , m_isLinkPrerender(false) | 48 , m_isLinkPrerender(false) |
| 48 , m_isLinkNext(false) | 49 , m_isLinkNext(false) |
| 49 , m_isImport(false) | 50 , m_isImport(false) |
| 50 , m_isManifest(false) | 51 , m_isManifest(false) |
| 51 , m_isTransitionExitingStylesheet(false) | 52 , m_isTransitionExitingStylesheet(false) |
| 52 , m_isDefaultPresentation(false) | 53 , m_isDefaultPresentation(false) |
| 53 { | 54 { |
| 54 if (rel.isEmpty()) | 55 if (rel.isEmpty()) |
| 55 return; | 56 return; |
| 56 String relCopy = rel; | 57 String relCopy = rel; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 73 m_iconType = Favicon; | 74 m_iconType = Favicon; |
| 74 } else if (equalIgnoringCase(linkType, "prefetch")) { | 75 } else if (equalIgnoringCase(linkType, "prefetch")) { |
| 75 m_isLinkPrefetch = true; | 76 m_isLinkPrefetch = true; |
| 76 } else if (equalIgnoringCase(linkType, "dns-prefetch")) { | 77 } else if (equalIgnoringCase(linkType, "dns-prefetch")) { |
| 77 m_isDNSPrefetch = true; | 78 m_isDNSPrefetch = true; |
| 78 } else if (equalIgnoringCase(linkType, "preconnect")) { | 79 } else if (equalIgnoringCase(linkType, "preconnect")) { |
| 79 if (RuntimeEnabledFeatures::linkPreconnectEnabled()) | 80 if (RuntimeEnabledFeatures::linkPreconnectEnabled()) |
| 80 m_isPreconnect = true; | 81 m_isPreconnect = true; |
| 81 } else if (equalIgnoringCase(linkType, "subresource")) { | 82 } else if (equalIgnoringCase(linkType, "subresource")) { |
| 82 m_isLinkSubresource = true; | 83 m_isLinkSubresource = true; |
| 84 } else if (equalIgnoringCase(linkType, "preload")) { |
| 85 if (RuntimeEnabledFeatures::linkPreloadEnabled()) |
| 86 m_isLinkPreload = true; |
| 83 } else if (equalIgnoringCase(linkType, "prerender")) { | 87 } else if (equalIgnoringCase(linkType, "prerender")) { |
| 84 m_isLinkPrerender = true; | 88 m_isLinkPrerender = true; |
| 85 } else if (equalIgnoringCase(linkType, "next")) { | 89 } else if (equalIgnoringCase(linkType, "next")) { |
| 86 m_isLinkNext = true; | 90 m_isLinkNext = true; |
| 87 } else if (equalIgnoringCase(linkType, "apple-touch-icon")) { | 91 } else if (equalIgnoringCase(linkType, "apple-touch-icon")) { |
| 88 if (RuntimeEnabledFeatures::touchIconLoadingEnabled()) | 92 if (RuntimeEnabledFeatures::touchIconLoadingEnabled()) |
| 89 m_iconType = TouchIcon; | 93 m_iconType = TouchIcon; |
| 90 } else if (equalIgnoringCase(linkType, "apple-touch-icon-precomposed"))
{ | 94 } else if (equalIgnoringCase(linkType, "apple-touch-icon-precomposed"))
{ |
| 91 if (RuntimeEnabledFeatures::touchIconLoadingEnabled()) | 95 if (RuntimeEnabledFeatures::touchIconLoadingEnabled()) |
| 92 m_iconType = TouchPrecomposedIcon; | 96 m_iconType = TouchPrecomposedIcon; |
| 93 } else if (equalIgnoringCase(linkType, "manifest")) { | 97 } else if (equalIgnoringCase(linkType, "manifest")) { |
| 94 m_isManifest = true; | 98 m_isManifest = true; |
| 95 } else if (equalIgnoringCase(rel, "transition-exiting-stylesheet")) { | 99 } else if (equalIgnoringCase(rel, "transition-exiting-stylesheet")) { |
| 96 if (RuntimeEnabledFeatures::navigationTransitionsEnabled()) | 100 if (RuntimeEnabledFeatures::navigationTransitionsEnabled()) |
| 97 m_isTransitionExitingStylesheet = true; | 101 m_isTransitionExitingStylesheet = true; |
| 98 } else if (equalIgnoringCase(linkType, "default-presentation")) { | 102 } else if (equalIgnoringCase(linkType, "default-presentation")) { |
| 99 if (RuntimeEnabledFeatures::presentationEnabled()) | 103 if (RuntimeEnabledFeatures::presentationEnabled()) |
| 100 m_isDefaultPresentation = true; | 104 m_isDefaultPresentation = true; |
| 101 } | 105 } |
| 102 } | 106 } |
| 103 } | 107 } |
| 104 | 108 |
| 105 } | 109 } |
| OLD | NEW |