Bug 123850

Summary: [HTML parser] reset insertion mode appropriate must check for "in select in table" mode
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: adamk, andersca, ap, benjamin, commit-queue, esprehn+autocc, gyuyoung.kim, jeffrey+webkit, koivisto, rafaelw, sam
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 123851    
Attachments:
Description Flags
Fixes the bug koivisto: review+, rniwa: commit-queue-

Ryosuke Niwa
Reported 2013-11-05 19:17:15 PST
Merge https://chromium.googlesource.com/chromium/blink/+/2cb7523df57dfb48111f6aa16b7138cd54024ba7 The HTML spec has been updated to detect encountering a <template> inside of a <select> which is inside of a <table>. In this case the <select> will cause the parser to be in "InSelectInTable" mode. Thus when the <template> closes, it should return to that mode. The fix here is that resetInsertionModeAppropriately must continue looking up the stack if the first node is <select> to see whether the <select> is inside of a <table>
Attachments
Fixes the bug (3.94 KB, patch)
2013-11-20 00:18 PST, Ryosuke Niwa
koivisto: review+
rniwa: commit-queue-
Ryosuke Niwa
Comment 1 2013-11-20 00:18:30 PST
Created attachment 217396 [details] Fixes the bug
Ryosuke Niwa
Comment 2 2013-11-20 00:35:55 PST
Comment on attachment 217396 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=217396&action=review > Source/WebCore/html/parser/HTMLTreeBuilder.cpp:1645 > + while (item->node() != m_tree.openElements()->rootNode() && !item->hasTagName(templateTag)) { Oops, I need to wrap this entire block with ENABLE(TEMPLTE_ELEMENT). Will do that before landing it.
Ryosuke Niwa
Comment 3 2013-11-20 19:35:51 PST
Comment on attachment 217396 [details] Fixes the bug Oops, I forgot to check my own comment :(
Ryosuke Niwa
Comment 4 2013-11-20 22:08:16 PST
Note You need to log in before you can comment on or make changes to this bug.