Reviewed by Darin.
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 23 Jul 2006 23:40:19 +0000 (23:40 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 23 Jul 2006 23:40:19 +0000 (23:40 +0000)
        - Fix for <rdar://problem/4646276> CrashTracer: 7 crashes in Safari at com.apple.WebCore: WebCore::RenderTableSection::paint + 155

        * WebView/WebHTMLView.m: (-[WebHTMLView _web_layoutIfNeededRecursive:testDirtyRect:]):
        needsDisplay was returning NO even though the view has a dirty rect (see <rdar://problem/4647062>).  Since we know about
        the dirty rect, we don't actually need to check needsDisplay.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15586 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/WebView/WebHTMLView.m

index 4128a63c22377abc6c4bfe0eecece20bb4e03216..98dafdc206b40f38f132b19d3a3d062c3fcb13fd 100644 (file)
@@ -1,3 +1,13 @@
+2006-07-23  Adele Peterson  <adele@apple.com>
+
+        Reviewed by Darin.
+
+        - Fix for <rdar://problem/4646276> CrashTracer: 7 crashes in Safari at com.apple.WebCore: WebCore::RenderTableSection::paint + 155
+
+        * WebView/WebHTMLView.m: (-[WebHTMLView _web_layoutIfNeededRecursive:testDirtyRect:]):
+        needsDisplay was returning NO even though the view has a dirty rect (see <rdar://problem/4647062>).  Since we know about
+        the dirty rect, we don't actually need to check needsDisplay.
+
 2006-07-22  Timothy Hatcher  <timothy@apple.com>
 
         Rolling out r15572.
 2006-07-22  Timothy Hatcher  <timothy@apple.com>
 
         Rolling out r15572.
index fc23f8ab06c6940887cd6900ed34b3a2470088da..b493212e98197a67410ded80a695e86d7022fe62 100644 (file)
@@ -1488,17 +1488,14 @@ static WebHTMLView *lastHitView = nil;
 - (void)_web_layoutIfNeededRecursive:(NSRect)displayRect testDirtyRect:(bool)testDirtyRect
 {
     ASSERT(!_private->subviewsSetAside);
 - (void)_web_layoutIfNeededRecursive:(NSRect)displayRect testDirtyRect:(bool)testDirtyRect
 {
     ASSERT(!_private->subviewsSetAside);
-    displayRect = NSIntersectionRect(displayRect, [self bounds]);
 
 
-    if (!testDirtyRect || [self needsDisplay]) {
-        if (testDirtyRect) {
-            NSRect dirtyRect = [self _dirtyRect];
-            displayRect = NSIntersectionRect(displayRect, dirtyRect);
-        }
-        if (!NSIsEmptyRect(displayRect)) {
-            [self _layoutIfNeeded];
-        }
+    displayRect = NSIntersectionRect(displayRect, [self bounds]);
+    if (testDirtyRect) {
+        NSRect dirtyRect = [self _dirtyRect];
+        displayRect = NSIntersectionRect(displayRect, dirtyRect);
     }
     }
+    if (!NSIsEmptyRect(displayRect))
+        [self _layoutIfNeeded];
 
     [super _web_layoutIfNeededRecursive:displayRect testDirtyRect:NO];
 }
 
     [super _web_layoutIfNeededRecursive:displayRect testDirtyRect:NO];
 }