Closed
Bug 82813
Opened 24 years ago
Closed 23 years ago
Whitespace handling needs to be savvy to <pre>
Categories
(Core :: DOM: Editor, defect, P1)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: mozeditor, Assigned: mozeditor)
References
Details
(Whiteboard: [ws] EDITORBASE+; FIXINHAND; need a=)
Attachments
(1 file, 2 obsolete files)
1.70 KB,
patch
|
Brade
:
review+
kinmoz
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
WS handling code that I landed for moz091 does not check for <pre>. I need to
add this in. WS handling is very different for pre cases. I'll attachsome test
cases later on.
Comment 1•24 years ago
|
||
Joe, moving this to 1.0, it seems like there is a lot fo detailed work that
needs to take place.
Priority: -- → P2
Whiteboard: [ws]
Target Milestone: --- → mozilla1.0
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [ws] → [ws] EDITORBASE; 3 days
Assignee | ||
Comment 2•24 years ago
|
||
*** Bug 111974 has been marked as a duplicate of this bug. ***
Comment 3•24 years ago
|
||
There are four testcases in the duplicate 111974 but I have since found a fifth.
If you type extra spaces at the end of a <pre> line then when you try to delete
them you end up deleting the text instead...
Comment 4•24 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1
(you can query for this string to delete spam or retrieve the list of bugs I've
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Assignee | ||
Comment 6•24 years ago
|
||
pushing off 098 to 099
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Comment 7•24 years ago
|
||
marking EDITORBASE+ per meeting
Whiteboard: [ws] EDITORBASE; 3 days → [ws] EDITORBASE+; 3 days
Assignee | ||
Comment 8•23 years ago
|
||
Assignee | ||
Comment 9•23 years ago
|
||
this is a limited fix. You will see uneven preservation of whitespace when you
merge two blocks, one a pre and one not. However, to fix that I have to do
more than just make the current code smarter - I will have to potentially scan
through the entire block rather just it's boundaries. To see this, consider
backspacing at the front of a pre that is after a (non-pre) paragraph. The
text that was in the pre gets appended to the paragraph. Any runs of
consecutive spaces anywhere in the old pre need to be converted to space-nbsp
combinations.
I think doing that might be beyond the scope of the editor (it is potentially a
performance problem). So I've made limited fixes that are fast and that allow
normal editting behavior within pre's.
Assignee | ||
Updated•23 years ago
|
Whiteboard: [ws] EDITORBASE+; 3 days → [ws] EDITORBASE+; FIXINHAND; need r=, sr=
Comment 10•23 years ago
|
||
Attachment #68847 -
Flags: superreview+
Comment 11•23 years ago
|
||
Comment on attachment 68848 [details] [diff] [review]
diffs for nsWSRunObject.cpp
Are these intermediate assignments just for readability's sake, or can we
remove them?
+ PRInt32 startOffset = point.mOffset;
+ PRInt32 endOffset = point.mOffset+1;
+ return DeleteChars(node, startOffset, node, endOffset);
The 2 blocks you added that call DeleteChars() need to have their indentation
fixed.
Heh, I was going to ask you why we didn't initialize outType, when looking at
one of your other patches:
+ *outType = eNone;
but then I realized "what's the point" if there's no code path that returns
without it being set?
sr=kin@netscape.com
Attachment #68848 -
Flags: superreview+
Whiteboard: [ws] EDITORBASE+; FIXINHAND; need r=, sr= → [ws] EDITORBASE+; FIXINHAND; need r=
Assignee | ||
Comment 12•23 years ago
|
||
fixed on tip
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 13•23 years ago
|
||
From the testcases in bug 111974, it appears that this not totally fixed.
Tested on Win XP using 02-20 trunk build.
I am still seeing this issue if you:
1. Open Composer
2. Select Preformat from the paragraph drop-down
3. Type (without quotes) " test"
4. Try to delete (either forward or backwards) the first t
Actual Results:
all but the first space is deleted.
Expected Results:
the t should be deleted and nothing else.
I am reopening this bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 14•23 years ago
|
||
This situation is a lot better now, but I think I can fix this issue too.
Target Milestone: mozilla0.9.9 → ---
Assignee | ||
Comment 15•23 years ago
|
||
pushed off EB+ get P1
Priority: P2 → P1
Target Milestone: --- → mozilla1.0
Assignee | ||
Updated•23 years ago
|
Whiteboard: [ws] EDITORBASE+; FIXINHAND; need r= → [ws] EDITORBASE+
Assignee | ||
Comment 16•23 years ago
|
||
additional tweak to fix the case mentioned in comment #13
Attachment #68847 -
Attachment is obsolete: true
Attachment #68848 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Whiteboard: [ws] EDITORBASE+ → [ws] EDITORBASE+; FIXINHAND; need r=,sr=,a=
Comment 17•23 years ago
|
||
Comment on attachment 74693 [details] [diff] [review]
patch to nsWSRunObject.cpp
sr=kin@netscape.com
Attachment #74693 -
Flags: superreview+
Whiteboard: [ws] EDITORBASE+; FIXINHAND; need r=,sr=,a= → [ws] EDITORBASE+; FIXINHAND; need r=,a=
Comment 18•23 years ago
|
||
Comment on attachment 74693 [details] [diff] [review]
patch to nsWSRunObject.cpp
r=brade
Attachment #74693 -
Flags: review+
Whiteboard: [ws] EDITORBASE+; FIXINHAND; need r=,a= → [ws] EDITORBASE+; FIXINHAND; need a=
Comment 19•23 years ago
|
||
Comment on attachment 74693 [details] [diff] [review]
patch to nsWSRunObject.cpp
a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #74693 -
Flags: approval+
Assignee | ||
Comment 20•23 years ago
|
||
fixed on trunk
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Comment 21•23 years ago
|
||
Neil, can you verify this and mark verified-fixed? thanks
Updated•23 years ago
|
Status: RESOLVED → VERIFIED
Comment 22•23 years ago
|
||
This appears to have fixed all my five test cases.
You need to log in
before you can comment on or make changes to this bug.
Description
•