Bug 7327 - REGRESSION (r12869): :hover subselector does not work in quirks mode
Summary: REGRESSION (r12869): :hover subselector does not work in quirks mode
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Nobody
URL:
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2006-02-17 15:29 PST by mitz
Modified: 2006-03-03 02:22 PST (History)
0 users

See Also:


Attachments
Patch to copy the tag into subselectors (2.56 KB, patch)
2006-02-18 09:44 PST, mitz
no flags Details | Formatted Diff | Diff
Patch (12.29 KB, patch)
2006-02-23 14:04 PST, mitz
no flags Details | Formatted Diff | Diff
Fix it another way (8.98 KB, patch)
2006-02-24 02:14 PST, mitz
no flags Details | Formatted Diff | Diff
Quirks test case (324 bytes, text/html)
2006-02-25 08:56 PST, mitz
no flags Details
Apply the *:hover and *:active quirks only when there are no sub-selectors (8.53 KB, patch)
2006-02-28 10:24 PST, mitz
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2006-02-17 15:29:08 PST
The fix for bug 7218 causes div#myID:hover not to match anything in quirks mode. Need to refine it since other browsers do let it match.
Comment 1 mitz 2006-02-18 09:44:14 PST
Created attachment 6589 [details]
Patch to copy the tag into subselectors

I would like to fix this by having the CSS parser copy the tag into subselectors. I tried it and the only negative effect was on selectorText (and possibly on performance), and trying to fix it I realized that selectorText already has a problem with subselectors (bug 7338).
Comment 2 mitz 2006-02-23 14:04:59 PST
Created attachment 6684 [details]
Patch

This patch also incorporates the fix for bug 7338, but not the testcase+changelog from that bug.
Comment 3 Dave Hyatt 2006-02-23 16:22:26 PST
Comment on attachment 6684 [details]
Patch

Conceptually I'm not sure I like the idea of the tag names being propagated into these other selectors just to accommodate the :hover quirk.

Is there no way to solve this problem at the time you're testing for the quirk?
Comment 4 mitz 2006-02-24 02:14:05 PST
Created attachment 6698 [details]
Fix it another way
Comment 5 mitz 2006-02-25 08:24:27 PST
Comment on attachment 6698 [details]
Fix it another way

The quirk is more subtle than I thought. Apparently #foo:hover should match... I'll need to investigate other combinations.
Comment 6 mitz 2006-02-25 08:56:58 PST
Created attachment 6731 [details]
Quirks test case

Various selectors with :hover and without a tag and the browsers in which they match. ddkilzer reports that none of them match in MSIE 6. The last patch makes WebKit behave like MSIE 6.
Comment 7 mitz 2006-02-27 15:26:41 PST
Comment on attachment 6698 [details]
Fix it another way

According to Dave Hyatt or IRC, "we should allow hover on everything except for *", so this patch is wrong (but the right patch should be even simpler).
Comment 8 mitz 2006-02-28 10:24:17 PST
Created attachment 6775 [details]
Apply the *:hover and *:active quirks only when there are no sub-selectors
Comment 9 Dave Hyatt 2006-03-01 01:58:54 PST
Comment on attachment 6775 [details]
Apply the *:hover and *:active quirks only when there are no sub-selectors

r=me