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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 else if (equalIgnoringCase(rel, "apple-touch-icon")) | 64 else if (equalIgnoringCase(rel, "apple-touch-icon")) |
65 m_iconType = TouchIcon; | 65 m_iconType = TouchIcon; |
66 else if (equalIgnoringCase(rel, "apple-touch-icon-precomposed")) | 66 else if (equalIgnoringCase(rel, "apple-touch-icon-precomposed")) |
67 m_iconType = TouchPrecomposedIcon; | 67 m_iconType = TouchPrecomposedIcon; |
68 #endif | 68 #endif |
69 else if (equalIgnoringCase(rel, "dns-prefetch")) | 69 else if (equalIgnoringCase(rel, "dns-prefetch")) |
70 m_isDNSPrefetch = true; | 70 m_isDNSPrefetch = true; |
71 else if (equalIgnoringCase(rel, "alternate stylesheet") || equalIgnoringCase
(rel, "stylesheet alternate")) { | 71 else if (equalIgnoringCase(rel, "alternate stylesheet") || equalIgnoringCase
(rel, "stylesheet alternate")) { |
72 m_isStyleSheet = true; | 72 m_isStyleSheet = true; |
73 m_isAlternate = true; | 73 m_isAlternate = true; |
74 } else if (equalIgnoringCase(rel, "dns-prefetch")) { | |
75 m_isDNSPrefetch = true; | |
76 } else if (equalIgnoringCase(rel, "import")) { | 74 } else if (equalIgnoringCase(rel, "import")) { |
77 m_isImport = true; | 75 m_isImport = true; |
78 } else { | 76 } else { |
79 // Tokenize the rel attribute and set bits based on specific keywords th
at we find. | 77 // Tokenize the rel attribute and set bits based on specific keywords th
at we find. |
80 String relCopy = rel; | 78 String relCopy = rel; |
81 relCopy.replace('\n', ' '); | 79 relCopy.replace('\n', ' '); |
82 Vector<String> list; | 80 Vector<String> list; |
83 relCopy.split(' ', list); | 81 relCopy.split(' ', list); |
84 Vector<String>::const_iterator end = list.end(); | 82 Vector<String>::const_iterator end = list.end(); |
85 for (Vector<String>::const_iterator it = list.begin(); it != end; ++it)
{ | 83 for (Vector<String>::const_iterator it = list.begin(); it != end; ++it)
{ |
(...skipping 13 matching lines...) Expand all Loading... |
99 m_isLinkPrefetch = true; | 97 m_isLinkPrefetch = true; |
100 else if (equalIgnoringCase(*it, "subresource")) | 98 else if (equalIgnoringCase(*it, "subresource")) |
101 m_isLinkSubresource = true; | 99 m_isLinkSubresource = true; |
102 else if (equalIgnoringCase(*it, "prerender")) | 100 else if (equalIgnoringCase(*it, "prerender")) |
103 m_isLinkPrerender = true; | 101 m_isLinkPrerender = true; |
104 } | 102 } |
105 } | 103 } |
106 } | 104 } |
107 | 105 |
108 } | 106 } |
OLD | NEW |