[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 07:47:49 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit da36fe541804aa249bc9a4eb6b7ce76eb3690044
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 17 23:41:12 2003 +0000

            Reviewed by John.
    
            - fixed 3250608 -- REGRESSION (74-85): reproducible Safari crash in blinkCaretTimerAction
    
            * WebView.subproj/WebHTMLViewPrivate.m:
            (-[WebNSTextView drawInsertionPointInRect:color:turnedOn:]):
            Use NSView's setNeedsDisplayInRect: instead of the one in NSTextView.
            This avoids the layout that the NSTextView version of the call might do.
            By definition, we don't need layout to draw the insertion point, because we did
            the layout to find where the insertion point should display. If we do the layout
            we can end up recursing into the insertion point drawing code, which wreaks major
            havoc. Still no idea why this happened less in version 74.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4668 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index e48ca67..5317450 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,18 @@
+2003-07-17  Darin Adler  <darin at apple.com>
+
+        Reviewed by John.
+
+        - fixed 3250608 -- REGRESSION (74-85): reproducible Safari crash in blinkCaretTimerAction
+
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebNSTextView drawInsertionPointInRect:color:turnedOn:]):
+        Use NSView's setNeedsDisplayInRect: instead of the one in NSTextView.
+        This avoids the layout that the NSTextView version of the call might do.
+        By definition, we don't need layout to draw the insertion point, because we did
+        the layout to find where the insertion point should display. If we do the layout
+        we can end up recursing into the insertion point drawing code, which wreaks major
+        havoc. Still no idea why this happened less in version 74.
+
 2003-07-17  Ken Kocienda  <kocienda at apple.com>
 
         Reviewed by John
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index 77b57c3..9ec77d9 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -667,7 +667,15 @@ static BOOL inNSTextViewDrawRect;
     [super drawInsertionPointInRect:rect color:color turnedOn:NO];
     if (turnedOn) {
         rect.size.width = 1;
-        [self setNeedsDisplayInRect:rect];
+        
+        // Call the setNeedsDisplayInRect function in NSView.
+        // If we call the one in NSTextView through the normal Objective-C dispatch
+        // we will reenter the caret blinking code and end up with a nasty crash
+        // (see Radar 3250608).
+        SEL selector = @selector(setNeedsDisplayInRect:);
+        typedef void (*IMPWithNSRect)(id, SEL, NSRect);
+        IMPWithNSRect implementation = (IMPWithNSRect)[NSView instanceMethodForSelector:selector];
+        implementation(self, selector, rect);
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list