OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ | 3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ |
4 * Copyright (C) 2010 Google Inc. All Rights Reserved. | 4 * Copyright (C) 2010 Google Inc. All Rights Reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 m_srcsetImageCandidate = bestFitSourceForSrcsetAttribute(m_devic
eScaleFactor, attributeValue); | 171 m_srcsetImageCandidate = bestFitSourceForSrcsetAttribute(m_devic
eScaleFactor, attributeValue); |
172 setUrlToLoad(bestFitSourceForImageAttributes(m_deviceScaleFactor
, m_urlToLoad, m_srcsetImageCandidate), AllowURLReplacement); | 172 setUrlToLoad(bestFitSourceForImageAttributes(m_deviceScaleFactor
, m_urlToLoad, m_srcsetImageCandidate), AllowURLReplacement); |
173 } | 173 } |
174 } else if (match(m_tagImpl, linkTag)) { | 174 } else if (match(m_tagImpl, linkTag)) { |
175 if (match(attributeName, hrefAttr)) | 175 if (match(attributeName, hrefAttr)) |
176 setUrlToLoad(attributeValue, DisallowURLReplacement); | 176 setUrlToLoad(attributeValue, DisallowURLReplacement); |
177 else if (match(attributeName, relAttr)) | 177 else if (match(attributeName, relAttr)) |
178 m_linkIsStyleSheet = relAttributeIsStyleSheet(attributeValue); | 178 m_linkIsStyleSheet = relAttributeIsStyleSheet(attributeValue); |
179 else if (match(attributeName, mediaAttr)) | 179 else if (match(attributeName, mediaAttr)) |
180 m_mediaAttribute = attributeValue; | 180 m_mediaAttribute = attributeValue; |
| 181 else if (match(attributeName, crossoriginAttr)) |
| 182 setCrossOriginAllowed(attributeValue); |
181 } else if (match(m_tagImpl, inputTag)) { | 183 } else if (match(m_tagImpl, inputTag)) { |
182 if (match(attributeName, srcAttr)) | 184 if (match(attributeName, srcAttr)) |
183 setUrlToLoad(attributeValue, DisallowURLReplacement); | 185 setUrlToLoad(attributeValue, DisallowURLReplacement); |
184 else if (match(attributeName, typeAttr)) | 186 else if (match(attributeName, typeAttr)) |
185 m_inputIsImage = equalIgnoringCase(attributeValue, InputTypeName
s::image); | 187 m_inputIsImage = equalIgnoringCase(attributeValue, InputTypeName
s::image); |
186 } | 188 } |
187 } | 189 } |
188 | 190 |
189 static bool relAttributeIsStyleSheet(const String& attributeValue) | 191 static bool relAttributeIsStyleSheet(const String& attributeValue) |
190 { | 192 { |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 if (m_token.type() == HTMLToken::StartTag) | 403 if (m_token.type() == HTMLToken::StartTag) |
402 m_tokenizer->updateStateFor(attemptStaticStringCreation(m_token.name
(), Likely8Bit)); | 404 m_tokenizer->updateStateFor(attemptStaticStringCreation(m_token.name
(), Likely8Bit)); |
403 m_scanner.scan(m_token, m_source, requests); | 405 m_scanner.scan(m_token, m_source, requests); |
404 m_token.clear(); | 406 m_token.clear(); |
405 } | 407 } |
406 | 408 |
407 preloader->takeAndPreload(requests); | 409 preloader->takeAndPreload(requests); |
408 } | 410 } |
409 | 411 |
410 } | 412 } |
OLD | NEW |