Implementation of nested quotes

VERIFIED DUPLICATE of bug 24861

Status

()

VERIFIED DUPLICATE of bug 24861
18 years ago
15 years ago

People

(Reporter: drepper, Assigned: pierre)

Tracking

({css2})

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

18 years ago
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.
(Reporter)

Comment 1

18 years ago
Created attachment 39853 [details]
Test case for nested quotes
(Reporter)

Comment 2

18 years ago
Created attachment 39854 [details] [diff] [review]
Patch to implement correct nesting handling
(Reporter)

Updated

18 years ago
Keywords: css2, patch, review
(Reporter)

Comment 3

18 years ago
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.
(Reporter)

Comment 4

18 years ago
Created attachment 39858 [details] [diff] [review]
Updated patch with NS_RELEASE

Comment 5

18 years ago
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.
(Reporter)

Comment 6

18 years ago
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
Last Resolved: 18 years ago
Resolution: --- → DUPLICATE

Updated

15 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.