Last Comment Bug 210556 - Should be able to serialize <li> in plaintext without the bullet characters added in.
: Should be able to serialize <li> in plaintext without the bullet characters a...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Christopher Aillon (sabbatical, not receiving bugmail)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-06-24 15:44 PDT by Christopher Aillon (sabbatical, not receiving bugmail)
Modified: 2008-07-31 02:37 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
The smack down (1.69 KB, patch)
2003-06-27 17:46 PDT, Christopher Aillon (sabbatical, not receiving bugmail)
no flags Details | Diff | Splinter Review
The real patch (1.82 KB, patch)
2003-06-27 17:55 PDT, Christopher Aillon (sabbatical, not receiving bugmail)
harishd: review+
jst: superreview+
Details | Diff | Splinter Review

Description Christopher Aillon (sabbatical, not receiving bugmail) 2003-06-24 15:44:55 PDT
<ul><li> will always hit this bit of code in plaintext serialization:

768       static char bulletCharArray[] = "*o+#";
769       NS_ASSERTION(mULCount > 0, "mULCount should be greater than 0 here");
770       char bulletChar = bulletCharArray[(mULCount - 1) % 4];
771       mInIndentString.Append(PRUnichar(bulletChar));

This should not happen unless the caller cares about formatted output.  I
noticed this when implementing Node.textContent (see the DOM 3 core WD).  After
I do some testing to make sure this doesn't break things like plaintext editing,
I'll put out a patch.
Comment 1 Christopher Aillon (sabbatical, not receiving bugmail) 2003-06-27 17:46:37 PDT
Created attachment 126661 [details] [diff] [review]
The smack down

Make OutputRaw do the right thing.
Comment 2 Christopher Aillon (sabbatical, not receiving bugmail) 2003-06-27 17:47:28 PDT
Comment on attachment 126661 [details] [diff] [review]
The smack down

Wrong patch.  Sigh.
Comment 3 Christopher Aillon (sabbatical, not receiving bugmail) 2003-06-27 17:55:48 PDT
Created attachment 126662 [details] [diff] [review]
The real patch
Comment 4 Christopher Aillon (sabbatical, not receiving bugmail) 2003-06-27 17:56:25 PDT
Comment on attachment 126662 [details] [diff] [review]
The real patch

Okay, so this makes raw mean raw.  This does not cause any regressions since
nobody is relying on raw output in the plaintext serializer (except
Node.textContent, which is the reason for this bug being filed).  I ran tests
against editor source view, dnd, copy, and mail plaintext view just to be sure
though, and everything seemed happy.
Comment 5 harishd 2003-07-01 12:05:24 PDT
Comment on attachment 126662 [details] [diff] [review]
The real patch

Make sure that this patch does not break mail and news in the plain text mode.

r=harishd
Comment 6 Johnny Stenback (:jst, jst@mozilla.com) 2003-07-02 17:10:48 PDT
Comment on attachment 126662 [details] [diff] [review]
The real patch

sr=jst
Comment 7 Christopher Aillon (sabbatical, not receiving bugmail) 2003-07-03 14:51:00 PDT
Fix checked in 07/02/2003 17:34.

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