Title: [140559] trunk/Source/WebCore
- Revision
- 140559
- Author
- [email protected]
- Date
- 2013-01-23 11:23:41 -0800 (Wed, 23 Jan 2013)
Log Message
Clarify some usage of shouldUseThreading vs m_haveBackgroundParser, fixing about:blank parsing
https://bugs.webkit.org/show_bug.cgi?id=107664
Reviewed by Adam Barth.
The HTMLDocumentParser can be "supposed" to use a background parser
but not end up ever doing so for blank documents. It's important
that we spin the forground parser at least once, so we end up
actually creating the about:blank document.
shouldUseThreading() means that threading is enabled and we should use it if we can.
m_haveBackgroundParser means that we actually are already using threading.
When we add full document.write support this will get a bit trickier still as
we'll need to be using both the foreground and background parsers.
This fixes about 20 tests in fast/frames and many others outside of fast/frames. :)
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::prepareToStopParsing):
(WebCore::HTMLDocumentParser::resumeParsingAfterYield):
(WebCore::HTMLDocumentParser::finish):
(WebCore::HTMLDocumentParser::lineNumber):
(WebCore::HTMLDocumentParser::textPosition):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (140558 => 140559)
--- trunk/Source/WebCore/ChangeLog 2013-01-23 19:15:58 UTC (rev 140558)
+++ trunk/Source/WebCore/ChangeLog 2013-01-23 19:23:41 UTC (rev 140559)
@@ -1,3 +1,29 @@
+2013-01-23 Eric Seidel <[email protected]>
+
+ Clarify some usage of shouldUseThreading vs m_haveBackgroundParser, fixing about:blank parsing
+ https://bugs.webkit.org/show_bug.cgi?id=107664
+
+ Reviewed by Adam Barth.
+
+ The HTMLDocumentParser can be "supposed" to use a background parser
+ but not end up ever doing so for blank documents. It's important
+ that we spin the forground parser at least once, so we end up
+ actually creating the about:blank document.
+
+ shouldUseThreading() means that threading is enabled and we should use it if we can.
+ m_haveBackgroundParser means that we actually are already using threading.
+ When we add full document.write support this will get a bit trickier still as
+ we'll need to be using both the foreground and background parsers.
+
+ This fixes about 20 tests in fast/frames and many others outside of fast/frames. :)
+
+ * html/parser/HTMLDocumentParser.cpp:
+ (WebCore::HTMLDocumentParser::prepareToStopParsing):
+ (WebCore::HTMLDocumentParser::resumeParsingAfterYield):
+ (WebCore::HTMLDocumentParser::finish):
+ (WebCore::HTMLDocumentParser::lineNumber):
+ (WebCore::HTMLDocumentParser::textPosition):
+
2013-01-17 Roger Fong <[email protected]>
[Win] Remove dependence on Microsoft Embedded OpenType Font Engine (T2EMBED.DLL) from FontCustomPlatformData.cpp.
Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (140558 => 140559)
--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp 2013-01-23 19:15:58 UTC (rev 140558)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp 2013-01-23 19:23:41 UTC (rev 140559)
@@ -149,7 +149,7 @@
#if ENABLE(THREADED_HTML_PARSER)
// NOTE: This pump should only ever emit buffered character tokens,
// so ForceSynchronous vs. AllowYield should be meaningless.
- if (!shouldUseThreading())
+ if (!m_haveBackgroundParser)
#endif
pumpTokenizerIfPossible(ForceSynchronous);
@@ -202,7 +202,7 @@
// Used by HTMLParserScheduler
void HTMLDocumentParser::resumeParsingAfterYield()
{
- ASSERT(!shouldUseThreading());
+ ASSERT(!m_haveBackgroundParser);
// pumpTokenizer can cause this parser to be detached from the Document,
// but we need to ensure it isn't deleted yet.
@@ -586,7 +586,7 @@
// Empty documents never got an append() call, and thus have never started
// a background parser. In those cases, we ignore shouldUseThreading()
// and fall through to the non-threading case.
- if (shouldUseThreading() && m_haveBackgroundParser) {
+ if (m_haveBackgroundParser) {
HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::finishPartial, ParserMap::identifierForParser(this)));
return;
}
@@ -610,7 +610,7 @@
OrdinalNumber HTMLDocumentParser::lineNumber() const
{
#if ENABLE(THREADED_HTML_PARSER)
- if (shouldUseThreading())
+ if (m_haveBackgroundParser)
return m_textPosition.m_line;
#endif
@@ -620,7 +620,7 @@
TextPosition HTMLDocumentParser::textPosition() const
{
#if ENABLE(THREADED_HTML_PARSER)
- if (shouldUseThreading())
+ if (m_haveBackgroundParser)
return m_textPosition;
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes