[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:23:30 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit d0eeedacac3304f0e11e68cba7c7f07f41a31d1d
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Jul 7 09:57:54 2002 +0000
WebCore:
WebCore part of fix for Radar 2953431 - JavaScript window.close()
method is not working
* khtml/ecma/kjs_window.cpp:
(Window::scheduleClose): In AppleChanges
* khtml/khtml_part.cpp:
(KHTMLPart::openedByJS): Call kwq implementations, because we need
to remember the openedByJS state across location changes, which in
our case means replacing the part.
(KHTMLPart::setOpenedByJS): Likewise.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPartImpl::openedByJS): Implement by calling bridge.
(KWQKHTMLPartImpl::setOpenedByJS): Likewise.
(KWQKHTMLPartImpl::close): Likewise.
* kwq/KWQKHTMLPartImpl.h: Prototype new PartImpl methods.
* kwq/WebCoreBridge.h: Prototype new bridge methods.
WebKit:
WebCore part of fix for Radar 2953431 - JavaScript window.close()
method is not working
* WebCoreSupport.subproj/IFWebCoreBridge.mm:
(-[IFWebCoreBridge openedByScript]): Implement by calling controller.
(-[IFWebCoreBridge setOpenedByScript:]): Likewise.
* WebView.subproj/IFWebControllerPrivate.h:
* WebView.subproj/IFWebControllerPrivate.mm:
(-[IFWebController _openedByScript]): Implement.
(-[IFWebController _setOpenedByScript:]): Implement.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index bc3f9d0..43bce3f 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,22 @@
+2002-07-07 Maciej Stachowiak <mjs at apple.com>
+
+ WebCore part of fix for Radar 2953431 - JavaScript window.close()
+ method is not working
+
+ * khtml/ecma/kjs_window.cpp:
+ (Window::scheduleClose): In AppleChanges
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::openedByJS): Call kwq implementations, because we need
+ to remember the openedByJS state across location changes, which in
+ our case means replacing the part.
+ (KHTMLPart::setOpenedByJS): Likewise.
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPartImpl::openedByJS): Implement by calling bridge.
+ (KWQKHTMLPartImpl::setOpenedByJS): Likewise.
+ (KWQKHTMLPartImpl::close): Likewise.
+ * kwq/KWQKHTMLPartImpl.h: Prototype new PartImpl methods.
+ * kwq/WebCoreBridge.h: Prototype new bridge methods.
+
2002-07-06 Darin Adler <darin at apple.com>
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPartImpl::write): Remove reference
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index bc3f9d0..43bce3f 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,22 @@
+2002-07-07 Maciej Stachowiak <mjs at apple.com>
+
+ WebCore part of fix for Radar 2953431 - JavaScript window.close()
+ method is not working
+
+ * khtml/ecma/kjs_window.cpp:
+ (Window::scheduleClose): In AppleChanges
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::openedByJS): Call kwq implementations, because we need
+ to remember the openedByJS state across location changes, which in
+ our case means replacing the part.
+ (KHTMLPart::setOpenedByJS): Likewise.
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPartImpl::openedByJS): Implement by calling bridge.
+ (KWQKHTMLPartImpl::setOpenedByJS): Likewise.
+ (KWQKHTMLPartImpl::close): Likewise.
+ * kwq/KWQKHTMLPartImpl.h: Prototype new PartImpl methods.
+ * kwq/WebCoreBridge.h: Prototype new bridge methods.
+
2002-07-06 Darin Adler <darin at apple.com>
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPartImpl::write): Remove reference
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index bc3f9d0..43bce3f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,22 @@
+2002-07-07 Maciej Stachowiak <mjs at apple.com>
+
+ WebCore part of fix for Radar 2953431 - JavaScript window.close()
+ method is not working
+
+ * khtml/ecma/kjs_window.cpp:
+ (Window::scheduleClose): In AppleChanges
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::openedByJS): Call kwq implementations, because we need
+ to remember the openedByJS state across location changes, which in
+ our case means replacing the part.
+ (KHTMLPart::setOpenedByJS): Likewise.
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPartImpl::openedByJS): Implement by calling bridge.
+ (KWQKHTMLPartImpl::setOpenedByJS): Likewise.
+ (KWQKHTMLPartImpl::close): Likewise.
+ * kwq/KWQKHTMLPartImpl.h: Prototype new PartImpl methods.
+ * kwq/WebCoreBridge.h: Prototype new bridge methods.
+
2002-07-06 Darin Adler <darin at apple.com>
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPartImpl::write): Remove reference
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index aca49dc..67327db 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -48,6 +48,9 @@
#include "xml/dom2_eventsimpl.h"
#include "xml/dom_docimpl.h"
#include "html/html_documentimpl.h"
+#ifdef APPLE_CHANGES
+#include "KWQKHTMLPartImpl.h"
+#endif
using namespace KJS;
@@ -846,7 +849,11 @@ void Window::scheduleClose()
{
kdDebug(6070) << "Window::scheduleClose window.close() " << m_part << endl;
Q_ASSERT(winq);
+#ifdef APPLE_CHANGES
+ m_part->impl->close();
+#else
QTimer::singleShot( 0, winq, SLOT( timeoutClose() ) );
+#endif
}
bool Window::isSafeScript(ExecState *exec) const
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index ed0c1d2..456d125 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -4661,12 +4661,20 @@ void KHTMLPart::setOpener(KHTMLPart *_opener)
bool KHTMLPart::openedByJS()
{
+#ifdef APPLE_CHANGES
+ return impl->openedByJS();
+#else
return d->m_openedByJS;
+#endif
}
void KHTMLPart::setOpenedByJS(bool _openedByJS)
{
+#ifdef APPLE_CHANGES
+ impl->setOpenedByJS(_openedByJS);
+#else
d->m_openedByJS = _openedByJS;
+#endif
}
void KHTMLPart::preloadStyleSheet(const QString &url, const QString &stylesheet)
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 22cfcbc..156dddd 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -74,6 +74,10 @@ public:
void submitForm(const char *action, const QString &url, const QByteArray &formData, const QString &_target, const QString& contentType, const QString& boundary);
+ bool openedByJS();
+ void setOpenedByJS(bool _openedByJS);
+
+ void close();
private:
KHTMLPart *part;
KHTMLPartPrivate *d;
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 99aee74..25f9a33 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -646,3 +646,19 @@ KHTMLPart *KWQKHTMLPartImpl::parentPart()
{
return [[bridge parent] part];
}
+
+bool KWQKHTMLPartImpl::openedByJS()
+{
+ return [bridge openedByScript];
+}
+
+void KWQKHTMLPartImpl::setOpenedByJS(bool _openedByJS)
+{
+ [bridge setOpenedByScript:_openedByJS];
+}
+
+void KWQKHTMLPartImpl::close()
+{
+ [[bridge window] close];
+}
+
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.h b/WebCore/kwq/KWQKHTMLPartImpl.h
index 22cfcbc..156dddd 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.h
+++ b/WebCore/kwq/KWQKHTMLPartImpl.h
@@ -74,6 +74,10 @@ public:
void submitForm(const char *action, const QString &url, const QByteArray &formData, const QString &_target, const QString& contentType, const QString& boundary);
+ bool openedByJS();
+ void setOpenedByJS(bool _openedByJS);
+
+ void close();
private:
KHTMLPart *part;
KHTMLPartPrivate *d;
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 99aee74..25f9a33 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -646,3 +646,19 @@ KHTMLPart *KWQKHTMLPartImpl::parentPart()
{
return [[bridge parent] part];
}
+
+bool KWQKHTMLPartImpl::openedByJS()
+{
+ return [bridge openedByScript];
+}
+
+void KWQKHTMLPartImpl::setOpenedByJS(bool _openedByJS)
+{
+ [bridge setOpenedByScript:_openedByJS];
+}
+
+void KWQKHTMLPartImpl::close()
+{
+ [[bridge window] close];
+}
+
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 8fed9de..6551fd6 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -123,6 +123,9 @@ typedef khtml::RenderPart KHTMLRenderPart;
- (void)objectLoadedFromCache:(NSURL *)URL size:(unsigned)bytes;
+- (BOOL) openedByScript;
+- (void) setOpenedByScript:(BOOL)openedByScript;
+
@end
// This interface definition allows those who hold a WebCoreBridge * to call all the methods
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 2264094..68f6c2a 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,16 @@
+2002-07-07 Maciej Stachowiak <mjs at apple.com>
+
+ WebCore part of fix for Radar 2953431 - JavaScript window.close()
+ method is not working
+
+ * WebCoreSupport.subproj/IFWebCoreBridge.mm:
+ (-[IFWebCoreBridge openedByScript]): Implement by calling controller.
+ (-[IFWebCoreBridge setOpenedByScript:]): Likewise.
+ * WebView.subproj/IFWebControllerPrivate.h:
+ * WebView.subproj/IFWebControllerPrivate.mm:
+ (-[IFWebController _openedByScript]): Implement.
+ (-[IFWebController _setOpenedByScript:]): Implement.
+
2002-07-05 Darin Adler <darin at apple.com>
Fix crashes I saw with zombies enabled caused by messing with windows that are
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 2264094..68f6c2a 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,16 @@
+2002-07-07 Maciej Stachowiak <mjs at apple.com>
+
+ WebCore part of fix for Radar 2953431 - JavaScript window.close()
+ method is not working
+
+ * WebCoreSupport.subproj/IFWebCoreBridge.mm:
+ (-[IFWebCoreBridge openedByScript]): Implement by calling controller.
+ (-[IFWebCoreBridge setOpenedByScript:]): Likewise.
+ * WebView.subproj/IFWebControllerPrivate.h:
+ * WebView.subproj/IFWebControllerPrivate.mm:
+ (-[IFWebController _openedByScript]): Implement.
+ (-[IFWebController _setOpenedByScript:]): Implement.
+
2002-07-05 Darin Adler <darin at apple.com>
Fix crashes I saw with zombies enabled caused by messing with windows that are
diff --git a/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm b/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
index 47f7da5..7904915 100644
--- a/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
+++ b/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
@@ -200,4 +200,14 @@
dataSource = ds;
}
+- (BOOL)openedByScript
+{
+ return [[dataSource controller] _openedByScript];
+}
+
+- (void)setOpenedByScript:(BOOL)openedByScript
+{
+ [[dataSource controller] _setOpenedByScript:openedByScript];
+}
+
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 47f7da5..7904915 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -200,4 +200,14 @@
dataSource = ds;
}
+- (BOOL)openedByScript
+{
+ return [[dataSource controller] _openedByScript];
+}
+
+- (void)setOpenedByScript:(BOOL)openedByScript
+{
+ [[dataSource controller] _setOpenedByScript:openedByScript];
+}
+
@end
diff --git a/WebKit/WebView.subproj/IFWebControllerPrivate.h b/WebKit/WebView.subproj/IFWebControllerPrivate.h
index 9ddce45..f4f8314 100644
--- a/WebKit/WebView.subproj/IFWebControllerPrivate.h
+++ b/WebKit/WebView.subproj/IFWebControllerPrivate.h
@@ -15,6 +15,7 @@
id<IFWindowContext> windowContext;
id<IFResourceProgressHandler> resourceProgressHandler;
id<IFWebControllerPolicyHandler> policyHandler;
+ BOOL openedByScript;
}
@end
@@ -26,4 +27,6 @@
- (void)_didStartLoading: (NSURL *)url;
- (void)_didStopLoading: (NSURL *)url;
+ (NSString *)_MIMETypeForFile: (NSString *)path;
+- (BOOL)_openedByScript;
+- (void)_setOpenedByScript:(BOOL)openedByScript;
@end
diff --git a/WebKit/WebView.subproj/IFWebControllerPrivate.mm b/WebKit/WebView.subproj/IFWebControllerPrivate.mm
index 8c59f1d..8403a94 100644
--- a/WebKit/WebView.subproj/IFWebControllerPrivate.mm
+++ b/WebKit/WebView.subproj/IFWebControllerPrivate.mm
@@ -215,4 +215,14 @@
return [[IFFileTypeMappings sharedMappings] MIMETypeForExtension:extension];
}
+- (BOOL)_openedByScript
+{
+ return _private->openedByScript;
+}
+
+- (void)_setOpenedByScript:(BOOL)openedByScript
+{
+ _private->openedByScript = openedByScript;
+}
+
@end
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index 9ddce45..f4f8314 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -15,6 +15,7 @@
id<IFWindowContext> windowContext;
id<IFResourceProgressHandler> resourceProgressHandler;
id<IFWebControllerPolicyHandler> policyHandler;
+ BOOL openedByScript;
}
@end
@@ -26,4 +27,6 @@
- (void)_didStartLoading: (NSURL *)url;
- (void)_didStopLoading: (NSURL *)url;
+ (NSString *)_MIMETypeForFile: (NSString *)path;
+- (BOOL)_openedByScript;
+- (void)_setOpenedByScript:(BOOL)openedByScript;
@end
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 8c59f1d..8403a94 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -215,4 +215,14 @@
return [[IFFileTypeMappings sharedMappings] MIMETypeForExtension:extension];
}
+- (BOOL)_openedByScript
+{
+ return _private->openedByScript;
+}
+
+- (void)_setOpenedByScript:(BOOL)openedByScript
+{
+ _private->openedByScript = openedByScript;
+}
+
@end
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index 9ddce45..f4f8314 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -15,6 +15,7 @@
id<IFWindowContext> windowContext;
id<IFResourceProgressHandler> resourceProgressHandler;
id<IFWebControllerPolicyHandler> policyHandler;
+ BOOL openedByScript;
}
@end
@@ -26,4 +27,6 @@
- (void)_didStartLoading: (NSURL *)url;
- (void)_didStopLoading: (NSURL *)url;
+ (NSString *)_MIMETypeForFile: (NSString *)path;
+- (BOOL)_openedByScript;
+- (void)_setOpenedByScript:(BOOL)openedByScript;
@end
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 8c59f1d..8403a94 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -215,4 +215,14 @@
return [[IFFileTypeMappings sharedMappings] MIMETypeForExtension:extension];
}
+- (BOOL)_openedByScript
+{
+ return _private->openedByScript;
+}
+
+- (void)_setOpenedByScript:(BOOL)openedByScript
+{
+ _private->openedByScript = openedByScript;
+}
+
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list