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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>89054</bug_id>
          
          <creation_ts>2012-06-13 19:43:44 -0700</creation_ts>
          <short_desc>document.execCommand(&apos;Indent&apos;) removes Shadow DOM.</short_desc>
          <delta_ts>2012-06-22 17:34:28 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>82697</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Shinya Kawanaka">shinyak</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dglazkov</cc>
    
    <cc>dominicc</cc>
    
    <cc>enrica</cc>
    
    <cc>hayato</cc>
    
    <cc>morrita</cc>
    
    <cc>rniwa</cc>
    
    <cc>tasak</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>648711</commentid>
    <comment_count>0</comment_count>
    <who name="Shinya Kawanaka">shinyak</who>
    <bug_when>2012-06-13 19:43:44 -0700</bug_when>
    <thetext>Repro:
&lt;div contenteditable&gt;
    BEFORE HOST
    &lt;div id=&quot;host&quot;&gt;HOST&lt;/div&gt;
    AFTER HOST
&lt;/div&gt;

Shadow DOM for host
&lt;span&gt;BEFORE SHADOW&lt;shadow&gt;&lt;/shadow&gt;AFTER SHADOW&lt;/span&gt;


When performing document.execCommand(&apos;Indent&apos;) in BEFORE HOST, the Shadow DOM for host disappears.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>648794</commentid>
    <comment_count>1</comment_count>
    <who name="Shinya Kawanaka">shinyak</who>
    <bug_when>2012-06-13 21:56:07 -0700</bug_when>
    <thetext>This is because node-&gt;cloneNode() does not clone Shadow DOM.

However, if we clone Shadow DOM always, it might be harmful for existing elements e.g. &lt;input&gt; etc. We should think this more.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>648796</commentid>
    <comment_count>2</comment_count>
    <who name="Shinya Kawanaka">shinyak</who>
    <bug_when>2012-06-13 21:56:35 -0700</bug_when>
    <thetext>See also: CompositeEditCommand::moveParagraphWithClones()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>655781</commentid>
    <comment_count>3</comment_count>
    <who name="Shinya Kawanaka">shinyak</who>
    <bug_when>2012-06-22 14:40:17 -0700</bug_when>
    <thetext>We should discuss how do we clone Shadow DOM (or do not clone Shadow DOM) before fixing this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>655871</commentid>
    <comment_count>4</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2012-06-22 16:00:50 -0700</bug_when>
    <thetext>I think editing command should treat pure DOM structures in general.
That means if we clone some nodes in editing, it is okay that everything that can not be serialized into text is not cloned. like event listeners or attached Shadow DOM created by user.

So I vote for WONTFIX for now.

(In reply to comment #3)
&gt; We should discuss how do we clone Shadow DOM (or do not clone Shadow DOM) before fixing this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>655951</commentid>
    <comment_count>5</comment_count>
    <who name="Shinya Kawanaka">shinyak</who>
    <bug_when>2012-06-22 17:26:59 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; I think editing command should treat pure DOM structures in general.
&gt; That means if we clone some nodes in editing, it is okay that everything that can not be serialized into text is not cloned. like event listeners or attached Shadow DOM created by user.
&gt; 
&gt; So I vote for WONTFIX for now.
&gt; 
&gt; (In reply to comment #3)
&gt; &gt; We should discuss how do we clone Shadow DOM (or do not clone Shadow DOM) before fixing this problem.

Yeah, I agree with you.

Something weid things like disappearing Shadow DOM or Event Listeners etc. cannot be evitable for now. We should discuss this more, but we have higher priority things than this.

I vote for closing as LATER.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>655958</commentid>
    <comment_count>6</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-06-22 17:34:28 -0700</bug_when>
    <thetext>This is same thing as shadow DOM being lost in copy &amp; paste. Won&apos;t fix.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>