Bug 6170 - CSS1: Properties for :first-letter aren't recalculated on color change
Summary: CSS1: Properties for :first-letter aren't recalculated on color change
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P3 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2005-12-20 13:17 PST by Matthias Lange
Modified: 2007-06-04 01:15 PDT (History)
1 user (show)

See Also:


Attachments
Test case for above filed bug (578 bytes, text/html)
2005-12-20 13:19 PST, Matthias Lange
no flags Details
First attempt (22.73 KB, patch)
2007-06-04 00:17 PDT, Rob Buis
hyatt: review-
Details | Formatted Diff | Diff
Using Hyatt's approach (22.53 KB, patch)
2007-06-04 00:57 PDT, Rob Buis
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Lange 2005-12-20 13:17:51 PST
The color of :first-letter is rendered wrong in following elements if it was changed previously through 
another element. The attached test case demonstrates it: in the first paragraph the first letter is rendered 
blue, because it is contained in a <a href ... statement. However the first letter of the second paragraph 
should be black but it is blue.
Comment 1 Matthias Lange 2005-12-20 13:19:01 PST
Created attachment 5190 [details]
Test case for above filed bug
Comment 2 Joost de Valk (AlthA) 2005-12-21 13:14:47 PST
Confirmed. Secondly, you are not able to select the first letter when it's styled differently, this is an issue 
too.
Comment 3 Matthias Lange 2005-12-22 15:39:12 PST
(In reply to comment #2)
> Confirmed. Secondly, you are not able to select the first letter when it's styled differently, this is an issue 
> too.

What do you mean by selecting the first letter? Is this related to WebKit internals or to some CSS stuff?
Comment 4 Rob Buis 2007-06-04 00:17:41 PDT
Created attachment 14849 [details]
First attempt

I am not 100% sure this is the right approach, but I can't think of another solution atm.
Cheers,

Rob.
Comment 5 Dave Hyatt 2007-06-04 00:22:39 PDT
Comment on attachment 14849 [details]
First attempt

The unique() bit is for this purpose.  Approach is basically right, but I'd rather you set the unique bit if it has first-letter (rather than adding first-letter to the canShareStyle check).
Comment 6 Rob Buis 2007-06-04 00:57:31 PDT
Created attachment 14850 [details]
Using Hyatt's approach

I hope I picked the right place for this code :)
Cheers,

Rob.
Comment 7 Dave Hyatt 2007-06-04 01:03:37 PDT
Comment on attachment 14850 [details]
Using Hyatt's approach

r=me
Comment 8 Rob Buis 2007-06-04 01:15:57 PDT
Landed in r21964.