Summary: | HTML5 TreeBuilder builds wrong DOM for <a><svg><tr><input></a> | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> | ||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Major | CC: | abarth, commit-queue, ddkilzer, eric, inferno, sam, tonyg | ||||
Priority: | P1 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | 44170 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Eric Seidel (no email)
2010-08-21 20:07:15 PDT
Actually, I think this might be an adoption agency bug caused by this FIXME: bool isNotFormattingAndNotPhrasing(const Element* element) { // The spec often says "node is not in the formatting category, and is not // in the phrasing category". !phrasing && !formatting == scoping || special // scoping || special is easier to compute. // FIXME: localName() is wrong for non-html content. const AtomicString& tagName = element->localName(); return isScopingTag(tagName) || isSpecialTag(tagName); We also need to update our lists to match the current spec. There is no such thing as a "phrasing" element anymore: Special The following HTML elements have varying levels of special parsing rules: address, applet, area, article, aside, base, basefont, bgsound, blockquote, body, br, button, caption, center, col, colgroup, command, dd, details, dir, div, dl, dt, embed, fieldset, figcaption, figure, footer, form, frame, frameset, h1, h2, h3, h4, h5, h6, head, header, hgroup, hr, html, iframe, img, input, isindex, li, link, listing, marquee, menu, meta, nav, noembed, noframes, noscript, object, ol, p, param, plaintext, pre, script, section, select, style, summary, table, tbody, td, textarea, tfoot, th, thead, title, tr, ul, wbr, xmp, and SVG's foreignObject. Formatting The following HTML elements are those that end up in the list of active formatting elements: a, b, big, code, em, font, i, nobr, s, small, strike, strong, tt, and u. Ordinary All other elements found while parsing an HTML document. Created attachment 65063 [details]
Patch
The only problem with this change is that this is sorta a hodge-podge update of a few cases in the spec. Really we should look at the total diff in the HTML5 spec from when we transcribed the TreeBuilder until today. However, test-driven development like this is much easier. :) Comment on attachment 65063 [details]
Patch
Yeah, we should look at the diff. We can also sync with HTML5lib to get more test cases.
Comment on attachment 65063 [details] Patch Clearing flags on attachment: 65063 Committed r65785: <http://trac.webkit.org/changeset/65785> All reviewed patches have been landed. Closing bug. |