Closed Bug 3448 Opened 26 years ago Closed 26 years ago

Adjacent sibling selector fails unless content is well-formed

Categories

(Core :: DOM: HTML Parser, defect, P2)

All
Mac System 8.5
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: fahrner, Assigned: rickg)

References

()

Details

The URL given is a valid, simple HTML document. I am using a "P + P" selector to indent paragraphs that are preceded by other paragraphs. All other paragraphs should not be indented. But they are. Converting the document to XML makes everything work fine: http://style.verso.com/styleserverb/cgi-bin/styleserver.cgi?doc=localdoc&localdo c_name=XML_and_Java&proprocess=tidy&composites=midnight In my opinion, if the property won't be supported properly in some cases, then it should be entirely ignored in sa
Assignee: troy → peterl
Component: Layout → Style System
I don't see any adjacent sibling selectors used in this document (let alone any style sheet at all).
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Sorry, Peter - that resource isn't very stable. I have attempted to reproduce with Mac M3, happily without success, here: http://style.verso.com/junk/adjsiblingtest.html . I am changing to fixed. Looks great - typographers and markup freaks everywhere bless you for implementing an elegant means toward traditional indented composition!Oddly, though, the final paragraph renders initially with too little top-margin until the window is resized - then it's fine. I'll report as a separate bug if it persists.
I've re-opened, as further investigation shows that the bug persists. Valid butnot-well-formed content screws up the adjacent sibling selector mechanism.The relevant CSS is p+p { text-indent: 5% } .In the simplest case, the bug doesn't appear:http://style.verso.com/junk/adjsiblingtest.htmlhttp://style.verso.com/junk/adj_a.gifHowever, once you interpose headings between runs of paragraphs, then it breaks:* http://style.verso.com/junk/adjsiblingtest_b.html* http://style.verso.com/junk/adj_b.gifThe paragraphs following the heading elements should not be indented, nor shouldany headings themselves be indented.The problem vanishes by making the content well-formed (closing paragraphs):* http://style.verso.com/junk/adjsiblingtest_c.html* http://style.verso.com/junk/adj_c.gif
Assignee: peterl → rickg
Status: REOPENED → NEW
Component: Style System → Parser
This is a parser/DTD issue. The H2s in question are winding up inside the preceeding (non-closed) paragraph, so the CSS code sees adjacent paragraphs (which is what's in the content model)
Fixed by changes to CNavDTD.cpp
Status: NEW → RESOLVED
Closed: 26 years ago26 years ago
Status: RESOLVED → VERIFIED
Fixed in April 6th Build.
You need to log in before you can comment on or make changes to this bug.