[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:20:43 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit bda1770ad963150a1390b8ae9b61469df68169b6
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jun 19 21:28:36 2002 +0000
* khtml/khtmlview.cpp: (KHTMLView::~KHTMLView):
Tweak
* khtml/rendering/render_image.cpp:
(RenderImage::setPixmap):
Call stopAnimations when a image changes, i.e. may be changed
by JS.
* kwq/KWQPixmap.mm:
(QPixmap::stopAnimations):
Call image renderer's stopAnimation.
* kwq/qt/qpixmap.h:
Added stopAnimations.
Break image renderer reference cycle. When a view is removed from the view
hierarchy active image renderers are told to stop animating,
which will, in turn, cause them to release their view. We leverage
the existing _stopPlugins mechanism.
* WebCoreSupport.subproj/IFImageRenderer.h:
* WebCoreSupport.subproj/IFImageRenderer.m:
(+[IFImageRenderer stopAnimationsInView:]):
(-[IFImageRenderer beginAnimationInView:inRect:fromRect:]):
(-[IFImageRenderer frameView]):
(-[IFImageRenderer stopAnimation]):
* WebView.subproj/IFHTMLViewPrivate.mm:
(-[IFHTMLView _stopPlugins]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index a50cfc7..c559f7f 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,17 @@
+2002-06-19 Richard Williamson (local) <rjw at apple.com>
+
+ * khtml/khtmlview.cpp: (KHTMLView::~KHTMLView):
+ Tweak
+ * khtml/rendering/render_image.cpp:
+ (RenderImage::setPixmap):
+ Call stopAnimations when a image changes, i.e. may be changed
+ by JS.
+ * kwq/KWQPixmap.mm:
+ (QPixmap::stopAnimations):
+ Call image renderer's stopAnimation.
+ * kwq/qt/qpixmap.h:
+ Added stopAnimations.
+
2002-06-19 Darin Adler <darin at apple.com>
- fixed 2956444 -- mac os x feedback form missing textarea
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index a50cfc7..c559f7f 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,17 @@
+2002-06-19 Richard Williamson (local) <rjw at apple.com>
+
+ * khtml/khtmlview.cpp: (KHTMLView::~KHTMLView):
+ Tweak
+ * khtml/rendering/render_image.cpp:
+ (RenderImage::setPixmap):
+ Call stopAnimations when a image changes, i.e. may be changed
+ by JS.
+ * kwq/KWQPixmap.mm:
+ (QPixmap::stopAnimations):
+ Call image renderer's stopAnimation.
+ * kwq/qt/qpixmap.h:
+ Added stopAnimations.
+
2002-06-19 Darin Adler <darin at apple.com>
- fixed 2956444 -- mac os x feedback form missing textarea
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a50cfc7..c559f7f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,17 @@
+2002-06-19 Richard Williamson (local) <rjw at apple.com>
+
+ * khtml/khtmlview.cpp: (KHTMLView::~KHTMLView):
+ Tweak
+ * khtml/rendering/render_image.cpp:
+ (RenderImage::setPixmap):
+ Call stopAnimations when a image changes, i.e. may be changed
+ by JS.
+ * kwq/KWQPixmap.mm:
+ (QPixmap::stopAnimations):
+ Call image renderer's stopAnimation.
+ * kwq/qt/qpixmap.h:
+ Added stopAnimations.
+
2002-06-19 Darin Adler <darin at apple.com>
- fixed 2956444 -- mac os x feedback form missing textarea
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index 81598ad..82b2510 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -249,6 +249,9 @@ KHTMLView::~KHTMLView()
doc->detach();
}
delete d; d = 0;
+#ifdef APPLE_CHANGES
+ m_part = 0;
+#endif
}
void KHTMLView::init()
diff --git a/WebCore/khtml/rendering/render_image.cpp b/WebCore/khtml/rendering/render_image.cpp
index 697817a..656bc40 100644
--- a/WebCore/khtml/rendering/render_image.cpp
+++ b/WebCore/khtml/rendering/render_image.cpp
@@ -141,6 +141,11 @@ void RenderImage::setPixmap( const QPixmap &p, const QRect& r, CachedImage *o)
m_height = oldheight;
}
+#ifdef APPLE_CHANGES
+ // Stop the previous image, if it may be animating.
+ pix.stopAnimations();
+#endif
+
pix = p;
if(needlayout)
diff --git a/WebCore/kwq/KWQPixmap.h b/WebCore/kwq/KWQPixmap.h
index 9b91cde..b9cca1c 100644
--- a/WebCore/kwq/KWQPixmap.h
+++ b/WebCore/kwq/KWQPixmap.h
@@ -72,7 +72,8 @@ public:
WebCoreImageRendererPtr getImageRenderer() const { return imageRenderer; }
bool receivedData(const QByteArray &bytes, bool isComplete);
-
+ void stopAnimations();
+
private:
WebCoreImageRendererPtr imageRenderer;
bool needCopyOnWrite;
diff --git a/WebCore/kwq/KWQPixmap.mm b/WebCore/kwq/KWQPixmap.mm
index 9f50b7d..aa35e0f 100644
--- a/WebCore/kwq/KWQPixmap.mm
+++ b/WebCore/kwq/KWQPixmap.mm
@@ -149,3 +149,10 @@ QPixmap &QPixmap::operator=(const QPixmap &assignFrom)
needCopyOnWrite = true;
return *this;
}
+
+
+void QPixmap::stopAnimations()
+{
+ [imageRenderer stopAnimation];
+}
+
\ No newline at end of file
diff --git a/WebCore/kwq/qt/qpixmap.h b/WebCore/kwq/qt/qpixmap.h
index 9b91cde..b9cca1c 100644
--- a/WebCore/kwq/qt/qpixmap.h
+++ b/WebCore/kwq/qt/qpixmap.h
@@ -72,7 +72,8 @@ public:
WebCoreImageRendererPtr getImageRenderer() const { return imageRenderer; }
bool receivedData(const QByteArray &bytes, bool isComplete);
-
+ void stopAnimations();
+
private:
WebCoreImageRendererPtr imageRenderer;
bool needCopyOnWrite;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index df8e6c9..833a513 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2002-06-19 Richard Williamson (local) <rjw at apple.com>
+
+ Break image renderer reference cycle. When a view is removed from the view
+ hierarchy active image renderers are told to stop animating,
+ which will, in turn, cause them to release their view. We leverage
+ the existing _stopPlugins mechanism.
+
+ * WebCoreSupport.subproj/IFImageRenderer.h:
+ * WebCoreSupport.subproj/IFImageRenderer.m:
+ (+[IFImageRenderer stopAnimationsInView:]):
+ (-[IFImageRenderer beginAnimationInView:inRect:fromRect:]):
+ (-[IFImageRenderer frameView]):
+ (-[IFImageRenderer stopAnimation]):
+ * WebView.subproj/IFHTMLViewPrivate.mm:
+ (-[IFHTMLView _stopPlugins]):
+
2002-06-19 John Sullivan <sullivan at apple.com>
- fixed 2960677 -- attempt to insert nil key; content policy set twice on particular page.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index df8e6c9..833a513 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,19 @@
+2002-06-19 Richard Williamson (local) <rjw at apple.com>
+
+ Break image renderer reference cycle. When a view is removed from the view
+ hierarchy active image renderers are told to stop animating,
+ which will, in turn, cause them to release their view. We leverage
+ the existing _stopPlugins mechanism.
+
+ * WebCoreSupport.subproj/IFImageRenderer.h:
+ * WebCoreSupport.subproj/IFImageRenderer.m:
+ (+[IFImageRenderer stopAnimationsInView:]):
+ (-[IFImageRenderer beginAnimationInView:inRect:fromRect:]):
+ (-[IFImageRenderer frameView]):
+ (-[IFImageRenderer stopAnimation]):
+ * WebView.subproj/IFHTMLViewPrivate.mm:
+ (-[IFHTMLView _stopPlugins]):
+
2002-06-19 John Sullivan <sullivan at apple.com>
- fixed 2960677 -- attempt to insert nil key; content policy set twice on particular page.
diff --git a/WebKit/WebCoreSupport.subproj/IFImageRenderer.h b/WebKit/WebCoreSupport.subproj/IFImageRenderer.h
index 8f7d73c..4d4fc16 100644
--- a/WebKit/WebCoreSupport.subproj/IFImageRenderer.h
+++ b/WebKit/WebCoreSupport.subproj/IFImageRenderer.h
@@ -15,7 +15,9 @@
unsigned lastLength;
BOOL lastReturn;
}
++ (void)stopAnimationsInView: (NSView *)aView;
- (BOOL)incrementalLoadWithBytes: (const void *)bytes length:(unsigned)length complete:(BOOL)isComplete;
- (void)beginAnimationInView: (NSView *)view inRect: (NSRect)ir fromRect: (NSRect)fr;
- (void)stopAnimation;
+- (NSView *)frameView;
@end
diff --git a/WebKit/WebCoreSupport.subproj/IFImageRenderer.m b/WebKit/WebCoreSupport.subproj/IFImageRenderer.m
index 6fd206b..d9cf278 100644
--- a/WebKit/WebCoreSupport.subproj/IFImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/IFImageRenderer.m
@@ -8,6 +8,22 @@
@implementation IFImageRenderer
+static NSMutableArray *activeImageRenderers;
+
++ (void)stopAnimationsInView: (NSView *)aView
+{
+ int i, count;
+
+ count = [activeImageRenderers count];
+ for (i = count-1; i >= 0; i--){
+ IFImageRenderer *renderer = [activeImageRenderers objectAtIndex: i];
+ if ([renderer frameView] == aView){
+ [renderer stopAnimation];
+ }
+ }
+
+}
+
- init
{
lastStatus = -9999;
@@ -145,6 +161,10 @@
selector:@selector(nextFrame:)
userInfo:nil
repeats:NO] retain];
+ if (!activeImageRenderers)
+ activeImageRenderers = [[NSMutableArray alloc] init];
+
+ [activeImageRenderers addObject: self];
}
[self drawInRect: ir
@@ -153,6 +173,11 @@
fraction: 1.0];
}
+- (NSView *)frameView
+{
+ return frameView;
+}
+
- (void)stopAnimation
{
[frameTimer invalidate];
@@ -161,6 +186,8 @@
[frameView release];
frameView = nil;
+
+ [activeImageRenderers removeObject: self];
}
- (void)resize:(NSSize)s
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.h b/WebKit/WebCoreSupport.subproj/WebImageRenderer.h
index 8f7d73c..4d4fc16 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.h
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.h
@@ -15,7 +15,9 @@
unsigned lastLength;
BOOL lastReturn;
}
++ (void)stopAnimationsInView: (NSView *)aView;
- (BOOL)incrementalLoadWithBytes: (const void *)bytes length:(unsigned)length complete:(BOOL)isComplete;
- (void)beginAnimationInView: (NSView *)view inRect: (NSRect)ir fromRect: (NSRect)fr;
- (void)stopAnimation;
+- (NSView *)frameView;
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
index 6fd206b..d9cf278 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
@@ -8,6 +8,22 @@
@implementation IFImageRenderer
+static NSMutableArray *activeImageRenderers;
+
++ (void)stopAnimationsInView: (NSView *)aView
+{
+ int i, count;
+
+ count = [activeImageRenderers count];
+ for (i = count-1; i >= 0; i--){
+ IFImageRenderer *renderer = [activeImageRenderers objectAtIndex: i];
+ if ([renderer frameView] == aView){
+ [renderer stopAnimation];
+ }
+ }
+
+}
+
- init
{
lastStatus = -9999;
@@ -145,6 +161,10 @@
selector:@selector(nextFrame:)
userInfo:nil
repeats:NO] retain];
+ if (!activeImageRenderers)
+ activeImageRenderers = [[NSMutableArray alloc] init];
+
+ [activeImageRenderers addObject: self];
}
[self drawInRect: ir
@@ -153,6 +173,11 @@
fraction: 1.0];
}
+- (NSView *)frameView
+{
+ return frameView;
+}
+
- (void)stopAnimation
{
[frameTimer invalidate];
@@ -161,6 +186,8 @@
[frameView release];
frameView = nil;
+
+ [activeImageRenderers removeObject: self];
}
- (void)resize:(NSSize)s
diff --git a/WebKit/WebView.subproj/IFHTMLViewPrivate.mm b/WebKit/WebView.subproj/IFHTMLViewPrivate.mm
index 9b498b2..e4007d1 100644
--- a/WebKit/WebView.subproj/IFHTMLViewPrivate.mm
+++ b/WebKit/WebView.subproj/IFHTMLViewPrivate.mm
@@ -7,6 +7,7 @@
*/
#import <WebKit/WebKitDebug.h>
+#import <WebKit/IFImageRenderer.h>
#import <WebKit/IFHTMLViewPrivate.h>
#import <WebKit/IFPluginView.h>
@@ -39,6 +40,9 @@
- (void)_stopPlugins
{
NSArray *subviews = [[self subviews] copy];
+
+ [IFImageRenderer stopAnimationsInView: self];
+
int count = [subviews count];
while (count--) {
id view = [subviews objectAtIndex:count];
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index 9b498b2..e4007d1 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -7,6 +7,7 @@
*/
#import <WebKit/WebKitDebug.h>
+#import <WebKit/IFImageRenderer.h>
#import <WebKit/IFHTMLViewPrivate.h>
#import <WebKit/IFPluginView.h>
@@ -39,6 +40,9 @@
- (void)_stopPlugins
{
NSArray *subviews = [[self subviews] copy];
+
+ [IFImageRenderer stopAnimationsInView: self];
+
int count = [subviews count];
while (count--) {
id view = [subviews objectAtIndex:count];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list