Changeset 86537 in webkit
- Timestamp:
- May 16, 2011 12:24:01 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86532 r86537 1 2011-05-16 Adam Barth <abarth@webkit.org> 2 3 [Qt] QtPlatformPlugin create methods should use PassOwnPtr 4 https://bugs.webkit.org/show_bug.cgi?id=60873 5 6 * plugins/qt/PluginViewQt.cpp: 7 (WebCore::PluginView::platformStart): 8 1 9 2011-05-15 Adam Barth <abarth@webkit.org> 2 10 -
trunk/Source/WebCore/plugins/qt/PluginViewQt.cpp
r84371 r86537 946 946 && m_parentFrame->page()->settings() 947 947 && m_parentFrame->page()->settings()->acceleratedCompositingEnabled()) { 948 m_platformLayer = new PluginGraphicsLayerQt(this);948 m_platformLayer = adoptPtr(new PluginGraphicsLayerQt(this)); 949 949 // Trigger layer computation in RenderLayerCompositor 950 950 m_element->setNeedsStyleRecalc(SyntheticStyleChange); -
trunk/Source/WebKit/qt/Api/qwebpage.cpp
r86533 r86537 1320 1320 { 1321 1321 QtPlatformPlugin platformPlugin; 1322 QWebTouchModifier*touchModifier = platformPlugin.createTouchModifier();1322 OwnPtr<QWebTouchModifier> touchModifier = platformPlugin.createTouchModifier(); 1323 1323 if (!touchModifier) 1324 1324 return; … … 1329 1329 unsigned leftPadding = touchModifier->hitTestPaddingForTouch(QWebTouchModifier::Left); 1330 1330 1331 delete touchModifier; 1332 touchModifier = 0; 1331 touchModifier = nullptr; 1333 1332 1334 1333 if (!topPadding && !rightPadding && !bottomPadding && !leftPadding) -
trunk/Source/WebKit/qt/ChangeLog
r86533 r86537 1 2011-05-16 Adam Barth <abarth@webkit.org> 2 3 [Qt] QtPlatformPlugin create methods should use PassOwnPtr 4 https://bugs.webkit.org/show_bug.cgi?id=60873 5 6 This change is slightly more than a build fix because the patch kind of 7 spidered a bit while I was trying to fix the build the "right way." 8 Hopefully nothing here is controversial. 9 10 * Api/qwebpage.cpp: 11 (QWebPagePrivate::adjustPointForClicking): 12 * WebCoreSupport/ChromeClientQt.cpp: 13 (WebCore::ChromeClientQt::createSelectPopup): 14 * WebCoreSupport/FullScreenVideoQt.cpp: 15 (WebCore::FullScreenVideoQt::FullScreenVideoQt): 16 (WebCore::FullScreenVideoQt::~FullScreenVideoQt): 17 * WebCoreSupport/FullScreenVideoQt.h: 18 * WebCoreSupport/NotificationPresenterClientQt.cpp: 19 (WebCore::NotificationWrapper::NotificationWrapper): 20 (WebCore::NotificationPresenterClientQt::displayNotification): 21 * WebCoreSupport/PopupMenuQt.cpp: 22 (WebCore::PopupMenuQt::PopupMenuQt): 23 (WebCore::PopupMenuQt::~PopupMenuQt): 24 (WebCore::PopupMenuQt::show): 25 * WebCoreSupport/PopupMenuQt.h: 26 * WebCoreSupport/QtPlatformPlugin.cpp: 27 (WebCore::QtPlatformPlugin::createSelectInputMethod): 28 (WebCore::QtPlatformPlugin::createNotificationPresenter): 29 (WebCore::QtPlatformPlugin::createHapticFeedbackPlayer): 30 (WebCore::QtPlatformPlugin::createTouchModifier): 31 (WebCore::QtPlatformPlugin::createFullScreenVideoHandler): 32 * WebCoreSupport/QtPlatformPlugin.h: 33 (WebCore::QtPlatformPlugin::QtPlatformPlugin): 34 1 35 2011-05-15 Adam Barth <abarth@webkit.org> 2 36 -
trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r86451 r86537 697 697 #endif 698 698 699 QWebSelectMethod*ChromeClientQt::createSelectPopup() const700 { 701 QWebSelectMethod*result = m_platformPlugin.createSelectInputMethod();699 PassOwnPtr<QWebSelectMethod> ChromeClientQt::createSelectPopup() const 700 { 701 OwnPtr<QWebSelectMethod> result = m_platformPlugin.createSelectInputMethod(); 702 702 if (result) 703 return result ;703 return result.release(); 704 704 705 705 #if defined(Q_WS_MAEMO_5) 706 return new QtMaemoWebPopup;706 return adoptPtr(new QtMaemoWebPopup); 707 707 #elif !defined(QT_NO_COMBOBOX) 708 return new QtFallbackWebPopup(this);708 return adoptPtr(new QtFallbackWebPopup(this)); 709 709 #else 710 return 0;710 return nullptr; 711 711 #endif 712 712 } -
trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r85823 r86537 35 35 #include "PlatformString.h" 36 36 #include "QtPlatformPlugin.h" 37 #include <wtf/PassOwnPtr.h> 37 38 #include <wtf/RefCounted.h> 38 39 … … 190 191 virtual void populateVisitedLinks(); 191 192 192 QWebSelectMethod*createSelectPopup() const;193 PassOwnPtr<QWebSelectMethod> createSelectPopup() const; 193 194 194 195 virtual void dispatchViewportDataDidChange(const ViewportArguments&) const; -
trunk/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
r83108 r86537 139 139 m_FullScreenVideoHandler = m_chromeClient->m_platformPlugin.createFullScreenVideoHandler(); 140 140 if (!m_FullScreenVideoHandler) 141 m_FullScreenVideoHandler = new DefaultFullScreenVideoHandler;141 m_FullScreenVideoHandler = adoptPtr(new DefaultFullScreenVideoHandler); 142 142 143 143 if (m_FullScreenVideoHandler) 144 connect(m_FullScreenVideoHandler , SIGNAL(fullScreenClosed()), this, SLOT(aboutToClose()));145 #endif 146 147 #if USE(GSTREAMER) 148 m_FullScreenVideoHandlerGStreamer = new GStreamerFullScreenVideoHandler;144 connect(m_FullScreenVideoHandler.get(), SIGNAL(fullScreenClosed()), this, SLOT(aboutToClose())); 145 #endif 146 147 #if USE(GSTREAMER) 148 m_FullScreenVideoHandlerGStreamer = adoptPtr(new GStreamerFullScreenVideoHandler); 149 149 #endif 150 150 } … … 152 152 FullScreenVideoQt::~FullScreenVideoQt() 153 153 { 154 #if USE(QT_MULTIMEDIA)155 delete m_FullScreenVideoHandler;156 #endif157 #if USE(GSTREAMER)158 delete m_FullScreenVideoHandlerGStreamer;159 #endif160 154 } 161 155 -
trunk/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
r83108 r86537 24 24 #include <QObject> 25 25 #include <wtf/Platform.h> 26 #include <wtf/OwnPtr.h> 26 27 27 28 QT_BEGIN_NAMESPACE … … 105 106 HTMLVideoElement* m_videoElement; 106 107 #if USE(QT_MULTIMEDIA) 107 QWebFullScreenVideoHandler*m_FullScreenVideoHandler;108 OwnPtr<QWebFullScreenVideoHandler> m_FullScreenVideoHandler; 108 109 #endif 109 110 #if USE(GSTREAMER) 110 GStreamerFullScreenVideoHandler*m_FullScreenVideoHandlerGStreamer;111 OwnPtr<GStreamerFullScreenVideoHandler> m_FullScreenVideoHandlerGStreamer; 111 112 #endif 112 113 }; -
trunk/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
r79098 r86537 74 74 75 75 #ifndef QT_NO_SYSTEMTRAYICON 76 m_notificationIcon = 0;77 #endif 78 m_presenter = 0;76 m_notificationIcon = nullptr; 77 #endif 78 m_presenter = nullptr; 79 79 #endif 80 80 } … … 212 212 if (bytes.length() && pixmap.loadFromData(bytes)) { 213 213 QIcon icon(pixmap); 214 wrapper->m_notificationIcon = new QSystemTrayIcon(icon);214 wrapper->m_notificationIcon = adoptPtr(new QSystemTrayIcon(icon)); 215 215 } else 216 wrapper->m_notificationIcon = new QSystemTrayIcon();216 wrapper->m_notificationIcon = adoptPtr(new QSystemTrayIcon()); 217 217 #endif 218 218 } -
trunk/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
r82075 r86537 83 83 PopupMenuQt::PopupMenuQt(PopupMenuClient* client, const ChromeClientQt* chromeClient) 84 84 : m_popupClient(client) 85 , m_popup(0)86 , m_selectData(0)87 85 , m_chromeClient(chromeClient) 88 86 { … … 91 89 PopupMenuQt::~PopupMenuQt() 92 90 { 93 delete m_selectData;94 delete m_popup;95 91 } 96 92 … … 108 104 if (!m_popup) { 109 105 m_popup = m_chromeClient->createSelectPopup(); 110 connect(m_popup , SIGNAL(didHide()), this, SLOT(didHide()));111 connect(m_popup , SIGNAL(selectItem(int, bool, bool)), this, SLOT(selectItem(int, bool, bool)));106 connect(m_popup.get(), SIGNAL(didHide()), this, SLOT(didHide())); 107 connect(m_popup.get(), SIGNAL(selectItem(int, bool, bool)), this, SLOT(selectItem(int, bool, bool))); 112 108 } 113 109 114 if (QtFallbackWebPopup* fallback = qobject_cast<QtFallbackWebPopup*>(m_popup )) {110 if (QtFallbackWebPopup* fallback = qobject_cast<QtFallbackWebPopup*>(m_popup.get())) { 115 111 QRect geometry(rect); 116 112 geometry.moveTopLeft(view->contentsToWindow(rect.location())); … … 119 115 } 120 116 121 if (m_selectData) 122 delete m_selectData; 123 m_selectData = new SelectData(m_popupClient); 124 m_popup->show(*m_selectData); 117 m_selectData = adoptPtr(new SelectData(m_popupClient)); 118 m_popup->show(*m_selectData.get()); 125 119 #endif 126 120 } -
trunk/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.h
r64829 r86537 23 23 #include "PopupMenu.h" 24 24 #include <QObject> 25 #include <wtf/PassOwnPtr.h> 25 26 26 27 class QWebSelectData; … … 50 51 private: 51 52 PopupMenuClient* m_popupClient; 52 QWebSelectMethod*m_popup;53 QWebSelectData*m_selectData;53 OwnPtr<QWebSelectMethod> m_popup; 54 OwnPtr<QWebSelectData> m_selectData; 54 55 const ChromeClientQt* m_chromeClient; 55 56 }; -
trunk/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
r83108 r86537 103 103 } 104 104 105 QWebSelectMethod*QtPlatformPlugin::createSelectInputMethod()105 PassOwnPtr<QWebSelectMethod> QtPlatformPlugin::createSelectInputMethod() 106 106 { 107 107 QWebKitPlatformPlugin* p = plugin(); 108 return p ? static_cast<QWebSelectMethod*>(p->createExtension(QWebKitPlatformPlugin::MultipleSelections)) : 0;108 return adoptPtr(p ? static_cast<QWebSelectMethod*>(p->createExtension(QWebKitPlatformPlugin::MultipleSelections)) : 0); 109 109 } 110 110 111 112 QWebNotificationPresenter* QtPlatformPlugin::createNotificationPresenter() 111 PassOwnPtr<QWebNotificationPresenter> QtPlatformPlugin::createNotificationPresenter() 113 112 { 114 113 QWebKitPlatformPlugin* p = plugin(); 115 return p ? static_cast<QWebNotificationPresenter*>(p->createExtension(QWebKitPlatformPlugin::Notifications)) : 0;114 return adoptPtr(p ? static_cast<QWebNotificationPresenter*>(p->createExtension(QWebKitPlatformPlugin::Notifications)) : 0); 116 115 } 117 116 118 QWebHapticFeedbackPlayer*QtPlatformPlugin::createHapticFeedbackPlayer()117 PassOwnPtr<QWebHapticFeedbackPlayer> QtPlatformPlugin::createHapticFeedbackPlayer() 119 118 { 120 119 QWebKitPlatformPlugin* p = plugin(); 121 return p ? static_cast<QWebHapticFeedbackPlayer*>(p->createExtension(QWebKitPlatformPlugin::Haptics)) : 0;120 return adoptPtr(p ? static_cast<QWebHapticFeedbackPlayer*>(p->createExtension(QWebKitPlatformPlugin::Haptics)) : 0); 122 121 } 123 122 124 QWebTouchModifier*QtPlatformPlugin::createTouchModifier()123 PassOwnPtr<QWebTouchModifier> QtPlatformPlugin::createTouchModifier() 125 124 { 126 125 QWebKitPlatformPlugin* p = plugin(); 127 return p ? static_cast<QWebTouchModifier*>(p->createExtension(QWebKitPlatformPlugin::TouchInteraction)) : 0;126 return adoptPtr(p ? static_cast<QWebTouchModifier*>(p->createExtension(QWebKitPlatformPlugin::TouchInteraction)) : 0); 128 127 } 129 128 130 129 #if ENABLE(VIDEO) && USE(QT_MULTIMEDIA) 131 QWebFullScreenVideoHandler*QtPlatformPlugin::createFullScreenVideoHandler()130 PassOwnPtr<QWebFullScreenVideoHandler> QtPlatformPlugin::createFullScreenVideoHandler() 132 131 { 133 132 QWebKitPlatformPlugin* p = plugin(); 134 return p ? static_cast<QWebFullScreenVideoHandler*>(p->createExtension(QWebKitPlatformPlugin::FullScreenVideoPlayer)) : 0;133 return adoptPtr(p ? static_cast<QWebFullScreenVideoHandler*>(p->createExtension(QWebKitPlatformPlugin::FullScreenVideoPlayer)) : 0); 135 134 } 136 135 #endif -
trunk/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
r83108 r86537 23 23 24 24 #include <QPluginLoader> 25 #include <wtf/PassOwnPtr.h> 25 26 26 27 class QWebSelectMethod; … … 38 39 class QtPlatformPlugin { 39 40 public: 40 QtPlatformPlugin() : m_loaded(false), m_plugin(0) {} 41 QtPlatformPlugin() 42 : m_loaded(false) 43 , m_plugin(0) 44 { 45 } 46 41 47 ~QtPlatformPlugin(); 42 48 43 QWebSelectMethod*createSelectInputMethod();44 QWebNotificationPresenter*createNotificationPresenter();45 QWebHapticFeedbackPlayer*createHapticFeedbackPlayer();46 QWebTouchModifier*createTouchModifier();49 PassOwnPtr<QWebSelectMethod> createSelectInputMethod(); 50 PassOwnPtr<QWebNotificationPresenter> createNotificationPresenter(); 51 PassOwnPtr<QWebHapticFeedbackPlayer> createHapticFeedbackPlayer(); 52 PassOwnPtr<QWebTouchModifier> createTouchModifier(); 47 53 #if ENABLE(VIDEO) && USE(QT_MULTIMEDIA) 48 QWebFullScreenVideoHandler*createFullScreenVideoHandler();54 PassOwnPtr<QWebFullScreenVideoHandler> createFullScreenVideoHandler(); 49 55 #endif 50 56
Note: See TracChangeset
for help on using the changeset viewer.