WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
9738
Unqualified :hover selector ignored in strict parsing mode
https://bugs.webkit.org/show_bug.cgi?id=9738
Summary
Unqualified :hover selector ignored in strict parsing mode
Mark Rowe (bdash)
Reported
2006-07-05 03:53:51 PDT
When in strict parsing mode :hover { text-decoration: underline; } is ignored. Firefox ignores the selector in quirks mode, but accepts it in strict mode. I believe WebKit should do the same.
Attachments
Quirks test case
(363 bytes, text/html)
2006-07-05 03:57 PDT
,
Mark Rowe (bdash)
no flags
Details
Strict test case
(379 bytes, text/html)
2006-07-05 03:57 PDT
,
Mark Rowe (bdash)
no flags
Details
Only ignore unqualified :hover rules in quirks mode
(46.15 KB, patch)
2006-07-05 04:39 PDT
,
Mark Rowe (bdash)
mjs
: review-
Details
Formatted Diff
Diff
Updated patch
(43.98 KB, patch)
2006-07-10 02:20 PDT
,
Mark Rowe (bdash)
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2006-07-05 03:57:01 PDT
Created
attachment 9206
[details]
Quirks test case
Mark Rowe (bdash)
Comment 2
2006-07-05 03:57:35 PDT
Created
attachment 9207
[details]
Strict test case
Mark Rowe (bdash)
Comment 3
2006-07-05 04:15:43 PDT
Heh, I just realised that the text in both of the test cases is meaningless, and is left over from reducing
bug 9737
. The expected results are that in the quirks case, moving the mouse into the document or over the text should have no effect. In the strict case, moving the mouse over the document or text should result in the text being underlined.
Mark Rowe (bdash)
Comment 4
2006-07-05 04:39:16 PDT
Created
attachment 9208
[details]
Only ignore unqualified :hover rules in quirks mode
Maciej Stachowiak
Comment 5
2006-07-10 01:33:44 PDT
Conceptually this is a good fix. However: + // intended to apply the rules only to links. + bool onlyHoverActive = !strictParsing && (!sel->hasTag() && + (sel->match == CSSSelector::PseudoClass && + (sel->pseudoType() == CSSSelector::PseudoHover || + sel->pseudoType() == CSSSelector::PseudoActive))); This makes "onlyHoverActive" a poor variable name now, since it no longer represents just the fact tha the style consists of only hover and active states. I think it would be better to change the point of use instead, in terms of clarity: // disallow *:hover, *:active, and *:hover:active except for links if (onlyHoverActive && subject) { Otherwise the variable name should be changed to something like shouldTreatAsQuirkyHoverActiveRule or something like that.
Maciej Stachowiak
Comment 6
2006-07-10 01:34:14 PDT
Comment on
attachment 9208
[details]
Only ignore unqualified :hover rules in quirks mode r=me
Maciej Stachowiak
Comment 7
2006-07-10 01:35:04 PDT
Comment on
attachment 9208
[details]
Only ignore unqualified :hover rules in quirks mode Er, meant to r- this due to comments above.
Mark Rowe (bdash)
Comment 8
2006-07-10 02:20:25 PDT
Created
attachment 9333
[details]
Updated patch Changed point of use as per Maciej's comment. I'm not really sure why I missed that initially.
Darin Adler
Comment 9
2006-07-10 07:40:21 PDT
Comment on
attachment 9333
[details]
Updated patch r=mjs
Timothy Hatcher
Comment 10
2006-07-31 20:55:00 PDT
Landed in
r15727
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug