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

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

Issue 116183005: Add support for rel=next to Prerender in Blink. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add missing file Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/LinkRelAttribute.h ('k') | Source/core/loader/LinkLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 27 matching lines...) Expand all
38 namespace WebCore { 38 namespace WebCore {
39 39
40 LinkRelAttribute::LinkRelAttribute() 40 LinkRelAttribute::LinkRelAttribute()
41 : m_iconType(InvalidIcon) 41 : m_iconType(InvalidIcon)
42 , m_isStyleSheet(false) 42 , m_isStyleSheet(false)
43 , m_isAlternate(false) 43 , m_isAlternate(false)
44 , m_isDNSPrefetch(false) 44 , m_isDNSPrefetch(false)
45 , m_isLinkPrefetch(false) 45 , m_isLinkPrefetch(false)
46 , m_isLinkSubresource(false) 46 , m_isLinkSubresource(false)
47 , m_isLinkPrerender(false) 47 , m_isLinkPrerender(false)
48 , m_isLinkNext(false)
48 , m_isImport(false) 49 , m_isImport(false)
49 { 50 {
50 } 51 }
51 52
52 LinkRelAttribute::LinkRelAttribute(const String& rel) 53 LinkRelAttribute::LinkRelAttribute(const String& rel)
53 : m_iconType(InvalidIcon) 54 : m_iconType(InvalidIcon)
54 , m_isStyleSheet(false) 55 , m_isStyleSheet(false)
55 , m_isAlternate(false) 56 , m_isAlternate(false)
56 , m_isDNSPrefetch(false) 57 , m_isDNSPrefetch(false)
57 , m_isLinkPrefetch(false) 58 , m_isLinkPrefetch(false)
58 , m_isLinkSubresource(false) 59 , m_isLinkSubresource(false)
59 , m_isLinkPrerender(false) 60 , m_isLinkPrerender(false)
61 , m_isLinkNext(false)
60 , m_isImport(false) 62 , m_isImport(false)
61 { 63 {
62 if (equalIgnoringCase(rel, "stylesheet")) { 64 if (equalIgnoringCase(rel, "stylesheet")) {
63 m_isStyleSheet = true; 65 m_isStyleSheet = true;
64 } else if (equalIgnoringCase(rel, "icon") || equalIgnoringCase(rel, "shortcu t icon")) { 66 } else if (equalIgnoringCase(rel, "icon") || equalIgnoringCase(rel, "shortcu t icon")) {
65 m_iconType = Favicon; 67 m_iconType = Favicon;
66 } else if (equalIgnoringCase(rel, "dns-prefetch")) { 68 } else if (equalIgnoringCase(rel, "dns-prefetch")) {
67 m_isDNSPrefetch = true; 69 m_isDNSPrefetch = true;
68 } else if (equalIgnoringCase(rel, "alternate stylesheet") || equalIgnoringCa se(rel, "stylesheet alternate")) { 70 } else if (equalIgnoringCase(rel, "alternate stylesheet") || equalIgnoringCa se(rel, "stylesheet alternate")) {
69 m_isStyleSheet = true; 71 m_isStyleSheet = true;
(...skipping 21 matching lines...) Expand all
91 } else if (equalIgnoringCase(*it, "alternate")) { 93 } else if (equalIgnoringCase(*it, "alternate")) {
92 m_isAlternate = true; 94 m_isAlternate = true;
93 } else if (equalIgnoringCase(*it, "icon")) { 95 } else if (equalIgnoringCase(*it, "icon")) {
94 m_iconType = Favicon; 96 m_iconType = Favicon;
95 } else if (equalIgnoringCase(*it, "prefetch")) { 97 } else if (equalIgnoringCase(*it, "prefetch")) {
96 m_isLinkPrefetch = true; 98 m_isLinkPrefetch = true;
97 } else if (equalIgnoringCase(*it, "subresource")) { 99 } else if (equalIgnoringCase(*it, "subresource")) {
98 m_isLinkSubresource = true; 100 m_isLinkSubresource = true;
99 } else if (equalIgnoringCase(*it, "prerender")) { 101 } else if (equalIgnoringCase(*it, "prerender")) {
100 m_isLinkPrerender = true; 102 m_isLinkPrerender = true;
103 } else if (equalIgnoringCase(*it, "next")) {
104 m_isLinkNext = true;
101 } else if (equalIgnoringCase(*it, "apple-touch-icon")) { 105 } else if (equalIgnoringCase(*it, "apple-touch-icon")) {
102 if (RuntimeEnabledFeatures::touchIconLoadingEnabled()) { 106 if (RuntimeEnabledFeatures::touchIconLoadingEnabled()) {
103 m_iconType = TouchIcon; 107 m_iconType = TouchIcon;
104 } 108 }
105 } else if (equalIgnoringCase(*it, "apple-touch-icon-precomposed")) { 109 } else if (equalIgnoringCase(*it, "apple-touch-icon-precomposed")) {
106 if (RuntimeEnabledFeatures::touchIconLoadingEnabled()) { 110 if (RuntimeEnabledFeatures::touchIconLoadingEnabled()) {
107 m_iconType = TouchPrecomposedIcon; 111 m_iconType = TouchPrecomposedIcon;
108 } 112 }
109 } 113 }
110 } 114 }
111 } 115 }
112 } 116 }
113 117
114 } 118 }
OLDNEW
« no previous file with comments | « Source/core/html/LinkRelAttribute.h ('k') | Source/core/loader/LinkLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698