Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: third_party/WebKit/Source/core/html/LinkRelAttribute.cpp

Issue 2194473002: Remove LinkPreload runtime flag (status=stable) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 * 29 *
30 */ 30 */
31 31
32 #include "core/html/LinkRelAttribute.h" 32 #include "core/html/LinkRelAttribute.h"
33 33
34 #include "platform/RuntimeEnabledFeatures.h"
35
36 namespace blink { 34 namespace blink {
37 35
38 LinkRelAttribute::LinkRelAttribute(const String& rel) 36 LinkRelAttribute::LinkRelAttribute(const String& rel)
39 : m_iconType(InvalidIcon) 37 : m_iconType(InvalidIcon)
40 , m_isStyleSheet(false) 38 , m_isStyleSheet(false)
41 , m_isAlternate(false) 39 , m_isAlternate(false)
42 , m_isDNSPrefetch(false) 40 , m_isDNSPrefetch(false)
43 , m_isPreconnect(false) 41 , m_isPreconnect(false)
44 , m_isLinkPrefetch(false) 42 , m_isLinkPrefetch(false)
45 , m_isLinkPreload(false) 43 , m_isLinkPreload(false)
(...skipping 23 matching lines...) Expand all
69 // FIXME: This doesn't really follow the spec that requires "shortcu t icon" to be the 67 // FIXME: This doesn't really follow the spec that requires "shortcu t icon" to be the
70 // entire string http://www.whatwg.org/specs/web-apps/current-work/m ultipage/links.html#rel-icon 68 // entire string http://www.whatwg.org/specs/web-apps/current-work/m ultipage/links.html#rel-icon
71 m_iconType = Favicon; 69 m_iconType = Favicon;
72 } else if (equalIgnoringCase(linkType, "prefetch")) { 70 } else if (equalIgnoringCase(linkType, "prefetch")) {
73 m_isLinkPrefetch = true; 71 m_isLinkPrefetch = true;
74 } else if (equalIgnoringCase(linkType, "dns-prefetch")) { 72 } else if (equalIgnoringCase(linkType, "dns-prefetch")) {
75 m_isDNSPrefetch = true; 73 m_isDNSPrefetch = true;
76 } else if (equalIgnoringCase(linkType, "preconnect")) { 74 } else if (equalIgnoringCase(linkType, "preconnect")) {
77 m_isPreconnect = true; 75 m_isPreconnect = true;
78 } else if (equalIgnoringCase(linkType, "preload")) { 76 } else if (equalIgnoringCase(linkType, "preload")) {
79 if (RuntimeEnabledFeatures::linkPreloadEnabled()) 77 m_isLinkPreload = true;
80 m_isLinkPreload = true;
81 } else if (equalIgnoringCase(linkType, "prerender")) { 78 } else if (equalIgnoringCase(linkType, "prerender")) {
82 m_isLinkPrerender = true; 79 m_isLinkPrerender = true;
83 } else if (equalIgnoringCase(linkType, "next")) { 80 } else if (equalIgnoringCase(linkType, "next")) {
84 m_isLinkNext = true; 81 m_isLinkNext = true;
85 } else if (equalIgnoringCase(linkType, "apple-touch-icon")) { 82 } else if (equalIgnoringCase(linkType, "apple-touch-icon")) {
86 m_iconType = TouchIcon; 83 m_iconType = TouchIcon;
87 } else if (equalIgnoringCase(linkType, "apple-touch-icon-precomposed")) { 84 } else if (equalIgnoringCase(linkType, "apple-touch-icon-precomposed")) {
88 m_iconType = TouchPrecomposedIcon; 85 m_iconType = TouchPrecomposedIcon;
89 } else if (equalIgnoringCase(linkType, "manifest")) { 86 } else if (equalIgnoringCase(linkType, "manifest")) {
90 m_isManifest = true; 87 m_isManifest = true;
91 } else if (equalIgnoringCase(linkType, "serviceworker")) { 88 } else if (equalIgnoringCase(linkType, "serviceworker")) {
92 m_isServiceWorker = true; 89 m_isServiceWorker = true;
93 } 90 }
94 // Adding or removing a value here requires you to update RelList::suppo rtedTokens() 91 // Adding or removing a value here requires you to update RelList::suppo rtedTokens()
95 } 92 }
96 } 93 }
97 94
98 } // namespace blink 95 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLinkElement.idl ('k') | third_party/WebKit/Source/core/loader/LinkLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698