[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 06:33:25 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0a83d42a0500f8ed9b80a9f004022a2f31a0c3f7
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 21 19:51:56 2002 +0000

    	- fixed 3027927 -- selected text fields do not cause the web view to scroll to reveal them
    
            * kwq/KWQNSTextField.mm:
            (-[KWQNSTextField becomeFirstResponder]): Call [self _KWQ_scrollFrameToVisible].
            (-[KWQSecureTextField becomeFirstResponder]): Call [self _KWQ_scrollFrameToVisible].
    
            * kwq/KWQNSViewExtras.h: Added. New scrolling functions.
            * kwq/KWQNSViewExtras.m: Added. New scrolling functions.
            * WebCore.pbproj/project.pbxproj: Added KWQNSViewExtras.
    
            * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::nextKeyViewInFrame):
    	Make sure superview and position is set up properly before we try to tab to something.
            * kwq/KWQWidget.mm: (QWidget::setFocus):
    	Make sure superview and position is set up properly before we try to focus something.
    
    	Unrelated change.
    
            * kwq/KWQInvisibleButton.h:
            * kwq/KWQInvisibleButton.mm:
    	Add KWQ prefix to the name of the private Objective C class to avoid potential conflicts.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1890 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index c603eb4..a69c569 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,28 @@
 2002-08-21  Darin Adler  <darin at apple.com>
 
+	- fixed 3027927 -- selected text fields do not cause the web view to scroll to reveal them
+
+        * kwq/KWQNSTextField.mm:
+        (-[KWQNSTextField becomeFirstResponder]): Call [self _KWQ_scrollFrameToVisible].
+        (-[KWQSecureTextField becomeFirstResponder]): Call [self _KWQ_scrollFrameToVisible].
+
+        * kwq/KWQNSViewExtras.h: Added. New scrolling functions.
+        * kwq/KWQNSViewExtras.m: Added. New scrolling functions.
+        * WebCore.pbproj/project.pbxproj: Added KWQNSViewExtras.
+
+        * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::nextKeyViewInFrame):
+	Make sure superview and position is set up properly before we try to tab to something.
+        * kwq/KWQWidget.mm: (QWidget::setFocus):
+	Make sure superview and position is set up properly before we try to focus something.
+
+	Unrelated change.
+
+        * kwq/KWQInvisibleButton.h:
+        * kwq/KWQInvisibleButton.mm:
+	Add KWQ prefix to the name of the private Objective C class to avoid potential conflicts.
+
+2002-08-21  Darin Adler  <darin at apple.com>
+
 	Implemented baseline alignment for form elements. We decided that this was better
 	than what we're currently doing. But it will look even better when the font of the
 	text field matches the font of the surrounding text, so we should consider that.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index c603eb4..a69c569 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,28 @@
 2002-08-21  Darin Adler  <darin at apple.com>
 
+	- fixed 3027927 -- selected text fields do not cause the web view to scroll to reveal them
+
+        * kwq/KWQNSTextField.mm:
+        (-[KWQNSTextField becomeFirstResponder]): Call [self _KWQ_scrollFrameToVisible].
+        (-[KWQSecureTextField becomeFirstResponder]): Call [self _KWQ_scrollFrameToVisible].
+
+        * kwq/KWQNSViewExtras.h: Added. New scrolling functions.
+        * kwq/KWQNSViewExtras.m: Added. New scrolling functions.
+        * WebCore.pbproj/project.pbxproj: Added KWQNSViewExtras.
+
+        * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::nextKeyViewInFrame):
+	Make sure superview and position is set up properly before we try to tab to something.
+        * kwq/KWQWidget.mm: (QWidget::setFocus):
+	Make sure superview and position is set up properly before we try to focus something.
+
+	Unrelated change.
+
+        * kwq/KWQInvisibleButton.h:
+        * kwq/KWQInvisibleButton.mm:
+	Add KWQ prefix to the name of the private Objective C class to avoid potential conflicts.
+
+2002-08-21  Darin Adler  <darin at apple.com>
+
 	Implemented baseline alignment for form elements. We decided that this was better
 	than what we're currently doing. But it will look even better when the font of the
 	text field matches the font of the surrounding text, so we should consider that.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index c603eb4..a69c569 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,28 @@
 2002-08-21  Darin Adler  <darin at apple.com>
 
+	- fixed 3027927 -- selected text fields do not cause the web view to scroll to reveal them
+
+        * kwq/KWQNSTextField.mm:
+        (-[KWQNSTextField becomeFirstResponder]): Call [self _KWQ_scrollFrameToVisible].
+        (-[KWQSecureTextField becomeFirstResponder]): Call [self _KWQ_scrollFrameToVisible].
+
+        * kwq/KWQNSViewExtras.h: Added. New scrolling functions.
+        * kwq/KWQNSViewExtras.m: Added. New scrolling functions.
+        * WebCore.pbproj/project.pbxproj: Added KWQNSViewExtras.
+
+        * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::nextKeyViewInFrame):
+	Make sure superview and position is set up properly before we try to tab to something.
+        * kwq/KWQWidget.mm: (QWidget::setFocus):
+	Make sure superview and position is set up properly before we try to focus something.
+
+	Unrelated change.
+
+        * kwq/KWQInvisibleButton.h:
+        * kwq/KWQInvisibleButton.mm:
+	Add KWQ prefix to the name of the private Objective C class to avoid potential conflicts.
+
+2002-08-21  Darin Adler  <darin at apple.com>
+
 	Implemented baseline alignment for form elements. We decided that this was better
 	than what we're currently doing. But it will look even better when the font of the
 	text field matches the font of the surrounding text, so we should consider that.
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index 3b9b699..e4d78a0 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -490,6 +490,7 @@
 				F5117BCF02F9FFEF018635CE,
 				F56234E103026D7301629B47,
 				F593F87D0302BE00018635CE,
+				F583D50303140623018635CE,
 			);
 			isa = PBXHeadersBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -717,6 +718,7 @@
 				F5117BD002F9FFEF018635CE,
 				F56234E203026D7301629B47,
 				F593F87E0302BE00018635CE,
+				F583D50403140623018635CE,
 			);
 			isa = PBXSourcesBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -920,6 +922,7 @@
 				F58784EF02DE375901EA4122,
 				F58784FA02DE375901EA4122,
 				F58784F802DE375901EA4122,
+				F54A61D302E3523B01A80180,
 				F58784FC02DE375901EA4122,
 				F587851702DE375901EA4122,
 				F587850302DE375901EA4122,
@@ -933,7 +936,8 @@
 				F587854102DE375901EA4122,
 				F587854302DE375901EA4122,
 				F587854402DE375901EA4122,
-				F54A61D302E3523B01A80180,
+				F583D50103140623018635CE,
+				F583D50203140623018635CE,
 			);
 			isa = PBXGroup;
 			name = other;
@@ -3749,6 +3753,28 @@
 			settings = {
 			};
 		};
+		F583D50103140623018635CE = {
+			isa = PBXFileReference;
+			path = KWQNSViewExtras.h;
+			refType = 4;
+		};
+		F583D50203140623018635CE = {
+			isa = PBXFileReference;
+			path = KWQNSViewExtras.m;
+			refType = 4;
+		};
+		F583D50303140623018635CE = {
+			fileRef = F583D50103140623018635CE;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F583D50403140623018635CE = {
+			fileRef = F583D50203140623018635CE;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 		F58784C402DE375801EA4122 = {
 			isa = PBXFileReference;
 			path = KWQApplication.mm;
diff --git a/WebCore/kwq/KWQInvisibleButton.h b/WebCore/kwq/KWQInvisibleButton.h
index 0e5529b..a90538f 100644
--- a/WebCore/kwq/KWQInvisibleButton.h
+++ b/WebCore/kwq/KWQInvisibleButton.h
@@ -27,9 +27,9 @@
 #define KWQINVISIBLEBUTTON_H_
 
 #ifdef __OBJC__
- at class InvisibleButtonView;
+ at class KWQInvisibleButtonView;
 #else
-class InvisibleButtonView;
+class KWQInvisibleButtonView;
 #endif
 
 class KHTMLView;
@@ -47,7 +47,7 @@ public:
 
 private:
     khtml::RenderImageButton *imageButton;
-    InvisibleButtonView *buttonView;
+    KWQInvisibleButtonView *buttonView;
 };
 
 #endif
diff --git a/WebCore/kwq/KWQInvisibleButton.mm b/WebCore/kwq/KWQInvisibleButton.mm
index ea4283e..ff4ea76 100644
--- a/WebCore/kwq/KWQInvisibleButton.mm
+++ b/WebCore/kwq/KWQInvisibleButton.mm
@@ -31,7 +31,7 @@
 #import <render_form.h>
 #import <dom2_eventsimpl.h>
 
- at interface InvisibleButtonView : NSView
+ at interface KWQInvisibleButtonView : NSView
 {
     khtml::RenderImageButton *imageButton;
 }
@@ -41,7 +41,7 @@
 @end
 
 
- at implementation InvisibleButtonView
+ at implementation KWQInvisibleButtonView
 
 -(void)setImageButton:(khtml::RenderImageButton *)theImageButton
 {
@@ -73,7 +73,6 @@
 
 @end
 
-
 KWQInvisibleButton::KWQInvisibleButton(khtml::RenderImageButton *theImageButton)
 {
     imageButton = theImageButton;
@@ -88,18 +87,15 @@ KWQInvisibleButton::~KWQInvisibleButton()
 
 void KWQInvisibleButton::setFrameInView(int x, int y, int w, int h, KHTMLView *khtmlview)
 {
-    if (buttonView) {
-        [buttonView setFrame:NSMakeRect(x, y, w, h)];
-    }
-    else {
-        buttonView = [[InvisibleButtonView alloc] initWithFrame:NSMakeRect(x, y, w, h)];
+    if (!buttonView) {
+        buttonView = [[KWQInvisibleButtonView alloc] init];
         [buttonView setImageButton:imageButton];
         NSView *nsview = khtmlview->getView();    
-        if ([nsview isKindOfClass: [NSScrollView class]]) {
+        if ([nsview isKindOfClass:[NSScrollView class]]) {
             NSScrollView *scrollView = (NSScrollView *)nsview;
             nsview = [scrollView documentView];
         }
-
         [nsview addSubview:buttonView];
     }
+    [buttonView setFrame:NSMakeRect(x, y, w, h)];
 }
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 75239df..59f1a26 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -545,7 +545,8 @@ NSView *KWQKHTMLPartImpl::nextKeyViewInFrame(NodeImpl *node, KWQSelectionDirecti
 {
     DocumentImpl *doc = document();
     for (;;) {
-        node = direction == KWQSelectingNext ? doc->nextFocusNode(node) : doc->previousFocusNode(node);
+        node = direction == KWQSelectingNext
+            ? doc->nextFocusNode(node) : doc->previousFocusNode(node);
         if (!node) {
             return nil;
         }
@@ -553,14 +554,21 @@ NSView *KWQKHTMLPartImpl::nextKeyViewInFrame(NodeImpl *node, KWQSelectionDirecti
         if (renderWidget) {
             QWidget *widget = renderWidget->widget();
             KHTMLView *childFrameWidget = dynamic_cast<KHTMLView *>(widget);
-            NSView *view;
             if (childFrameWidget) {
-                view = childFrameWidget->part()->impl->nextKeyViewInFrame(0, direction);
+                NSView *view = childFrameWidget->part()->impl->nextKeyViewInFrame(0, direction);
+                if (view) {
+                    return view;
+                }
             } else {
-                view = widget->getView();
-            }
-            if (view) {
-                return view;
+                NSView *view = widget->getView();
+                // AppKit won't be able to handle scrolling and making us the first responder
+                // well unless we are actually installed in the correct place. KHTML only does
+                // that for visible widgets, so we need to do it explicitly here.
+                int x, y;
+                if (view && renderWidget->absolutePosition(x, y)) {
+                    renderWidget->view()->addChild(widget, x, y);
+                    return view;
+                }
             }
         }
     }
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 75239df..59f1a26 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -545,7 +545,8 @@ NSView *KWQKHTMLPartImpl::nextKeyViewInFrame(NodeImpl *node, KWQSelectionDirecti
 {
     DocumentImpl *doc = document();
     for (;;) {
-        node = direction == KWQSelectingNext ? doc->nextFocusNode(node) : doc->previousFocusNode(node);
+        node = direction == KWQSelectingNext
+            ? doc->nextFocusNode(node) : doc->previousFocusNode(node);
         if (!node) {
             return nil;
         }
@@ -553,14 +554,21 @@ NSView *KWQKHTMLPartImpl::nextKeyViewInFrame(NodeImpl *node, KWQSelectionDirecti
         if (renderWidget) {
             QWidget *widget = renderWidget->widget();
             KHTMLView *childFrameWidget = dynamic_cast<KHTMLView *>(widget);
-            NSView *view;
             if (childFrameWidget) {
-                view = childFrameWidget->part()->impl->nextKeyViewInFrame(0, direction);
+                NSView *view = childFrameWidget->part()->impl->nextKeyViewInFrame(0, direction);
+                if (view) {
+                    return view;
+                }
             } else {
-                view = widget->getView();
-            }
-            if (view) {
-                return view;
+                NSView *view = widget->getView();
+                // AppKit won't be able to handle scrolling and making us the first responder
+                // well unless we are actually installed in the correct place. KHTML only does
+                // that for visible widgets, so we need to do it explicitly here.
+                int x, y;
+                if (view && renderWidget->absolutePosition(x, y)) {
+                    renderWidget->view()->addChild(widget, x, y);
+                    return view;
+                }
             }
         }
     }
diff --git a/WebCore/kwq/KWQNSTextField.mm b/WebCore/kwq/KWQNSTextField.mm
index 5cdfa50..aea56c6 100644
--- a/WebCore/kwq/KWQNSTextField.mm
+++ b/WebCore/kwq/KWQNSTextField.mm
@@ -27,6 +27,7 @@
 
 #import <qlineedit.h>
 #import <KWQKHTMLPartImpl.h>
+#import <KWQNSViewExtras.h>
 
 // KWQTextFieldCell is larger than a normal text field cell, so it includes
 // the focus border as well as the rest of the text field.
@@ -250,6 +251,12 @@
     return view;
 }
 
+- (BOOL)becomeFirstResponder
+{
+    [self _KWQ_scrollFrameToVisible];
+    return [super becomeFirstResponder];
+}
+
 @end
 
 // This cell is used so that our frame includes the place where the focus rectangle is drawn.
@@ -392,4 +399,10 @@
     inSetFrameSize = NO;
 }
 
+- (BOOL)becomeFirstResponder
+{
+    [self _KWQ_scrollFrameToVisible];
+    return [super becomeFirstResponder];
+}
+
 @end
diff --git a/WebCore/kwq/WebCoreEncodings.h b/WebCore/kwq/KWQNSViewExtras.h
similarity index 86%
copy from WebCore/kwq/WebCoreEncodings.h
copy to WebCore/kwq/KWQNSViewExtras.h
index 0005bfa..3fcec9e 100644
--- a/WebCore/kwq/WebCoreEncodings.h
+++ b/WebCore/kwq/KWQNSViewExtras.h
@@ -23,10 +23,12 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#import <Foundation/Foundation.h>
+#import <Cocoa/Cocoa.h>
 
+ at interface NSView (KWQNSViewExtras)
+
+- (void)_KWQ_scrollFrameToVisible;
+- (void)_KWQ_scrollRectToVisible:(NSRect)rect;
+- (void)_KWQ_scrollRectToVisible:(NSRect)rect inView:(NSView *)view;
 
- at interface WebCoreEncodings : NSObject
-+ (NSString *)charsetNameForEncoding:(CFStringEncoding)encoding;
-+ (CFStringEncoding)encodingForCharsetName:(NSString *)charsetName;
 @end
diff --git a/WebCore/kwq/KWQNSViewExtras.m b/WebCore/kwq/KWQNSViewExtras.m
new file mode 100644
index 0000000..917e642
--- /dev/null
+++ b/WebCore/kwq/KWQNSViewExtras.m
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2002 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#import "KWQNSViewExtras.h"
+
+ at implementation NSView (KWQNSViewExtras)
+
+- (void)_KWQ_scrollFrameToVisible
+{
+    [self _KWQ_scrollRectToVisible:[self bounds]];
+}
+
+- (void)_KWQ_scrollRectToVisible:(NSRect)rect
+{
+    [self _KWQ_scrollRectToVisible:rect inView:self];
+}
+
+- (void)_KWQ_scrollRectToVisible:(NSRect)rect inView:(NSView *)view
+{
+    [[self superview] _KWQ_scrollRectToVisible:rect inView:view];
+}
+
+ at end
+
+ at implementation NSClipView (KWQNSViewExtras)
+
+- (void)_KWQ_scrollRectToVisible:(NSRect)rect inView:(NSView *)view
+{
+    NSRect exposeRect = [self convertRect:rect fromView:view];
+    NSRect visibleRect = [self visibleRect];
+    
+    if (!NSContainsRect(visibleRect, exposeRect)) {
+        // Make an expose rectangle that will end up centering the passed-in rectangle horizontally.
+        if (exposeRect.size.width >= visibleRect.size.width) {
+            exposeRect.size.width = visibleRect.size.width;
+        } else {
+            exposeRect.origin.x -= (visibleRect.size.width - exposeRect.size.width) / 2.0;
+            exposeRect.size.width += (visibleRect.size.width - exposeRect.size.width);
+        }
+        
+        // Make an expose rectangle that will end up centering the passed-in rectangle vertically.
+        if (exposeRect.size.height >= visibleRect.size.height) {
+            exposeRect.size.height = visibleRect.size.height;
+        } else {
+            if ([self isFlipped]) {
+                exposeRect.origin.y -= (visibleRect.size.height - exposeRect.size.height) / 2.0;
+            } else {
+                exposeRect.origin.y += (visibleRect.size.height - exposeRect.size.height) / 2.0;
+            }
+            exposeRect.size.height += (visibleRect.size.height - exposeRect.size.height);
+        }
+        
+        [self scrollRectToVisible:exposeRect];
+    }
+
+    [super _KWQ_scrollRectToVisible:rect inView:view];
+}
+
+ at end
diff --git a/WebCore/kwq/KWQTextField.mm b/WebCore/kwq/KWQTextField.mm
index 5cdfa50..aea56c6 100644
--- a/WebCore/kwq/KWQTextField.mm
+++ b/WebCore/kwq/KWQTextField.mm
@@ -27,6 +27,7 @@
 
 #import <qlineedit.h>
 #import <KWQKHTMLPartImpl.h>
+#import <KWQNSViewExtras.h>
 
 // KWQTextFieldCell is larger than a normal text field cell, so it includes
 // the focus border as well as the rest of the text field.
@@ -250,6 +251,12 @@
     return view;
 }
 
+- (BOOL)becomeFirstResponder
+{
+    [self _KWQ_scrollFrameToVisible];
+    return [super becomeFirstResponder];
+}
+
 @end
 
 // This cell is used so that our frame includes the place where the focus rectangle is drawn.
@@ -392,4 +399,10 @@
     inSetFrameSize = NO;
 }
 
+- (BOOL)becomeFirstResponder
+{
+    [self _KWQ_scrollFrameToVisible];
+    return [super becomeFirstResponder];
+}
+
 @end
diff --git a/WebCore/kwq/KWQWidget.mm b/WebCore/kwq/KWQWidget.mm
index 31666b1..b7ebe5d 100644
--- a/WebCore/kwq/KWQWidget.mm
+++ b/WebCore/kwq/KWQWidget.mm
@@ -30,6 +30,11 @@
 #import <kwqdebug.h>
 #import <KWQWindowWidget.h>
 
+#import <khtmlview.h>
+#import <render_replaced.h>
+
+using khtml::RenderWidget;
+
 /*
     A QWidget roughly corresponds to an NSView.  In Qt a QFrame and QMainWindow inherit
     from a QWidget.  In Cocoa a NSWindow does not inherit from NSView.  We
@@ -184,6 +189,14 @@ QPoint QWidget::mapToGlobal(const QPoint &p) const
 
 void QWidget::setFocus()
 {
+    // KHTML will call setFocus on us without first putting us in our
+    // superview and positioning us. This works around that issue.
+    RenderWidget *renderWidget = dynamic_cast<RenderWidget *>(const_cast<QObject *>(eventFilterObject()));
+    int x, y;
+    if (renderWidget && renderWidget->absolutePosition(x, y)) {
+        renderWidget->view()->addChild(this, x, y);
+    }
+    
     [[getView() window] makeFirstResponder:getView()];
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list