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


The following commit has been merged in the debian/unstable branch:
commit 409731e1e65f2fdde625f0340de9733e4f9344e4
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jul 1 19:31:48 2002 +0000

            * WebView.subproj/IFDynamicScrollBarsView.m:
            (-[IFDynamicScrollBarsView updateScrollers]): After a closer reading of
    	the NSScrollView source code, I see that we don't need to explicitly do
    	tile or setNeedsDisplay: because the setters take care of that, so I made
    	this simpler.
            (-[IFDynamicScrollBarsView reflectScrolledClipView:]): Replace the anti-
    	recursion hack that I erroneously removed earlier.
    
            * WebView.subproj/IFTextView.h: Removed the isRTF flag.
            * WebView.subproj/IFTextView.m:
            (-[IFTextView provisionalDataSourceChanged:]): Do nothing here.
            (-[IFTextView dataSourceUpdated:]): Check the MIME type here.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1485 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 6fae753..4d57c7d 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,18 @@
+2002-07-01  Darin Adler  <darin at apple.com>
+
+        * WebView.subproj/IFDynamicScrollBarsView.m:
+        (-[IFDynamicScrollBarsView updateScrollers]): After a closer reading of
+	the NSScrollView source code, I see that we don't need to explicitly do
+	tile or setNeedsDisplay: because the setters take care of that, so I made
+	this simpler.
+        (-[IFDynamicScrollBarsView reflectScrolledClipView:]): Replace the anti-
+	recursion hack that I erroneously removed earlier.
+
+        * WebView.subproj/IFTextView.h: Removed the isRTF flag.
+        * WebView.subproj/IFTextView.m:
+        (-[IFTextView provisionalDataSourceChanged:]): Do nothing here.
+        (-[IFTextView dataSourceUpdated:]): Check the MIME type here.
+
 2002-07-01  Richard Williamson  <rjw at apple.com>
 
         Fixed 2976913.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 6fae753..4d57c7d 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,18 @@
+2002-07-01  Darin Adler  <darin at apple.com>
+
+        * WebView.subproj/IFDynamicScrollBarsView.m:
+        (-[IFDynamicScrollBarsView updateScrollers]): After a closer reading of
+	the NSScrollView source code, I see that we don't need to explicitly do
+	tile or setNeedsDisplay: because the setters take care of that, so I made
+	this simpler.
+        (-[IFDynamicScrollBarsView reflectScrolledClipView:]): Replace the anti-
+	recursion hack that I erroneously removed earlier.
+
+        * WebView.subproj/IFTextView.h: Removed the isRTF flag.
+        * WebView.subproj/IFTextView.m:
+        (-[IFTextView provisionalDataSourceChanged:]): Do nothing here.
+        (-[IFTextView dataSourceUpdated:]): Check the MIME type here.
+
 2002-07-01  Richard Williamson  <rjw at apple.com>
 
         Fixed 2976913.
diff --git a/WebKit/WebView.subproj/IFDynamicScrollBarsView.m b/WebKit/WebView.subproj/IFDynamicScrollBarsView.m
index 0056e3a..af30182 100644
--- a/WebKit/WebView.subproj/IFDynamicScrollBarsView.m
+++ b/WebKit/WebView.subproj/IFDynamicScrollBarsView.m
@@ -21,13 +21,12 @@
 {
     BOOL scrollsVertically;
     BOOL scrollsHorizontally;
-    BOOL scrollersChanged;    
 
     if (!allowsScrolling) {
         scrollsVertically = NO;
         scrollsHorizontally = NO;
     } else {
-        NSSize documentSize = [[self documentView] bounds].size;
+        NSSize documentSize = [[self documentView] frame].size;
         NSSize frameSize = [self frame].size;
         
         scrollsVertically = documentSize.height > frameSize.height;
@@ -40,29 +39,26 @@
         }
     }
 
