Closed
Bug 419285
Opened 17 years ago
Closed 17 years ago
::first-letter applies to entire line following <br> at start of block
Categories
(Core :: Layout: Block and Inline, defect)
Core
Layout: Block and Inline
Tracking
()
VERIFIED
FIXED
People
(Reporter: nm127, Assigned: roc)
References
()
Details
(Keywords: regression, verified1.9.0.2, verified1.9.1)
Attachments
(5 files)
53.13 KB,
image/png
|
Details | |
32.62 KB,
image/png
|
Details | |
50.06 KB,
image/png
|
Details | |
619 bytes,
text/html
|
Details | |
5.67 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
samuel.sidler+old
:
approval1.9.0.2+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; hu; rv:1.9b3) Gecko/2008020513 Firefox/3.0b3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; hu; rv:1.9b3) Gecko/2008020513 Firefox/3.0b3
The sentence "This line should be green." is yellow and has red background at test case http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/xhtml/full/flat/css3-modsel-180a.xml
Reproducible: Always
Steps to Reproduce:
1. Open test case at http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/xhtml/full/flat/css3-modsel-180a.xml
Actual Results:
The sentence "This line should be green." is yellow and has red background.
If the window is resized so that the sentence wrap to multiple lines, then the second line will be green. Then, if the window is resized again so large that the senence would fit into one line, the second line remains.
Expected Results:
The sentence "This line should be green." is green.
If the window resized, the sentence wraps and unwraps as needed.
Reporter | ||
Comment 1•17 years ago
|
||
The screenshot was created with:
Mozilla/5.0 (X11; U; Linux i686; hu; rv:1.9b3) Gecko/2008020513 Firefox/3.0b3
Reporter | ||
Comment 2•17 years ago
|
||
Reporter | ||
Comment 3•17 years ago
|
||
The sentence "This line should be green." is still displayed in two lines like this:
This
line should be green.
Updated•17 years ago
|
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → style-system
Component: Style System (CSS) → Layout: Block and Inline
QA Contact: style-system → layout.block-and-inline
Summary: W3C CSS3 Selector test fails: "::first-letter after <br> (ID #180a)" → ::first-letter applies to entire line following <br> at start of block
![]() |
||
Comment 4•17 years ago
|
||
Ouch.
And that is a regression from Gecko 1.8.1
Further more, the :first-letter should not be applied at all, per
http://www.w3.org/TR/css3-selectors/#first-letter
(Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1a1pre) Gecko/2008062020 Minefield/3.1a1pre)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: wanted1.9.1?
Flags: blocking1.9.1?
Keywords: regression
OS: Linux → All
Hardware: PC → All
Version: unspecified → Trunk
![]() |
||
Comment 5•17 years ago
|
||
![]() |
||
Comment 6•17 years ago
|
||
regressed between 2007081504 and 2007081604
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-08-15+04%3A00%3A00&maxdate=2007-08-16+03%3A00%3A00&cvsroot=%2Fcvsroot
--> almost certainly 385270 (caused a similar, but fixed, bug 392435)
Blocks: 385270
Updated•17 years ago
|
Flags: blocking1.9.0.1?
Assignee | ||
Comment 7•17 years ago
|
||
nsCSSFrameConstructor::WrapFramesInFirstLetterFrame treats the BR frame as inline since it's an eLineParticipant, so it carries on and wraps the following text frame in an nsFirstLetterFrame. Then during reflow, firstLetterStyleOK is correctly returning false during reflow of the text line --- since it's not the first line --- but nsFirstLetterFrame still has the first-letter style. It only turns off the first-letter style when it creates a continuation and here, since firstLetterStyleOK is false, the text frame doesn't break internally so nsFirstLetterFrame never gets a chance to create a continuation without the first-letter style.
Assignee | ||
Comment 8•17 years ago
|
||
This approach is very simple and fixes the bug. I think it's the best approach; modifying nsFirstLetterFrame to handle cases where the first-in-flow should not have first-letter style seems hard.
Assignee: nobody → roc
Status: NEW → ASSIGNED
Attachment #326395 -
Flags: superreview?(dbaron)
Attachment #326395 -
Flags: review?(dbaron)
Updated•17 years ago
|
Flags: wanted1.9.1?
Flags: wanted1.9.1+
Flags: blocking1.9.1?
Flags: blocking1.9.1+
Flags: blocking1.9.0.1?
Flags: blocking1.9.0.1-
Comment 9•17 years ago
|
||
I wonder if this is also causing bug 431341. Will experiment.
Comment 10•17 years ago
|
||
alas, while I do still suspect the interpolation of nsFirstLetterFrame is causing bug 431341, this patch does not cure it.
Comment on attachment 326395 [details] [diff] [review]
fix
r+sr=dbaron
Attachment #326395 -
Flags: superreview?(dbaron)
Attachment #326395 -
Flags: superreview+
Attachment #326395 -
Flags: review?(dbaron)
Attachment #326395 -
Flags: review+
Assignee | ||
Comment 12•17 years ago
|
||
Pushed a50ca180ed3e
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
![]() |
||
Comment 13•17 years ago
|
||
Works perfectly with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1a2pre) Gecko/2008073016 Minefield/3.1a2pre
Based on comment 8, this sounds a simple fix. Can this be ported to the 1.9.0.x branch ?
Flags: wanted1.9.0.x?
Comment 14•17 years ago
|
||
Yeah, we should get this on 1.9.0.x. roc, can you request approval on a 1.9 patch?
Flags: wanted1.9.0.x? → wanted1.9.0.x+
Assignee | ||
Updated•17 years ago
|
Attachment #326395 -
Flags: approval1.9.0.2?
Comment 15•17 years ago
|
||
Comment on attachment 326395 [details] [diff] [review]
fix
Approved for 1.9.0.2. Please land in CVS. a=ss
Attachment #326395 -
Flags: approval1.9.0.2? → approval1.9.0.2+
Comment 17•16 years ago
|
||
Verified for 1.9.0.2 with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.2) Gecko/2008090212 Firefox/3.0.2.
Keywords: fixed1.9.0.2 → verified1.9.0.2
Updated•16 years ago
|
Keywords: fixed1.9.1
Comment 18•16 years ago
|
||
verified FIXED on Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090413 Minefield/3.6a1pre ID:20090413031052
and
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090413 Minefield/3.6a1pre ID:20090413031052
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.1 → verified1.9.1
Comment 19•16 years ago
|
||
ack, here's the build ID for Shiretoko Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4pre) Gecko/20090413 Shiretoko/3.5b4pre ID:20090413031313
You need to log in
before you can comment on or make changes to this bug.
Description
•