[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:22:12 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 4f92def7e9fb3c2103650bd13847b333b9d03ed1
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 28 00:12:58 2003 +0000
WebCore:
Fixed: 3152053 - Safari: Java 141: Only visible applets are instantiated on web page
Reviewed by dave.
* khtml/rendering/render_applet.cpp:
(RenderApplet::layout): move the widget before calling showApplet
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::showApplet): add the java view to the main view immediately instead of waiting for first paint
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge selectionImage]): tweak
WebKit:
Fixed: 3156230 - REGRESSION: Java 141: Safari Does Not Stop Applets When Browser Window Closes
Reviewed by dave.
* Plugins.subproj/WebPluginController.h:
* Plugins.subproj/WebPluginController.m:
(-[WebPluginController destroyAllPlugins]): renamed from HTMLViewWillBeDeallocated because it may get called before the dealloc
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView addWindowObservers]): observe NSWindowWillCloseNotification
(-[WebHTMLView removeWindowObservers]): remove observer for NSWindowWillCloseNotification
(-[WebHTMLView windowWillClose:]): call destroyAllPlugins
* WebView.subproj/WebHTMLViewPrivate.m:
(-[WebHTMLViewPrivate dealloc]): call destroyAllPlugins
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 8d50bf0..b3fb17f 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2003-01-27 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: 3152053 - Safari: Java 141: Only visible applets are instantiated on web page
+
+ Reviewed by dave.
+
+ * khtml/rendering/render_applet.cpp:
+ (RenderApplet::layout): move the widget before calling showApplet
+ * kwq/KWQKJavaAppletWidget.mm:
+ (KJavaAppletWidget::showApplet): add the java view to the main view immediately instead of waiting for first paint
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge selectionImage]): tweak
+
2003-01-26 Maciej Stachowiak <mjs at apple.com>
Reviewed by Darin.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 8d50bf0..b3fb17f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2003-01-27 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: 3152053 - Safari: Java 141: Only visible applets are instantiated on web page
+
+ Reviewed by dave.
+
+ * khtml/rendering/render_applet.cpp:
+ (RenderApplet::layout): move the widget before calling showApplet
+ * kwq/KWQKJavaAppletWidget.mm:
+ (KJavaAppletWidget::showApplet): add the java view to the main view immediately instead of waiting for first paint
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge selectionImage]): tweak
+
2003-01-26 Maciej Stachowiak <mjs at apple.com>
Reviewed by Darin.
diff --git a/WebCore/khtml/rendering/render_applet.cpp b/WebCore/khtml/rendering/render_applet.cpp
index 09e39f2..e8a79fe 100644
--- a/WebCore/khtml/rendering/render_applet.cpp
+++ b/WebCore/khtml/rendering/render_applet.cpp
@@ -112,6 +112,14 @@ void RenderApplet::layout()
//kdDebug(6100) << "setting applet widget to size: " << m_width << ", " << m_height << endl;
m_widget->resize(m_width-marginLeft()-marginRight()-paddingLeft()-paddingRight(),
m_height-marginTop()-marginBottom()-paddingTop()-paddingBottom());
+#if APPLE_CHANGES
+ // showApplet creates the java view if it hasn't already been created.
+ // When doing this, it replaces the widget's view with the newly created java view.
+ // Since this replacement doesn't actually occur until the widget gets its first paint,
+ // showApplet adds itself to the main view so that applets start even when not visible.
+ // We have to do this move so the widget knows where to place itself when adding itself.
+ m_widget->move(xPos(), yPos());
+#endif
tmp->showApplet();
}
diff --git a/WebCore/kwq/KWQKJavaAppletWidget.mm b/WebCore/kwq/KWQKJavaAppletWidget.mm
index 06945f0..def87b2 100644
--- a/WebCore/kwq/KWQKJavaAppletWidget.mm
+++ b/WebCore/kwq/KWQKJavaAppletWidget.mm
@@ -25,6 +25,7 @@
#import "KWQKJavaAppletWidget.h"
+#import "KHTMLView.h"
#import "KWQKJavaAppletContext.h"
#import "KWQKURL.h"
#import "KWQKHTMLPart.h"
@@ -65,8 +66,10 @@ void KJavaAppletWidget::showApplet()
// Only set the Java view once.
if ([getView() isKindOfClass:[KWQView class]]) {
setView([KWQ(_context->part())->bridge()
- viewForJavaAppletWithFrame:NSMakeRect(pos().x(), pos().y(), size().width(), size().height())
+ viewForJavaAppletWithFrame:NSMakeRect(x(), y(), width(), height())
attributes:_parameters
baseURL:_baseURL.getNSString()]);
+ // Add the view to the main view now so the applet starts immediately rather than until the first paint.
+ _context->part()->view()->addChild(this, x(), y());
}
}
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 436417a..44053bf 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -624,16 +624,18 @@ static bool initializedObjectCacheSize = FALSE;
return nil;
}
- NSRect rect = [self selectionRect];
+ NSRect rect = [self selectionRect];
+ NSRect bounds = [view bounds];
NSImage *selectionImage = [[[NSImage alloc] initWithSize:rect.size] autorelease];
[selectionImage setFlipped:YES];
[selectionImage lockFocus];
[NSGraphicsContext saveGraphicsState];
- CGContextTranslateCTM((CGContext *)[[NSGraphicsContext currentContext] graphicsPort], -NSMinX(rect), -NSMinY(rect));
+ CGContextTranslateCTM((CGContext *)[[NSGraphicsContext currentContext] graphicsPort],
+ -(NSMinX(rect) - NSMinX(bounds)), -(NSMinY(rect) - NSMinY(bounds)));
_drawSelectionOnly = YES;
- [view drawRect:[view bounds]];
+ [view drawRect:rect];
_drawSelectionOnly = NO;
[NSGraphicsContext restoreGraphicsState];
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1b79d9a..b2e0ce9 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2003-01-27 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: 3156230 - REGRESSION: Java 141: Safari Does Not Stop Applets When Browser Window Closes
+
+ Reviewed by dave.
+
+ * Plugins.subproj/WebPluginController.h:
+ * Plugins.subproj/WebPluginController.m:
+ (-[WebPluginController destroyAllPlugins]): renamed from HTMLViewWillBeDeallocated because it may get called before the dealloc
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView addWindowObservers]): observe NSWindowWillCloseNotification
+ (-[WebHTMLView removeWindowObservers]): remove observer for NSWindowWillCloseNotification
+ (-[WebHTMLView windowWillClose:]): call destroyAllPlugins
+ * WebView.subproj/WebHTMLViewPrivate.m:
+ (-[WebHTMLViewPrivate dealloc]): call destroyAllPlugins
+
2003-01-27 Richard Williamson <rjw at apple.com>
Fixed 3139909. Fake the resource load delegate messages (minus willSendRequest)
diff --git a/WebKit/Plugins.subproj/WebPluginController.h b/WebKit/Plugins.subproj/WebPluginController.h
index 7299d47..5c9971f 100644
--- a/WebKit/Plugins.subproj/WebPluginController.h
+++ b/WebKit/Plugins.subproj/WebPluginController.h
@@ -21,11 +21,11 @@
}
- (id)initWithHTMLView:(WebHTMLView *)HTMLView;
-- (void)HTMLViewWillBeDeallocated;
- (void)addPlugin:(NSView <WebPlugin> *)view;
- (void)startAllPlugins;
- (void)stopAllPlugins;
+- (void)destroyAllPlugins;
@end
diff --git a/WebKit/Plugins.subproj/WebPluginController.m b/WebKit/Plugins.subproj/WebPluginController.m
index 69d329e..8ff03b2 100644
--- a/WebKit/Plugins.subproj/WebPluginController.m
+++ b/WebKit/Plugins.subproj/WebPluginController.m
@@ -74,7 +74,7 @@
}
}
-- (void)HTMLViewWillBeDeallocated
+- (void)destroyAllPlugins
{
LOG(Plugins, "destroying all plug-ins");
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index a7a724b..b819c21 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -189,6 +189,8 @@
name:NSWindowDidBecomeMainNotification object:window];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidResignMain:)
name:NSWindowDidResignMainNotification object:window];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowWillClose:)
+ name:NSWindowWillCloseNotification object:window];
}
}
@@ -200,6 +202,8 @@
name:NSWindowDidBecomeMainNotification object:window];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:NSWindowDidResignMainNotification object:window];
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:NSWindowWillCloseNotification object:window];
}
}
@@ -592,6 +596,11 @@
[self removeMouseMovedObserver];
}
+- (void)windowWillClose:(NSNotification *)notification
+{
+ [[self _pluginController] destroyAllPlugins];
+}
+
- (void)mouseDown: (NSEvent *)event
{
// Record the mouse down position so we can determine drag hysteresis.
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index f5dd3b8..fa1513f 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -88,8 +88,8 @@ static BOOL forceRealHitTest = NO;
- (void)dealloc
{
- [pluginController HTMLViewWillBeDeallocated];
-
+ [pluginController destroyAllPlugins];
+
[mouseDownEvent release];
[dragElement release];
[draggingImageURL release];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list