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

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: Created 7 years 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
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 26 matching lines...) Expand all
37 namespace WebCore { 37 namespace WebCore {
38 38
39 LinkRelAttribute::LinkRelAttribute() 39 LinkRelAttribute::LinkRelAttribute()
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_isLinkPrefetch(false) 44 , m_isLinkPrefetch(false)
45 , m_isLinkSubresource(false) 45 , m_isLinkSubresource(false)
46 , m_isLinkPrerender(false) 46 , m_isLinkPrerender(false)
47 , m_isLinkNext(false)
47 , m_isImport(false) 48 , m_isImport(false)
48 { 49 {
49 } 50 }
50 51
51 LinkRelAttribute::LinkRelAttribute(const String& rel) 52 LinkRelAttribute::LinkRelAttribute(const String& rel)
52 : m_iconType(InvalidIcon) 53 : m_iconType(InvalidIcon)
53 , m_isStyleSheet(false) 54 , m_isStyleSheet(false)
54 , m_isAlternate(false) 55 , m_isAlternate(false)
55 , m_isDNSPrefetch(false) 56 , m_isDNSPrefetch(false)
56 , m_isLinkPrefetch(false) 57 , m_isLinkPrefetch(false)
57 , m_isLinkSubresource(false) 58 , m_isLinkSubresource(false)
58 , m_isLinkPrerender(false) 59 , m_isLinkPrerender(false)
60 , m_isLinkNext(false)
59 , m_isImport(false) 61 , m_isImport(false)
60 { 62 {
61 if (equalIgnoringCase(rel, "stylesheet")) 63 if (equalIgnoringCase(rel, "stylesheet"))
62 m_isStyleSheet = true; 64 m_isStyleSheet = true;
63 else if (equalIgnoringCase(rel, "icon") || equalIgnoringCase(rel, "shortcut icon")) 65 else if (equalIgnoringCase(rel, "icon") || equalIgnoringCase(rel, "shortcut icon"))
64 m_iconType = Favicon; 66 m_iconType = Favicon;
65 #if ENABLE(TOUCH_ICON_LOADING) 67 #if ENABLE(TOUCH_ICON_LOADING)
66 else if (equalIgnoringCase(rel, "apple-touch-icon")) 68 else if (equalIgnoringCase(rel, "apple-touch-icon"))
67 m_iconType = TouchIcon; 69 m_iconType = TouchIcon;
68 else if (equalIgnoringCase(rel, "apple-touch-icon-precomposed")) 70 else if (equalIgnoringCase(rel, "apple-touch-icon-precomposed"))
(...skipping 20 matching lines...) Expand all
89 m_isAlternate = true; 91 m_isAlternate = true;
90 else if (equalIgnoringCase(*it, "icon")) 92 else if (equalIgnoringCase(*it, "icon"))
91 m_iconType = Favicon; 93 m_iconType = Favicon;
92 #if ENABLE(TOUCH_ICON_LOADING) 94 #if ENABLE(TOUCH_ICON_LOADING)
93 else if (equalIgnoringCase(*it, "apple-touch-icon")) 95 else if (equalIgnoringCase(*it, "apple-touch-icon"))
94 m_iconType = TouchIcon; 96 m_iconType = TouchIcon;
95 else if (equalIgnoringCase(*it, "apple-touch-icon-precomposed")) 97 else if (equalIgnoringCase(*it, "apple-touch-icon-precomposed"))
96 m_iconType = TouchPrecomposedIcon; 98 m_iconType = TouchPrecomposedIcon;
97 #endif 99 #endif
98 else if (equalIgnoringCase(*it, "prefetch")) 100 else if (equalIgnoringCase(*it, "prefetch"))
99 m_isLinkPrefetch = true; 101 m_isLinkPrefetch = true;
100 else if (equalIgnoringCase(*it, "subresource")) 102 else if (equalIgnoringCase(*it, "subresource"))
101 m_isLinkSubresource = true; 103 m_isLinkSubresource = true;
102 else if (equalIgnoringCase(*it, "prerender")) 104 else if (equalIgnoringCase(*it, "prerender"))
103 m_isLinkPrerender = true; 105 m_isLinkPrerender = true;
106 else if (equalIgnoringCase(*it, "next"))
107 m_isLinkNext = true;
104 } 108 }
105 } 109 }
106 } 110 }
107 111
108 } 112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698