Changeset 85603 in webkit


Ignore:
Timestamp:
May 3, 2011 6:54:58 AM (13 years ago)
Author:
Adam Roben
Message:

Allow implicit conversion from nullptr_t to PassOwnPtr

This makes it a lot easier to write code that just wants a null PassOwnPtr, especially in
strict PassOwnPtr mode.

Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
doesn't work, but should

Reviewed by Adam Barth.

Source/JavaScriptCore:

  • wtf/PassOwnPtr.h:

(WTF::PassOwnPtr::PassOwnPtr): Added a non-explicit constructor that takes a nullptr_t.

  • wtf/MessageQueue.h:

(WTF::::waitForMessageFilteredWithTimeout):
(WTF::::tryGetMessage):
Use the new implicit conversion.

Source/WebCore:

Take advantage of implicit conversion from nullptr_t to PassOwnPtr

  • bindings/js/ScheduledAction.cpp:
  • css/CSSStyleSelector.cpp:
  • css/MediaList.cpp:
  • css/MediaQueryMatcher.cpp:
  • css/SVGCSSStyleSelector.cpp:
  • dom/MessagePort.cpp:
  • html/InputType.cpp:
  • html/canvas/WebGLRenderingContext.cpp:
  • inspector/InspectorStyleSheet.cpp:
  • page/ContextMenuController.cpp:
  • page/Page.cpp:
  • platform/PlatformGestureRecognizer.cpp:
  • platform/PurgeableBuffer.h:
  • platform/graphics/ImageBuffer.h:
  • platform/leveldb/LevelDBDatabase.cpp:
  • platform/mac/PurgeableBufferMac.cpp:
  • platform/text/RegularExpression.cpp:
  • rendering/RenderTheme.cpp:
  • rendering/RenderThemeMac.mm:
  • rendering/style/RenderStyle.h:
  • rendering/style/SVGRenderStyleDefs.cpp:
  • rendering/style/ShadowData.cpp:
  • rendering/style/StyleRareInheritedData.cpp:
  • rendering/style/StyleRareNonInheritedData.cpp:
  • rendering/svg/RenderSVGResourcePattern.cpp:

Source/WebKit/chromium:

Take advantage of implicit conversion from nullptr_t to PassOwnPtr

  • src/WebMediaPlayerClientImpl.cpp:

Source/WebKit/mac:

Take advantage of implicit conversion from nullptr_t to PassOwnPtr

  • History/WebHistory.mm:
  • Plugins/WebNetscapePluginEventHandler.mm:
  • WebView/WebView.mm:

Source/WebKit2:

Take advantage of implicit conversion from nullptr_t to PassOwnPtr

  • Platform/CoreIPC/Connection.cpp:
  • UIProcess/qt/WebContextMenuProxyQt.cpp:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:
  • WebProcess/WebPage/DrawingArea.cpp:

Tools:

Take advantage of implicit nullptr_t -> PassOwnPtr conversion

  • DumpRenderTree/chromium/CppBoundClass.h:
  • DumpRenderTree/chromium/WebViewHost.cpp:
