Changeset 159607 in webkit
- Timestamp:
- Nov 20, 2013 10:10:31 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r159596 r159607 1 2013-11-20 Ryosuke Niwa <rniwa@webkit.org> 2 3 [HTML parser] reset insertion mode appropriate must check for "in select in table" mode 4 https://bugs.webkit.org/show_bug.cgi?id=123850 5 6 Reviewed by Antti Koivisto. 7 8 * html5lib/resources/template.dat: 9 1 10 2013-11-20 Ryosuke Niwa <rniwa@webkit.org> 2 11 -
trunk/LayoutTests/html5lib/resources/template.dat
r147185 r159607 1270 1270 | content 1271 1271 | <span> 1272 1273 #data 1274 <body><table><tr><td><select><template>Foo</template><caption>A</table> 1275 #errors 1276 #document 1277 | <html> 1278 | <head> 1279 | <body> 1280 | <table> 1281 | <tbody> 1282 | <tr> 1283 | <td> 1284 | <select> 1285 | <template> 1286 | content 1287 | "Foo" 1288 | <caption> 1289 | "A" -
trunk/Source/WebCore/ChangeLog
r159606 r159607 1 2013-11-20 Ryosuke Niwa <rniwa@webkit.org> 2 3 [HTML parser] reset insertion mode appropriate must check for "in select in table" mode 4 https://bugs.webkit.org/show_bug.cgi?id=123850 5 6 Reviewed by Antti Koivisto. 7 8 Merge https://chromium.googlesource.com/chromium/blink/+/2cb7523df57dfb48111f6aa16b7138cd54024ba7 9 10 The HTML specification has been updated to detect encountering a template element inside of a select element, 11 which in turn is inside of a table element. In this case, the select element will cause the parser to be in 12 "InSelectInTable" mode. Thus when the template element closes, it should return to that mode. 13 14 The fix here is that resetInsertionModeAppropriately must continue looking up the stack if the first node is 15 select element to see whether the select element is inside of a table element. 16 17 See also: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#reset-the-insertion-mode-appropriately 18 19 Test: html5lib/resources/template.dat 20 21 * html/parser/HTMLTreeBuilder.cpp: 22 (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately): 23 1 24 2013-11-20 Mark Lam <mark.lam@apple.com> 2 25 -
trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp
r158650 r159607 1642 1642 #endif 1643 1643 if (item->hasTagName(selectTag)) { 1644 #if ENABLE(TEMPLATE_ELEMENT) 1645 if (!last) { 1646 while (item->node() != m_tree.openElements()->rootNode() && !item->hasTagName(templateTag)) { 1647 nodeRecord = nodeRecord->next(); 1648 item = nodeRecord->stackItem(); 1649 if (isHTMLTableElement(item->node())) 1650 return setInsertionMode(InSelectInTableMode); 1651 } 1652 } 1653 #endif 1644 1654 return setInsertionMode(InSelectMode); 1645 1655 }
Note: See TracChangeset
for help on using the changeset viewer.