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

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:09:52 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit cbf7a351ffea65b94a7b2d9007238a3a439630a7
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 6 21:29:06 2003 +0000

            Reviewed by Richard
    
    	Fixes for these bugs:
    
    	<rdar://problem/3476006>: Form file input widgets do not scroll
    	to view when focused
    
    	<rdar://problem/3476007>: Form file input widgets should only
    	focus when full keyboard access is on
    
            * kwq/KWQFileButton.h: Added focusPolicy declaration.
            * kwq/KWQFileButton.mm:
            (KWQFileButton::focusPolicy): Added. Now works like other buttons.
    	Fixes 3476007.
            (KWQFileButton::focusChanged): Added. Code similar to text area
    	widgets. Fixes 3476006.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5410 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index c3b9530..67b4136 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,22 @@
+2003-11-06  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by Richard
+
+	Fixes for these bugs:
+
+	<rdar://problem/3476006>: Form file input widgets do not scroll 
+	to view when focused
+
+	<rdar://problem/3476007>: Form file input widgets should only 
+	focus when full keyboard access is on
+
+        * kwq/KWQFileButton.h: Added focusPolicy declaration.
+        * kwq/KWQFileButton.mm:
+        (KWQFileButton::focusPolicy): Added. Now works like other buttons.
+	Fixes 3476007.
+        (KWQFileButton::focusChanged): Added. Code similar to text area
+	widgets. Fixes 3476006.
+
 2003-11-06  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: <rdar://problem/3308609>: 6L60 Safari URL links with line-endings converted to hex by contextual menu
diff --git a/WebCore/kwq/KWQFileButton.h b/WebCore/kwq/KWQFileButton.h
index 3a58dc6..c67a54e 100644
--- a/WebCore/kwq/KWQFileButton.h
+++ b/WebCore/kwq/KWQFileButton.h
@@ -46,6 +46,8 @@ public:
     QRect frameGeometry() const;
     void setFrameGeometry(const QRect &);
     int baselinePosition(int height) const;
+
+    virtual FocusPolicy focusPolicy() const;
     
     void filenameChanged(const QString &);
     void focusChanged(bool);
diff --git a/WebCore/kwq/KWQFileButton.mm b/WebCore/kwq/KWQFileButton.mm
index e09945d..dc1f906 100644
--- a/WebCore/kwq/KWQFileButton.mm
+++ b/WebCore/kwq/KWQFileButton.mm
@@ -28,6 +28,7 @@
 #import "KWQAssertions.h"
 #import "KWQExceptions.h"
 #import "KWQKHTMLPart.h"
+#import "KWQNSViewExtras.h"
 #import "WebCoreBridge.h"
 
 @interface KWQFileButtonAdapter : NSObject <WebCoreFileButtonDelegate>
@@ -118,6 +119,21 @@ int KWQFileButton::baselinePosition(int height) const
     return 0;
 }
 
+QWidget::FocusPolicy KWQFileButton::focusPolicy() const
+{
+    KWQ_BLOCK_EXCEPTIONS;
+
+    // Add an additional check here.
+    // For now, buttons are only focused when full
+    // keyboard access is turned on.
+    if (![KWQKHTMLPart::bridgeForWidget(this) keyboardUIMode] == WebCoreFullKeyboardAccess)
+        return NoFocus;
+
+    KWQ_UNBLOCK_EXCEPTIONS;
+
+    return QWidget::focusPolicy();
+}
+
 void KWQFileButton::filenameChanged(const QString &filename)
 {
     _textChanged.call(filename);
@@ -126,6 +142,9 @@ void KWQFileButton::filenameChanged(const QString &filename)
 void KWQFileButton::focusChanged(bool nowHasFocus)
 {
     if (nowHasFocus) {
+        if (!KWQKHTMLPart::currentEventIsMouseDownInWidget(this)) {
+            [getView() _KWQ_scrollFrameToVisible];
+        }        
         QFocusEvent event(QEvent::FocusIn);
         const_cast<QObject *>(eventFilterObject())->eventFilter(this, &event);
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list