[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

sullivan sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:50:52 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 84a91d2f8a7cf8c91c53d6cf9b657cf12dbe6342
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 8 18:34:16 2003 +0000

    WebCore:
    
    	- fixed 3362481 -- REGRESSION (89-90): clicking in a field causes
    	page to move; esp. bad if the field moves out from under the mouse
    
            Reviewed by Darin
    
            * kwq/KWQKHTMLPart.h:
            * kwq/KWQKHTMLPart.mm:
            (KWQKHTMLPart::currentEventIsMouseDownInWidget):
    	new method
    
            * kwq/KWQTextArea.mm:
            (-[KWQTextAreaTextView becomeFirstResponder]):
    	only scroll to reveal if currentEventIsMouseDownInWidget is false
    
            * kwq/KWQTextField.mm:
            (-[KWQTextField setHasFocus:]):
    	ditto
    
    WebBrowser:
    
    	- fixed 3369587 -- REGRESSION (85-88): window position isn't
    	being saved if moved from default position
    
            Reviewed by Chris
    
    	The bug was that when the default window size is set
    	programmatically to be full screen height, we're setting the
    	_lastResizeWasProgrammatic bit in WindowController, which
    	prevents the window frame from being saved on subsequent window
    	moves (to avoid saving a window frame whose size was set by
    	JavaScript). The fix is to rejigger the code so that this bit
    	is not left set in this default-window-frame case.
    
            * WindowController.h:
            * WindowController.m:
            (-[WindowController defaultFrame]):
    	New method for subclasses to override. Default implementation
    	is to return the current frame.
            (-[WindowController setFrameToDefault]):
    	new method, uses defaultFrame but leaves the
    	_lastResizeWasProgrammatic bit clear
    
            * BrowserWindowController.m:
            (-[BrowserWindowController defaultFrame]):
    	replace setDefaultWindowFrame with this override of new method;
    	we don't know about the _lastResizeWasProgrammatic bit at this
    	level.
            (-[BrowserWindowController windowDidLoad]):
    	call new setFrameToDefault instead of old setDefaultWindowFrame
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4798 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 04fcaa0..28c710c 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,23 @@
+2003-08-08  John Sullivan  <sullivan at apple.com>
+
+	- fixed 3362481 -- REGRESSION (89-90): clicking in a field causes 
+	page to move; esp. bad if the field moves out from under the mouse
+
+        Reviewed by Darin
+
+        * kwq/KWQKHTMLPart.h:
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::currentEventIsMouseDownInWidget):
+	new method
+
+        * kwq/KWQTextArea.mm:
+        (-[KWQTextAreaTextView becomeFirstResponder]):
+	only scroll to reveal if currentEventIsMouseDownInWidget is false
+
+        * kwq/KWQTextField.mm:
+        (-[KWQTextField setHasFocus:]):
+	ditto
+
 === WebCore-92.1 ===
 
 2003-08-07  Darin Adler  <darin at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 04fcaa0..28c710c 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,23 @@
+2003-08-08  John Sullivan  <sullivan at apple.com>
+
+	- fixed 3362481 -- REGRESSION (89-90): clicking in a field causes 
+	page to move; esp. bad if the field moves out from under the mouse
+
+        Reviewed by Darin
+
+        * kwq/KWQKHTMLPart.h:
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::currentEventIsMouseDownInWidget):
+	new method
+
+        * kwq/KWQTextArea.mm:
+        (-[KWQTextAreaTextView becomeFirstResponder]):
+	only scroll to reveal if currentEventIsMouseDownInWidget is false
+
+        * kwq/KWQTextField.mm:
+        (-[KWQTextField setHasFocus:]):
+	ditto
+
 === WebCore-92.1 ===
 
 2003-08-07  Darin Adler  <darin at apple.com>
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index d372cc9..692cc52 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -139,6 +139,8 @@ public:
     NSView *nextKeyViewInFrameHierarchy(DOM::NodeImpl *startingPoint, KWQSelectionDirection);
     static NSView *nextKeyViewForWidget(QWidget *startingPoint, KWQSelectionDirection);
     
+    static bool currentEventIsMouseDownInWidget(QWidget *candidate);
+    
     static void setDocumentFocus(QWidget *);
     static void clearDocumentFocus(QWidget *);
     
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index d6d72cd..ad3b863 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -930,6 +930,23 @@ NSView *KWQKHTMLPart::nextKeyViewForWidget(QWidget *startingWidget, KWQSelection
     return partForNode(node)->nextKeyView(node, direction);
 }
 
+bool KWQKHTMLPart::currentEventIsMouseDownInWidget(QWidget *candidate)
+{
+    switch ([[NSApp currentEvent] type]) {
+        case NSLeftMouseDown:
+        case NSRightMouseDown:
+        case NSOtherMouseDown:
+            break;
+        default:
+            return NO;
+    }
+
+    NodeImpl *node = nodeForWidget(candidate);
+    ASSERT(node);
+    return partForNode(node)->nodeUnderMouse() == node;
+}
+
+
 QMap<int, ScheduledAction*> *KWQKHTMLPart::pauseActions(const void *key)
 {
     if (d->m_doc && d->m_jscript) {
diff --git a/WebCore/kwq/KWQTextArea.mm b/WebCore/kwq/KWQTextArea.mm
index 07e945e..36f13ae 100644
--- a/WebCore/kwq/KWQTextArea.mm
+++ b/WebCore/kwq/KWQTextArea.mm
@@ -531,7 +531,9 @@ static NSString *WebContinuousSpellCheckingEnabled = @"WebContinuousSpellCheckin
         if ([[self window] keyViewSelectionDirection] != NSDirectSelection) {
             [self selectAll:nil];
         }
-        [self _KWQ_scrollFrameToVisible];
+        if (!KWQKHTMLPart::currentEventIsMouseDownInWidget(widget)) {
+            [self _KWQ_scrollFrameToVisible];
+        }        
 	[self _KWQ_setKeyboardFocusRingNeedsDisplay];
 	QFocusEvent event(QEvent::FocusIn);
 	const_cast<QObject *>(widget->eventFilterObject())->eventFilter(widget, &event);
diff --git a/WebCore/kwq/KWQTextField.mm b/WebCore/kwq/KWQTextField.mm
index efc660d..e745448 100644
--- a/WebCore/kwq/KWQTextField.mm
+++ b/WebCore/kwq/KWQTextField.mm
@@ -532,11 +532,14 @@
         if ([[self window] keyViewSelectionDirection] != NSDirectSelection) {
             lastSelectedRange.location = NSNotFound;
         }
+
         if (lastSelectedRange.location != NSNotFound) {
             [self setSelectedRange:lastSelectedRange];
         }
-
-        [self _KWQ_scrollFrameToVisible];
+        
+        if (!KWQKHTMLPart::currentEventIsMouseDownInWidget(widget)) {
+            [self _KWQ_scrollFrameToVisible];
+        }
 
         QFocusEvent event(QEvent::FocusIn);
         const_cast<QObject *>(widget->eventFilterObject())->eventFilter(widget, &event);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list