| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 if (match(tagImpl, linkTag)) | 88 if (match(tagImpl, linkTag)) |
| 89 return linkTag.localName(); | 89 return linkTag.localName(); |
| 90 if (match(tagImpl, scriptTag)) | 90 if (match(tagImpl, scriptTag)) |
| 91 return scriptTag.localName(); | 91 return scriptTag.localName(); |
| 92 ASSERT_NOT_REACHED(); | 92 ASSERT_NOT_REACHED(); |
| 93 return emptyString(); | 93 return emptyString(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 static bool mediaAttributeMatches(const MediaValues& mediaValues, const String&
attributeValue) | 96 static bool mediaAttributeMatches(const MediaValues& mediaValues, const String&
attributeValue) |
| 97 { | 97 { |
| 98 RefPtrWillBeRawPtr<MediaQuerySet> mediaQueries = MediaQuerySet::create(attri
buteValue); | 98 RefPtrWillBeRawPtr<MediaQuerySet> mediaQueries = MediaQuerySet::createOffMai
nThread(attributeValue); |
| 99 MediaQueryEvaluator mediaQueryEvaluator("screen", mediaValues); | 99 MediaQueryEvaluator mediaQueryEvaluator("screen", mediaValues); |
| 100 return mediaQueryEvaluator.eval(mediaQueries.get()); | 100 return mediaQueryEvaluator.eval(mediaQueries.get()); |
| 101 } | 101 } |
| 102 | 102 |
| 103 class TokenPreloadScanner::StartTagScanner { | 103 class TokenPreloadScanner::StartTagScanner { |
| 104 public: | 104 public: |
| 105 StartTagScanner(const StringImpl* tagImpl, PassRefPtr<MediaValues> mediaValu
es) | 105 StartTagScanner(const StringImpl* tagImpl, PassRefPtr<MediaValues> mediaValu
es) |
| 106 : m_tagImpl(tagImpl) | 106 : m_tagImpl(tagImpl) |
| 107 , m_linkIsStyleSheet(false) | 107 , m_linkIsStyleSheet(false) |
| 108 , m_matchedMediaAttribute(true) | 108 , m_matchedMediaAttribute(true) |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 if (m_token.type() == HTMLToken::StartTag) | 414 if (m_token.type() == HTMLToken::StartTag) |
| 415 m_tokenizer->updateStateFor(attemptStaticStringCreation(m_token.name
(), Likely8Bit)); | 415 m_tokenizer->updateStateFor(attemptStaticStringCreation(m_token.name
(), Likely8Bit)); |
| 416 m_scanner.scan(m_token, m_source, requests); | 416 m_scanner.scan(m_token, m_source, requests); |
| 417 m_token.clear(); | 417 m_token.clear(); |
| 418 } | 418 } |
| 419 | 419 |
| 420 preloader->takeAndPreload(requests); | 420 preloader->takeAndPreload(requests); |
| 421 } | 421 } |
| 422 | 422 |
| 423 } | 423 } |
| OLD | NEW |