<?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>15792</bug_id>
          
          <creation_ts>2012-01-30 12:15:20 +0000</creation_ts>
          <short_desc>[Shadow]: cloneNode should throw DATA_CLONE_ERR</short_desc>
          <delta_ts>2012-01-31 23:30:37 +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>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>14978</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Hayato Ito">hayato</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>63326</commentid>
    <comment_count>0</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2012-01-30 12:15:20 +0000</bug_when>
    <thetext>The latest draft spec says:
  Invoking the cloneNode() method on a ShadowRoot instance must always throw a HIERARCHY_REQUEST_ERR exception.

But according to Node&apos;s IDL definition,
  http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247
 Node               cloneNode(in boolean deep);

It seems cloneNode must not throw DOMException.
Is it okay to throw DOMException in case of ShadowRoot?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63342</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-01-30 17:30:44 +0000</bug_when>
    <thetext>Sure, why not? If you&apos;d like, I can redefine cloneNode on ShadowRoot in the IDL?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63365</commentid>
    <comment_count>2</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2012-01-30 23:32:05 +0000</bug_when>
    <thetext>If that&apos;s okay and commonly used in IDL world, I do not mind. :)
I just afraid that it seems to violate substitution principle of inheritance in general.

Fo example, if DOMException should be considered a &apos;checked&apos; exception (I borrowed the word from Java) , it violates substitution principal. Subclass can not override a method so that it add a checked Exception which is not declared in superclass&apos;s signature.

In IDL world, I am not sure whether we should keep this rule or not. I just want to make sure that is okay in IDL.

(In reply to comment #1)
&gt; Sure, why not? If you&apos;d like, I can redefine cloneNode on ShadowRoot in the
&gt; IDL?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63369</commentid>
    <comment_count>3</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-01-30 23:42:34 +0000</bug_when>
    <thetext>The thing is that cloneNode _does_ indeed throw an exception  for DocumentFragments: http://www.w3.org/TR/2011/WD-domcore-20110531/#clone

I think the IDL is just wrong. I&apos;ll file a bug against domcore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63387</commentid>
    <comment_count>4</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2012-01-31 04:55:53 +0000</bug_when>
    <thetext>Thank you.
I agree that either the spec or the implementation must be fixed if DocumentFragment&apos;s cloneNode might throw DOMException. I cannot find any spec that DocumentFragment&apos;s cloneNode may throw DOMException.

(In reply to comment #3)
&gt; The thing is that cloneNode _does_ indeed throw an exception  for
&gt; DocumentFragments: http://www.w3.org/TR/2011/WD-domcore-20110531/#clone
&gt; 
&gt; I think the IDL is just wrong. I&apos;ll file a bug against domcore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63476</commentid>
    <comment_count>5</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-01-31 23:27:47 +0000</bug_when>
    <thetext>Renaming the bug to keep in sync with DOM Core.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63477</commentid>
    <comment_count>6</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-01-31 23:30:37 +0000</bug_when>
    <thetext>http://dvcs.w3.org/hg/webcomponents/rev/75b4cc4d3efa</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>