[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:52:07 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 1050cfaa2fc8592706c3db75f9f6a8ff23f23281
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 9 23:29:26 2001 +0000

    Fixed duplication of addSubview calls.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@432 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/kwq/KWQScrollView.mm b/WebCore/kwq/KWQScrollView.mm
index aeed1ec..d426d81 100644
--- a/WebCore/kwq/KWQScrollView.mm
+++ b/WebCore/kwq/KWQScrollView.mm
@@ -144,10 +144,16 @@ void QScrollView::addChild(QWidget* child, int x, int y)
     
     thisView = getView();
     subView = child->getView();
+    NSRect wFrame = [subView frame];
+
+    if ([subView superview] == thisView){
+        //NSLog (@"Already added 0x%08x %@ at (%d,%d) w %d h %d\n", subView, [[subView class] className], x, y, (int)wFrame.size.width, (int)wFrame.size.height);
+        return;
+    }
+    
     [subView removeFromSuperview];
     
-    NSRect wFrame = [subView frame];
-    NSLog (@"Adding %@ at (%d,%d) w %d h %d\n", [[subView class] className], x, y, (int)wFrame.size.width, (int)wFrame.size.height);
+    NSLog (@"Adding 0x%08x %@ at (%d,%d) w %d h %d\n", subView, [[subView class] className], x, y, (int)wFrame.size.width, (int)wFrame.size.height);
     [thisView addSubview: subView];
 }
 
diff --git a/WebCore/src/kwq/KWQScrollView.mm b/WebCore/src/kwq/KWQScrollView.mm
index aeed1ec..d426d81 100644
--- a/WebCore/src/kwq/KWQScrollView.mm
+++ b/WebCore/src/kwq/KWQScrollView.mm
@@ -144,10 +144,16 @@ void QScrollView::addChild(QWidget* child, int x, int y)
     
     thisView = getView();
     subView = child->getView();
+    NSRect wFrame = [subView frame];
+
+    if ([subView superview] == thisView){
+        //NSLog (@"Already added 0x%08x %@ at (%d,%d) w %d h %d\n", subView, [[subView class] className], x, y, (int)wFrame.size.width, (int)wFrame.size.height);
+        return;
+    }
+    
     [subView removeFromSuperview];
     
-    NSRect wFrame = [subView frame];
-    NSLog (@"Adding %@ at (%d,%d) w %d h %d\n", [[subView class] className], x, y, (int)wFrame.size.width, (int)wFrame.size.height);
+    NSLog (@"Adding 0x%08x %@ at (%d,%d) w %d h %d\n", subView, [[subView class] className], x, y, (int)wFrame.size.width, (int)wFrame.size.height);
     [thisView addSubview: subView];
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list