[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:51:51 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 3dc1ecb072a916402be8ad681a1350c59c5c7e3b
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 21 18:12:47 2002 +0000

    	- fixed 3080246 -- REGRESSION: Animated GIFs sometimes disappear after drag or scroll
    
    	Once more, with feeling.
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView _setNeedsLayoutIfSizeChanged:]): Added setNeedsDisplay:YES here. The lack
    	of this is what caused the bug. But also don't do any work when the size doesn't change.
    	This prevents this from being called at all in the scrolling case, which is what we want.
            (-[WebHTMLView viewWillMoveToSuperview:]): Just the name change.
            (-[WebHTMLView layout]): Store the layout size for the above methods.
            * WebView.subproj/WebHTMLViewPrivate.h: Add a place to store the size.
    
            * WebView.subproj/WebImageView.m: (-[WebImageView layout]):
    	Roll this change back in.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2396 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1011b16..9a2abfe 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,4 +1,21 @@
-y2002-10-21  Darin Adler  <darin at apple.com>
+2002-10-21  Darin Adler  <darin at apple.com>
+
+	- fixed 3080246 -- REGRESSION: Animated GIFs sometimes disappear after drag or scroll
+
+	Once more, with feeling.
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView _setNeedsLayoutIfSizeChanged:]): Added setNeedsDisplay:YES here. The lack
+	of this is what caused the bug. But also don't do any work when the size doesn't change.
+	This prevents this from being called at all in the scrolling case, which is what we want.
+        (-[WebHTMLView viewWillMoveToSuperview:]): Just the name change.
+        (-[WebHTMLView layout]): Store the layout size for the above methods.
+        * WebView.subproj/WebHTMLViewPrivate.h: Add a place to store the size.
+
+        * WebView.subproj/WebImageView.m: (-[WebImageView layout]):
+	Roll this change back in.
+
+2002-10-21  Darin Adler  <darin at apple.com>
 
 	- fixed 3080246 -- REGRESSION: Animated GIFs sometimes disappear after drag or scroll
 
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 1011b16..9a2abfe 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,4 +1,21 @@
-y2002-10-21  Darin Adler  <darin at apple.com>
+2002-10-21  Darin Adler  <darin at apple.com>
+
+	- fixed 3080246 -- REGRESSION: Animated GIFs sometimes disappear after drag or scroll
+
+	Once more, with feeling.
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView _setNeedsLayoutIfSizeChanged:]): Added setNeedsDisplay:YES here. The lack
+	of this is what caused the bug. But also don't do any work when the size doesn't change.
+	This prevents this from being called at all in the scrolling case, which is what we want.
+        (-[WebHTMLView viewWillMoveToSuperview:]): Just the name change.
+        (-[WebHTMLView layout]): Store the layout size for the above methods.
+        * WebView.subproj/WebHTMLViewPrivate.h: Add a place to store the size.
+
+        * WebView.subproj/WebImageView.m: (-[WebImageView layout]):
+	Roll this change back in.
+
+2002-10-21  Darin Adler  <darin at apple.com>
 
 	- fixed 3080246 -- REGRESSION: Animated GIFs sometimes disappear after drag or scroll
 
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 22b15f4..5991773 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -172,9 +172,12 @@
     [[NSNotificationCenter defaultCenter] removeObserver: self name: NSWindowDidResignMainNotification object: nil];
 }
 
-- (void)_setNeedsLayoutToYes:(NSNotification *)notification
+- (void)_setNeedsLayoutIfSizeChanged:(NSNotification *)notification
 {
-    [self setNeedsLayout:YES];
+    if (!NSEqualSizes(_private->lastLayoutSize, [(NSClipView *)[self superview] documentVisibleRect].size)) {
+        [self setNeedsLayout:YES];
+        [self setNeedsDisplay:YES];
+    }
 }
 
 - (void)viewWillMoveToSuperview:(NSView *)newSuperview
@@ -196,9 +199,9 @@
     }
 
     if (newSuperview) {
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_setNeedsLayoutToYes:) 
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_setNeedsLayoutIfSizeChanged:) 
             name:NSViewFrameDidChangeNotification object:newSuperview];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_setNeedsLayoutToYes:) 
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_setNeedsLayoutIfSizeChanged:) 
             name:NSViewBoundsDidChangeNotification object:newSuperview];
     }
 }
@@ -270,6 +273,8 @@
     [[self _bridge] forceLayout];
     _private->needsLayout = NO;
     
+    _private->lastLayoutSize = [(NSClipView *)[self superview] documentVisibleRect].size;
+    
     [self setNeedsDisplay:YES];
 
 #ifdef _KWQ_TIMING        
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.h b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
index 824d728..d4b1666 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
@@ -30,6 +30,8 @@
     NSDictionary *draggingImageElement;
     
     BOOL lastMouseOverElementWasNotNil;
+    
+    NSSize lastLayoutSize;
 }
 @end
 
diff --git a/WebKit/WebView.subproj/WebImageView.m b/WebKit/WebView.subproj/WebImageView.m
index 52063ab..43d3f4d 100644
--- a/WebKit/WebView.subproj/WebImageView.m
+++ b/WebKit/WebView.subproj/WebImageView.m
@@ -61,6 +61,8 @@
     WebImageRenderer *image = [representation image];
     if (image) {
         [self setFrameSize:[image size]];
+    } else {
+        [self setFrameSize:NSMakeSize(0, 0)];
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list