<?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>25315</bug_id>
          
          <creation_ts>2009-04-21 16:09:37 -0700</creation_ts>
          <short_desc>Outdenting a line following a BR tag inside an indented block moves that line above preceding content</short_desc>
          <delta_ts>2009-07-20 16:21:40 -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>PC</rep_platform>
          <op_sys>Windows XP</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marcos Almeida">marcosalmeida</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>eric</cc>
    
    <cc>jparent</cc>
    
    <cc>justin.garcia</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>118327</commentid>
    <comment_count>0</comment_count>
    <who name="Marcos Almeida">marcosalmeida</who>
    <bug_when>2009-04-21 16:09:37 -0700</bug_when>
    <thetext>1) go to http://www.mozilla.org/editor/midasdemo/
2) check View HTML
3) enter &quot;one&lt;br&gt;two&quot;
4) uncheck View HTML
5) select all text inside the editable area
6) press the indent button
  --&gt; both lines are indented. if you check View HTML, you&apos;ll see a blockquote with some styles was created wrapping the original HTML
7) put the cursor at the beginning of &quot;two&quot;
8) press the outdent button
  --&gt; the &quot;two&quot; line is outdented, but also moved up above the &quot;one&quot; line. it should stay below.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119304</commentid>
    <comment_count>1</comment_count>
    <who name="Julie Parent">jparent</who>
    <bug_when>2009-04-29 11:47:48 -0700</bug_when>
    <thetext>Plexode demo: http://www.plexode.com/cgi-bin/eval3.py#ht=%3Cdiv%20contentEditable%20id%3D&apos;ce&apos;%3E%3Cblockquote%20class%3D%22webkit-indent-blockquote%22%20style%3D%22margin%3A%200%200%200%2040px%3B%20border%3A%20none%3B%20padding%3A%200px%3B%22%3Eone%3Cbr%3Etwo%3C%2Fblockquote%3E%3C%2Fdiv%3E&amp;ohh=1&amp;ohj=0&amp;jt=var%20ce%20%3D%20gebi(&apos;ce&apos;)%3B%0Avar%20sel%20%3D%20window.getSelection()%3B%0Asel.setPosition(ce.firstChild.childNodes%5B2%5D%2C%200)%3B%0Adocument.execCommand(&apos;outdent&apos;%2C%20false%2C%20null)%3B%0A%0Ace.innerHTML&amp;ojh=0&amp;ojj=0&amp;ms=100&amp;oth=0&amp;otj=0&amp;cex=1

Just click &quot;eval js now&quot;.  I&apos;ll turn this into a layout test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119333</commentid>
    <comment_count>2</comment_count>
    <who name="Julie Parent">jparent</who>
    <bug_when>2009-04-29 13:44:20 -0700</bug_when>
    <thetext>This issue isn&apos;t limited to BR&apos;s.  If you replace one&lt;br&gt;two with &lt;div&gt;one&lt;/div&gt;&lt;div&gt;two&lt;/div&gt; it also repros.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119343</commentid>
    <comment_count>3</comment_count>
    <who name="Julie Parent">jparent</who>
    <bug_when>2009-04-29 14:20:30 -0700</bug_when>
    <thetext>Other notes - also happens for non collapsed selections, and for selections anywhere inside of &quot;two&quot;, so this isn&apos;t just a small broken edge case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119349</commentid>
    <comment_count>4</comment_count>
    <who name="Julie Parent">jparent</who>
    <bug_when>2009-04-29 14:41:33 -0700</bug_when>
    <thetext>And it get worse.  If the selection is inside the first div (&apos;one&apos;), then everything inside the blockquote gets indented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119381</commentid>
    <comment_count>5</comment_count>
    <who name="Julie Parent">jparent</who>
    <bug_when>2009-04-29 15:46:45 -0700</bug_when>
    <thetext>A couple questions -
* I&apos;ve got a bunch of layout tests written for this - is there any value in getting them checked in without a fix?  Or do you usually wait to add tests until you have a fix?
* Should this be separated out into separate bug reports?  It is hitting different code branches and one fix probably won&apos;t fix both issues, but both broken cases (moving outdented content to the wrong location and outdenting subsequent non selected blocks) seem related.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119413</commentid>
    <comment_count>6</comment_count>
    <who name="Julie Parent">jparent</who>
    <bug_when>2009-04-29 17:56:46 -0700</bug_when>
    <thetext>I&apos;ve got a fix for the second issue, so I&apos;ve separated that out into another bug: https://bugs.webkit.org/show_bug.cgi?id=25473</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>130768</commentid>
    <comment_count>7</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2009-07-09 16:51:38 -0700</bug_when>
    <thetext>My patch for https://bugs.webkit.org/show_bug.cgi?id=25316 will fix this issue as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>133288</commentid>
    <comment_count>8</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2009-07-20 16:21:40 -0700</bug_when>
    <thetext>This problem has been fixed by http://trac.webkit.org/changeset/45886.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>