Closed
Bug 167292
Opened 21 years ago
Closed 15 years ago
Incorrect behavior when rule for floating :first-letter removed/added
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
DUPLICATE
of bug 303076
People
(Reporter: Maniac, Unassigned)
References
()
Details
(Keywords: helpwanted, testcase)
CSS2 selectors with display:block loose formatting on alternate stylesheet change Build ID: 2002090308 (trunk) Steps to reproduce: 1. Go to URL. Page has 2 stylesheet with P:first-letter set to display:block; float:left and some color. 2. Page displayed correctly: a word 'Test' with first letter red. 3. Change stylesheet from menu View, Use style Actual behaviour: Color (and actually any style) is lost and word 'Test' displayed twice (!) Expected behaviour: First letter of word 'Test' changes its color to blue, as specified in second stylesheet. P.S. This doesn't occur without setting display:block; float:left;
Comment 1•21 years ago
|
||
Confirming bug, 2002-09-05-08 trunk Linux
Updated•21 years ago
|
Summary: CSS2 selectors with display:block loose formatting on alternate stylesheet change → [RR/RCF]Incorrect behavior when rule for floating :first-letter removed/added
Reporter | ||
Comment 2•21 years ago
|
||
I feel that this is the same issue: Mozilla also refuses to display :before and :after pseudo-elements after stylesheet change. May be the overview should sound like '[RR/RCF]Incorrect behavior when rule for CSS2 selectors (:first-letter, :after, :before) removed/added'?
Comment 3•21 years ago
|
||
This is NOT the same bug as issues relating to :before and :after.
Updated•19 years ago
|
Keywords: helpwanted
Hardware: PC → All
Summary: [RR/RCF]Incorrect behavior when rule for floating :first-letter removed/added → Incorrect behavior when rule for floating :first-letter removed/added
![]() |
||
Comment 4•19 years ago
|
||
So there are several basic ways to fix this problem: 1) Simply reframe if we used to have a first-letter pseudo and no longer do. 2) Make the mContent for first-letter be the block, not the textnode 3) Make ReResolveStyleContext append a reframe hint for the block if the first-letter needs a reframe. #1 will fix this bug, but not bugs where a first-letter reframe is triggered without removing all first-letter styles. #2 and #3 will both work in general; #3 may be safer, but #2 seems cleaner to me.... David, Robert, thoughts?
![]() |
||
Comment 5•19 years ago
|
||
Oh, and I think the key here is that when we go to ContentRemoved on the textnode we want to reframe (since that's the mContent for the first-letter), the block doesn't have a first-letter frame anymore, so we don't RemoveLetterFrames, though we really should....
I'm not really up to speed on first-letter machinations.
Updated•16 years ago
|
Assignee: dbaron → nobody
QA Contact: ian → style-system
Comment 7•15 years ago
|
||
URL is 404, so duping forward to bug 303076, which has a testcase.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•