<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>10314</bug_id>
          
          <creation_ts>2010-08-08 04:02:29 +0000</creation_ts>
          <short_desc>&quot;in cell&quot; (secondary) insertion mode shows strange behavior for e.g. &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;svg&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;, &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;svg&gt;&lt;tbody&gt;&lt;/tbody&gt;</short_desc>
          <delta_ts>2010-10-04 14:49:28 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>pre-LC1 HTML5 spec (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#parsing-main-intd</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>eric</cc>
    
    <cc>hsivonen</cc>
    
    <cc>ian</cc>
    
    <cc>james</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>w3c</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>37281</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2010-08-08 04:02:29 +0000</bug_when>
    <thetext>Section: http://www.whatwg.org/specs/web-apps/current-work/#parsing-main-intd

Comment:
&quot;in cell&quot; (secondary) insertion mode shows strange behavior for e.g.
&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;svg&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;, &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;svg&gt;&lt;tbody&gt;&lt;/tbody&gt;

Posted from: 121.102.72.35</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38842</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-09-10 19:20:08 +0000</bug_when>
    <thetext>I assume you mean &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;svg&gt;&lt;desc&gt;&lt;td&gt;?

I guess the solution is to make it clear that &quot;reprocess the current token&quot; means that we should first check the rule in the &quot;in foreign content&quot; section that resets the insertion mode, before then rerunning the token through the entire system from the top?

There is also the problem with &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;svg&gt;&lt;td&gt;&lt;desc&gt;&lt;td&gt;. Not sure how to handle that one, unless we start checking for namespaces when looking at tag names. Any suggestions?

We could probably solve both problems by making &lt;svg&gt; scoping for table scope, but then we&apos;d have to add a bunch of error-handling logic in the table modes.

Or maybe the real problem is that the secondary mode can be anything but &quot;in body&quot;. Should we give up with the secondary mode idea, and just reset the insertion mode when exiting foreign lands, and always defer to the in-body mode from foreign lands when appropriate?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39559</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-09-27 09:13:07 +0000</bug_when>
    <thetext>Cases that would not be solved by the proposal above:

  &lt;foo&gt;&lt;svg&gt;&lt;/foo&gt;

  &lt;svg&gt;&lt;em&gt;&lt;desc&gt;&lt;/em&gt;

Maybe these aren&apos;t problems? It&apos;s a bigger issue if the implied end tags cause such problems... are there any that could trigger something like this if we always defer to &quot;in body&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39560</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-09-27 09:17:04 +0000</bug_when>
    <thetext>&lt;svg&gt;&lt;body&gt;&lt;desc&gt;&lt;/html&gt;
&lt;p&gt;&lt;svg&gt;&lt;desc&gt;&lt;form&gt;

Maybe we should always defer to &quot;in body&quot; _and_ make the foreign lands scoping.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39562</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-09-27 09:19:16 +0000</bug_when>
    <thetext>Hm, &lt;foreignObject&gt; is already scoping. Maybe I should make all the other exits scoping as well, rather than make the entrances scoping.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39631</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-09-27 23:45:07 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Ok, I&apos;ve tried to address this. This is a pretty big change in how foreign lands are built, it gets rid of the secondary insertion mode, etc. See the check-in comment below.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39632</commentid>
    <comment_count>6</comment_count>
    <who name="">contributor</who>
    <bug_when>2010-09-27 23:45:25 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r5521.
Check-in comment: Parser foreign lands: Get rid of secondary insertion mode, always use &apos;in body&apos;, scope HTML in foreign lands so that we won&apos;t try to close elements cross-namespace (e.g. &lt;svg&gt;&lt;p&gt;&lt;desc&gt;&lt;form&gt; won&apos;t imply a &lt;/p&gt; that closes the &lt;p&gt;...; &lt;td&gt; won&apos;t close all the SVG if the SVG is in a cell).
http://html5.org/tools/web-apps-tracker?from=5520&amp;to=5521</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39633</commentid>
    <comment_count>7</comment_count>
    <who name="">contributor</who>
    <bug_when>2010-09-27 23:54:24 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r5522.
Check-in comment: Parser foreign lands: Oops, I missed one of the ways that scoping happens.
http://html5.org/tools/web-apps-tracker?from=5521&amp;to=5522</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39634</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Seidel">eric</who>
    <bug_when>2010-09-27 23:57:32 +0000</bug_when>
    <thetext>https://bugs.webkit.org/show_bug.cgi?id=46676 is the WebKit bug for applying these spec changes.

Thanks you Hixie.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>