<?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>42009</bug_id>
          
          <creation_ts>2010-07-09 17:33:27 -0700</creation_ts>
          <short_desc>indenting a pre inside a table doesn&apos;t indent all of the selection</short_desc>
          <delta_ts>2022-07-26 12:33:39 -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>All</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tony Chang">tony</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>rniwa</cc>
    
    <cc>shezbaig.wk</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>249379</commentid>
    <comment_count>0</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-07-09 17:33:27 -0700</bug_when>
    <thetext>Here&apos;s a test case:
http://plexode.com/eval3/#ht=%3Ctable%20contenteditable%3Dtrue%3E%0A%3Ctr%3E%3Ctd%3E%3Cpre%20id%3D&apos;p&apos;%3Eline%201%0Aline%202%3C%2Fpre%3E%3C%2Ftd%3E%3C%2Ftr%3E%0A%3C%2Ftable%3E&amp;ohh=1&amp;ohj=1&amp;jt=var%20p%20%3D%20document.getElementById(%22p%22)%3B%0Avar%20selection%20%3D%20window.getSelection()%3B%0Aselection.setBaseAndExtent(p%2C%200%2C%20p%2C%200)%3B%0Aselection.modify(%22extend%22%2C%20%22forward%22%2C%20%22line%22)%3B%0Aselection.modify(%22extend%22%2C%20%22forward%22%2C%20%22line%22)%3B%0Adocument.execCommand(%22indent%22)%3B&amp;ojh=1&amp;ojj=1&amp;ms=100&amp;oth=0&amp;otj=0&amp;cex=1

The test case should indent the 2 lines of text, but instead it indents the 2 lines but leaves a duplicate of the second line.

After fixing bug 38231, the correct lines get indented, but there are extra blank lines between the indented lines.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>299263</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2010-10-25 21:07:16 -0700</bug_when>
    <thetext>Hi Tony,

This bug doesn&apos;t reproduce on WebKit nightly build as far as I checked.  Could you verify that this bug has been fixed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>299768</commentid>
    <comment_count>2</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-10-26 13:37:24 -0700</bug_when>
    <thetext>It no longer duplicates the second line, but the second line doesn&apos;t seem to get indented.

The resulting html in the table cell is:

&lt;td&gt;&lt;blockquote class=&quot;webkit-indent-blockquote&quot; style=&quot;margin: 0 0 0 40px; border: none; padding: 0px;&quot;&gt;&lt;pre id=&quot;p&quot;&gt;line 1&lt;/pre&gt;&lt;/blockquote&gt;&lt;pre id=&quot;p&quot;&gt;line 2&lt;/pre&gt;&lt;/td&gt;

I would expect both &lt;pre&gt; tags to be in the blockquote or separate blockquote elements around each pre.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>618743</commentid>
    <comment_count>3</comment_count>
    <who name="Shezan Baig">shezbaig.wk</who>
    <bug_when>2012-05-08 13:16:39 -0700</bug_when>
    <thetext>see also http://jsfiddle.net/5ft7U/, not sure if it is related to this bug.  the &apos;line1&apos; should not be duplicated.  this happens when &quot;white-space: pre&quot; style is specified.  Without &quot;white-space: pre&quot;, there is no duplication of line1 (http://jsfiddle.net/5ft7U/1/)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886851</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-26 12:19:14 -0700</bug_when>
    <thetext>I am not sure on expected behavior across browsers or web-spec but this is Current result across all browsers:

*** Safari 15.6 on macOS ***

On Test case from Comment 0 - It shows &apos;line 1&apos; as indented while &apos;line 2&apos; as not.

On Test case from Comment 3 - It shows only one line

*** Firefox Nightly 104 ***

On Test case from Comment 0 - It shows &apos;line 1&apos; as indented while &apos;line 2&apos; as not.

On Test case from Comment 3 - It shows only one line

*** Chrome Canary 106 ***

On Test case from Comment 0 - It shows both line non-intended

On Test case from Comment 3 - It shows two lines

_____

Just wanted to share updated results, please mark this bug resolved etc. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886860</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-26 12:33:39 -0700</bug_when>
    <thetext>&lt;rdar://problem/97621013&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>