Location:
trunk
Files:
43 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r85575 r85603  
     12011-05-02  Adam Roben  <aroben@apple.com>
     2
     3        Allow implicit conversion from nullptr_t to PassOwnPtr
     4
     5        This makes it a lot easier to write code that just wants a null PassOwnPtr, especially in
     6        strict PassOwnPtr mode.
     7
     8        Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
     9        doesn't work, but should
     10
     11        Reviewed by Adam Barth.
     12
     13        * wtf/PassOwnPtr.h:
     14        (WTF::PassOwnPtr::PassOwnPtr): Added a non-explicit constructor that takes a nullptr_t.
     15
     16        * wtf/MessageQueue.h:
     17        (WTF::::waitForMessageFilteredWithTimeout):
     18        (WTF::::tryGetMessage):
     19        Use the new implicit conversion.
     20
    1212011-05-02  Jessie Berlin  <jberlin@apple.com>
    222
  • trunk/Source/JavaScriptCore/wtf/MessageQueue.h

    r84855 r85603  
    141141        if (m_killed) {
    142142            result = MessageQueueTerminated;
    143             return PassOwnPtr<DataType>();
     143            return nullptr;
    144144        }
    145145
    146146        if (timedOut) {
    147147            result = MessageQueueTimeout;
    148             return PassOwnPtr<DataType>();
     148            return nullptr;
    149149        }
    150150
     
    161161        MutexLocker lock(m_mutex);
    162162        if (m_killed)
    163             return PassOwnPtr<DataType>();
     163            return nullptr;
    164164        if (m_queue.isEmpty())
    165             return PassOwnPtr<DataType>();
     165            return nullptr;
    166166
    167167        return adoptPtr(m_queue.takeFirst());
  • trunk/Source/JavaScriptCore/wtf/PassOwnPtr.h

    r74695 r85603  
    4949
    5050        PassOwnPtr() : m_ptr(0) { }
     51        PassOwnPtr(std::nullptr_t) : m_ptr(0) { }
    5152
    5253        // It somewhat breaks the type system to allow transfer of ownership out of
  • trunk/Source/WebCore/ChangeLog

    r85601 r85603  
     12011-05-02  Adam Roben  <aroben@apple.com>
     2
     3        Take advantage of implicit conversion from nullptr_t to PassOwnPtr
     4
     5        Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
     6        doesn't work, but should
     7
     8        Reviewed by Adam Barth.
     9
     10        * bindings/js/ScheduledAction.cpp:
     11        * css/CSSStyleSelector.cpp:
     12        * css/MediaList.cpp:
     13        * css/MediaQueryMatcher.cpp:
     14        * css/SVGCSSStyleSelector.cpp:
     15        * dom/MessagePort.cpp:
     16        * html/InputType.cpp:
     17        * html/canvas/WebGLRenderingContext.cpp:
     18        * inspector/InspectorStyleSheet.cpp:
     19        * page/ContextMenuController.cpp:
     20        * page/Page.cpp:
     21        * platform/PlatformGestureRecognizer.cpp:
     22        * platform/PurgeableBuffer.h:
     23        * platform/graphics/ImageBuffer.h:
     24        * platform/leveldb/LevelDBDatabase.cpp:
     25        * platform/mac/PurgeableBufferMac.cpp:
     26        * platform/text/RegularExpression.cpp:
     27        * rendering/RenderTheme.cpp:
     28        * rendering/RenderThemeMac.mm:
     29        * rendering/style/RenderStyle.h:
     30        * rendering/style/SVGRenderStyleDefs.cpp:
     31        * rendering/style/ShadowData.cpp:
     32        * rendering/style/StyleRareInheritedData.cpp:
     33        * rendering/style/StyleRareNonInheritedData.cpp:
     34        * rendering/svg/RenderSVGResourcePattern.cpp:
     35
    1362011-05-03  Pavel Feldman  <pfeldman@google.com>
    237
  • trunk/Source/WebCore/bindings/js/ScheduledAction.cpp

    r85442 r85603  
    5555    if (getCallData(v, callData) == CallTypeNone) {
    5656        if (policy && !policy->allowEval())
    57             return PassOwnPtr<ScheduledAction>();
     57            return nullptr;
    5858        UString string = v.toString(exec);
    5959        if (exec->hadException())
    60             return PassOwnPtr<ScheduledAction>();
     60            return nullptr;
    6161        return adoptPtr(new ScheduledAction(ustringToString(string), isolatedWorld));
    6262    }
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r85489 r85603  
    48284828        if (isInherit) {
    48294829            if (id == CSSPropertyTextShadow)
    4830                 return m_style->setTextShadow(m_parentStyle->textShadow() ? adoptPtr(new ShadowData(*m_parentStyle->textShadow())) : PassOwnPtr<ShadowData>());
    4831             return m_style->setBoxShadow(m_parentStyle->boxShadow() ? adoptPtr(new ShadowData(*m_parentStyle->boxShadow())) : PassOwnPtr<ShadowData>());
     4830                return m_style->setTextShadow(m_parentStyle->textShadow() ? adoptPtr(new ShadowData(*m_parentStyle->textShadow())) : nullptr);
     4831            return m_style->setBoxShadow(m_parentStyle->boxShadow() ? adoptPtr(new ShadowData(*m_parentStyle->boxShadow())) : nullptr);
    48324832        }
    48334833        if (isInitial || primitiveValue) // initial | none
    4834             return id == CSSPropertyTextShadow ? m_style->setTextShadow(PassOwnPtr<ShadowData>()) : m_style->setBoxShadow(PassOwnPtr<ShadowData>());
     4834            return id == CSSPropertyTextShadow ? m_style->setTextShadow(nullptr) : m_style->setBoxShadow(nullptr);
    48354835
    48364836        if (!value->isValueList())
  • trunk/Source/WebCore/css/MediaList.cpp

    r85162 r85603  
    132132        String medium = parseMediaDescriptor(oldMedium);
    133133        if (!medium.isNull()) {
    134             createdQuery = adoptPtr(new MediaQuery(MediaQuery::None, medium, PassOwnPtr<MediaQuery::ExpressionVector>()));
     134            createdQuery = adoptPtr(new MediaQuery(MediaQuery::None, medium, nullptr));
    135135            oldQuery = createdQuery.get();
    136136        }
     
    187187                    String mediaDescriptor = parseMediaDescriptor(medium);
    188188                    if (!mediaDescriptor.isNull())
    189                         tempMediaList->m_queries.append(new MediaQuery(MediaQuery::None, mediaDescriptor, PassOwnPtr<MediaQuery::ExpressionVector>()));
     189                        tempMediaList->m_queries.append(new MediaQuery(MediaQuery::None, mediaDescriptor, nullptr));
    190190                } else {
    191191                    ec = SYNTAX_ERR;
     
    233233        String medium = parseMediaDescriptor(newMedium);
    234234        if (!medium.isNull()) {
    235             m_queries.append(new MediaQuery(MediaQuery::None, medium, PassOwnPtr<MediaQuery::ExpressionVector>()));
     235            m_queries.append(new MediaQuery(MediaQuery::None, medium, nullptr));
    236236            ec = 0;
    237237        }
  • trunk/Source/WebCore/css/MediaQueryMatcher.cpp

    r84892 r85603  
    7878{
    7979    if (!m_document || !m_document->frame())
    80         return PassOwnPtr<MediaQueryEvaluator>();
     80        return nullptr;
    8181
    8282    Element* documentElement = m_document->documentElement();
    8383    if (!documentElement)
    84         return PassOwnPtr<MediaQueryEvaluator>();
     84        return nullptr;
    8585
    8686    CSSStyleSelector* styleSelector = m_document->styleSelector();
    8787    if (!styleSelector)
    88         return PassOwnPtr<MediaQueryEvaluator>();
     88        return nullptr;
    8989
    9090    RefPtr<RenderStyle> rootStyle = styleSelector->styleForElement(documentElement, 0 /*defaultParent*/, false /*allowSharing*/, true /*resolveForRootDefault*/);
  • trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp

    r85020 r85603  
    565565                return svgstyle->setShadow(adoptPtr(m_parentStyle->svgStyle()->shadow() ? new ShadowData(*m_parentStyle->svgStyle()->shadow()) : 0));
    566566            if (isInitial || primitiveValue) // initial | none
    567                 return svgstyle->setShadow(PassOwnPtr<ShadowData>());
     567                return svgstyle->setShadow(nullptr);
    568568
    569569            if (!value->isValueList())
  • trunk/Source/WebCore/dom/MessagePort.cpp

    r85162 r85603  
    207207{
    208208    if (!ports || !ports->size())
    209         return PassOwnPtr<MessagePortChannelArray>();
     209        return nullptr;
    210210
    211211    // HashSet used to efficiently check for duplicates in the passed-in array.
     
    217217        if (!port || port->isCloned() || portSet.contains(port)) {
    218218            ec = INVALID_STATE_ERR;
    219             return PassOwnPtr<MessagePortChannelArray>();
     219            return nullptr;
    220220        }
    221221        portSet.add(port);
     
    235235{
    236236    if (!channels || !channels->size())
    237         return PassOwnPtr<MessagePortArray>();
     237        return nullptr;
    238238
    239239    OwnPtr<MessagePortArray> portArray = adoptPtr(new MessagePortArray(channels->size()));
  • trunk/Source/WebCore/html/InputType.cpp

    r84695 r85603  
    505505PassOwnPtr<ClickHandlingState> InputType::willDispatchClick()
    506506{
    507     return PassOwnPtr<ClickHandlingState>();
     507    return nullptr;
    508508}
    509509
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp

    r85020 r85603  
    372372    if (!context) {
    373373        canvas->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextcreationerrorEvent, false, true, "Could not create a WebGL context."));
    374         return PassOwnPtr<WebGLRenderingContext>();
     374        return nullptr;
    375375    }
    376376
     
    474474{
    475475    detachAndRemoveAllObjects();
    476     m_context->setContextLostCallback(PassOwnPtr<GraphicsContext3D::ContextLostCallback>());
     476    m_context->setContextLostCallback(nullptr);
    477477}
    478478
  • trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp

    r85172 r85603  
    8585    m_hasText = true;
    8686    m_text = text;
    87     setSourceData(PassOwnPtr<SourceData>());
     87    setSourceData(nullptr);
    8888}
    8989
  • trunk/Source/WebCore/page/ContextMenuController.cpp

    r85036 r85603  
    123123{
    124124    if (!event->isMouseEvent())
    125         return PassOwnPtr<ContextMenu>();
     125        return nullptr;
    126126
    127127    MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
     
    132132
    133133    if (!result.innerNonSharedNode())
    134         return PassOwnPtr<ContextMenu>();
     134        return nullptr;
    135135
    136136    m_hitTestResult = result;
  • trunk/Source/WebCore/page/Page.cpp

    r85256 r85603  
    129129#endif
    130130#if ENABLE(DEVICE_ORIENTATION)
    131     , m_deviceMotionController(RuntimeEnabledFeatures::deviceMotionEnabled() ? adoptPtr(new DeviceMotionController(pageClients.deviceMotionClient)) : PassOwnPtr<DeviceMotionController>())
    132     , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? adoptPtr(new DeviceOrientationController(this, pageClients.deviceOrientationClient)) : PassOwnPtr<DeviceOrientationController>())
     131    , m_deviceMotionController(RuntimeEnabledFeatures::deviceMotionEnabled() ? adoptPtr(new DeviceMotionController(pageClients.deviceMotionClient)) : nullptr)
     132    , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? adoptPtr(new DeviceOrientationController(this, pageClients.deviceOrientationClient)) : nullptr)
    133133#endif
    134134#if ENABLE(INPUT_SPEECH)
  • trunk/Source/WebCore/platform/PlatformGestureRecognizer.cpp

    r84890 r85603  
    4141PassOwnPtr<PlatformGestureRecognizer> PlatformGestureRecognizer::create()
    4242{
    43     return PassOwnPtr<PlatformGestureRecognizer>();
     43    return nullptr;
    4444}
    4545
  • trunk/Source/WebCore/platform/PurgeableBuffer.h

    r76248 r85603  
    6464
    6565#if !ENABLE(PURGEABLE_MEMORY)
    66     inline PassOwnPtr<PurgeableBuffer> PurgeableBuffer::create(const char*, size_t) { return PassOwnPtr<PurgeableBuffer>(); }
     66    inline PassOwnPtr<PurgeableBuffer> PurgeableBuffer::create(const char*, size_t) { return nullptr; }
    6767    inline PurgeableBuffer::~PurgeableBuffer() { }
    6868    inline const char* PurgeableBuffer::data() const { return 0; }
  • trunk/Source/WebCore/platform/graphics/ImageBuffer.h

    r84884 r85603  
    7070            if (success)
    7171                return buf.release();
    72             return PassOwnPtr<ImageBuffer>();
     72            return nullptr;
    7373        }
    7474
  • trunk/Source/WebCore/platform/leveldb/LevelDBDatabase.cpp

    r85169 r85603  
    107107
    108108    if (!s.ok())
    109         return PassOwnPtr<LevelDBDatabase>();
     109        return nullptr;
    110110
    111111    result->m_db = adoptPtr(db);
  • trunk/Source/WebCore/platform/mac/PurgeableBufferMac.cpp

    r85036 r85603  
    5656{
    5757    if (size < minPurgeableBufferSize)
    58         return PassOwnPtr<PurgeableBuffer>();
     58        return nullptr;
    5959
    6060    vm_address_t buffer = 0;
     
    6363    ASSERT(ret == KERN_SUCCESS);
    6464    if (ret != KERN_SUCCESS)
    65         return PassOwnPtr<PurgeableBuffer>();
     65        return nullptr;
    6666
    6767    ret = vm_copy(mach_task_self(), reinterpret_cast<vm_address_t>(data), size, buffer);
     
    7070    if (ret != KERN_SUCCESS) {
    7171        vm_deallocate(mach_task_self(), buffer, size);
    72         return PassOwnPtr<PurgeableBuffer>();
     72        return nullptr;
    7373    }
    7474
  • trunk/Source/WebCore/platform/text/RegularExpression.cpp

    r78042 r85603  
    6060        if (m_constructionError) {
    6161            LOG_ERROR("RegularExpression: YARR compile failed with '%s'", m_constructionError);
    62             return PassOwnPtr<JSC::Yarr::BytecodePattern>();
     62            return nullptr;
    6363        }
    6464
  • trunk/Source/WebCore/rendering/RenderTheme.cpp

    r85162 r85603  
    9494
    9595    // Never support box-shadow on native controls.
    96     style->setBoxShadow(PassOwnPtr<ShadowData>());
     96    style->setBoxShadow(nullptr);
    9797   
    9898#if USE(NEW_THEME)
     
    930930void RenderTheme::adjustMeterStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
    931931{
    932     style->setBoxShadow(PassOwnPtr<ShadowData>());
     932    style->setBoxShadow(nullptr);
    933933}
    934934
  • trunk/Source/WebCore/rendering/RenderThemeMac.mm

    r85162 r85603  
    11651165    setFontFromControlSize(selector, style, controlSize);
    11661166
    1167     style->setBoxShadow(PassOwnPtr<ShadowData>());
     1167    style->setBoxShadow(nullptr);
    11681168}
    11691169
     
    12511251void RenderThemeMac::adjustSliderTrackStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
    12521252{
    1253     style->setBoxShadow(PassOwnPtr<ShadowData>());
     1253    style->setBoxShadow(nullptr);
    12541254}
    12551255
     
    12921292void RenderThemeMac::adjustSliderThumbStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
    12931293{
    1294     style->setBoxShadow(PassOwnPtr<ShadowData>());
     1294    style->setBoxShadow(nullptr);
    12951295}
    12961296
     
    14441444    setFontFromControlSize(selector, style, controlSize);
    14451445
    1446     style->setBoxShadow(PassOwnPtr<ShadowData>());
     1446    style->setBoxShadow(nullptr);
    14471447}
    14481448
     
    15031503    style->setWidth(Length(size.width(), Fixed));
    15041504    style->setHeight(Length(size.height(), Fixed));
    1505     style->setBoxShadow(PassOwnPtr<ShadowData>());
     1505    style->setBoxShadow(nullptr);
    15061506}
    15071507
     
    15181518    style->setWidth(Length(size.width() - emptyResultsOffset, Fixed));
    15191519    style->setHeight(Length(size.height(), Fixed));
    1520     style->setBoxShadow(PassOwnPtr<ShadowData>());
     1520    style->setBoxShadow(nullptr);
    15211521}
    15221522
     
    15311531    style->setWidth(Length(size.width(), Fixed));
    15321532    style->setHeight(Length(size.height(), Fixed));
    1533     style->setBoxShadow(PassOwnPtr<ShadowData>());
     1533    style->setBoxShadow(nullptr);
    15341534}
    15351535
     
    15641564    style->setWidth(Length(size.width() + resultsArrowWidth, Fixed));
    15651565    style->setHeight(Length(size.height(), Fixed));
    1566     style->setBoxShadow(PassOwnPtr<ShadowData>());
     1566    style->setBoxShadow(nullptr);
    15671567}
    15681568
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r85027 r85603  
    11031103    }
    11041104
    1105     void inheritAnimations(const AnimationList* parent) { rareNonInheritedData.access()->m_animations = parent ? adoptPtr(new AnimationList(*parent)) : PassOwnPtr<AnimationList>(); }
    1106     void inheritTransitions(const AnimationList* parent) { rareNonInheritedData.access()->m_transitions = parent ? adoptPtr(new AnimationList(*parent)) : PassOwnPtr<AnimationList>(); }
     1105    void inheritAnimations(const AnimationList* parent) { rareNonInheritedData.access()->m_animations = parent ? adoptPtr(new AnimationList(*parent)) : nullptr; }
     1106    void inheritTransitions(const AnimationList* parent) { rareNonInheritedData.access()->m_transitions = parent ? adoptPtr(new AnimationList(*parent)) : nullptr; }
    11071107    void adjustAnimations();
    11081108    void adjustTransitions();
  • trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp

    r84851 r85603  
    164164StyleShadowSVGData::StyleShadowSVGData(const StyleShadowSVGData& other)
    165165    : RefCounted<StyleShadowSVGData>()
    166     , shadow(other.shadow ? adoptPtr(new ShadowData(*other.shadow)) : PassOwnPtr<ShadowData>())
     166    , shadow(other.shadow ? adoptPtr(new ShadowData(*other.shadow)) : nullptr)
    167167{
    168168}
  • trunk/Source/WebCore/rendering/style/ShadowData.cpp

    r85027 r85603  
    3838    , m_style(o.m_style)
    3939    , m_isWebkitBoxShadow(o.m_isWebkitBoxShadow)
    40     , m_next(o.m_next ? adoptPtr(new ShadowData(*o.m_next)) : PassOwnPtr<ShadowData>())
     40    , m_next(o.m_next ? adoptPtr(new ShadowData(*o.m_next)) : nullptr)
    4141{
    4242}
  • trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp

    r85027 r85603  
    6464    , textFillColor(o.textFillColor)
    6565    , textEmphasisColor(o.textEmphasisColor)
    66     , textShadow(o.textShadow ? adoptPtr(new ShadowData(*o.textShadow)) : PassOwnPtr<ShadowData>())
     66    , textShadow(o.textShadow ? adoptPtr(new ShadowData(*o.textShadow)) : nullptr)
    6767    , highlight(o.highlight)
    6868    , cursorData(o.cursorData)
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp

    r85027 r85603  
    8080    , m_runningAcceleratedAnimation(o.m_runningAcceleratedAnimation)
    8181#endif
    82     , m_boxShadow(o.m_boxShadow ? adoptPtr(new ShadowData(*o.m_boxShadow)) : PassOwnPtr<ShadowData>())
     82    , m_boxShadow(o.m_boxShadow ? adoptPtr(new ShadowData(*o.m_boxShadow)) : nullptr)
    8383    , m_boxReflect(o.m_boxReflect)
    84     , m_animations(o.m_animations ? adoptPtr(new AnimationList(*o.m_animations)) : PassOwnPtr<AnimationList>())
    85     , m_transitions(o.m_transitions ? adoptPtr(new AnimationList(*o.m_transitions)) : PassOwnPtr<AnimationList>())
     84    , m_animations(o.m_animations ? adoptPtr(new AnimationList(*o.m_animations)) : nullptr)
     85    , m_transitions(o.m_transitions ? adoptPtr(new AnimationList(*o.m_transitions)) : nullptr)
    8686    , m_mask(o.m_mask)
    8787    , m_maskBoxImage(o.m_maskBoxImage)
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp

    r84101 r85603  
    261261
    262262    if (!SVGImageBufferTools::createImageBuffer(absoluteTileBoundaries, clampedAbsoluteTileBoundaries, tileImage, ColorSpaceDeviceRGB))
    263         return PassOwnPtr<ImageBuffer>();
     263        return nullptr;
    264264
    265265    GraphicsContext* tileImageContext = tileImage->context();
  • trunk/Source/WebKit/chromium/ChangeLog

    r85592 r85603  
     12011-05-02  Adam Roben  <aroben@apple.com>
     2
     3        Take advantage of implicit conversion from nullptr_t to PassOwnPtr
     4
     5        Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
     6        doesn't work, but should
     7
     8        Reviewed by Adam Barth.
     9
     10        * src/WebMediaPlayerClientImpl.cpp:
     11
    1122011-05-03  Pavel Feldman  <pfeldman@google.com>
    213
  • trunk/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp

    r84933 r85603  
    5757
    5858    if (!webFrame->client())
    59         return PassOwnPtr<WebMediaPlayer>();
     59        return nullptr;
    6060    return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, client));
    6161}
  • trunk/Source/WebKit/mac/ChangeLog

    r85549 r85603  
     12011-05-02  Adam Roben  <aroben@apple.com>
     2
     3        Take advantage of implicit conversion from nullptr_t to PassOwnPtr
     4
     5        Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
     6        doesn't work, but should
     7
     8        Reviewed by Adam Barth.
     9
     10        * History/WebHistory.mm:
     11        * Plugins/WebNetscapePluginEventHandler.mm:
     12        * WebView/WebView.mm:
     13
    1142011-05-02  Brady Eidson  <beidson@apple.com>
    215
  • trunk/Source/WebKit/mac/History/WebHistory.mm

    r85515 r85603  
    827827        item->setLastVisitWasHTTPNonGet([method caseInsensitiveCompare:@"GET"] && (![[url scheme] caseInsensitiveCompare:@"http"] || ![[url scheme] caseInsensitiveCompare:@"https"]));
    828828
    829     item->setRedirectURLs(PassOwnPtr<Vector<String> >());
     829    item->setRedirectURLs(nullptr);
    830830
    831831    NSArray *entries = [[NSArray alloc] initWithObjects:entry, nil];
  • trunk/Source/WebKit/mac/Plugins/WebNetscapePluginEventHandler.mm

    r84883 r85603  
    4545        default:
    4646            ASSERT_NOT_REACHED();
    47             return PassOwnPtr<WebNetscapePluginEventHandler>();
     47            return nullptr;
    4848    }
    4949}
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r85549 r85603  
    643643    static NSString *mailQuirksScriptContents = leakMailQuirksUserScriptContents();
    644644    core(self)->group().addUserScriptToWorld(core([WebScriptWorld world]),
    645         mailQuirksScriptContents, KURL(), PassOwnPtr<Vector<String> >(), PassOwnPtr<Vector<String> >(), InjectAtDocumentEnd, InjectInAllFrames);
     645        mailQuirksScriptContents, KURL(), nullptr, nullptr, InjectAtDocumentEnd, InjectInAllFrames);
    646646}
    647647
     
    664664    static NSString *outlookQuirksScriptContents = leakOutlookQuirksUserScriptContents();
    665665    core(self)->group().addUserScriptToWorld(core([WebScriptWorld world]),
    666         outlookQuirksScriptContents, KURL(), PassOwnPtr<Vector<String> >(), PassOwnPtr<Vector<String> >(), InjectAtDocumentEnd, InjectInAllFrames);
     666        outlookQuirksScriptContents, KURL(), nullptr, nullptr, InjectAtDocumentEnd, InjectInAllFrames);
    667667}
    668668
     
    25812581    NSUInteger count = [patterns count];
    25822582    if (count == 0)
    2583         return PassOwnPtr<Vector<String> >();
     2583        return nullptr;
    25842584    OwnPtr<Vector<String> > patternsVector = adoptPtr(new Vector<String>);
    25852585    for (NSUInteger i = 0; i < count; ++i) {
  • trunk/Source/WebKit2/ChangeLog

    r85595 r85603  
     12011-05-02  Adam Roben  <aroben@apple.com>
     2
     3        Take advantage of implicit conversion from nullptr_t to PassOwnPtr
     4
     5        Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
     6        doesn't work, but should
     7
     8        Reviewed by Adam Barth.
     9
     10        * Platform/CoreIPC/Connection.cpp:
     11        * UIProcess/qt/WebContextMenuProxyQt.cpp:
     12        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     13        * WebProcess/WebPage/DrawingArea.cpp:
     14
    1152011-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
    216
  • trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp

    r85576 r85603  
    378378    }
    379379   
    380     return PassOwnPtr<ArgumentDecoder>();
     380    return nullptr;
    381381}
    382382
     
    388388    if (!isValid()) {
    389389        didFailToSendSyncMessage();
    390         return PassOwnPtr<ArgumentDecoder>();
     390        return nullptr;
    391391    }
    392392
     
    396396        if (!m_shouldWaitForSyncReplies) {
    397397            didFailToSendSyncMessage();
    398             return PassOwnPtr<ArgumentDecoder>();
     398            return nullptr;
    399399        }
    400400
     
    458458        // any more incoming messages.
    459459        if (!isValid())
    460             return PassOwnPtr<ArgumentDecoder>();
     460            return nullptr;
    461461
    462462        // We didn't find a sync reply yet, keep waiting.
     
    472472        m_client->syncMessageSendTimedOut(this);
    473473
    474     return PassOwnPtr<ArgumentDecoder>();
     474    return nullptr;
    475475}
    476476
  • trunk/Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.cpp

    r81205 r85603  
    137137    // Do not show sub-menus with just disabled actions.
    138138    if (menu->isEmpty())
    139         return PassOwnPtr<QMenu>();
     139        return nullptr;
    140140
    141141    bool isAnyActionEnabled = false;
     
    146146    }
    147147    if (!isAnyActionEnabled)
    148         return PassOwnPtr<QMenu>();
     148        return nullptr;
    149149
    150150    return menu.release();
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r85515 r85603  
    213213{
    214214    if (!patterns)
    215         return PassOwnPtr<Vector<String> >();
     215        return nullptr;
    216216
    217217    size_t size =  patterns->size();
    218218    if (!size)
    219         return PassOwnPtr<Vector<String> >();
     219        return nullptr;
    220220
    221221    OwnPtr<Vector<String> > patternsVector = adoptPtr(new Vector<String>);
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp

    r85515 r85603  
    4949        return DrawingAreaImpl::create(webPage, parameters);
    5050#else
    51         return PassOwnPtr<DrawingArea>();
     51        return nullptr;
    5252#endif
    5353    case DrawingAreaTypeChunkedUpdate:
     
    5959    }
    6060
    61     return PassOwnPtr<DrawingArea>();
     61    return nullptr;
    6262}
    6363
  • trunk/Tools/ChangeLog

    r85583 r85603  
     12011-05-02  Adam Roben  <aroben@apple.com>
     2
     3        Take advantage of implicit nullptr_t -> PassOwnPtr conversion
     4
     5        Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
     6        doesn't work, but should
     7
     8        Reviewed by Adam Barth.
     9
     10        * DumpRenderTree/chromium/CppBoundClass.h:
     11        * DumpRenderTree/chromium/WebViewHost.cpp:
     12
    1132011-05-02  Martin Robinson  <mrobinson@igalia.com>
    214
  • trunk/Tools/DumpRenderTree/chromium/CppBoundClass.h

    r84926 r85603  
    206206            bindFallbackCallback(callback.release());
    207207        } else
    208             bindFallbackCallback(PassOwnPtr<Callback>());
     208            bindFallbackCallback(nullptr);
    209209    }
    210210
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp

    r84926 r85603  
    12981298
    12991299    // In case LoadRequest failed before DidCreateDataSource was called.
    1300     setPendingExtraData(PassOwnPtr<TestShellExtraData>());
     1300    setPendingExtraData(nullptr);
    13011301
    13021302    // Restore focus to the main frame prior to loading new request.
Note: See TracChangeset for help on using the changeset viewer.