Last Comment Bug 291780 - List outdent is not working properly
: List outdent is not working properly
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla9
Assigned To: Fabien Cazenave [:kaze]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-25 04:43 PDT by ABHIJEET BHATTACHARYA
Modified: 2011-09-04 11:33 PDT (History)
6 users (show)
iann_bugzilla: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Test for bug 291780 (5.30 KB, patch)
2011-08-07 12:40 PDT, Ian Neal
no flags Details | Diff | Splinter Review
mochitest-plain test for bug 291780 [Checked in: Comment 10] (2.58 KB, patch)
2011-08-08 10:13 PDT, Ian Neal
ehsan: review+
Details | Diff | Splinter Review
patch proposal (3.02 KB, patch)
2011-08-26 07:07 PDT, Fabien Cazenave [:kaze]
ehsan: review+
Details | Diff | Splinter Review

Description ABHIJEET BHATTACHARYA 2005-04-25 04:43:52 PDT
User-Agent:       Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.7.5) Gecko/20041220
Build Identifier: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.7.5) Gecko/20041220

List outdent is not working properly

Reproducible: Always

Steps to Reproduce:
1.Open composer create a list.
2.indent the list twice or thrice.
3.Now indent part of the list twice.
4.Outdent this part.

Actual Results:  
Outdenting the part creates three different list of originally one list.

Expected Results:  
Outdenting should fit the part into original list and the list count should be one.
Comment 1 zug_treno 2005-04-26 03:39:50 PDT
Reproducible with Mozilla 1.8b1 and Mozilla 1.8b2/20050424.
Comment 2 Gervase Markham [:gerv] 2005-09-27 01:57:49 PDT
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Comment 3 Gérard Talbot 2005-10-02 19:14:38 PDT

*** This bug has been marked as a duplicate of 290026 ***
Comment 4 Ian Neal 2011-08-06 07:16:58 PDT
This is not dealt with by bug 290026, that is for the whole list.
What happens in this one is that when indenting part of a list <ul> in inserted for each one, when outdenting, instead of removing the <ul>, the list is split into 3 parts.
So originally it is:
<ul style="margin-left: 40px;">
<li>Item One</li>
<li>Item Two</li>
<li>Item Three</li>
<li>Item Four<br>
</li>
</ul>
After the indentation of part of the list:
<ul style="margin-left: 40px;">
<li>Item One</li>
<ul>
<li>Item Two</li>
<li>Item Three</li>
</ul>
<li>Item Four<br>
</li>
</ul>
After the outdentation of that part of the list:
<ul style="margin-left: 40px;">
<li>Item One</li>
</ul>
<ul>
<ul>
<li>Item Two</li>
<li>Item Three</li>
</ul>
</ul>
<ul style="margin-left: 40px;">
<li>Item Four<br>
</li>
</ul>
Comment 5 Fabien Cazenave [:kaze] 2011-08-06 08:15:02 PDT
Confirmed with a quick contentEditable test, this is a Core/Editor bug.
Comment 6 Ian Neal 2011-08-07 12:40:07 PDT
Created attachment 551332 [details] [diff] [review]
Test for bug 291780

This test:
* Takes a 4 item bullet list.
* Selects items 2 and 3.
* Indents the selected items.
* Tests the HTML is correct.
* Outdents the selected items.
* Tests the HTML is back to original.

Once this bug is fixed both tests should pass but at the moment the second one fails.
Comment 7 :Ehsan Akhgari 2011-08-08 07:51:52 PDT
Ian, thanks for writing the test case.  Is there any chance that you can modify it to be a simple HTML mochitest though?  There is nothing specific to <xul:editor> in this bug, so I would rather the test case to be a simple mochitest HTML file with a contenteditable area...

Thanks!
Comment 8 Ian Neal 2011-08-08 10:13:23 PDT
Created attachment 551492 [details] [diff] [review]
mochitest-plain test for bug 291780 [Checked in: Comment 10]

This time only with HTML and no xul:editor
Comment 9 :Ehsan Akhgari 2011-08-09 11:57:08 PDT
Comment on attachment 551492 [details] [diff] [review]
mochitest-plain test for bug 291780 [Checked in: Comment 10]

If you can change the failing check to todo_is, we can land the test right now.  :-)
Comment 10 Ian Neal 2011-08-09 16:17:00 PDT
Comment on attachment 551492 [details] [diff] [review]
mochitest-plain test for bug 291780 [Checked in: Comment 10]

Checked in with last test changed to "todo_is"
http://hg.mozilla.org/mozilla-central/rev/42992432ed56

Once bug is fixed, need to change this to "is"
Comment 11 Fabien Cazenave [:kaze] 2011-08-26 07:07:11 PDT
Created attachment 556022 [details] [diff] [review]
patch proposal

http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=ef4d7fd6a742
Comment 12 :Ehsan Akhgari 2011-08-31 14:52:01 PDT
Comment on attachment 556022 [details] [diff] [review]
patch proposal

Can this be landed?
Comment 13 Fabien Cazenave [:kaze] 2011-09-02 07:52:53 PDT
TryServer looks ok:
https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=ef4d7fd6a742
Comment 15 Marco Bonardo [::mak] 2011-09-03 02:57:38 PDT
http://hg.mozilla.org/mozilla-central/rev/056dda4ab249
Comment 16 Joe Sabash [:JoeS1] 2011-09-04 11:33:49 PDT
While it is certainly nice to see some of these old bugs fixed, it doesn't help much for using css in mail composition.
No way AFAICT to set useCSS. 
@@ -4110,17 +4110,17 @@ nsHTMLEditRules::WillOutdent(nsISelectio
         else if (useCSS)

Just a thought; Isn't it about time include more CSS editing capability for mailnews, or access to the "Full editor"
Maybe that would alleviate some of the horrible (msword generated) code I'm seeing in some mail, and the bugs that go with that.

Note You need to log in before you can comment on or make changes to this bug.