Inconsistent text wrapping of plain text files (direct v inside an iframe)

RESOLVED DUPLICATE of bug 1514655

Status

()

defect
P3
normal
RESOLVED DUPLICATE of bug 1514655
2 years ago
7 days ago

People

(Reporter: atnbueno, Unassigned)

Tracking

56 Branch
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20171024165158

Steps to reproduce:

Loaded a plain text (.txt) file in my browser via an iframe and directly. Example: http://atnbueno.com/firefox_text_wrap.html


Actual results:

Long lines in the plain text (.txt) file didn't wrap (while the same plain text file, accessed directly by the browser, wraps them).


Expected results:

Long lines in the plain text (.txt) source should wrap, as the do when the file is accessed directly by the browser. Not doing it so was reported as bug 253564 14 years ago and fixed 9 years later.

Firefox should apply the same CSS to both cases. All the other major browsers are consistent: Chrome (Windows 10 and macOS High Sierra), Safari (macOS High Sierra and iOS 11) and Edge (Windows 10) wrap the lines in both cases, and Internet Explorer 11 (Windows 10) doesn't wrap any of them. Only Firefox shows this inconsistence.
[Edited to clarify]

Steps to reproduce:

Loaded a plain text (.txt) file in my browser via an iframe. Example: http://atnbueno.com/firefox_text_wrap.html


Actual results:

Long lines in the framed text didn't wrap (while in the same plain text file, accessed directly by the browser, they are wrapped).


Expected results:

Long lines in the framed text (.txt) source should be wrapped, as the are when the plain text file is accessed directly by the browser. The issue of plain text wrapping for direct access was reported as bug 253564 14 years ago and fixed 9 years later.

Firefox should apply the same CSS to both cases. All the other major browsers are consistent: Chrome (Windows 10 and macOS High Sierra), Safari (macOS High Sierra and iOS 11) and Edge (Windows 10) wrap the lines in both cases, and Internet Explorer 11 (Windows 10) doesn't wrap any of them. Only Firefox (Windows 10 and macOS High Sierra) shows this inconsistence.
Component: Untriaged → Layout: Text
Product: Firefox → Core
It seems we don't inject the plaintext.css sheet in the <iframe> case.
I'm guessing we probably intended to but missed this case somehow in bug 253564.

Anyway, it's not a layout bug per se.  Parser or Toolkit maybe?
Blocks: 253564
Status: UNCONFIRMED → NEW
Component: Layout: Text → HTML: Parser
Ever confirmed: true
jaws fixed bug 253564 so maybe he has relevant thoughts?
Flags: needinfo?(jaws)
This is the direct result of https://bugzilla.mozilla.org/show_bug.cgi?id=851230.

Since all other modern browsers (this does not include IE11) wrap the iframe contents then I suppose we should too. We could revert bug 851230 or remove the "alternate"-ness of the stylesheet.
Flags: needinfo?(jaws)
Thanks for the info
Component: HTML: Parser → Layout
Priority: -- → P3
Status: NEW → RESOLVED
Closed: 7 days ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1514655
You need to log in before you can comment on or make changes to this bug.