Changeset 13381 in webkit
- Timestamp:
- Mar 18, 2006 9:47:01 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 12 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r13379 r13381 1 2006-03-18 David Kilzer <ddkilzer@kilzer.net> 2 3 Reviewed by Darin. 4 5 - Tests for http://bugzilla.opendarwin.org/show_bug.cgi?id=6314 6 Unclosed <style> element in <head> makes page completely blank 7 8 * fast/js/exception-linenums-in-html-3-expected.txt: Added. 9 * fast/js/exception-linenums-in-html-3.html: Added. 10 11 Identical to fast/js/exception-linenums-in-html-1.html except that it contains 12 an unclosed <style> tag, which causes the code path for Bug 6314 to be tested. 13 14 * fast/js/missing-style-end-tag-js-expected.txt: Added. 15 * fast/js/missing-style-end-tag-js.html: Added. 16 17 While developing a fix for Bug 6314, a state variable (scriptCodeSize) was not 18 reset in the tokenizer causing the next <script></script> tags to contain the 19 entire contents of the document after the open <title> tag. This test case 20 tests for that condition. 21 22 * fast/tokenizer/missing-style-end-tag-1-expected.checksum: Added. 23 * fast/tokenizer/missing-style-end-tag-1-expected.png: Added. 24 * fast/tokenizer/missing-style-end-tag-1-expected.txt: Added. 25 * fast/tokenizer/missing-style-end-tag-1.html: Added. 26 * fast/tokenizer/missing-style-end-tag-2-expected.checksum: Added. 27 * fast/tokenizer/missing-style-end-tag-2-expected.png: Added. 28 * fast/tokenizer/missing-style-end-tag-2-expected.txt: Added. 29 * fast/tokenizer/missing-style-end-tag-2.html: Added. 30 31 The first test case contains an unclosed <style> tag in <head>, while the 32 second test case contains an unclosed <style> tag in <body>. These two test 33 cases result in different code paths being taken. 34 1 35 2006-03-18 Alexey Proskuryakov <ap@nypop.com> 2 36 -
trunk/WebCore/ChangeLog
r13380 r13381 1 2006-03-15 Rob Buis <buis@kde.org> 1 2006-03-18 David Kilzer <ddkilzer@kilzer.net> 2 3 Reviewed by Darin. 4 5 - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6314 6 Unclosed <style> element in <head> makes page completely blank 7 8 Test: fast/js/exception-linenums-in-html-3.html 9 Test: fast/js/missing-style-end-tag-js.html 10 Test: fast/tokenizer/missing-style-end-tag-1.html 11 Test: fast/tokenizer/missing-style-end-tag-2.html 12 13 * khtml/html/htmlparser.cpp: 14 (WebCore::HTMLParser::handleError): Add check for missing </style> tag and handle 15 this condition if identified. 16 * khtml/html/htmltokenizer.cpp: 17 (WebCore::HTMLTokenizer::parseTag): If parseSpecial() consumes the rest of the 18 document looking for a </style> tag, reset the state of the tokenizer and 19 retokenize with no special handling for <style>. The parser will handle the 20 missing </style> tag in HTMLParser::handleError(). 21 22 2006-03-18 Rob Buis <buis@kde.org> 2 23 3 24 Reviewed by Darin. -
trunk/WebCore/khtml/html/htmlparser.cpp
r13262 r13381 469 469 } 470 470 } else if (h->hasLocalName(addressTag) || h->hasLocalName(dlTag) || h->hasLocalName(dtTag) 471 || h->hasLocalName(fontTag) || h->hasLocalName( titleTag)) {471 || h->hasLocalName(fontTag) || h->hasLocalName(styleTag) || h->hasLocalName(titleTag)) { 472 472 popBlock(currentTagName); 473 473 handled = true; -
trunk/WebCore/khtml/html/htmltokenizer.cpp
r13369 r13381 1253 1253 searchStopper = styleEnd; 1254 1254 searchStopperLen = 7; 1255 State savedState = state; 1256 SegmentedString savedSrc = src; 1257 long savedLineno = lineno; 1255 1258 state.setInStyle(true); 1256 1259 state = parseSpecial(src, state); 1260 if (state.inStyle() && src.isEmpty()) { 1261 // We just ate the rest of the document as the style #text node! 1262 // Reset the state then retokenize without special style handling. 1263 // Let the html parser clean up the missing </style> tag. 1264 state = savedState; 1265 src = savedSrc; 1266 lineno = savedLineno; 1267 scriptCodeSize = 0; 1268 } 1257 1269 } 1258 1270 } else if (tagName == textareaTag) {
Note: See TracChangeset
for help on using the changeset viewer.