Closed
Bug 272293
Opened 20 years ago
Closed 20 years ago
Phrase-level tags (such as <em>) do not close when there is an open "Inline" tag (such as <nobr>)
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: rmsimons50, Assigned: mrbkap)
Details
Attachments
(2 files, 2 obsolete files)
|
83 bytes,
text/html
|
Details | |
|
5.63 KB,
patch
|
bzbarsky
:
review+
dmosedale
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 <h3><font face="arial" color="#009966"><em>E-mail</em><nbr><img src="eemail.gif" hspace="20" width="45" height="52"></font></h3> THE ABOVE HTML WORKS CORRECTLY, BUT THE FOLLOWING HTML IGNORES THE </EM> <h3><font face="arial" color="#009966"><em>E-mail<nbr><img src="eemail.gif" hspace="20" width="45" height="52"></em></font></h3> Reproducible: Always Steps to Reproduce: 1. 2. 3. Actual Results: Following text is italicized. Expected Results: Following text should not be italicized. It works in IE.
Comment 1•20 years ago
|
||
I can see the bug with this testcase in Mozilla1.7, but I can't see the bug anymore using: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20041128 Firefox/0.9.1+ So I think this has already been fixed somehow.
Updated•20 years ago
|
Assignee: general → parser
Component: General → HTML: Parser
Product: Mozilla Application Suite → Core
QA Contact: general → mrbkap
Version: unspecified → 1.7 Branch
| Reporter | ||
Comment 2•20 years ago
|
||
This attachment illustrates the problem more simply than the original example involving <img...> which should be ignored.
| Assignee | ||
Comment 3•20 years ago
|
||
A really minimized testcase (the other testcases were good, but this is much easier to debug).
Assignee: parser → mrbkap
Attachment #167371 -
Attachment is obsolete: true
Attachment #167382 -
Attachment is obsolete: true
Status: UNCONFIRMED → ASSIGNED
| Assignee | ||
Comment 4•20 years ago
|
||
The problem here is that we don't let phrasals close kInlineEntity's. I let them do so in nsElementTable.cpp and that change passes the parser regression tests with flying colors. The only actual kInlineEntity's are: <dd>, <dt>, <nobr>, <xmp>, which are all tested in the tests so I'm pretty confident with this change. Are there any other problems I should look out for?
Summary: </em> ignored when <img...> is between <em> and </em> → Phrase-level tags (such as <em>) do not close when there is an open "Inline" tag (such as <nobr>)
Comment 5•20 years ago
|
||
Hmm.. how does this interact with residual style handling on <dd>/<dt> ?
| Assignee | ||
Comment 6•20 years ago
|
||
Neither <dd> or <dt> are residual style tags, so we should just close them and be done with them... this is as it should be, I think (reopening <dd> or <dt> doesn't make sense to me).
Comment 7•20 years ago
|
||
No, I mean the following case: <em> <dl> <dt>Text </em> More text </dt> </dl> Would we end up closing out the <dt> when we hit </em>?
| Assignee | ||
Comment 8•20 years ago
|
||
Good point. How about changing <nobr> back to kExtensions and letting phrasals (and specials) close kExtensions. To avoid "breaking" <multicol> support (note: <multicol> is currently the only kExtension that is a container, <wbr> and <spacer> are both kNonContainers), I've made <multicol> a kBlock (which is what it really is anyway) to avoid <em><multicol></em>foo</multicol> so we'll do RS handling. Note that we treat kExtension as an inline entity.
Comment 9•20 years ago
|
||
That sounds reasonable at first blush, but I really don't remember this code well... test carefully! ;)
| Assignee | ||
Comment 10•20 years ago
|
||
This is basically what I described above. The only real change is that I had to make <multicol> contain kFlowEntity (== kInlineEntity | kBlockEntity) since RS handling didn't quite work correctly without that. This patch also cleans up some whitespace and comments.
| Assignee | ||
Comment 11•20 years ago
|
||
Comment on attachment 167619 [details] [diff] [review] patch v1 See comment 8 for an explanation of what's going on. This doesn't affect <dt> or <dd>. I've tested both <multicol> and <nobr> with this patch and they work as expected.
Attachment #167619 -
Flags: superreview?(dmose)
Attachment #167619 -
Flags: review?(rbs)
| Assignee | ||
Comment 12•20 years ago
|
||
Just as a note, my patch actually *improves* our <multicol> support. The old code didn't allow even #text as a child of <multicol>.
Comment 13•20 years ago
|
||
Comment on attachment 167619 [details] [diff] [review] patch v1 sr=dmose
Attachment #167619 -
Flags: superreview?(dmose) → superreview+
| Assignee | ||
Updated•20 years ago
|
Attachment #167619 -
Flags: review?(rbs) → review?(bzbarsky)
Comment 14•20 years ago
|
||
Comment on attachment 167619 [details] [diff] [review] patch v1 r=bzbarsky
Attachment #167619 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 15•20 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•