-    scrollersChanged = NO;
-        
-    if ([self hasVerticalScroller] != scrollsVertically) {
-        [self setHasVerticalScroller:scrollsVertically];
-        scrollersChanged = YES;
-    }
-        
-    if ([self hasHorizontalScroller] != scrollsHorizontally) {
-        [self setHasHorizontalScroller:scrollsHorizontally];
-        scrollersChanged = YES;
-    }
-    
-    if (scrollersChanged) {
-        [self tile];
-        [self setNeedsDisplay:YES];
-    }
+    [self setHasVerticalScroller:scrollsVertically];
+    [self setHasHorizontalScroller:scrollsHorizontally];
 }
 
 // Make the horizontal and vertical scroll bars come and go as needed.
 - (void)reflectScrolledClipView:(NSClipView *)clipView
 {
     if (clipView == [self contentView]) {
-        [self updateScrollers];
+        // FIXME: This hack here prevents infinite recursion that takes place when we
+        // gyrate between having a vertical scroller and not having one. A reproducible
+        // case is clicking on the "the Policy Routing text" link at
+        // http://www.linuxpowered.com/archive/howto/Net-HOWTO-8.html.
+        // The underlying cause is some problem in the NSText machinery, but I was not
+        // able to pin it down.
+        static BOOL inUpdateScrollers;
+        if (!inUpdateScrollers) {
+            inUpdateScrollers = YES;
+            [self updateScrollers];
+            inUpdateScrollers = NO;
+        }
     }
     [super reflectScrolledClipView:clipView];
 }
diff --git a/WebKit/WebView.subproj/IFTextView.h b/WebKit/WebView.subproj/IFTextView.h
index c04020c..418c8b0 100644
--- a/WebKit/WebView.subproj/IFTextView.h
+++ b/WebKit/WebView.subproj/IFTextView.h
@@ -14,7 +14,6 @@
 {
     BOOL canDragFrom;
     BOOL canDragTo;
-    BOOL isRTF;
 }
 
 - (void)provisionalDataSourceChanged:(IFWebDataSource *)dataSource;
diff --git a/WebKit/WebView.subproj/IFTextView.m b/WebKit/WebView.subproj/IFTextView.m
index 9b68395..64f7635 100644
--- a/WebKit/WebView.subproj/IFTextView.m
+++ b/WebKit/WebView.subproj/IFTextView.m
@@ -3,14 +3,14 @@
 	Copyright 2002, Apple, Inc. All rights reserved.
 */
 
-#import "IFTextView.h"
+#import <WebKit/IFTextView.h>
+
 #import <WebKit/IFWebDataSource.h>
 
 @implementation IFTextView
 
