Closed
Bug 373268
Opened 18 years ago
Closed 18 years ago
page break characters, as code points, do not collapse
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
INVALID
People
(Reporter: ray, Assigned: roc)
References
Details
Attachments
(1 file, 4 obsolete files)
(deleted),
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a3pre) Gecko/20070304 Minefield/3.0a3pre
I created two html files to use as a reftest: test.html and a reference.html:
test.html:
<html><head><title>Single-Space</title></head>
<body>
XXXXXX<br>
</body></html>
reference.html:
<html><head><title>Single-Space</title></head>
<body>
XXX XXX
</body></html>
These are supposed to come out exactly the same and they do not.
A single  does get displayed as the same as an ascii space. But obviously a sequence of page break characters do not collapse to a single space.
Comment 3•18 years ago
|
||
I think this is a bug in nsScanner::SkipWhitespace(). Reference: http://www.w3.org/TR/html401/struct/text.html#didx-white_space-1
Assignee: nobody → mrbkap
Component: Layout → HTML: Parser
OS: Mac OS X → All
QA Contact: layout → parser
Hardware: PC → All
Comment 4•18 years ago
|
||
So, while nsScanner::SkipWhitespace does need to take form feeds into account, it seems that layout needs to deal with collapsing the whitespace itself -- the parser doesn't do any of that (or else switching white-space: pre on and off wouldn't work correctly).
Assignee | ||
Comment 5•18 years ago
|
||
Yeah, that's my bug. You can make this a layout bug and assign it to me or file a new bug for me.
Assignee | ||
Comment 6•18 years ago
|
||
BTW is there a spec somewhere that says that FFs should be considered CSS whitespace?
Updated•18 years ago
|
Assignee: mrbkap → nobody
Component: HTML: Parser → Layout
QA Contact: parser → layout
Updated•18 years ago
|
Assignee: nobody → roc
Assignee | ||
Comment 7•18 years ago
|
||
Oh silly me. Never mind.
FYI, I am looking at things on the trunk build. The behavior has changed. Now, it appears that a  is rendered as a "missing character", a box.
I have also created a reftest for the single pagebreak () case.
Attachment #257901 -
Attachment is obsolete: true
Attachment #257902 -
Attachment is obsolete: true
Attachment #259455 -
Flags: review?(roc)
Assignee | ||
Comment 9•18 years ago
|
||
Why is this file zipped? Can you attach a patch in CVS diff format?
Assignee | ||
Comment 10•18 years ago
|
||
BTW my new-textframe code is supposed to fix this.
Depends on: 333659
Reporter | ||
Comment 11•18 years ago
|
||
I do get how the reftests are being placed into the source directories. Into which directory do you want these landed? Or does that matter?
Reporter | ||
Comment 12•18 years ago
|
||
roc: as you requested.
FYI, I did the diff with:
diff -x CVS -e -r -N ../newer/mozilla/layout/reftests mozilla/layout/reftests
Attachment #259455 -
Attachment is obsolete: true
Attachment #259486 -
Flags: review?(roc)
Attachment #259455 -
Flags: review?(roc)
Assignee | ||
Comment 13•18 years ago
|
||
CSS has very specific instructions for whitespace collapsing:
http://www.w3.org/TR/CSS21/text.html#white-space-prop
and they don't mention form feed characters. I'm inclined to follow CSS here and ignore the HTML spec.
Assignee | ||
Comment 14•18 years ago
|
||
So I'm afraid to say that this is, after all, INVALID.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Comment 15•18 years ago
|
||
Perhaps a test that asserts this behavior holds is in order, since deciding upon the test's invalidity took more than a trivial amount of effort? Should just be changing == to != in the list, so a new patch probably isn't needed.
Flags: in-testsuite?
Comment 16•18 years ago
|
||
(Bonus points for adding a comment to the tests explaining why the testcase is valid and that it respects the CSS but not HTML specs, preferably with URL references.)
Assignee | ||
Comment 17•17 years ago
|
||
Comment on attachment 259486 [details] [diff] [review]
patch for files previously attached as tarball
I'd like a new patch, in unified diff format, please
Attachment #259486 -
Flags: review?(roc)
Reporter | ||
Comment 18•17 years ago
|
||
As requested, in better format.
Attachment #259486 -
Attachment is obsolete: true
Attachment #281368 -
Flags: review?(roc)
Assignee | ||
Comment 19•17 years ago
|
||
Comment on attachment 281368 [details] [diff] [review]
new reftests, patch is in diff -uNp8 format
good
Attachment #281368 -
Flags: superreview+
Attachment #281368 -
Flags: review?(roc)
Attachment #281368 -
Flags: review+
You need to log in
before you can comment on or make changes to this bug.
Description
•