Commit 559a988d authored by antti@apple.com's avatar antti@apple.com

Incoming source should be preload scanned when the parser is blocked

https://bugs.webkit.org/show_bug.cgi?id=58117

Reviewed by Tony Gentilcore.

Source/WebCore: 

Scan the appended source if parser is blocked.

Test: http/tests/loading/preload-append-scan.php

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::append):

LayoutTests: 

* http/tests/loading/preload-append-scan-expected.txt: Added.
* http/tests/loading/preload-append-scan.php: Added.
* http/tests/resources/slow-script.pl: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b3e35558
2011-04-08 Antti Koivisto <antti@apple.com>
Reviewed by Tony Gentilcore.
Incoming source should be preload scanned when the parser is blocked
https://bugs.webkit.org/show_bug.cgi?id=58117
* http/tests/loading/preload-append-scan-expected.txt: Added.
* http/tests/loading/preload-append-scan.php: Added.
* http/tests/resources/slow-script.pl: Added.
2011-04-08 Jian Li <jianli@chromium.org>
Unreviewed, fixed a typo in chromium test expectation list.
......@@ -9934,7 +9945,6 @@
* platform/mac/fast/repaint/layout-state-scrolloffset3-expected.txt:
* platform/mac/tables/mozilla/bugs/bug51140-expected.txt:
>>>>>>> .r82178
2011-03-25 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
......@@ -13085,7 +13095,6 @@
* platform/win-wk2/inspector/console: Added.
* platform/win-wk2/inspector/console/command-line-api-inspect-expected.txt: Added.
>>>>>>> .r81488
2011-03-18 Alexander Pavlov <apavlov@chromium.org>
[Chromium] Unreviewed, suppress editing/deleting/5206311-1.html crashes on Mac Debug
main frame - didStartProvisionalLoadForFrame
main frame - didCommitLoadForFrame
slow-script.pl has MIME type application/javascript
main frame - didFinishDocumentLoadForFrame
main frame - didHandleOnloadEventsForFrame
preload-test.jpg has MIME type image/jpeg
main frame - didFinishLoadForFrame
This test needs to be run in DRT. Preload scanner should see the image resource.
<img src="resources/preload-test.jpg">
<?
header("Content-Type: text/html; charset=utf-8");
?>
<!-- <?php
# Spam a bunch of As to make sure we blow past any buffers.
print str_repeat("A", 2048);
?> -->
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.dumpResourceResponseMIMETypes();
}
function debug(x) {}
</script>
<script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=1000"></script>
<?php
flush();
usleep(200000);
?>
<script>
document.write("<plaintext>");
</script>
This test needs to be run in DRT. Preload scanner should see the image resource.
<img src="resources/preload-test.jpg">
#!/usr/bin/perl -w
use strict;
use CGI;
use Time::HiRes qw(sleep);
my $cgi = new CGI;
my $delay = $cgi->param('delay');
$delay = 5000 unless $delay;
# flush the buffers after each print
select (STDOUT);
$| = 1;
print "Content-Type: application/javascript\n";
print "Expires: Thu, 01 Dec 2003 16:00:00 GMT\n";
print "Cache-Control: no-store, no-cache, must-revalidate\n";
print "Pragma: no-cache\n";
print "\n";
sleep $delay / 1000;
2011-04-08 Antti Koivisto <antti@apple.com>
Reviewed by Tony Gentilcore.
Incoming source should be preload scanned when the parser is blocked
https://bugs.webkit.org/show_bug.cgi?id=58117
Scan the appended source if parser is blocked.
Test: http/tests/loading/preload-append-scan.php
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::append):
2011-04-08 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
......@@ -345,8 +345,11 @@ void HTMLDocumentParser::append(const SegmentedString& source)
RefPtr<HTMLDocumentParser> protect(this);
m_input.appendToEnd(source);
if (m_preloadScanner)
if (m_preloadScanner) {
m_preloadScanner->appendToEnd(source);
if (m_treeBuilder->isPaused())
m_preloadScanner->scan();
}
if (inPumpSession()) {
// We've gotten data off the network in a nested write.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment