Changeset 65916 in webkit


Ignore:
Timestamp:
Aug 24, 2010 11:31:25 AM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-08-24 Adam Barth <abarth@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):
Location:
trunk/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r65913 r65916  
     12010-08-24  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Partial deployment of adoptPtr to WebCore/html
     6        https://bugs.webkit.org/show_bug.cgi?id=44507
     7
     8        There's a lot of places that need adoptPtr in WebCore/html.  This patch
     9        does some of them.  More will follow.
     10
     11        * html/FileThreadTask.h:
     12        (WebCore::FileThreadTask0::create):
     13        (WebCore::FileThreadTask1::create):
     14        (WebCore::FileThreadTask2::create):
     15        (WebCore::FileThreadTask3::create):
     16        * html/HTMLAreaElement.cpp:
     17        (WebCore::HTMLAreaElement::mapMouseEvent):
     18        * html/HTMLCanvasElement.cpp:
     19        (WebCore::HTMLCanvasElement::getContext):
     20        * html/HTMLElementStack.cpp:
     21        (WebCore::HTMLElementStack::insertAbove):
     22        (WebCore::HTMLElementStack::pushCommon):
     23        * html/HTMLEmbedElement.cpp:
     24        (WebCore::HTMLEmbedElement::parseMappedAttribute):
     25        (WebCore::HTMLEmbedElement::attach):
     26
    1272010-08-24  Sam Weinig  <sam@webkit.org>
    228
  • trunk/WebCore/html/FileThreadTask.h

    r65523 r65916  
    4848    static PassOwnPtr<FileThreadTaskImpl> create(T* instance, Method method)
    4949    {
    50         return new FileThreadTaskImpl(instance, method);
     50        return adoptPtr(new FileThreadTaskImpl(instance, method));
    5151    }
    5252
     
    7676    static PassOwnPtr<FileThreadTaskImpl> create(T* instance, Method method, Param1 parameter1)
    7777    {
    78         return new FileThreadTaskImpl(instance, method, parameter1);
     78        return adoptPtr(new FileThreadTaskImpl(instance, method, parameter1));
    7979    }
    8080
     
    107107    static PassOwnPtr<FileThreadTaskImpl> create(T* instance, Method method, Param1 parameter1, Param2 parameter2)
    108108    {
    109         return new FileThreadTaskImpl(instance, method, parameter1, parameter2);
     109        return adoptPtr(new FileThreadTaskImpl(instance, method, parameter1, parameter2));
    110110    }
    111111
     
    141141    static PassOwnPtr<FileThreadTaskImpl> create(T* instance, Method method, Param1 parameter1, Param2 parameter2, Param3 parameter3)
    142142    {
    143         return new FileThreadTaskImpl(instance, method, parameter1, parameter2, parameter3);
     143        return adoptPtr(new FileThreadTaskImpl(instance, method, parameter1, parameter2, parameter3));
    144144    }
    145145
  • trunk/WebCore/html/HTMLAreaElement.cpp

    r61959 r65916  
    7373{
    7474    if (m_lastSize != size) {
    75         m_region.set(new Path(getRegion(size)));
     75        m_region = adoptPtr(new Path(getRegion(size)));
    7676        m_lastSize = size;
    7777    }
  • trunk/WebCore/html/HTMLCanvasElement.cpp

    r65449 r65916  
    169169                usesDashbardCompatibilityMode = settings->usesDashboardBackwardCompatibilityMode();
    170170#endif
    171             m_context = new CanvasRenderingContext2D(this, document()->inCompatMode(), usesDashbardCompatibilityMode);
     171            m_context = adoptPtr(new CanvasRenderingContext2D(this, document()->inCompatMode(), usesDashbardCompatibilityMode));
    172172#if ENABLE(ACCELERATED_2D_CANVAS) && USE(ACCELERATED_COMPOSITING)
    173173            if (m_context) {
  • trunk/WebCore/html/HTMLElementStack.cpp

    r65006 r65916  
    300300            continue;
    301301
    302         recordAbove->setNext(new ElementRecord(element, recordAbove->releaseNext()));
     302        recordAbove->setNext(adoptPtr(new ElementRecord(element, recordAbove->releaseNext())));
    303303        recordAbove->next()->element()->beginParsingChildren();
    304304        return;
     
    493493{
    494494    ASSERT(m_htmlElement);
    495     m_top.set(new ElementRecord(element, m_top.release()));
     495    m_top = adoptPtr(new ElementRecord(element, m_top.release()));
    496496    top()->beginParsingChildren();
    497497}
  • trunk/WebCore/html/HTMLEmbedElement.cpp

    r65468 r65916  
    101101        if (renderer() && isImageType()) {
    102102            if (!m_imageLoader)
    103                 m_imageLoader.set(new HTMLImageLoader(this));
     103                m_imageLoader = adoptPtr(new HTMLImageLoader(this));
    104104            m_imageLoader->updateFromElementIgnoringPreviousError();
    105105        }
     
    168168    if (isImage && renderer()) {
    169169        if (!m_imageLoader)
    170             m_imageLoader.set(new HTMLImageLoader(this));
     170            m_imageLoader = adoptPtr(new HTMLImageLoader(this));
    171171        m_imageLoader->updateFromElement();
    172172
Note: See TracChangeset for help on using the changeset viewer.