Changeset 84893 in webkit


Ignore:
Timestamp:
Apr 26, 2011 12:43:22 AM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-04-26 Adam Barth <abarth@webkit.org>

Reviewed by David Levin.

WebKit/chromium should play nice with strict OwnPtrs
https://bugs.webkit.org/show_bug.cgi?id=59434

This fixes about half the issues.

  • src/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::maybeLoadMainResource):
  • src/ApplicationCacheHostInternal.h: (WebCore::ApplicationCacheHostInternal::ApplicationCacheHostInternal):
  • src/AutoFillPopupMenuClient.cpp: (WebKit::AutoFillPopupMenuClient::initialize):
  • src/GraphicsContext3DChromium.cpp: (WebCore::GraphicsContext3DInternal::initialize):
  • src/ResourceHandle.cpp: (WebCore::ResourceHandleInternal::start): (WebCore::ResourceHandle::ResourceHandle): (WebCore::ResourceHandle::loadResourceSynchronously):
  • src/SocketStreamHandle.cpp: (WebCore::SocketStreamHandleInternal::connect):
Location:
trunk/Source/WebKit/chromium
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r84849 r84893  
     12011-04-26  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by David Levin.
     4
     5        WebKit/chromium should play nice with strict OwnPtrs
     6        https://bugs.webkit.org/show_bug.cgi?id=59434
     7
     8        This fixes about half the issues.
     9
     10        * src/ApplicationCacheHost.cpp:
     11        (WebCore::ApplicationCacheHost::maybeLoadMainResource):
     12        * src/ApplicationCacheHostInternal.h:
     13        (WebCore::ApplicationCacheHostInternal::ApplicationCacheHostInternal):
     14        * src/AutoFillPopupMenuClient.cpp:
     15        (WebKit::AutoFillPopupMenuClient::initialize):
     16        * src/GraphicsContext3DChromium.cpp:
     17        (WebCore::GraphicsContext3DInternal::initialize):
     18        * src/ResourceHandle.cpp:
     19        (WebCore::ResourceHandleInternal::start):
     20        (WebCore::ResourceHandle::ResourceHandle):
     21        (WebCore::ResourceHandle::loadResourceSynchronously):
     22        * src/SocketStreamHandle.cpp:
     23        (WebCore::SocketStreamHandleInternal::connect):
     24
    1252011-04-25  Dirk Pranke  <dpranke@chromium.org>
    226
  • trunk/Source/WebKit/chromium/src/ApplicationCacheHost.cpp

    r81183 r84893  
    8080        return;
    8181
    82     m_internal.set(new ApplicationCacheHostInternal(this));
     82    m_internal = adoptPtr(new ApplicationCacheHostInternal(this));
    8383    if (m_internal->m_outerHost) {
    8484        WrappedResourceRequest wrapped(request);
  • trunk/Source/WebKit/chromium/src/ApplicationCacheHostInternal.h

    r63440 r84893  
    5151        WebKit::WebFrameImpl* webFrame = WebKit::WebFrameImpl::fromFrame(host->m_documentLoader->frame());
    5252        ASSERT(webFrame);
    53         m_outerHost.set(webFrame->client()->createApplicationCacheHost(webFrame, this));
     53        m_outerHost = adoptPtr(webFrame->client()->createApplicationCacheHost(webFrame, this));
    5454    }
    5555
  • trunk/Source/WebKit/chromium/src/AutoFillPopupMenuClient.cpp

    r84342 r84893  
    292292    // The direction of text in popup menu is set the same as the direction of
    293293    // the input element: textField.
    294     m_regularStyle.set(new PopupMenuStyle(Color::black,
    295                                           Color::white,
    296                                           regularFont,
    297                                           true,
    298                                           false,
    299                                           Length(WebCore::Fixed),
    300                                           textField->renderer()->style()->direction(),
    301                                           textField->renderer()->style()->unicodeBidi() == Override,
    302                                           PopupMenuStyle::AutofillPopup));
     294    m_regularStyle = adoptPtr(new PopupMenuStyle(Color::black, Color::white, regularFont, true, false,
     295                                                 Length(WebCore::Fixed), textField->renderer()->style()->direction(),
     296                                                 textField->renderer()->style()->unicodeBidi() == Override,
     297                                                 PopupMenuStyle::AutofillPopup));
    303298
    304299    FontDescription warningFontDescription = regularFont.fontDescription();
     
    306301    Font warningFont(warningFontDescription, regularFont.letterSpacing(), regularFont.wordSpacing());
    307302    warningFont.update(regularFont.fontSelector());
    308     m_warningStyle.set(new PopupMenuStyle(Color::darkGray,
    309                                           m_regularStyle->backgroundColor(),
    310                                           warningFont,
    311                                           m_regularStyle->isVisible(),
    312                                           m_regularStyle->isDisplayNone(),
    313                                           m_regularStyle->textIndent(),
    314                                           m_regularStyle->textDirection(),
    315                                           m_regularStyle->hasTextDirectionOverride(),
    316                                           PopupMenuStyle::AutofillPopup));
     303    m_warningStyle = adoptPtr(new PopupMenuStyle(Color::darkGray, m_regularStyle->backgroundColor(), warningFont,
     304                                                 m_regularStyle->isVisible(), m_regularStyle->isDisplayNone(),
     305                                                 m_regularStyle->textIndent(), m_regularStyle->textDirection(),
     306                                                 m_regularStyle->hasTextDirectionOverride(),
     307                                                 PopupMenuStyle::AutofillPopup));
    317308}
    318309
  • trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp

    r84449 r84893  
    110110    webAttributes.premultipliedAlpha = attrs.premultipliedAlpha;
    111111    webAttributes.canRecoverFromContextLoss = attrs.canRecoverFromContextLoss;
    112     WebKit::WebGraphicsContext3D* webContext = WebKit::webKitClient()->createGraphicsContext3D();
     112    OwnPtr<WebKit::WebGraphicsContext3D> webContext = adoptPtr(WebKit::webKitClient()->createGraphicsContext3D());
    113113    if (!webContext)
    114114        return false;
     
    121121    if (!m_webViewImpl)
    122122        return false;
    123     if (!webContext->initialize(webAttributes, m_webViewImpl, renderDirectlyToHostWindow)) {
    124         delete webContext;
     123    if (!webContext->initialize(webAttributes, m_webViewImpl, renderDirectlyToHostWindow))
    125124        return false;
    126     }
    127     m_impl.set(webContext);
     125    m_impl = webContext;
    128126
    129127#if USE(ACCELERATED_COMPOSITING)
  • trunk/Source/WebKit/chromium/src/ResourceHandle.cpp

    r84260 r84893  
    105105    m_state = ConnectionStateStarted;
    106106
    107     m_loader.set(webKitClient()->createURLLoader());
     107    m_loader = adoptPtr(webKitClient()->createURLLoader());
    108108    ASSERT(m_loader.get());
    109109
     
    202202                               bool defersLoading,
    203203                               bool shouldContentSniff)
    204     : d(new ResourceHandleInternal(request, client))
     204    : d(adoptPtr(new ResourceHandleInternal(request, client)))
    205205{
    206206    d->m_owner = this;
     
    293293                                               Vector<char>& data)
    294294{
    295     OwnPtr<WebURLLoader> loader(webKitClient()->createURLLoader());
     295    OwnPtr<WebURLLoader> loader = adoptPtr(webKitClient()->createURLLoader());
    296296    ASSERT(loader.get());
    297297
  • trunk/Source/WebKit/chromium/src/SocketStreamHandle.cpp

    r50820 r84893  
    9090void SocketStreamHandleInternal::connect(const KURL& url)
    9191{
    92     m_socket.set(webKitClient()->createSocketStreamHandle());
     92    m_socket = adoptPtr(webKitClient()->createSocketStreamHandle());
    9393    LOG(Network, "connect");
    9494    ASSERT(m_socket.get());
Note: See TracChangeset for help on using the changeset viewer.