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

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

Issue 1493253002: CSSPreloadScanner should handle <base> adjusted URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ensure init pointers at c-tor Created 5 years 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 | « third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 return; 525 return;
526 526
527 // http://crbug.com/434230 Disable preload for documents with CSP <meta> tag s 527 // http://crbug.com/434230 Disable preload for documents with CSP <meta> tag s
528 if (m_isCSPEnabled) 528 if (m_isCSPEnabled)
529 return; 529 return;
530 530
531 switch (token.type()) { 531 switch (token.type()) {
532 case HTMLToken::Character: { 532 case HTMLToken::Character: {
533 if (!m_inStyle) 533 if (!m_inStyle)
534 return; 534 return;
535 m_cssScanner.scan(token.data(), source, requests); 535 m_cssScanner.scan(token.data(), source, requests, m_predictedBaseElement URL);
536 return; 536 return;
537 } 537 }
538 case HTMLToken::EndTag: { 538 case HTMLToken::EndTag: {
539 const StringImpl* tagImpl = tagImplFor(token.data()); 539 const StringImpl* tagImpl = tagImplFor(token.data());
540 if (match(tagImpl, templateTag)) { 540 if (match(tagImpl, templateTag)) {
541 if (m_templateCount) 541 if (m_templateCount)
542 --m_templateCount; 542 --m_templateCount;
543 return; 543 return;
544 } 544 }
545 if (match(tagImpl, styleTag)) { 545 if (match(tagImpl, styleTag)) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 else 670 else
671 mediaValues = MediaValuesCached::create(*document); 671 mediaValues = MediaValuesCached::create(*document);
672 ASSERT(mediaValues->isSafeToSendToAnotherThread()); 672 ASSERT(mediaValues->isSafeToSendToAnotherThread());
673 defaultViewportMinWidth = document->viewportDefaultMinWidth(); 673 defaultViewportMinWidth = document->viewportDefaultMinWidth();
674 viewportMetaZeroValuesQuirk = document->settings() && document->settings()-> viewportMetaZeroValuesQuirk(); 674 viewportMetaZeroValuesQuirk = document->settings() && document->settings()-> viewportMetaZeroValuesQuirk();
675 viewportMetaEnabled = document->settings() && document->settings()->viewport MetaEnabled(); 675 viewportMetaEnabled = document->settings() && document->settings()->viewport MetaEnabled();
676 referrerPolicy = ReferrerPolicyDefault; 676 referrerPolicy = ReferrerPolicyDefault;
677 } 677 }
678 678
679 } 679 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698