-
-- (id)initWithFrame:(NSRect)frame {
-    
+- (id)initWithFrame:(NSRect)frame
+{
     self = [super initWithFrame:frame];
     if (self) {
         canDragFrom = YES;
@@ -24,33 +24,29 @@
 
 - (void)provisionalDataSourceChanged:(IFWebDataSource *)dataSource
 {
-    if([[dataSource contentType] isEqualToString:@"text/rtf"])
-        isRTF = YES;
-    else
-        isRTF = NO;
 }
 
 - (void)provisionalDataSourceCommitted:(IFWebDataSource *)dataSource
 {
-
 }
 
 - (void)dataSourceUpdated:(IFWebDataSource *)dataSource
 {
-    NSString *theString;
+    NSString *string;
     
-    //FIXME: This needs to be more efficient
+    // FIXME: This needs to be more efficient for progressively loading documents.
     
-    if(isRTF){
+    if ([[dataSource contentType] isEqualToString:@"text/rtf"]) {
         [self setRichText:YES];
         [self replaceCharactersInRange:NSMakeRange(0,0) withRTF:[dataSource data]];
-    }else{
+    } else {
         [self setRichText:NO];
         
-        // set correct encoding
-        theString = [[NSString alloc] initWithData:[dataSource data] encoding:NSASCIIStringEncoding];
-        [self setString:theString];
-        [theString release];
+        // FIXME: This needs to use the correct encoding, but the list of names of encodings
+        // is currently inside WebCore where we can't share it.
+        string = [[NSString alloc] initWithData:[dataSource data] encoding:NSASCIIStringEncoding];
+        [self setString:string];
+        [string release];
     }
 }
 
@@ -84,7 +80,6 @@
 
 - (void)searchFor: (NSString *)string direction: (BOOL)forward caseSensitive: (BOOL)caseFlag
 {
-
 }
 
 @end
diff --git a/WebKit/WebView.subproj/WebDynamicScrollBarsView.m b/WebKit/WebView.subproj/WebDynamicScrollBarsView.m
index 0056e3a..af30182 100644
--- a/WebKit/WebView.subproj/WebDynamicScrollBarsView.m
+++ b/WebKit/WebView.subproj/WebDynamicScrollBarsView.m
@@ -21,13 +21,12 @@
 {
     BOOL scrollsVertically;
     BOOL scrollsHorizontally;
-    BOOL scrollersChanged;    
 
     if (!allowsScrolling) {
         scrollsVertically = NO;
         scrollsHorizontally = NO;
     } else {
-        NSSize documentSize = [[self documentView] bounds].size;
+        NSSize documentSize = [[self documentView] frame].size;
         NSSize frameSize = [self frame].size;
         
         scrollsVertically = documentSize.height > frameSize.height;
@@ -40,29 +39,26 @@
         }
     }
 
-    scrollersChanged = NO;
-        
-    if ([self hasVerticalScroller] != scrollsVertically) {
-        [self setHasVerticalScroller:scrollsVertically];
-        scrollersChanged = YES;
-    }
-        
-    if ([self hasHorizontalScroller] != scrollsHorizontally) {
-        [self setHasHorizontalScroller:scrollsHorizontally];
-        scrollersChanged = YES;
-    }
-    
-    if (scrollersChanged) {
-        [self tile];
-        [self setNeedsDisplay:YES];
-    }
+    [self setHasVerticalScroller:scrollsVertically];
+    [self setHasHorizontalScroller:scrollsHorizontally];
 }
 
 // Make the horizontal and vertical scroll bars come and go as needed.
 - (void)reflectScrolledClipView:(NSClipView *)clipView
 {
     if (clipView == [self contentView]) {
-        [self updateScrollers];
+        // FIXME: This hack here prevents infinite recursion that takes place when we
+        // gyrate between having a vertical scroller and not having one. A reproducible
+        // case is clicking on the "the Policy Routing text" link at
+        // http://www.linuxpowered.com/archive/howto/Net-HOWTO-8.html.
+        // The underlying cause is some problem in the NSText machinery, but I was not
+        // able to pin it down.
+        static BOOL inUpdateScrollers;
+        if (!inUpdateScrollers) {
+            inUpdateScrollers = YES;
+            [self updateScrollers];
+            inUpdateScrollers = NO;
+        }
     }
     [super reflectScrolledClipView:clipView];
 }
diff --git a/WebKit/WebView.subproj/WebTextView.h b/WebKit/WebView.subproj/WebTextView.h
index c04020c..418c8b0 100644
--- a/WebKit/WebView.subproj/WebTextView.h
+++ b/WebKit/WebView.subproj/WebTextView.h
@@ -14,7 +14,6 @@
 {
     BOOL canDragFrom;
     BOOL canDragTo;
-    BOOL isRTF;
 }
 
 - (void)provisionalDataSourceChanged:(IFWebDataSource *)dataSource;
diff --git a/WebKit/WebView.subproj/WebTextView.m b/WebKit/WebView.subproj/WebTextView.m
index 9b68395..64f7635 100644
--- a/WebKit/WebView.subproj/WebTextView.m
+++ b/WebKit/WebView.subproj/WebTextView.m
@@ -3,14 +3,14 @@
 	Copyright 2002, Apple, Inc. All rights reserved.
 */
 
-#import "IFTextView.h"
+#import <WebKit/IFTextView.h>
+
 #import <WebKit/IFWebDataSource.h>
 
 @implementation IFTextView
 
-
-- (id)initWithFrame:(NSRect)frame {
-    
+- (id)initWithFrame:(NSRect)frame
+{
     self = [super initWithFrame:frame];
     if (self) {
         canDragFrom = YES;
@@ -24,33 +24,29 @@
 
 - (void)provisionalDataSourceChanged:(IFWebDataSource *)dataSource
 {
-    if([[dataSource contentType] isEqualToString:@"text/rtf"])
-        isRTF = YES;
-    else
-        isRTF = NO;
 }
 
 - (void)provisionalDataSourceCommitted:(IFWebDataSource *)dataSource
 {
-
 }
 
 - (void)dataSourceUpdated:(IFWebDataSource *)dataSource
 {
-    NSString *theString;
+    NSString *string;
     
-    //FIXME: This needs to be more efficient
+    // FIXME: This needs to be more efficient for progressively loading documents.
     
-    if(isRTF){
+    if ([[dataSource contentType] isEqualToString:@"text/rtf"]) {
         [self setRichText:YES];
         [self replaceCharactersInRange:NSMakeRange(0,0) withRTF:[dataSource data]];
-    }else{
+    } else {
         [self setRichText:NO];
         
-        // set correct encoding
-        theString = [[NSString alloc] initWithData:[dataSource data] encoding:NSASCIIStringEncoding];
-        [self setString:theString];
-        [theString release];
+        // FIXME: This needs to use the correct encoding, but the list of names of encodings
+        // is currently inside WebCore where we can't share it.
+        string = [[NSString alloc] initWithData:[dataSource data] encoding:NSASCIIStringEncoding];
+        [self setString:string];
+        [string release];
     }
 }
 
@@ -84,7 +80,6 @@
 
 - (void)searchFor: (NSString *)string direction: (BOOL)forward caseSensitive: (BOOL)caseFlag
 {
-
 }
 
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list