[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

abarth at webkit.org abarth at webkit.org
Wed Dec 22 12:29:21 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e5a57d8c06c21604270143df47b008ecb844844d
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 24 18:31:25 2010 +0000

    2010-08-24  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            Partial deployment of adoptPtr to WebCore/html
            https://bugs.webkit.org/show_bug.cgi?id=44507
    
            There's a lot of places that need adoptPtr in WebCore/html.  This patch
            does some of them.  More will follow.
    
            * html/FileThreadTask.h:
            (WebCore::FileThreadTask0::create):
            (WebCore::FileThreadTask1::create):
            (WebCore::FileThreadTask2::create):
            (WebCore::FileThreadTask3::create):
            * html/HTMLAreaElement.cpp:
            (WebCore::HTMLAreaElement::mapMouseEvent):
            * html/HTMLCanvasElement.cpp:
            (WebCore::HTMLCanvasElement::getContext):
            * html/HTMLElementStack.cpp:
            (WebCore::HTMLElementStack::insertAbove):
            (WebCore::HTMLElementStack::pushCommon):
            * html/HTMLEmbedElement.cpp:
            (WebCore::HTMLEmbedElement::parseMappedAttribute):
            (WebCore::HTMLEmbedElement::attach):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65916 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 86538b0..437927f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,29 @@
+2010-08-24  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        Partial deployment of adoptPtr to WebCore/html
+        https://bugs.webkit.org/show_bug.cgi?id=44507
+
+        There's a lot of places that need adoptPtr in WebCore/html.  This patch
+        does some of them.  More will follow.
+
+        * html/FileThreadTask.h:
+        (WebCore::FileThreadTask0::create):
+        (WebCore::FileThreadTask1::create):
+        (WebCore::FileThreadTask2::create):
+        (WebCore::FileThreadTask3::create):
+        * html/HTMLAreaElement.cpp:
+        (WebCore::HTMLAreaElement::mapMouseEvent):
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::getContext):
+        * html/HTMLElementStack.cpp:
+        (WebCore::HTMLElementStack::insertAbove):
+        (WebCore::HTMLElementStack::pushCommon):
+        * html/HTMLEmbedElement.cpp:
+        (WebCore::HTMLEmbedElement::parseMappedAttribute):
+        (WebCore::HTMLEmbedElement::attach):
+
 2010-08-24  Sam Weinig  <sam at webkit.org>
 
         Reviewed by Simon Fraser.
diff --git a/WebCore/html/FileThreadTask.h b/WebCore/html/FileThreadTask.h
index 3443457..8a8ffcb 100644
--- a/WebCore/html/FileThreadTask.h
+++ b/WebCore/html/FileThreadTask.h
@@ -47,7 +47,7 @@ public:
 
     static PassOwnPtr<FileThreadTaskImpl> create(T* instance, Method method)
     {
-        return new FileThreadTaskImpl(instance, method);
+        return adoptPtr(new FileThreadTaskImpl(instance, method));
     }
 
 private:
@@ -75,7 +75,7 @@ public:
 
     static PassOwnPtr<FileThreadTaskImpl> create(T* instance, Method method, Param1 parameter1)
     {
-        return new FileThreadTaskImpl(instance, method, parameter1);
+        return adoptPtr(new FileThreadTaskImpl(instance, method, parameter1));
     }
 
 private:
@@ -106,7 +106,7 @@ public:
 
     static PassOwnPtr<FileThreadTaskImpl> create(T* instance, Method method, Param1 parameter1, Param2 parameter2)
     {
-        return new FileThreadTaskImpl(instance, method, parameter1, parameter2);
+        return adoptPtr(new FileThreadTaskImpl(instance, method, parameter1, parameter2));
     }
 
 private:
@@ -140,7 +140,7 @@ public:
 
     static PassOwnPtr<FileThreadTaskImpl> create(T* instance, Method method, Param1 parameter1, Param2 parameter2, Param3 parameter3)
     {
-        return new FileThreadTaskImpl(instance, method, parameter1, parameter2, parameter3);
+        return adoptPtr(new FileThreadTaskImpl(instance, method, parameter1, parameter2, parameter3));
     }
 
 private:
diff --git a/WebCore/html/HTMLAreaElement.cpp b/WebCore/html/HTMLAreaElement.cpp
index 2d714ba..3547cd9 100644
--- a/WebCore/html/HTMLAreaElement.cpp
+++ b/WebCore/html/HTMLAreaElement.cpp
@@ -72,7 +72,7 @@ void HTMLAreaElement::parseMappedAttribute(Attribute* attr)
 bool HTMLAreaElement::mapMouseEvent(int x, int y, const IntSize& size, HitTestResult& result)
 {
     if (m_lastSize != size) {
-        m_region.set(new Path(getRegion(size)));
+        m_region = adoptPtr(new Path(getRegion(size)));
         m_lastSize = size;
     }
 
diff --git a/WebCore/html/HTMLCanvasElement.cpp b/WebCore/html/HTMLCanvasElement.cpp
index 84ab227..bf6b95e 100644
--- a/WebCore/html/HTMLCanvasElement.cpp
+++ b/WebCore/html/HTMLCanvasElement.cpp
@@ -168,7 +168,7 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, Canvas
             if (Settings* settings = document()->settings())
                 usesDashbardCompatibilityMode = settings->usesDashboardBackwardCompatibilityMode();
 #endif
-            m_context = new CanvasRenderingContext2D(this, document()->inCompatMode(), usesDashbardCompatibilityMode);
+            m_context = adoptPtr(new CanvasRenderingContext2D(this, document()->inCompatMode(), usesDashbardCompatibilityMode));
 #if ENABLE(ACCELERATED_2D_CANVAS) && USE(ACCELERATED_COMPOSITING)
             if (m_context) {
                 // Need to make sure a RenderLayer and compositing layer get created for the Canvas
diff --git a/WebCore/html/HTMLElementStack.cpp b/WebCore/html/HTMLElementStack.cpp
index 194753b..b6f4111 100644
--- a/WebCore/html/HTMLElementStack.cpp
+++ b/WebCore/html/HTMLElementStack.cpp
@@ -299,7 +299,7 @@ void HTMLElementStack::insertAbove(PassRefPtr<Element> element, ElementRecord* r
         if (recordAbove->next() != recordBelow)
             continue;
 
-        recordAbove->setNext(new ElementRecord(element, recordAbove->releaseNext()));
+        recordAbove->setNext(adoptPtr(new ElementRecord(element, recordAbove->releaseNext())));
         recordAbove->next()->element()->beginParsingChildren();
         return;
     }
@@ -492,7 +492,7 @@ Element* HTMLElementStack::bodyElement() const
 void HTMLElementStack::pushCommon(PassRefPtr<Element> element)
 {
     ASSERT(m_htmlElement);
-    m_top.set(new ElementRecord(element, m_top.release()));
+    m_top = adoptPtr(new ElementRecord(element, m_top.release()));
     top()->beginParsingChildren();
 }
 
diff --git a/WebCore/html/HTMLEmbedElement.cpp b/WebCore/html/HTMLEmbedElement.cpp
index afa56d4..0a15321 100644
--- a/WebCore/html/HTMLEmbedElement.cpp
+++ b/WebCore/html/HTMLEmbedElement.cpp
@@ -100,7 +100,7 @@ void HTMLEmbedElement::parseMappedAttribute(Attribute* attr)
         m_url = deprecatedParseURL(value.string());
         if (renderer() && isImageType()) {
             if (!m_imageLoader)
-                m_imageLoader.set(new HTMLImageLoader(this));
+                m_imageLoader = adoptPtr(new HTMLImageLoader(this));
             m_imageLoader->updateFromElementIgnoringPreviousError();
         }
     } else if (attr->name() == hiddenAttr) {
@@ -167,7 +167,7 @@ void HTMLEmbedElement::attach()
 
     if (isImage && renderer()) {
         if (!m_imageLoader)
-            m_imageLoader.set(new HTMLImageLoader(this));
+            m_imageLoader = adoptPtr(new HTMLImageLoader(this));
         m_imageLoader->updateFromElement();
 
         if (renderer())

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list