Bug 32187

Summary: Combination of #specific div:hover, and (non-inheriting) p:first-letter and p:first-line declarations inappropriately affects first-letter on hover
Product: WebKit Reporter: Pat <micropat+bugzilla>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hamaji, hayato, micropat+bugzilla, mitz, mjs, simon.fraser, yuzo
Priority: P2 Keywords: GoogleBug, Regression
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
Test case
none
In diffing render styles, consider all pseudo style changes.
none
In diffing render styles, consider all pseudo style changes.
none
In diffing render styles, consider all pseudo style changes. none

Pat
Reported 2009-12-05 18:28:32 PST
Created attachment 44352 [details] Test case See the attached page for a test case. To reproduce: load page, then hover over the paragraph. Expected result: The font of the first letter should *not* suddenly change on hover. What happens: The font of the first letter unexpectedly changes on hover. This is very odd behavior because the paragraph should not inherit the :hover selector due to specificity: #specific div:hover Reproduced on: WebKit nightly r51705 Chrome 4.0.249.25 Safari 4.0.3 (531.9.1) Other non-webkit browsers OK.
Attachments
Test case (714 bytes, text/html)
2009-12-05 18:28 PST, Pat
no flags
In diffing render styles, consider all pseudo style changes. (6.24 KB, patch)
2010-01-13 23:13 PST, Yuzo Fujishima
no flags
In diffing render styles, consider all pseudo style changes. (7.66 KB, patch)
2010-01-14 20:48 PST, Yuzo Fujishima
no flags
In diffing render styles, consider all pseudo style changes. (23.23 KB, patch)
2010-01-20 02:12 PST, Yuzo Fujishima
no flags
mitz
Comment 1 2009-12-06 20:32:32 PST
Why is the Regression keyword attached?
Yuzo Fujishima
Comment 2 2010-01-13 23:13:22 PST
Created attachment 46544 [details] In diffing render styles, consider all pseudo style changes.
Darin Adler
Comment 3 2010-01-14 11:41:36 PST
Comment on attachment 46544 [details] In diffing render styles, consider all pseudo style changes. I don't know if this is correct. But if it is, then to keep performance good, I think we should consider a fast check that quickly tests if any pseudo style bits are set at all, avoiding the loop checking one bit at a time in the vast majority of cases. That's assuming this is a hot enough function that it matters.
Yuzo Fujishima
Comment 4 2010-01-14 20:48:04 PST
Created attachment 46639 [details] In diffing render styles, consider all pseudo style changes.
Yuzo Fujishima
Comment 5 2010-01-14 20:51:07 PST
Hi, Darin, Thank you for your comment. Now the loop is not entered if the style doesn't have any (public) pseudo styles. Yuzo
Shinichiro Hamaji
Comment 6 2010-01-19 06:29:53 PST
I'm not 100% sure if the C++ change is correct (it looks good though) either. I think you need to add png and checksum of the expected result. Or, it would be better if we can test this with dumpAsText.
Yuzo Fujishima
Comment 7 2010-01-20 02:12:24 PST
Created attachment 46992 [details] In diffing render styles, consider all pseudo style changes.
Yuzo Fujishima
Comment 8 2010-01-20 02:18:22 PST
Added .png and .checksum. I've tried to make the test text-based, but failed. dumpAsText doesn't seem to output text for pseudo-elements. I've also tried window.getComputedStyle, element.offsetHeight, offsetTop, etc., but none worked for me. Yuzo
Yuzo Fujishima
Comment 9 2010-02-01 20:00:39 PST
Ping?
Yuzo Fujishima
Comment 10 2010-02-07 22:39:38 PST
Ping again?
Yuzo Fujishima
Comment 11 2010-02-15 23:59:28 PST
Ping, the third time. :)
Eric Seidel (no email)
Comment 12 2010-02-17 14:56:08 PST
Comment on attachment 46992 [details] In diffing render styles, consider all pseudo style changes. As far as I can tell this looks right.
WebKit Commit Bot
Comment 13 2010-02-17 21:15:06 PST
Comment on attachment 46992 [details] In diffing render styles, consider all pseudo style changes. Clearing flags on attachment: 46992 Committed r54926: <http://trac.webkit.org/changeset/54926>
WebKit Commit Bot
Comment 14 2010-02-17 21:15:11 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.