| Summary: | dynamic pseudo-class :hover does not get applied | ||
|---|---|---|---|
| Product: | [Applications] konqueror | Reporter: | rick <rickv> |
| Component: | khtml | Assignee: | Konqueror Bugs <konqueror-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Gentoo Packages | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
rick
2006-06-05 22:19:19 UTC
You need to set doctype to transitional or strict. We only apply :hover to links in quirk mode. This is consistent with other browsers. Okay.. odd it works in Firefox.. SVN commit 548707 by carewolf:
If :hover is part of a subselector it doesn't fall under
the hoveractive-only quirk (REGRESSION)
BUG: 128710
M +4 -4 cssstyleselector.cpp
M +1 -1 cssstyleselector.h
--- branches/KDE/3.5/kdelibs/khtml/css/cssstyleselector.cpp #548706:548707
@@ -1021,7 +1021,7 @@
//kdDebug() << "CSSOrderedRule::checkSelector" << endl;
ElementImpl *elem = static_cast<ElementImpl *>(n);
- if(!checkOneSelector(sel, elem, isAncestor)) return 0;
+ if(!checkOneSelector(sel, elem, isAncestor, true)) return 0;
//kdDebug() << "CSSOrderedRule::checkSelector: passed" << endl;
break;
}
@@ -1054,7 +1054,7 @@
return;
}
-bool CSSStyleSelector::checkOneSelector(DOM::CSSSelector *sel, DOM::ElementImpl *e, bool isAncestor)
+bool CSSStyleSelector::checkOneSelector(DOM::CSSSelector *sel, DOM::ElementImpl *e, bool isAncestor, bool isSubSelector)
{
if(!e)
return false;
@@ -1433,7 +1433,7 @@
case CSSSelector::PseudoHover: {
// If we're in quirks mode, then *:active should only match focusable elements, and never
// unfocusable anchors.
- if (strictParsing || (sel->tag != anyQName && e->id() != ID_A) || e->isFocusable()) {
+ if (strictParsing || ((sel->tag != anyQName || isSubSelector) && e->id() != ID_A) || e->isFocusable()) {
doc->dynamicDomRestyler().addDependency(element, e, HoverDependency);
if (e->hovered())
@@ -1443,7 +1443,7 @@
}
case CSSSelector::PseudoActive:
// If we're in quirks mode, then *:active should only match focusable elements
- if (strictParsing || (sel->tag != anyQName && e->id() != ID_A) || e->isFocusable()) {
+ if (strictParsing || ((sel->tag != anyQName || isSubSelector) && e->id() != ID_A) || e->isFocusable()) {
doc->dynamicDomRestyler().addDependency(element, e, ActiveDependency);
if (e->active())
--- branches/KDE/3.5/kdelibs/khtml/css/cssstyleselector.h #548706:548707
@@ -152,7 +152,7 @@
with given relationships matches the given Element */
void checkSelector(int selector, DOM::ElementImpl *e);
/* checks if the selector matches the given Element */
- bool checkOneSelector(DOM::CSSSelector *selector, DOM::ElementImpl *e, bool isAncestor);
+ bool checkOneSelector(DOM::CSSSelector *selector, DOM::ElementImpl *e, bool isAncestor, bool isSubSelector=false);
#ifdef APPLE_CHANGES
/* This function fixes up the default font size if it detects that the
|