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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 return linkTag.localName(); | 90 return linkTag.localName(); |
91 if (match(tagImpl, scriptTag)) | 91 if (match(tagImpl, scriptTag)) |
92 return scriptTag.localName(); | 92 return scriptTag.localName(); |
93 ASSERT_NOT_REACHED(); | 93 ASSERT_NOT_REACHED(); |
94 return emptyString(); | 94 return emptyString(); |
95 } | 95 } |
96 | 96 |
97 static bool mediaAttributeMatches(const MediaValues& mediaValues, const String&
attributeValue) | 97 static bool mediaAttributeMatches(const MediaValues& mediaValues, const String&
attributeValue) |
98 { | 98 { |
99 RefPtrWillBeRawPtr<MediaQuerySet> mediaQueries = MediaQuerySet::createOffMai
nThread(attributeValue); | 99 RefPtrWillBeRawPtr<MediaQuerySet> mediaQueries = MediaQuerySet::createOffMai
nThread(attributeValue); |
100 MediaQueryEvaluator mediaQueryEvaluator("screen", mediaValues); | 100 MediaQueryEvaluator mediaQueryEvaluator(mediaValues); |
101 return mediaQueryEvaluator.eval(mediaQueries.get()); | 101 return mediaQueryEvaluator.eval(mediaQueries.get()); |
102 } | 102 } |
103 | 103 |
104 class TokenPreloadScanner::StartTagScanner { | 104 class TokenPreloadScanner::StartTagScanner { |
105 public: | 105 public: |
106 StartTagScanner(const StringImpl* tagImpl, PassRefPtr<MediaValues> mediaValu
es) | 106 StartTagScanner(const StringImpl* tagImpl, PassRefPtr<MediaValues> mediaValu
es) |
107 : m_tagImpl(tagImpl) | 107 : m_tagImpl(tagImpl) |
108 , m_linkIsStyleSheet(false) | 108 , m_linkIsStyleSheet(false) |
109 , m_matchedMediaAttribute(true) | 109 , m_matchedMediaAttribute(true) |
110 , m_inputIsImage(false) | 110 , m_inputIsImage(false) |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 if (m_token.type() == HTMLToken::StartTag) | 500 if (m_token.type() == HTMLToken::StartTag) |
501 m_tokenizer->updateStateFor(attemptStaticStringCreation(m_token.name
(), Likely8Bit)); | 501 m_tokenizer->updateStateFor(attemptStaticStringCreation(m_token.name
(), Likely8Bit)); |
502 m_scanner.scan(m_token, m_source, requests); | 502 m_scanner.scan(m_token, m_source, requests); |
503 m_token.clear(); | 503 m_token.clear(); |
504 } | 504 } |
505 | 505 |
506 preloader->takeAndPreload(requests); | 506 preloader->takeAndPreload(requests); |
507 } | 507 } |
508 | 508 |
509 } | 509 } |
OLD | NEW |