Closed Bug 311822 Opened 20 years ago Closed 20 years ago

No whitespace between inline elements in <caption> tags (a, em, b, i) (link)

Categories

(Core :: Layout: Tables, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: bugzilla, Assigned: dbaron)

References

()

Details

(Whiteboard: [patch])

Attachments

(3 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1 It seems that for any two links (<a> tags) separated by a space, contained in the <caption> tag of a table, the space is not rendered. See the specified URL. The words 'hello' and 'there' are two different links with a space between them. Reproducible: Always Steps to Reproduce: 1. Navigate to http://smurl.us/6 Actual Results: The caption reads 'hellothere' Expected Results: The caption should read 'hello there'
Component: General → Layout: Block and Inline
Product: Firefox → Core
Version: unspecified → 1.0 Branch
Weird. masayuki@d-toybox.com: I assume setting this to 1.0 branch was a mistake? Confirmed
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Version: 1.0 Branch → Trunk
Attached file testcase
It's not just for <a>, it's for any two inline elements with only whitespace between them. Occurs in quirks and strict. I'm going to change the summary, and I'm also going to move this to Layout: Tables, since I think we handle captions differently than normal block and inline elements.
Component: Layout: Block and Inline → Layout: Tables
QA Contact: general → layout.tables
Summary: Spaces in between links in <caption> tags → No whitespace between inline elements in <caption> tags (a, em, b, i) (link)
> I assume setting this to 1.0 branch was a mistake? Yeah, it's my mistake, thanks.
Attached patch patchSplinter Review
I don't see what in the TableProcessChildren codepath causes whitespace-stripping, but I also don't see any reason we should be going through TableProcessChildren to construct the children of a block.
Attachment #199513 - Flags: review?(bernd_mozilla)
Assignee: nobody → dbaron
Priority: -- → P1
Whiteboard: [patch]
Target Milestone: --- → mozilla1.9alpha
Comment on attachment 199513 [details] [diff] [review] patch This should be indeed identical to the situation at the table cell
Attachment #199513 - Flags: review?(bernd_mozilla) → review+
Attachment #199513 - Flags: superreview?(roc) → superreview+
Fix checked in to trunk.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Attached patch reftest (obsolete) — Splinter Review
Attachment #259040 - Flags: review?(dbaron)
Comment on attachment 259040 [details] [diff] [review] reftest I don't think we need tests for each inline element -- certainly not in separate files. I'm also a little hesitant to include a since some users have the pref set to always underline links. So how about dropping the a test and combining the others into just three files (-1, -2, -ref) by just putting the tests above/below each other in the same file? The basic idea of the tests looks fine, though.
Attachment #259040 - Flags: review?(dbaron) → review-
thanks for your comments. I'll attach a revised reftest.
Attached patch reftest-2Splinter Review
Attachment #259040 - Attachment is obsolete: true
Attachment #259080 - Flags: review?(dbaron)
Comment on attachment 259080 [details] [diff] [review] reftest-2 I committed these reftests to the trunk with the following changes: * I made the captions with <em> and <i> elements inside them font-style: italic in case the spaces were different width between italic and non-italic fonts (a problem you already fixed for bold and non-bold) * I cleaned up the formatting of the head elements and added a title to the tests * I renamed the tests, since the tests and the references were swapped -- the one that showed the bug was the one you had marked "-ref", and it should be the other way around. So r=dbaron with those changes -- and I just checked it in. Thanks for making the test, and sorry I took so long to get to it.
Attachment #259080 - Flags: review?(dbaron) → review+
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: