[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:22:44 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 80defcbb9f671e6622ef46bd5398a328358cd42d
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jul 2 02:23:05 2002 +0000
WebCore:
Fixed Radar 2953256 - JavaScript window.moveTo() and
window.moveBy() methods do not work
This was done by creating a class to wrap an NSWindow as a
QWidget, which should be useful for many other window-related
features.
* kwq/KWQWidget.mm:
(QWidget::x): Implement in terms of the virtual frameGeometry() method.
(QWidget::y): Likewise.
(QWidget::width): Likewise.
(QWidget::height): Likewise.
(QWidget::size): Likewise.
(QWidget::pos): Likewise.
(QWidget::topLevelWidget): Implement by creating a KWQWindowWidget
(QWidget::isVisible): Added FIXME comment.
* kwq/KWQWindowWidget.h: Added.
* kwq/KWQWindowWidget.mm: Added.
(KWQWindowWidget::fromNSWindow): Static method that maintains a
dictionary of top-level widgets, and creates them on demand.
(deleteOnWindowClose): Delete top level widget on close.
(KWQWindowWidget::KWQWindowWidget):
(KWQWindowWidget::~KWQWindowWidget):
(KWQWindowWidget::sizeHint): Implemented using NSWindow.
(KWQWindowWidget::minimumSizeHint): Likewise.
(KWQWindowWidget::frameGeometry): Likewise.
(KWQWindowWidget::topLevelWidget): Likewise.
(KWQWindowWidget::mapToGlobal): Likewise.
(KWQWindowWidget::mapFromGlobal): Likewise.
(KWQWindowWidget::setCursor): No-op implementation.
(KWQWindowWidget::internalSetGeometry): Implemented using NSWindow.
* kwq/Makefile.am: Add new files to build.
* kwq/qt/qwidget.h: Make methods virtual as needed.
WebKit:
* WebView.subproj/IFWebView.mm:
(-[IFWebView window]): If the view hasn't been added to a window
yet, get the window from the WindowContext.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 90a61d1..7a7ebbd 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,39 @@
+2002-07-01 Maciej Stachowiak <mjs at apple.com>
+
+ Fixed Radar 2953256 - JavaScript window.moveTo() and
+ window.moveBy() methods do not work
+
+ This was done by creating a class to wrap an NSWindow as a
+ QWidget, which should be useful for many other window-related
+ features.
+
+ * kwq/KWQWidget.mm:
+ (QWidget::x): Implement in terms of the virtual frameGeometry() method.
+ (QWidget::y): Likewise.
+ (QWidget::width): Likewise.
+ (QWidget::height): Likewise.
+ (QWidget::size): Likewise.
+ (QWidget::pos): Likewise.
+ (QWidget::topLevelWidget): Implement by creating a KWQWindowWidget
+ (QWidget::isVisible): Added FIXME comment.
+ * kwq/KWQWindowWidget.h: Added.
+ * kwq/KWQWindowWidget.mm: Added.
+ (KWQWindowWidget::fromNSWindow): Static method that maintains a
+ dictionary of top-level widgets, and creates them on demand.
+ (deleteOnWindowClose): Delete top level widget on close.
+ (KWQWindowWidget::KWQWindowWidget):
+ (KWQWindowWidget::~KWQWindowWidget):
+ (KWQWindowWidget::sizeHint): Implemented using NSWindow.
+ (KWQWindowWidget::minimumSizeHint): Likewise.
+ (KWQWindowWidget::frameGeometry): Likewise.
+ (KWQWindowWidget::topLevelWidget): Likewise.
+ (KWQWindowWidget::mapToGlobal): Likewise.
+ (KWQWindowWidget::mapFromGlobal): Likewise.
+ (KWQWindowWidget::setCursor): No-op implementation.
+ (KWQWindowWidget::internalSetGeometry): Implemented using NSWindow.
+ * kwq/Makefile.am: Add new files to build.
+ * kwq/qt/qwidget.h: Make methods virtual as needed.
+
2002-07-01 Darin Adler <darin at apple.com>
* khtml/css/cssparser.cpp:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 90a61d1..7a7ebbd 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,39 @@
+2002-07-01 Maciej Stachowiak <mjs at apple.com>
+
+ Fixed Radar 2953256 - JavaScript window.moveTo() and
+ window.moveBy() methods do not work
+
+ This was done by creating a class to wrap an NSWindow as a
+ QWidget, which should be useful for many other window-related
+ features.
+
+ * kwq/KWQWidget.mm:
+ (QWidget::x): Implement in terms of the virtual frameGeometry() method.
+ (QWidget::y): Likewise.
+ (QWidget::width): Likewise.
+ (QWidget::height): Likewise.
+ (QWidget::size): Likewise.
+ (QWidget::pos): Likewise.
+ (QWidget::topLevelWidget): Implement by creating a KWQWindowWidget
+ (QWidget::isVisible): Added FIXME comment.
+ * kwq/KWQWindowWidget.h: Added.
+ * kwq/KWQWindowWidget.mm: Added.
+ (KWQWindowWidget::fromNSWindow): Static method that maintains a
+ dictionary of top-level widgets, and creates them on demand.
+ (deleteOnWindowClose): Delete top level widget on close.
+ (KWQWindowWidget::KWQWindowWidget):
+ (KWQWindowWidget::~KWQWindowWidget):
+ (KWQWindowWidget::sizeHint): Implemented using NSWindow.
+ (KWQWindowWidget::minimumSizeHint): Likewise.
+ (KWQWindowWidget::frameGeometry): Likewise.
+ (KWQWindowWidget::topLevelWidget): Likewise.
+ (KWQWindowWidget::mapToGlobal): Likewise.
+ (KWQWindowWidget::mapFromGlobal): Likewise.
+ (KWQWindowWidget::setCursor): No-op implementation.
+ (KWQWindowWidget::internalSetGeometry): Implemented using NSWindow.
+ * kwq/Makefile.am: Add new files to build.
+ * kwq/qt/qwidget.h: Make methods virtual as needed.
+
2002-07-01 Darin Adler <darin at apple.com>
* khtml/css/cssparser.cpp:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 90a61d1..7a7ebbd 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,39 @@
+2002-07-01 Maciej Stachowiak <mjs at apple.com>
+
+ Fixed Radar 2953256 - JavaScript window.moveTo() and
+ window.moveBy() methods do not work
+
+ This was done by creating a class to wrap an NSWindow as a
+ QWidget, which should be useful for many other window-related
+ features.
+
+ * kwq/KWQWidget.mm:
+ (QWidget::x): Implement in terms of the virtual frameGeometry() method.
+ (QWidget::y): Likewise.
+ (QWidget::width): Likewise.
+ (QWidget::height): Likewise.
+ (QWidget::size): Likewise.
+ (QWidget::pos): Likewise.
+ (QWidget::topLevelWidget): Implement by creating a KWQWindowWidget
+ (QWidget::isVisible): Added FIXME comment.
+ * kwq/KWQWindowWidget.h: Added.
+ * kwq/KWQWindowWidget.mm: Added.
+ (KWQWindowWidget::fromNSWindow): Static method that maintains a
+ dictionary of top-level widgets, and creates them on demand.
+ (deleteOnWindowClose): Delete top level widget on close.
+ (KWQWindowWidget::KWQWindowWidget):
+ (KWQWindowWidget::~KWQWindowWidget):
+ (KWQWindowWidget::sizeHint): Implemented using NSWindow.
+ (KWQWindowWidget::minimumSizeHint): Likewise.
+ (KWQWindowWidget::frameGeometry): Likewise.
+ (KWQWindowWidget::topLevelWidget): Likewise.
+ (KWQWindowWidget::mapToGlobal): Likewise.
+ (KWQWindowWidget::mapFromGlobal): Likewise.
+ (KWQWindowWidget::setCursor): No-op implementation.
+ (KWQWindowWidget::internalSetGeometry): Implemented using NSWindow.
+ * kwq/Makefile.am: Add new files to build.
+ * kwq/qt/qwidget.h: Make methods virtual as needed.
+
2002-07-01 Darin Adler <darin at apple.com>
* khtml/css/cssparser.cpp:
diff --git a/WebCore/kwq/KWQWidget.h b/WebCore/kwq/KWQWidget.h
index 21a2e3c..86b5deb 100644
--- a/WebCore/kwq/KWQWidget.h
+++ b/WebCore/kwq/KWQWidget.h
@@ -63,10 +63,9 @@ public:
};
QWidget(QWidget *parent = 0, const char *name = 0, int f = 0);
- ~QWidget();
+ virtual ~QWidget();
virtual QSize sizeHint() const;
- virtual void resize(int,int);
virtual void setActiveWindow();
virtual void setEnabled(bool);
virtual void setAutoMask(bool);
@@ -78,20 +77,21 @@ public:
int width() const;
int height() const;
QSize size() const;
+ void resize(int,int);
void resize(const QSize &);
QPoint pos() const;
void move(int, int);
- virtual void move(const QPoint &);
+ void move(const QPoint &);
- QRect frameGeometry() const;
+ virtual QRect frameGeometry() const;
- QWidget *topLevelWidget() const;
+ virtual QWidget *topLevelWidget() const;
- QPoint mapToGlobal(const QPoint &) const;
- QPoint mapFromGlobal(const QPoint &) const;
+ virtual QPoint mapToGlobal(const QPoint &) const;
+ virtual QPoint mapFromGlobal(const QPoint &) const;
- void setFocus();
- void clearFocus();
+ virtual void setFocus();
+ virtual void clearFocus();
FocusPolicy focusPolicy() const;
virtual void setFocusPolicy(FocusPolicy);
virtual void setFocusProxy( QWidget * );
@@ -110,7 +110,7 @@ public:
virtual QSize minimumSizeHint() const;
bool isVisible() const;
virtual void setCursor(const QCursor &);
- QCursor cursor();
+ virtual QCursor cursor();
void unsetCursor();
bool event(QEvent *);
bool focusNextPrevChild(bool);
@@ -136,11 +136,12 @@ public:
NSView *getView() const;
void setView(NSView *aView);
- void endEditing();
+ virtual void endEditing();
-private:
- void internalSetGeometry( int x, int y, int w, int h );
+protected:
+ virtual void internalSetGeometry( int x, int y, int w, int h );
+private:
QWidgetPrivate *data;
};
diff --git a/WebCore/kwq/KWQWidget.mm b/WebCore/kwq/KWQWidget.mm
index 13f94b7..e84012d 100644
--- a/WebCore/kwq/KWQWidget.mm
+++ b/WebCore/kwq/KWQWidget.mm
@@ -24,12 +24,10 @@
*/
#import <qwidget.h>
-
#import <WebCoreFrameView.h>
-
#import <KWQView.h>
-
#import <kwqdebug.h>
+#import <KWQWindowWidget.h>
/*
A QWidget rougly corresponds to an NSView. In Qt a QFrame and QMainWindow inherit
@@ -99,28 +97,27 @@ int QWidget::winId() const
int QWidget::x() const
{
- return (int)[getView() frame].origin.x;
+ return frameGeometry().topLeft().x();
}
int QWidget::y() const
{
- return (int)[getView() frame].origin.y;
+ return frameGeometry().topLeft().y();
}
int QWidget::width() const
{
- return (int)[getView() frame].size.width;
+ return frameGeometry().size().width();
}
int QWidget::height() const
{
- return (int)[getView() frame].size.height;
+ return frameGeometry().size().height();
}
QSize QWidget::size() const
{
- NSRect vFrame = [getView() frame];
- return QSize((int)vFrame.size.width, (int)vFrame.size.height);
+ return frameGeometry().size();
}
void QWidget::resize(const QSize &s)
@@ -130,8 +127,7 @@ void QWidget::resize(const QSize &s)
QPoint QWidget::pos() const
{
- NSRect vFrame = [getView() frame];
- return QPoint((int)vFrame.origin.x, (int)vFrame.origin.y);
+ return frameGeometry().topLeft();
}
void QWidget::move(int x, int y)
@@ -153,13 +149,20 @@ QRect QWidget::frameGeometry() const
QWidget *QWidget::topLevelWidget() const
{
- // This is only used by JavaScript to implement the various
- // window geometry manipulations and accessors, i.e.:
- // window.moveTo(), window.moveBy(), window.resizeBy(), window.resizeTo(),
- // outerWidth, outerHeight.
-
- // This should return a subclass of QWidget that fronts for an NSWindow.
- return (QWidget *)this;
+ NSWindow *window = nil;
+ NSView *view = getView();
+
+ window = [view window];
+ while (window == nil && view != nil) {
+ view = [view superview];
+ window = [view window];
+ }
+
+ if (window != nil) {
+ return KWQWindowWidget::fromNSWindow(window);
+ } else {
+ return NULL;
+ }
}
QPoint QWidget::mapToGlobal(const QPoint &p) const
@@ -260,6 +263,7 @@ QSize QWidget::minimumSizeHint() const
bool QWidget::isVisible() const
{
+ // FIXME - rewrite interms of top level widget?
return [[data->view window] isVisible];
}
diff --git a/WebCore/kwq/qt/qtooltip.h b/WebCore/kwq/KWQWindowWidget.h
similarity index 66%
copy from WebCore/kwq/qt/qtooltip.h
copy to WebCore/kwq/KWQWindowWidget.h
index e0a678c..606a620 100644
--- a/WebCore/kwq/qt/qtooltip.h
+++ b/WebCore/kwq/KWQWindowWidget.h
@@ -23,17 +23,42 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef QTOOLTIP_H_
-#define QTOOLTIP_H_
+#ifndef KWQKWINDOW_WIDGET_H
+#define KWQKWINDOW_WIDGET_H
-#include <qpalette.h>
+#include <qwidget.h>
-class QToolTip {
-public:
- QToolTip(QWidget *) { }
- void tip(const QRect &r, const QString &s) { }
-
- static QPalette palette() { return QPalette(); }
+#ifdef __OBJC__
+ at class NSWindow;
+#else
+class NSWindow;
+#endif
+
+class KWQWindowWidgetPrivate;
+
+class KWQWindowWidget : public QWidget
+{
+ public:
+ virtual ~KWQWindowWidget();
+
+ static KWQWindowWidget *fromNSWindow(NSWindow *window);
+
+ virtual QSize sizeHint() const;
+ virtual QSize minimumSizeHint() const;
+ virtual QRect frameGeometry() const;
+
+ virtual QWidget *topLevelWidget() const;
+ virtual QPoint mapToGlobal(const QPoint &) const;
+ virtual QPoint mapFromGlobal(const QPoint &) const;
+ virtual void setCursor(const QCursor &);
+
+ protected:
+ virtual void internalSetGeometry( int x, int y, int w, int h );
+
+ private:
+ KWQWindowWidget();
+ KWQWindowWidget(NSWindow *window);
+ KWQWindowWidgetPrivate *d;
};
-#endif
+#endif /* KWQKWINDOW_WIDGET_H */
diff --git a/WebCore/kwq/KWQWindowWidget.mm b/WebCore/kwq/KWQWindowWidget.mm
new file mode 100644
index 0000000..cf51b09
--- /dev/null
+++ b/WebCore/kwq/KWQWindowWidget.mm
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2001 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 <KWQWindowWidget.h>
+#import <Cocoa/Cocoa.h>
+
+class KWQWindowWidgetPrivate
+{
+public:
+ NSWindow *window;
+};
+
+static CFMutableDictionaryRef windowWidgets = NULL;
+
+KWQWindowWidget *KWQWindowWidget::fromNSWindow(NSWindow *window)
+{
+ if (windowWidgets == NULL) {
+ windowWidgets = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, NULL);
+ }
+
+ KWQWindowWidget *widget = (KWQWindowWidget *)CFDictionaryGetValue(windowWidgets, window);
+ if (widget == NULL) {
+ widget = new KWQWindowWidget(window);
+ CFDictionarySetValue(windowWidgets, window, widget);
+ }
+
+ return widget;
+}
+
+
+static void deleteOnWindowClose(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo)
+{
+ delete (KWQWindowWidget *)observer;
+}
+
+KWQWindowWidget::KWQWindowWidget(NSWindow *window) :
+ d(new KWQWindowWidgetPrivate())
+{
+ d->window = [window retain];
+
+ CFNotificationCenterAddObserver
+ ((CFNotificationCenterRef)[NSNotificationCenter defaultCenter],
+ this, deleteOnWindowClose, (CFStringRef)NSWindowWillCloseNotification,
+ d->window, CFNotificationSuspensionBehaviorDeliverImmediately);
+}
+
+KWQWindowWidget::~KWQWindowWidget()
+{
+ CFDictionaryRemoveValue(windowWidgets, d->window);
+ CFNotificationCenterRemoveObserver
+ ((CFNotificationCenterRef)[NSNotificationCenter defaultCenter],
+ this, (CFStringRef)NSWindowWillCloseNotification, d->window);
+ [d->window release];
+ delete d;
+}
+
+QSize KWQWindowWidget::sizeHint() const
+{
+ return size();
+}
+
+QSize KWQWindowWidget::minimumSizeHint() const
+{
+ return size();
+}
+
+QRect KWQWindowWidget::frameGeometry() const
+{
+ NSRect frame = [d->window frame];
+ NSRect screenFrame = [[d->window screen] frame];
+ return QRect((int)frame.origin.x, (int)(screenFrame.size.height - frame.origin.y - frame.size.height),
+ (int)frame.size.width, (int)frame.size.height);
+}
+
+QWidget *KWQWindowWidget::topLevelWidget() const
+{
+ return (QWidget *)this;
+}
+
+QPoint KWQWindowWidget::mapToGlobal(const QPoint &p) const
+{
+ NSRect screenFrame = [[d->window screen] frame];
+ NSRect frame = [d->window frame];
+ NSPoint windowPoint = NSMakePoint(p.x(), frame.size.height - p.y());
+
+ NSPoint screenPoint = [d->window convertBaseToScreen:windowPoint];
+
+ return QPoint((int)screenPoint.x, (int)(screenFrame.size.height - screenFrame.origin.y - screenPoint.y));
+}
+
+QPoint KWQWindowWidget::mapFromGlobal(const QPoint &p) const
+{
+ NSRect screenFrame = [[d->window screen] frame];
+ NSRect frame = [d->window frame];
+ NSPoint screenPoint = NSMakePoint(p.x(), screenFrame.size.height - screenFrame.origin.y - p.y());
+
+ NSPoint windowPoint = [d->window convertScreenToBase:screenPoint];
+
+ return QPoint((int)windowPoint.x, (int)(frame.size.height - windowPoint.y));
+}
+
+void KWQWindowWidget::setCursor(const QCursor &)
+{
+}
+
+void KWQWindowWidget::internalSetGeometry( int x, int y, int w, int h )
+{
+ // FIXME: should try to avoid saving changes
+ NSRect screenFrame = [[d->window screen] frame];
+ [d->window setFrame:NSMakeRect(x, screenFrame.size.height - y - h,
+ w, h) display:NO];
+}
+
+
diff --git a/WebCore/kwq/Makefile.am b/WebCore/kwq/Makefile.am
index f69ea1b..01b6d52 100644
--- a/WebCore/kwq/Makefile.am
+++ b/WebCore/kwq/Makefile.am
@@ -103,6 +103,7 @@ libkwq_o_SOURCES = \
KWQView.mm \
KWQWMatrix.mm \
KWQWidget.mm \
+ KWQWindowWidget.mm \
KWQbrowserinterface.mm \
KWQsignals.mm \
KWQtextcodec.mm \
diff --git a/WebCore/kwq/qt/qwidget.h b/WebCore/kwq/qt/qwidget.h
index 21a2e3c..86b5deb 100644
--- a/WebCore/kwq/qt/qwidget.h
+++ b/WebCore/kwq/qt/qwidget.h
@@ -63,10 +63,9 @@ public:
};
QWidget(QWidget *parent = 0, const char *name = 0, int f = 0);
- ~QWidget();
+ virtual ~QWidget();
virtual QSize sizeHint() const;
- virtual void resize(int,int);
virtual void setActiveWindow();
virtual void setEnabled(bool);
virtual void setAutoMask(bool);
@@ -78,20 +77,21 @@ public:
int width() const;
int height() const;
QSize size() const;
+ void resize(int,int);
void resize(const QSize &);
QPoint pos() const;
void move(int, int);
- virtual void move(const QPoint &);
+ void move(const QPoint &);
- QRect frameGeometry() const;
+ virtual QRect frameGeometry() const;
- QWidget *topLevelWidget() const;
+ virtual QWidget *topLevelWidget() const;
- QPoint mapToGlobal(const QPoint &) const;
- QPoint mapFromGlobal(const QPoint &) const;
+ virtual QPoint mapToGlobal(const QPoint &) const;
+ virtual QPoint mapFromGlobal(const QPoint &) const;
- void setFocus();
- void clearFocus();
+ virtual void setFocus();
+ virtual void clearFocus();
FocusPolicy focusPolicy() const;
virtual void setFocusPolicy(FocusPolicy);
virtual void setFocusProxy( QWidget * );
@@ -110,7 +110,7 @@ public:
virtual QSize minimumSizeHint() const;
bool isVisible() const;
virtual void setCursor(const QCursor &);
- QCursor cursor();
+ virtual QCursor cursor();
void unsetCursor();
bool event(QEvent *);
bool focusNextPrevChild(bool);
@@ -136,11 +136,12 @@ public:
NSView *getView() const;
void setView(NSView *aView);
- void endEditing();
+ virtual void endEditing();
-private:
- void internalSetGeometry( int x, int y, int w, int h );
+protected:
+ virtual void internalSetGeometry( int x, int y, int w, int h );
+private:
QWidgetPrivate *data;
};
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 8dfe20e..7fa8905 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,9 @@
+2002-07-01 Maciej Stachowiak <mjs at apple.com>
+
+ * WebView.subproj/IFWebView.mm:
+ (-[IFWebView window]): If the view hasn't been added to a window
+ yet, get the window from the WindowContext.
+
2002-07-01 Richard Williamson <rjw at apple.com>
* WebView.subproj/IFMainURLHandleClient.mm:
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 8dfe20e..7fa8905 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,9 @@
+2002-07-01 Maciej Stachowiak <mjs at apple.com>
+
+ * WebView.subproj/IFWebView.mm:
+ (-[IFWebView window]): If the view hasn't been added to a window
+ yet, get the window from the WindowContext.
+
2002-07-01 Richard Williamson <rjw at apple.com>
* WebView.subproj/IFMainURLHandleClient.mm:
diff --git a/WebKit/WebView.subproj/IFWebView.mm b/WebKit/WebView.subproj/IFWebView.mm
index 319c241..db93e9a 100644
--- a/WebKit/WebView.subproj/IFWebView.mm
+++ b/WebKit/WebView.subproj/IFWebView.mm
@@ -191,5 +191,15 @@
{
}
+- (NSWindow *)window
+{
+ NSWindow *window = [super window];
+
+ if (window == nil) {
+ window = [[[self controller] windowContext] window];
+ }
+
+ return window;
+}
@end
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 319c241..db93e9a 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -191,5 +191,15 @@
{
}
+- (NSWindow *)window
+{
+ NSWindow *window = [super window];
+
+ if (window == nil) {
+ window = [[[self controller] windowContext] window];
+ }
+
+ return window;
+}
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list