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 29 matching lines...) Expand all Loading... |
40 , m_isStyleSheet(false) | 40 , m_isStyleSheet(false) |
41 , m_isAlternate(false) | 41 , m_isAlternate(false) |
42 , m_isDNSPrefetch(false) | 42 , m_isDNSPrefetch(false) |
43 , m_isPreconnect(false) | 43 , m_isPreconnect(false) |
44 , m_isLinkPrefetch(false) | 44 , m_isLinkPrefetch(false) |
45 , m_isLinkPreload(false) | 45 , m_isLinkPreload(false) |
46 , m_isLinkPrerender(false) | 46 , m_isLinkPrerender(false) |
47 , m_isLinkNext(false) | 47 , m_isLinkNext(false) |
48 , m_isImport(false) | 48 , m_isImport(false) |
49 , m_isManifest(false) | 49 , m_isManifest(false) |
| 50 , m_isServiceWorker(false) |
50 { | 51 { |
51 if (rel.isEmpty()) | 52 if (rel.isEmpty()) |
52 return; | 53 return; |
53 String relCopy = rel; | 54 String relCopy = rel; |
54 relCopy.replace('\n', ' '); | 55 relCopy.replace('\n', ' '); |
55 Vector<String> list; | 56 Vector<String> list; |
56 relCopy.split(' ', list); | 57 relCopy.split(' ', list); |
57 for (const String& linkType : list) { | 58 for (const String& linkType : list) { |
58 if (equalIgnoringCase(linkType, "stylesheet")) { | 59 if (equalIgnoringCase(linkType, "stylesheet")) { |
59 if (!m_isImport) | 60 if (!m_isImport) |
(...skipping 21 matching lines...) Expand all Loading... |
81 } else if (equalIgnoringCase(linkType, "prerender")) { | 82 } else if (equalIgnoringCase(linkType, "prerender")) { |
82 m_isLinkPrerender = true; | 83 m_isLinkPrerender = true; |
83 } else if (equalIgnoringCase(linkType, "next")) { | 84 } else if (equalIgnoringCase(linkType, "next")) { |
84 m_isLinkNext = true; | 85 m_isLinkNext = true; |
85 } else if (equalIgnoringCase(linkType, "apple-touch-icon")) { | 86 } else if (equalIgnoringCase(linkType, "apple-touch-icon")) { |
86 m_iconType = TouchIcon; | 87 m_iconType = TouchIcon; |
87 } else if (equalIgnoringCase(linkType, "apple-touch-icon-precomposed"))
{ | 88 } else if (equalIgnoringCase(linkType, "apple-touch-icon-precomposed"))
{ |
88 m_iconType = TouchPrecomposedIcon; | 89 m_iconType = TouchPrecomposedIcon; |
89 } else if (equalIgnoringCase(linkType, "manifest")) { | 90 } else if (equalIgnoringCase(linkType, "manifest")) { |
90 m_isManifest = true; | 91 m_isManifest = true; |
| 92 } else if (equalIgnoringCase(linkType, "serviceworker")) { |
| 93 m_isServiceWorker = true; |
91 } | 94 } |
92 // Adding or removing a value here requires you to update RelList::suppo
rtedTokens() | 95 // Adding or removing a value here requires you to update RelList::suppo
rtedTokens() |
93 } | 96 } |
94 } | 97 } |
95 | 98 |
96 } // namespace blink | 99 } // namespace blink |
OLD | NEW |