<?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>27684</bug_id>
          
          <creation_ts>2014-12-22 15:31:12 +0000</creation_ts>
          <short_desc>Handling of .contentType is not interoperable</short_desc>
          <delta_ts>2014-12-23 12:51:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>DOM</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>22960</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robin Berjon">robin</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>116642</commentid>
    <comment_count>0</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2014-12-22 15:31:12 +0000</bug_when>
    <thetext>We&apos;re observing pretty varying behaviour for .contentType, looking at this test:

    http://w3c-test.org/dom/nodes/Document-createElement-namespace.html

Parts of the failures are for synthetic documents. For those, both WebKit and Blink use the content type that would &quot;ideally&quot; match the namespace given to createDocument() instead of &quot;application/xml&quot;. I somehow suspect that the issue (at least in the way in which it is implemented) is related to bug 19431.

Other failures, notably in Blink, apply to remotely-loaded documents, notably involving attempts to change the content type by swapping the root element while loading:

    Vanilla load XHTML as application/xml: http://w3c-test.org/dom/nodes/Document-createElement-namespace-tests/xhtml.xml
    Try changing to SVG: http://w3c-test.org/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xml
    Try changing to without namespace: http://w3c-test.org/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xml


The externally-loaded ones likely ought to be handled by other specifications that build DOMs (in this case HTML), but I am including them in case the additional data helps.

The synthetic cases however ought to be defined by the DOM, and we&apos;re lacking interoperability today. Gecko sticks to the spec (Unless stated otherwise, a document&apos;s (...) content type is &quot;application/xml&quot;) but it would seem that no one else does. It is worth tracking whether this is something that implementers wish to align on or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116659</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-12-23 08:54:30 +0000</bug_when>
    <thetext>Sounds like bug 22960. Did you file bugs on browsers for violating the specification?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116662</commentid>
    <comment_count>2</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2014-12-23 12:51:11 +0000</bug_when>
    <thetext>(In reply to Anne from comment #1)
&gt; Sounds like bug 22960. Did you file bugs on browsers for violating the
&gt; specification?

Yes indeed, it stems from the same root. No need to file since it in effect already is :)

*** This bug has been marked as a duplicate of bug 22960 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>