OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 ASSERT(!shouldUseThreading()); | 817 ASSERT(!shouldUseThreading()); |
818 | 818 |
819 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.debug"), "HTMLDocumentParser::
append", "size", inputSource.length()); | 819 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.debug"), "HTMLDocumentParser::
append", "size", inputSource.length()); |
820 const SegmentedString source(inputSource); | 820 const SegmentedString source(inputSource); |
821 | 821 |
822 if (document()->isPrefetchOnly()) { | 822 if (document()->isPrefetchOnly()) { |
823 if (!m_preloadScanner) | 823 if (!m_preloadScanner) |
824 m_preloadScanner = createPreloadScanner(); | 824 m_preloadScanner = createPreloadScanner(); |
825 | 825 |
826 m_preloadScanner->appendToEnd(source); | 826 m_preloadScanner->appendToEnd(source); |
827 // TODO(droger): Set the LOAD_PREFETCH flags on the requests. | |
828 m_preloadScanner->scanAndPreload(m_preloader.get(), document()->validBas
eElementURL(), nullptr); | 827 m_preloadScanner->scanAndPreload(m_preloader.get(), document()->validBas
eElementURL(), nullptr); |
829 | 828 |
830 // Return after the preload scanner, do not actually parse the document. | 829 // Return after the preload scanner, do not actually parse the document. |
831 return; | 830 return; |
832 } | 831 } |
833 | 832 |
834 if (m_preloadScanner) { | 833 if (m_preloadScanner) { |
835 if (m_input.current().isEmpty() && !isWaitingForScripts()) { | 834 if (m_input.current().isEmpty() && !isWaitingForScripts()) { |
836 // We have parsed until the end of the current input and so are now
moving ahead of the preload scanner. | 835 // We have parsed until the end of the current input and so are now
moving ahead of the preload scanner. |
837 // Clear the scanner so we know to scan starting from the current in
put point if we block again. | 836 // Clear the scanner so we know to scan starting from the current in
put point if we block again. |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 (*WTF::bind(function, std::forward<Ps>(parameters)...))(); | 1213 (*WTF::bind(function, std::forward<Ps>(parameters)...))(); |
1215 return; | 1214 return; |
1216 case Asynchronous: | 1215 case Asynchronous: |
1217 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, WTF::bind(function, std::
forward<Ps>(parameters)...)); | 1216 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, WTF::bind(function, std::
forward<Ps>(parameters)...)); |
1218 return; | 1217 return; |
1219 } | 1218 } |
1220 NOTREACHED(); | 1219 NOTREACHED(); |
1221 } | 1220 } |
1222 | 1221 |
1223 } // namespace blink | 1222 } // namespace blink |
OLD | NEW |