[webkit-changes] cvs commit: WebCore/khtml/html htmltokenizer.cpp
Adele
adele at opensource.apple.com
Wed Aug 24 23:16:29 PDT 2005
adele 05/08/24 23:16:29
Modified: . Tag: Safari-2-0-branch ChangeLog
khtml/html Tag: Safari-2-0-branch htmltokenizer.cpp
Log:
Merged fix from TOT to Safari-2-0-branch
2005-08-23 David Harrison <harrison at apple.com>
Reviewed by Darin.
<rdar://problem/4226539> REGRESSION: Blank content at http://www.the-leaky-cauldron.org/ with Denver and TOT
Test cases added:
* layout-tests/fast/parser/comments-expected.txt: Added.
* layout-tests/fast/parser/comments.html: Added.
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::parseComment):
When non-space follows comment end, ignore that comment end.
Revision Changes Path
No revision
No revision
1.1.2.7 +18 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- ChangeLog 24 Aug 2005 17:48:19 -0000 1.1.2.6
+++ ChangeLog 25 Aug 2005 06:16:27 -0000 1.1.2.7
@@ -1,5 +1,23 @@
2005-08-24 Adele Peterson <adele at apple.com>
+ Merged fix from TOT to Safari-2-0-branch
+
+ 2005-08-23 David Harrison <harrison at apple.com>
+
+ Reviewed by Darin.
+
+ <rdar://problem/4226539> REGRESSION: Blank content at http://www.the-leaky-cauldron.org/ with Denver and TOT
+
+ Test cases added:
+ * layout-tests/fast/parser/comments-expected.txt: Added.
+ * layout-tests/fast/parser/comments.html: Added.
+
+ * khtml/html/htmltokenizer.cpp:
+ (khtml::HTMLTokenizer::parseComment):
+ When non-space follows comment end, ignore that comment end.
+
+2005-08-24 Adele Peterson <adele at apple.com>
+
* WebCore-tests.exp: removing KWQValueListIteratorImpl4nodeEv symbol since its not needed.
2005-08-23 Adele Peterson <adele at apple.com>
No revision
No revision
1.84.6.5 +21 -13 WebCore/khtml/html/htmltokenizer.cpp
Index: htmltokenizer.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/htmltokenizer.cpp,v
retrieving revision 1.84.6.4
retrieving revision 1.84.6.5
diff -u -r1.84.6.4 -r1.84.6.5
--- htmltokenizer.cpp 9 Aug 2005 23:52:14 -0000 1.84.6.4
+++ htmltokenizer.cpp 25 Aug 2005 06:16:27 -0000 1.84.6.5
@@ -654,19 +654,7 @@
QConstString((QChar*)src.current(), QMIN(16, src.length())).string().latin1());
#endif
- if (strict) {
- if (src->unicode() == '-') {
- delimiterCount++;
- if (delimiterCount == 2) {
- delimiterCount = 0;
- canClose = !canClose;
- }
- }
- else
- delimiterCount = 0;
- }
-
- if ((!strict || canClose) && src->unicode() == '>') {
+ if ((!strict || canClose) && *src == '>') {
bool handleBrokenComments = brokenComments && !(script || style);
int endCharsCount = 1; // start off with one for the '>' character
if (!strict) {
@@ -700,6 +688,26 @@
return; // Finished parsing comment
}
}
+
+ if (strict) {
+ if (*src == '-') {
+ delimiterCount++;
+ if (delimiterCount == 2) {
+ delimiterCount = 0;
+ canClose = !canClose;
+ }
+ } else {
+ delimiterCount = 0;
+ // Bad markup. Non-space between the comment end and the markup
+ // declaration close ('>'). Keep scanning as comment, but set
+ // the state back to where we need to see another comment end
+ // followed by a declaration close.
+ // This is not exactly to spec, but is better for compatiblility.
+ if (canClose && *src != ' ')
+ canClose = false;
+ }
+ }
+
++src;
}
}
More information about the webkit-changes
mailing list