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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 ASSERT(!shouldUseThreading()); | 816 ASSERT(!shouldUseThreading()); |
817 | 817 |
818 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.debug"), "HTMLDocumentParser::
append", "size", inputSource.length()); | 818 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.debug"), "HTMLDocumentParser::
append", "size", inputSource.length()); |
819 const SegmentedString source(inputSource); | 819 const SegmentedString source(inputSource); |
820 | 820 |
821 if (document()->isPrefetchOnly()) { | 821 if (document()->isPrefetchOnly()) { |
822 if (!m_preloadScanner) | 822 if (!m_preloadScanner) |
823 m_preloadScanner = createPreloadScanner(); | 823 m_preloadScanner = createPreloadScanner(); |
824 | 824 |
825 m_preloadScanner->appendToEnd(source); | 825 m_preloadScanner->appendToEnd(source); |
826 // TODO(droger): Set the LOAD_PREFETCH flags on the requests. | |
827 m_preloadScanner->scanAndPreload(m_preloader.get(), document()->validBas
eElementURL(), nullptr); | 826 m_preloadScanner->scanAndPreload(m_preloader.get(), document()->validBas
eElementURL(), nullptr); |
828 | 827 |
829 // Return after the preload scanner, do not actually parse the document. | 828 // Return after the preload scanner, do not actually parse the document. |
830 return; | 829 return; |
831 } | 830 } |
832 | 831 |
833 if (m_preloadScanner) { | 832 if (m_preloadScanner) { |
834 if (m_input.current().isEmpty() && !isWaitingForScripts()) { | 833 if (m_input.current().isEmpty() && !isWaitingForScripts()) { |
835 // We have parsed until the end of the current input and so are now
moving ahead of the preload scanner. | 834 // We have parsed until the end of the current input and so are now
moving ahead of the preload scanner. |
836 // Clear the scanner so we know to scan starting from the current in
put point if we block again. | 835 // 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... |
1213 (*WTF::bind(function, std::forward<Ps>(parameters)...))(); | 1212 (*WTF::bind(function, std::forward<Ps>(parameters)...))(); |
1214 return; | 1213 return; |
1215 case Asynchronous: | 1214 case Asynchronous: |
1216 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, WTF::bind(function, std::
forward<Ps>(parameters)...)); | 1215 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, WTF::bind(function, std::
forward<Ps>(parameters)...)); |
1217 return; | 1216 return; |
1218 } | 1217 } |
1219 NOTREACHED(); | 1218 NOTREACHED(); |
1220 } | 1219 } |
1221 | 1220 |
1222 } // namespace blink | 1221 } // namespace blink |
OLD | NEW |