Closed Bug 87497 Opened 23 years ago Closed 23 years ago

Implementation of nested quotes

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 24861

People

(Reporter: drepper, Assigned: pierre)

Details

(Keywords: css2)

Attachments

(3 files)

Mozilla currently does not handle nested quotes correctly.  I.e., if a style sheet
contains

    quotes: "<" ">" "<<" ">>"

the first pair would be used regardless of the nesting level.

I'll now append a test case for this problem (there is an XXX comment in the
sources) and a patch which implements the behavior I expect.  Somebody who
truly knows the CSS stuff should check it.  My knowledge comes form DSSSL
stylesheets etc where this is the correct behavior.
Keywords: css2, patch, review
I guess, from reading other pieces of code, that the patch I appended has some
leak problems.  I assume NS_RELEASE calls are necessary after calling GetParent?
If yes, the patch I'll append now should be more correct.
The existing report for this problem is bug 24861

You might like to read in particular Troy quoted by Marc Attinasi and check
whether you thought about reflecting changes to the document. I suspect that
engineers do not want to make Mozilla's already incomplete reflection of changes
get worse.

Nested quotes would be nice to have - thanks for taking time to work on it.
I've read 24861.  There is the problem of interpreting thewording.  I guess my
interpretation of CSS2 is not relevant since it's derived from a completely
different technology.  Anyway, the common opinion seems to be that the not only
the nesting for a specific tag is relevant, but all uses of the quotes.  I.e.,
two tags being represented with quotes means that both tags increment the same
nesting counter.  My  patch clearly doesn't do this since this is not how we
implemented similar things in DSSSL style sheets etc.
What's the performance impact of this patch? Does it pass the "party tricks"
part of http://www.bath.ac.uk/~py8ieh/internet/eviltests/content/2.html ?
Does it pass an equivalent test constructed in a random order using the DOM?
Incidentally I suggest moving discussion and the patch into bug 24861.
I think that your patch is incorrect. You assume that quotes are always
generated by the same tag, aren't you ?

This is false ; quotes are generated by elements that are selected by a rule 
containing a pseudo :before or :after with a 'content' declaration with
open-quote and/or close-quote values...

Hixie: yes, there is a performance hit in the proposed patch because it crowls
over all the element's ancestors each time a quote is inserted...


I'm marking this a dup. Let's continue discussion in the original bug.

*** This bug has been marked as a duplicate of 24861 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: