[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
abarth at webkit.org
abarth at webkit.org
Wed Dec 22 13:13:10 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit aeb3e23d075125102646b0b9d3d323cd40ee2f2e
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 9 00:18:53 2010 +0000
2010-09-08 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
text/plain documents that start with \n trigger ASSERT
https://bugs.webkit.org/show_bug.cgi?id=45409
Because the TextDocumentParser uses a <pre> element to show the text,
it ran into a requirement from HTML5 to skip any initial \n character
tokens inside a <pre> element. We don't want the behavior for
TextDocuments, so I've loosened our ASSERTs and added a comment and a
test to document the correct behavior.
Test: fast/tokenizer/text-plain.html
* html/parser/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::nextToken):
2010-09-08 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
text/plain documents that start with \n trigger ASSERT
https://bugs.webkit.org/show_bug.cgi?id=45409
* fast/tokenizer/resources/text.txt: Added.
* fast/tokenizer/text-plain.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 516a6a0..9d128c5 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-08 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ text/plain documents that start with \n trigger ASSERT
+ https://bugs.webkit.org/show_bug.cgi?id=45409
+
+ * fast/tokenizer/resources/text.txt: Added.
+ * fast/tokenizer/text-plain.html: Added.
+
2010-09-08 Yury Semikhatsky <yurys at chromium.org>
Reviewed by Joseph Pecoraro.
diff --git a/LayoutTests/fast/tokenizer/resources/text.txt b/LayoutTests/fast/tokenizer/resources/text.txt
new file mode 100644
index 0000000..fa13561
--- /dev/null
+++ b/LayoutTests/fast/tokenizer/resources/text.txt
@@ -0,0 +1,8 @@
+
+hi
+</pre>
+<strong>more</strong>
+!!!
+</plaintext>
+
+ggg
diff --git a/LayoutTests/fast/tokenizer/text-plain-expected.txt b/LayoutTests/fast/tokenizer/text-plain-expected.txt
new file mode 100644
index 0000000..34b460e
--- /dev/null
+++ b/LayoutTests/fast/tokenizer/text-plain-expected.txt
@@ -0,0 +1,14 @@
+
+
+--------
+Frame: '<!--framePath //<!--frame0-->-->'
+--------
+
+hi
+</pre>
+<strong>more</strong>
+!!!
+</plaintext>
+
+ggg
+
diff --git a/LayoutTests/fast/tokenizer/text-plain.html b/LayoutTests/fast/tokenizer/text-plain.html
new file mode 100644
index 0000000..8d3b727
--- /dev/null
+++ b/LayoutTests/fast/tokenizer/text-plain.html
@@ -0,0 +1,7 @@
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpChildFramesAsText();
+}
+</script>
+<iframe src="resources/text.txt"></iframe>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 39d1c40..d6e657e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-09-08 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ text/plain documents that start with \n trigger ASSERT
+ https://bugs.webkit.org/show_bug.cgi?id=45409
+
+ Because the TextDocumentParser uses a <pre> element to show the text,
+ it ran into a requirement from HTML5 to skip any initial \n character
+ tokens inside a <pre> element. We don't want the behavior for
+ TextDocuments, so I've loosened our ASSERTs and added a comment and a
+ test to document the correct behavior.
+
+ Test: fast/tokenizer/text-plain.html
+
+ * html/parser/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::nextToken):
+
2010-09-08 James Robinson <jamesr at chromium.org>
Reviewed by Kenneth Russell.
diff --git a/WebCore/html/parser/HTMLTokenizer.cpp b/WebCore/html/parser/HTMLTokenizer.cpp
index 5791842..f5405ff 100644
--- a/WebCore/html/parser/HTMLTokenizer.cpp
+++ b/WebCore/html/parser/HTMLTokenizer.cpp
@@ -293,7 +293,9 @@ bool HTMLTokenizer::nextToken(SegmentedString& source, HTMLToken& token)
ADVANCE_TO(DataState);
if (m_state == RCDATAState)
ADVANCE_TO(RCDATAState);
- ASSERT_NOT_REACHED();
+ // When parsing text/plain documents, we run the tokenizer in the
+ // PLAINTEXTState and ignore m_skipLeadingNewLineForListing.
+ ASSERT(m_state == PLAINTEXTState);
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list