Open Bug 509685 Opened 15 years ago Updated 2 years ago

::first-letter does not extend through punctuation across multiple elements / pseudo-elements / parts of pseudo-elements / text nodes

Categories

(Core :: Layout, defect)

x86
Linux
defect

Tracking

()

People

(Reporter: gsnedders, Unassigned)

References

(Depends on 1 open bug, Blocks 4 open bugs, )

Details

User-Agent:       Opera/9.80 (X11; Linux i686; U; en) Presto/2.2.15 Version/10.00
Build Identifier: 

layout/reftests/first-letter/quote-1c.html and the associated reftest is seemingly wrong, as it expected only the quotation mark at the start of the string to have the ::first-letter selector applied to. I would expect both the quotation mark and the "T" to have the selector applied, per, 'Punctuation (i.e, characters defined in Unicode in the "open" (Ps), "close" (Pe), "initial" (Pi). "final" (Pf) and "other" (Po) punctuation classes), that precedes or follows the first letter should be included.'

Reproducible: Always

Steps to Reproduce:
1. View URL
2. View reference URL
3. Compare rendering
Actual Results:  
The two were equal.

Expected Results:  
The two should not be equal.
(In reply to comment #0)
> layout/reftests/first-letter/quote-1c.html and the associated reftest is
> seemingly wrong,

It's currently marked as "fails".

> as it expected only the quotation mark at the start of the
> string to have the ::first-letter selector applied to.

The associated reference (quote-1-ref.html) has:

<span id="letter">"T</span>

which seems to be exactly what you request.



We do support extending :first-letter through punctuation (see quote-1a.html and other tests); the issue is that we don't currently support extending :first-letter across the boundary of the :before pseudo-element (and maybe across real element boundaries as well, although I haven't tested that).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: ::first-letter should apply to both first letter and preceding punctuation → ::first-letter does not extend through punctuation across multiple elements / pseudo-elements
We do fail to extend across real element boundaries.  I'll add a quote-1e.html testing that, and mark the failures of quote-1b,c,e as related to this bug.

Actually, it also seems (quote-1c.html) that we fail to extend *within* a single pseudo-element.
Component: Layout → Layout: Block and Inline
Priority: -- → P4
QA Contact: layout → layout.block-and-inline
Summary: ::first-letter does not extend through punctuation across multiple elements / pseudo-elements → ::first-letter does not extend through punctuation across multiple elements / pseudo-elements or within pseudo-elements
(In reply to comment #2)
> Actually, it also seems (quote-1c.html) that we fail to extend *within* a
> single pseudo-element.

In particular, between the open-quote part of the pseudo-element and the "This" part of the pseudo-element, which we represent internally as two separate elements.

We do extend correctly within a single pseudo-element, and I'll add that as *another* test.
Summary: ::first-letter does not extend through punctuation across multiple elements / pseudo-elements or within pseudo-elements → ::first-letter does not extend through punctuation across multiple elements / pseudo-elements or parts of pseudo-elements
This might be a dupe of bug 45091, but I have trouble parsing the summary of that one.
Component: Layout: Block and Inline → Layout
Priority: P4 → --
Yeah, I think it is basically a duplicate at this point.  But I'm sort of hesitant to mark duplicate in that direction because that bug has a lot of stuff about code that's no longer around, and about bugs that have already been fixed.

I'm also a little scared of trying to handle the necessary frame-munging for this bug during reflow.  I marked this bug as depending on handling :first-letter during frame construction, which would also fix all our current intrinsic width bugs.
(In reply to comment #1)
> The associated reference (quote-1-ref.html) has:
> 
> <span id="letter">"T</span>
> 
> which seems to be exactly what you request.

Hmm… I wonder how I managed to read that wrong. :\ RESOLVED?
No, we still need a bug on the fact that we're failing that test (and it probably should have been filed when the test was checked in).
QA Contact: layout.block-and-inline → layout
layout/reftests/first-letter/quote-1d.html also tests multiple text nodes (and fails)

Note that these reftests are also in the CSS2.1 test suite as first-letter-quote-*
Summary: ::first-letter does not extend through punctuation across multiple elements / pseudo-elements or parts of pseudo-elements → ::first-letter does not extend through punctuation across multiple elements / pseudo-elements / parts of pseudo-elements / text nodes
Blocks: css-pseudo-4
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.