Closed
Bug 340800
Opened 18 years ago
Closed 18 years ago
[FIX]Line breaks lost in text document's body.innerHTML
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: nevis2us, Assigned: bzbarsky)
References
()
Details
(Keywords: fixed1.8.1, regression, Whiteboard: [need regression test])
Attachments
(3 files, 2 obsolete files)
32 bytes,
text/plain
|
Details | |
1.07 KB,
text/html
|
Details | |
2.28 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
darin.moz
:
approval1.8.1+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060604 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060604 Firefox/1.5.0.4
Load a multiline plain text file into an iframe
and inspect iframe.document.body.innerHTML property.
No line breaks preserved there.
There's a thread in mozilla.dev.tech.dom:
new lines missing in innerHTML (FF 1.5.0.4)
Reproducible: Always
Steps to Reproduce:
See above
Actual Results:
line1 line2 line3
Expected Results:
line1
line2
line3
Reporter | ||
Comment 1•18 years ago
|
||
As there's currently no standard which covers serialization of text/plain content
within an iframe it makes sense to maintain compatibility with IE6 behaviour
or it may break existing cross-browser code.
Version: unspecified → 1.5.0.x Branch
Comment 2•18 years ago
|
||
Link to thread in mozilla.dev.tech.dom:
http://groups.google.com/group/mozilla.dev.tech.dom/browse_frm/thread/56e62fbcb175da80/d38d8128a57cff4d
Updated•18 years ago
|
Assignee: nobody → general
Component: General → DOM: Mozilla Extensions
Product: Firefox → Core
QA Contact: general → ian
Version: 1.5.0.x Branch → Trunk
Comment 3•18 years ago
|
||
Confirming with both Firefox 1.5.0.4 release build as well as Firefox trunk nightly on Windows XP.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Assignee | ||
Comment 4•18 years ago
|
||
Like I said in the newsgroup:
What seems to be going on here is that the plaintext serializer is broken when used in Raw mode -- it loses newlines. It should just preserve them in Raw mode, imo.
That said, maybe we should switch to just serializing innerHTML as HTML for any case-insensitive document (including text/plain) instead of serializing as the actual content type?
Flags: blocking1.9a1?
Flags: blocking1.8.1?
There's no indication in the bug that this is a regression. So while it may be bad, it doesn't seem like it needs to block 1.8.1.
Flags: blocking1.8.1? → blocking1.8.1-
Assignee | ||
Comment 6•18 years ago
|
||
> There's no indication in the bug that this is a regression.
Sorry about that. This is in fact a regression from Gecko 1.7; that was mentioned in the first post in the newsgroup thread linked in comment 2.
Specifically, this is a regression from bug 155723.
Blocks: 155723
Flags: blocking1.8.1- → blocking1.8.1?
OK, plussing (although I'm the least convinced of the people in the meeting).
Flags: blocking1.8.1? → blocking1.8.1+
Assignee | ||
Comment 8•18 years ago
|
||
I'm happy to fix this, btw. But I'd like some feedback on which of the two proposed solutions (or both?) we should take here.
Keywords: regression
Comment 9•18 years ago
|
||
-> boris
Not going to hold FF2 beta1 for this, but we'd be interested in a fix for FF2 beta2.
Assignee: general → bzbarsky
Flags: blocking1.8.1+ → blocking1.8.1-
Whiteboard: [ff2b2]
Comment 10•18 years ago
|
||
From testing what IE does it seems like it at least for text/plain content serializes body.innerHTML as HTML as the text ends up being inside a <PRE> tag. Given that, it seems like we should make .innerHTML serialize as HTML as well (for case-insensitive documents).
Assignee | ||
Comment 11•18 years ago
|
||
Assignee | ||
Comment 12•18 years ago
|
||
Assignee | ||
Comment 13•18 years ago
|
||
Attachment #227354 -
Attachment is obsolete: true
Assignee | ||
Comment 14•18 years ago
|
||
Attachment #227356 -
Attachment is obsolete: true
Assignee | ||
Comment 15•18 years ago
|
||
Attachment #227362 -
Flags: superreview?(peterv)
Attachment #227362 -
Flags: review?(peterv)
Assignee | ||
Updated•18 years ago
|
Priority: -- → P3
Summary: Line breaks lost in text document's body.innerHTML → [FIX]Line breaks lost in text document's body.innerHTML
Target Milestone: --- → mozilla1.9alpha
Updated•18 years ago
|
Flags: blocking1.8.1- → blocking1.8.1+
Whiteboard: [ff2b2]
Target Milestone: mozilla1.9alpha → mozilla1.8.1beta2
Assignee | ||
Updated•18 years ago
|
Target Milestone: mozilla1.8.1beta2 → mozilla1.9alpha
Updated•18 years ago
|
Target Milestone: mozilla1.9alpha → mozilla1.8.1beta2
Updated•18 years ago
|
Attachment #227362 -
Flags: superreview?(peterv)
Attachment #227362 -
Flags: superreview+
Attachment #227362 -
Flags: review?(peterv)
Attachment #227362 -
Flags: review+
Assignee | ||
Comment 16•18 years ago
|
||
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: blocking1.9a1?
Resolution: --- → FIXED
Assignee | ||
Updated•18 years ago
|
Attachment #227362 -
Flags: approval1.8.1?
Comment 17•18 years ago
|
||
Comment on attachment 227362 [details] [diff] [review]
Fix
a=darin on behalf of drivers
Attachment #227362 -
Flags: approval1.8.1? → approval1.8.1+
Assignee | ||
Comment 18•18 years ago
|
||
Checked in on 1.8 branch. Need to land a regression test, but we don't really have a setup for this sort of test yet... davel, we could probably drop a test for this into that test suite you were working on for the about:blank tests, actually. Is there a bug that covers that yet?
Keywords: fixed1.8.1
Whiteboard: [need regression test]
Assignee | ||
Comment 19•18 years ago
|
||
davel, see comment 18?
Target Milestone: mozilla1.8.1beta2 → mozilla1.9alpha
Comment 20•18 years ago
|
||
there is the meta-bug "test-harness" - I'll create a tracking bug for this harness (blocking the master test-harness bug), then block that bug with this one.
As far as this specific test:
1) I think we can use jsunit, since no chrome privs are required by the testcase.
2) I took a quick look at this. Is the pass condition that iframe.document.body.innerHTML contains newlines and is wrapped by a pre tag? Or do I need to test the results of assignment ot a textarea and a div, too?
Assignee | ||
Comment 21•18 years ago
|
||
> Is the pass condition that iframe.document.body.innerHTML contains newlines and
> is wrapped by a pre tag?
Yep. The assignment is just there to make it human-visible; it's not really part of the test.
Assignee | ||
Updated•18 years ago
|
Flags: in-testsuite?
Comment 22•18 years ago
|
||
added to mochitest
Checking in static/bug340800_iframe.txt;
/cvsroot/mozilla/testing/mochitest/static/bug340800_iframe.txt,v <-- bug340800_iframe.txt
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/testing/mochitest/tests/test_bug340800.html,v
done
Checking in tests/test_bug340800.html;
/cvsroot/mozilla/testing/mochitest/tests/test_bug340800.html,v <-- test_bug340800.html
initial revision: 1.1
done
Flags: in-testsuite? → in-testsuite+
Updated•12 years ago
|
Component: DOM: Mozilla Extensions → DOM
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•