[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:23:44 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 8a652810a592f14ec17aa24a1564a4222b130c1c
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 11 00:38:22 2002 +0000

            * kwq/KWQPixmap.mm:
            (QPixmap::QPixmap): Restore the imageRenderer == nil case to fix a regression
    	related to resized images. Otherwise, isNull was returning true for all images.
    	In copy constructor, set needCopyOnWrite on both the source and destination;
    	setting it on the destination was not enough.
            (QPixmap::receivedData): Create the imageRenderer if it's nil.
            (QPixmap::operator=): Set needCopyOnWrite on both the source and destination.
    
            * kwq/qt/qpixmap.h: Make needCopyOnWrite mutable so we can set it on the source
    	when copying or assigning.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1527 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index f81705c..02f6ec2 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,18 @@
 2002-07-10  Darin Adler  <darin at apple.com>
 
+        * kwq/KWQPixmap.mm:
+        (QPixmap::QPixmap): Restore the imageRenderer == nil case to fix a regression
+	related to resized images. Otherwise, isNull was returning true for all images.
+	In copy constructor, set needCopyOnWrite on both the source and destination;
+	setting it on the destination was not enough.
+        (QPixmap::receivedData): Create the imageRenderer if it's nil.
+        (QPixmap::operator=): Set needCopyOnWrite on both the source and destination.
+
+        * kwq/qt/qpixmap.h: Make needCopyOnWrite mutable so we can set it on the source
+	when copying or assigning.
+
+2002-07-10  Darin Adler  <darin at apple.com>
+
         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPartImpl::setBaseURL):
 	Call setBaseURL on the underlying document all the time, not just
 	when we add a missing "/" character.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index f81705c..02f6ec2 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,18 @@
 2002-07-10  Darin Adler  <darin at apple.com>
 
+        * kwq/KWQPixmap.mm:
+        (QPixmap::QPixmap): Restore the imageRenderer == nil case to fix a regression
+	related to resized images. Otherwise, isNull was returning true for all images.
+	In copy constructor, set needCopyOnWrite on both the source and destination;
+	setting it on the destination was not enough.
+        (QPixmap::receivedData): Create the imageRenderer if it's nil.
+        (QPixmap::operator=): Set needCopyOnWrite on both the source and destination.
+
+        * kwq/qt/qpixmap.h: Make needCopyOnWrite mutable so we can set it on the source
+	when copying or assigning.
+
+2002-07-10  Darin Adler  <darin at apple.com>
+
         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPartImpl::setBaseURL):
 	Call setBaseURL on the underlying document all the time, not just
 	when we add a missing "/" character.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index f81705c..02f6ec2 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,18 @@
 2002-07-10  Darin Adler  <darin at apple.com>
 
+        * kwq/KWQPixmap.mm:
+        (QPixmap::QPixmap): Restore the imageRenderer == nil case to fix a regression
+	related to resized images. Otherwise, isNull was returning true for all images.
+	In copy constructor, set needCopyOnWrite on both the source and destination;
+	setting it on the destination was not enough.
+        (QPixmap::receivedData): Create the imageRenderer if it's nil.
+        (QPixmap::operator=): Set needCopyOnWrite on both the source and destination.
+
+        * kwq/qt/qpixmap.h: Make needCopyOnWrite mutable so we can set it on the source
+	when copying or assigning.
+
+2002-07-10  Darin Adler  <darin at apple.com>
+
         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPartImpl::setBaseURL):
 	Call setBaseURL on the underlying document all the time, not just
 	when we add a missing "/" character.
diff --git a/WebCore/kwq/KWQPixmap.h b/WebCore/kwq/KWQPixmap.h
index a85609e..a4a8729 100644
--- a/WebCore/kwq/KWQPixmap.h
+++ b/WebCore/kwq/KWQPixmap.h
@@ -75,7 +75,7 @@ public:
     
 private:
     WebCoreImageRendererPtr imageRenderer;
-    bool needCopyOnWrite;
+    mutable bool needCopyOnWrite;
 
     friend class QPainter;
 
diff --git a/WebCore/kwq/KWQPixmap.mm b/WebCore/kwq/KWQPixmap.mm
index 1866854..d466045 100644
--- a/WebCore/kwq/KWQPixmap.mm
+++ b/WebCore/kwq/KWQPixmap.mm
@@ -32,7 +32,7 @@
 
 QPixmap::QPixmap()
 {
-    imageRenderer = [[[WebCoreImageRendererFactory sharedFactory] imageRenderer] retain];
+    imageRenderer = nil;
     needCopyOnWrite = false;
 }
 
@@ -58,6 +58,7 @@ QPixmap::QPixmap(const QPixmap &copyFrom)
     : QPaintDevice(copyFrom)
 {
     imageRenderer = [copyFrom.imageRenderer retain];
+    copyFrom.needCopyOnWrite = true;
     needCopyOnWrite = true;
 }
 
@@ -69,6 +70,9 @@ QPixmap::~QPixmap()
 
 bool QPixmap::receivedData(const QByteArray &bytes, bool isComplete)
 {
+    if (imageRenderer == nil) {
+        imageRenderer = [[[WebCoreImageRendererFactory sharedFactory] imageRenderer] retain];
+    }
     return [imageRenderer incrementalLoadWithBytes: bytes.data() length: bytes.size() complete: isComplete];
 }
 
@@ -142,6 +146,7 @@ QPixmap &QPixmap::operator=(const QPixmap &assignFrom)
     [assignFrom.imageRenderer retain];
     [imageRenderer release];
     imageRenderer = assignFrom.imageRenderer;
+    assignFrom.needCopyOnWrite = true;
     needCopyOnWrite = true;
     return *this;
 }
diff --git a/WebCore/kwq/qt/qpixmap.h b/WebCore/kwq/qt/qpixmap.h
index a85609e..a4a8729 100644
--- a/WebCore/kwq/qt/qpixmap.h
+++ b/WebCore/kwq/qt/qpixmap.h
@@ -75,7 +75,7 @@ public:
     
 private:
     WebCoreImageRendererPtr imageRenderer;
-    bool needCopyOnWrite;
+    mutable bool needCopyOnWrite;
 
     friend class QPainter;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list