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

Side by Side Diff: Source/core/html/parser/HTMLPreloadScanner.cpp

Issue 219183002: Disable the thread-safe MQ parser for main thread (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Testing BisonCSSParser Created 6 years, 8 months 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
« no previous file with comments | « Source/core/css/parser/BisonCSSParser-in.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/css/parser/BisonCSSParser-in.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698