Bug 68438 - <button> are not released from "pushed" stated with mouse release
Summary: <button> are not released from "pushed" stated with mouse release
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml forms (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 36839 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-17 18:57 UTC by Oded Arbel
Modified: 2005-02-18 22:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oded Arbel 2003-11-17 18:57:01 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:          Linux

pushed buttons are not released until the mouse-out event - when a button is clicked, its image becomes "pushed" but when the mouse button is released, the image remains in the "pushed" state until the mouse is moved outside of the button.
Comment 1 Leo Savernik 2004-08-27 11:24:34 UTC
Indeed.
Comment 2 Leo Savernik 2005-02-13 23:03:46 UTC
*** Bug 36839 has been marked as a duplicate of this bug. ***
Comment 3 Leo Savernik 2005-02-18 22:28:09 UTC
CVS commit by savernik: 

Fixed :active pseudo class not being unapplied on mouse button release.

BUG: 68438


  M +6 -0      ChangeLog   1.384
  M +10 -8     rendering/render_layer.cpp   1.48


--- kdelibs/khtml/ChangeLog  #1.383:1.384
@@ -1,2 +1,8 @@
+2005-02-18  Leo Savernik  <l.savernik@aon.at>
+
+        * rendering/render_layer.cpp (updateHoverActiveState): Also mark
+        textnodes as being active. Use NodeImpl's implementation of setActive
+        for efficiency reasons, the style is updated anyway afterwards.
+
 2005-02-16  Leo Savernik  <l.savernik@aon.at>
 

--- kdelibs/khtml/rendering/render_layer.cpp  #1.47:1.48
@@ -1063,4 +1063,5 @@ void RenderLayer::updateHoverActiveState
     DOM::NodeImpl* newHoverNode = info.innerNode();
 
+    
     if (oldHoverNode == newHoverNode && (!oldHoverNode || oldHoverNode->active() == info.active()))
         return;
@@ -1079,9 +1080,9 @@ void RenderLayer::updateHoverActiveState
     for (RenderObject* curr = oldHoverObj; curr && curr != ancestor; curr = hoverAncestor(curr)) {
         curr->setMouseInside(false);
-        if (curr->element() && !curr->isText()) {
+        if (curr->element()) {
             bool oldActive = curr->element()->active();
-            curr->element()->setActive(false);
-            if (curr->style()->affectedByHoverRules() ||
-                (curr->style()->affectedByActiveRules() && oldActive))
+            curr->element()->NodeImpl::setActive(false);
+            if (!curr->isText() && (curr->style()->affectedByHoverRules() ||
+                 (curr->style()->affectedByActiveRules() && oldActive)))
                 curr->element()->setChanged();
         }
@@ -1092,12 +1093,13 @@ void RenderLayer::updateHoverActiveState
         bool oldInside = curr->mouseInside();
         curr->setMouseInside(true);
-        if (curr->element() && !curr->isText()) {
+        if (curr->element()) {
             bool oldActive = curr->element()->active();
-            curr->element()->setActive(info.active());
-            if ((curr->style()->affectedByHoverRules() && !oldInside) ||
-                (curr->style()->affectedByActiveRules() && oldActive != info.active()))
+            curr->element()->NodeImpl::setActive(info.active());
+            if (!curr->isText() && (curr->style()->affectedByHoverRules() && !oldInside) ||
+                 (curr->style()->affectedByActiveRules() && oldActive != info.active())) {
                 curr->element()->setChanged();
         }
     }
+    }
 }