[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:31:39 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit a1a48f725adb0306241ad2118206dbbddb30dadb
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Mar 26 16:46:31 2003 +0000
Reviewed by Ken.
- fixed 3208468 -- REGRESSION: checkbox immediately unchecks the first time you check it
The stateChanged signal must be delivered before the mouse up event is handled.
* kwq/KWQButton.mm:
(-[KWQButton initWithQButton:]): Use [self init] instead of [super init]; no real difference,
just makes more logical sense.
(-[KWQButton action:]): Don't send the mouse up event here.
(-[KWQButton sendConsumedMouseUpIfNeeded]): Added. New method that sends the consumed mouse
up event.
(-[KWQButton mouseDown:]): Use a simplified scheme that uses only a single boolean to control
sending the consumed mouse up event. Call sendConsumedMouseUpIfNeeded to do the deed.
(QButton::clicked): Added comment to explain why it's important to send the consumed mouse
up event here. Added a call to the new sendConsumedMouseUpIfNeeded method, replacing the
code that was formerly in -[KWQButton action:].
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 278ee16..d6c9b88 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,23 @@
+2003-03-26 Darin Adler <darin at apple.com>
+
+ Reviewed by Ken.
+
+ - fixed 3208468 -- REGRESSION: checkbox immediately unchecks the first time you check it
+
+ The stateChanged signal must be delivered before the mouse up event is handled.
+
+ * kwq/KWQButton.mm:
+ (-[KWQButton initWithQButton:]): Use [self init] instead of [super init]; no real difference,
+ just makes more logical sense.
+ (-[KWQButton action:]): Don't send the mouse up event here.
+ (-[KWQButton sendConsumedMouseUpIfNeeded]): Added. New method that sends the consumed mouse
+ up event.
+ (-[KWQButton mouseDown:]): Use a simplified scheme that uses only a single boolean to control
+ sending the consumed mouse up event. Call sendConsumedMouseUpIfNeeded to do the deed.
+ (QButton::clicked): Added comment to explain why it's important to send the consumed mouse
+ up event here. Added a call to the new sendConsumedMouseUpIfNeeded method, replacing the
+ code that was formerly in -[KWQButton action:].
+
2003-03-25 David Hyatt <hyatt at apple.com>
Fix font-family parsing to match the spec (and other browsers).
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 278ee16..d6c9b88 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,23 @@
+2003-03-26 Darin Adler <darin at apple.com>
+
+ Reviewed by Ken.
+
+ - fixed 3208468 -- REGRESSION: checkbox immediately unchecks the first time you check it
+
+ The stateChanged signal must be delivered before the mouse up event is handled.
+
+ * kwq/KWQButton.mm:
+ (-[KWQButton initWithQButton:]): Use [self init] instead of [super init]; no real difference,
+ just makes more logical sense.
+ (-[KWQButton action:]): Don't send the mouse up event here.
+ (-[KWQButton sendConsumedMouseUpIfNeeded]): Added. New method that sends the consumed mouse
+ up event.
+ (-[KWQButton mouseDown:]): Use a simplified scheme that uses only a single boolean to control
+ sending the consumed mouse up event. Call sendConsumedMouseUpIfNeeded to do the deed.
+ (QButton::clicked): Added comment to explain why it's important to send the consumed mouse
+ up event here. Added a call to the new sendConsumedMouseUpIfNeeded method, replacing the
+ code that was formerly in -[KWQButton action:].
+
2003-03-25 David Hyatt <hyatt at apple.com>
Fix font-family parsing to match the spec (and other browsers).
diff --git a/WebCore/kwq/KWQButton.mm b/WebCore/kwq/KWQButton.mm
index eab61a6..560c7b1 100644
--- a/WebCore/kwq/KWQButton.mm
+++ b/WebCore/kwq/KWQButton.mm
@@ -32,44 +32,41 @@
@interface KWQButton : NSButton
{
QButton *button;
- BOOL processingMouseEvent;
- BOOL clickedDuringMouseEvent;
+ BOOL needToSendConsumedMouseUp;
}
-- initWithQButton:(QButton *)b;
-- (void)action:(id)sender;
+- (id)initWithQButton:(QButton *)b;
+- (void)sendConsumedMouseUpIfNeeded;
+
@end
@implementation KWQButton
-- initWithQButton:(QButton *)b
+- (id)initWithQButton:(QButton *)b
{
button = b;
- return [super init];
+ return [self init];
}
- (void)action:(id)sender
{
- if (processingMouseEvent) {
- clickedDuringMouseEvent = true;
+ button->clicked();
+}
+
+- (void)sendConsumedMouseUpIfNeeded
+{
+ if (needToSendConsumedMouseUp) {
+ needToSendConsumedMouseUp = NO;
button->sendConsumedMouseUp();
}
-
- button->clicked();
}
-(void)mouseDown:(NSEvent *)event
{
- processingMouseEvent = true;
+ needToSendConsumedMouseUp = YES;
[super mouseDown:event];
- processingMouseEvent = false;
-
- if (clickedDuringMouseEvent) {
- clickedDuringMouseEvent = false;
- } else {
- button->sendConsumedMouseUp();
- }
+ [self sendConsumedMouseUpIfNeeded];
}
@@ -112,7 +109,13 @@ QString QButton::text() const
void QButton::clicked()
{
+ // Order of signals is:
+ // 1) signals in subclasses (stateChanged, not sure if there are any others)
+ // 2) mouse up
+ // 3) clicked
+ // Proper behavior of check boxes, at least, depends on this order.
+
+ KWQButton *button = (KWQButton *)getView();
+ [button sendConsumedMouseUpIfNeeded];
m_clicked.call();
}
-
-
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list