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


The following commit has been merged in the debian/unstable branch:
commit a51a16b86560716147f91ba659d17e2f3d7b5ea4
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 6 08:20:48 2002 +0000

    WebCore:
    
            Reviewed by Trey.
    
    	- fixed 3111903 -- crash in DOM::HTMLDocumentImpl::close
    
            * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::close):
    	Check for the case where view() is 0 so we don't do a null-dereference.
    	Also, remove some of the unneeded redundant isNull/isEmpty checking here.
    
    WebKit:
    
            Reviewed by Trey.
    
    	- fixed 3103691 -- assertion in WebHTMLView addMouseMovedObserver at versiontracker
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView addMouseMovedObserver]): Instead of asserting, do the checks here to
    	determine if the observer should be installed.
            (-[WebHTMLView viewDidMoveToWindow]): Remove checks, since addMouseMovedObserver now checks.
            (-[WebHTMLView windowDidBecomeMain:]): Remove checks, since addMouseMovedObserver now checks.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2957 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 82c3159..18499bb 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,13 @@
+2002-12-06  Darin Adler  <darin at apple.com>
+
+        Reviewed by Trey.
+
+	- fixed 3111903 -- crash in DOM::HTMLDocumentImpl::close
+
+        * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::close):
+	Check for the case where view() is 0 so we don't do a null-dereference.
+	Also, remove some of the unneeded redundant isNull/isEmpty checking here.
+
 2002-12-05  Darin Adler  <darin at apple.com>
 
         Reviewed by Don.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 82c3159..18499bb 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2002-12-06  Darin Adler  <darin at apple.com>
+
+        Reviewed by Trey.
+
+	- fixed 3111903 -- crash in DOM::HTMLDocumentImpl::close
+
+        * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::close):
+	Check for the case where view() is 0 so we don't do a null-dereference.
+	Also, remove some of the unneeded redundant isNull/isEmpty checking here.
+
 2002-12-05  Darin Adler  <darin at apple.com>
 
         Reviewed by Don.
diff --git a/WebCore/khtml/html/html_documentimpl.cpp b/WebCore/khtml/html/html_documentimpl.cpp
index 84e1a45..458c090 100644
--- a/WebCore/khtml/html/html_documentimpl.cpp
+++ b/WebCore/khtml/html/html_documentimpl.cpp
@@ -298,23 +298,25 @@ void HTMLDocumentImpl::close()
 {
     // First fire the onload.
     bool doload = !parsing() && m_tokenizer;
-    bool notRedirecting = view()->part()->d->m_redirectURL.isNull() ||
-                          view()->part()->d->m_redirectURL.isEmpty();
+    
+    bool wasNotRedirecting = !view() || view()->part()->d->m_redirectURL.isEmpty();
     
     if (body() && doload)
         body()->dispatchWindowEvent(EventImpl::LOAD_EVENT, false, false);
         
     // Make sure both the initial layout and reflow happen after the onload
-    // fires.  This will improve onload scores, and other browsers do it.
+    // fires. This will improve onload scores, and other browsers do it.
     // If they wanna cheat, we can too. -dwh
-    if (doload && notRedirecting && !view()->part()->d->m_redirectURL.isNull() &&
-        !view()->part()->d->m_redirectURL.isEmpty() && 
-        view()->part()->d->m_delayRedirect == 0 &&
-        m_startTime.elapsed() < 1000) {
-        delete m_tokenizer; m_tokenizer = 0;
+    if (doload && wasNotRedirecting
+            && view() && !view()->part()->d->m_redirectURL.isEmpty() && view()->part()->d->m_delayRedirect == 0
+            && m_startTime.elapsed() < 1000) {
+
+        // Just bail out. During the onload we were shifted to another page.
+        // i-Bench does this. When this happens don't bother painting or laying out.        
+        delete m_tokenizer;
+        m_tokenizer = 0;
         view()->unscheduleRelayout();
-        return; // Just bail out. During the onload we were shifted to another page.
-                // i-Bench does this.  When this happens don't bother painting or laying out.
+        return;
     }
                 
     // The initial layout happens here.
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index eee9f78..c3ce3f8 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2002-12-05  Darin Adler  <darin at apple.com>
+
+        Reviewed by Trey.
+
+	- fixed 3103691 -- assertion in WebHTMLView addMouseMovedObserver at versiontracker
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView addMouseMovedObserver]): Instead of asserting, do the checks here to
+	determine if the observer should be installed.
+        (-[WebHTMLView viewDidMoveToWindow]): Remove checks, since addMouseMovedObserver now checks.
+        (-[WebHTMLView windowDidBecomeMain:]): Remove checks, since addMouseMovedObserver now checks.
+
 2002-12-05  Richard Williamson   <rjw at apple.com>
 
         Don't ceil spaces if not a fixed pitch font.  This make sites
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index b7160d4..2269ff3 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -151,11 +151,11 @@
 
 - (void)addMouseMovedObserver
 {
-    ASSERT([[self window] isMainWindow]);
-    ASSERT(![self _insideAnotherHTMLView]);
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mouseMovedNotification:)
-        name:NSMouseMovedNotification object:nil];
-    [self _frameOrBoundsChanged];
+    if ([[self window] isMainWindow] && ![self _insideAnotherHTMLView]) {
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mouseMovedNotification:)
+            name:NSMouseMovedNotification object:nil];
+        [self _frameOrBoundsChanged];
+    }
 }
 
 - (void)removeMouseMovedObserver
@@ -238,9 +238,7 @@
     if ([self window]) {
         [self addWindowObservers];
         [self addSuperviewObservers];
-        if ([[self window] isMainWindow] && ![self _insideAnotherHTMLView]) {
-            [self addMouseMovedObserver];
-        }
+        [self addMouseMovedObserver];
         _private->inWindow = YES;
     } else {
         // Reset when we are moved out of a window after being moved into one.
@@ -576,9 +574,7 @@
 - (void)windowDidBecomeMain:(NSNotification *)notification
 {
     ASSERT([notification object] == [self window]);
-    if (![self _insideAnotherHTMLView]) {
-        [self addMouseMovedObserver];
-    }
+    [self addMouseMovedObserver];
 }
 
 - (void)windowDidResignMain: (NSNotification *)notification

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list