Changeset 57408 in webkit
- Timestamp:
- Apr 10, 2010 12:35:01 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r57405 r57408 1 2010-04-10 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Implement Desktop Notifications API for QtWebKit 6 https://bugs.webkit.org/show_bug.cgi?id=35503 7 8 No new tests enabled as notification DRT tests are 9 disabled at the moment. 10 11 * WebCore.pri: Add files to the build system and turn 12 on the feature by default. 13 14 * WebCore.pro: Add files to the build system 15 16 * bindings/js/JSDesktopNotificationsCustom.cpp: 17 (WebCore::JSNotificationCenter::requestPermission): 18 (WebCore::JSNotification::addEventListener): 19 (WebCore::JSNotification::removeEventListener): 20 Fix build regresssion. 21 1 22 2010-04-09 Pavel Feldman <pfeldman@chromium.org> 2 23 -
trunk/WebCore/WebCore.pri
r57316 r57408 57 57 !contains(DEFINES, ENABLE_PROGRESS_TAG=.): DEFINES += ENABLE_PROGRESS_TAG=1 58 58 !contains(DEFINES, ENABLE_BLOB_SLICE=.): DEFINES += ENABLE_BLOB_SLICE=0 59 !contains(DEFINES, ENABLE_NOTIFICATIONS=.): DEFINES += ENABLE_NOTIFICATIONS=1 59 60 60 61 greaterThan(QT_MINOR_VERSION, 5) { … … 158 159 contains(DEFINES, ENABLE_TOUCH_EVENTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_TOUCH_EVENTS=1 159 160 contains(DEFINES, ENABLE_TILED_BACKING_STORE=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_TILED_BACKING_STORE=1 161 contains(DEFINES, ENABLE_NOTIFICATIONS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_NOTIFICATIONS=1 160 162 161 163 … … 402 404 inspector/JavaScriptCallFrame.idl \ 403 405 loader/appcache/DOMApplicationCache.idl \ 406 notifications/Notification.idl \ 407 notifications/NotificationCenter.idl \ 404 408 page/BarInfo.idl \ 405 409 page/Console.idl \ -
trunk/WebCore/WebCore.pro
r57320 r57408 296 296 bindings/js/JSDataGridDataSource.cpp \ 297 297 bindings/js/JSDebugWrapperSet.cpp \ 298 bindings/js/JSDesktopNotificationsCustom.cpp \ 298 299 bindings/js/JSDocumentCustom.cpp \ 299 300 bindings/js/JSDocumentFragmentCustom.cpp \ … … 760 761 loader/TextResourceDecoder.cpp \ 761 762 loader/ThreadableLoader.cpp \ 763 notifications/Notification.cpp \ 764 notifications/NotificationCenter.cpp \ 762 765 page/animation/AnimationBase.cpp \ 763 766 page/animation/AnimationController.cpp \ … … 1484 1487 loader/ThreadableLoader.h \ 1485 1488 loader/WorkerThreadableLoader.h \ 1489 notifications/Notification.h \ 1490 notifications/NotificationCenter.h \ 1491 notifications/NotificationPresenter.h \ 1492 notifications/NotificationContents.h \ 1486 1493 page/animation/AnimationBase.h \ 1487 1494 page/animation/AnimationController.h \ … … 2026 2033 $$PWD/../WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h \ 2027 2034 $$PWD/../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h \ 2035 $$PWD/../WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h \ 2028 2036 $$PWD/platform/network/qt/DnsPrefetchHelper.h 2029 2037 … … 2112 2120 ../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp \ 2113 2121 ../WebKit/qt/WebCoreSupport/InspectorClientQt.cpp \ 2122 ../WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp \ 2114 2123 ../WebKit/qt/Api/qwebframe.cpp \ 2115 2124 ../WebKit/qt/Api/qgraphicswebview.cpp \ -
trunk/WebCore/bindings/js/JSDesktopNotificationsCustom.cpp
r49963 r57408 56 56 return throwError(exec, TypeError); 57 57 58 PassRefPtr<JSCustomVoidCallback> callback = JSCustomVoidCallback::create(args.at(0).getObject(), static_cast<Document*>(context)->frame());58 PassRefPtr<JSCustomVoidCallback> callback = JSCustomVoidCallback::create(args.at(0).getObject(), toJSDOMGlobalObject(static_cast<Document*>(context), exec)); 59 59 60 60 impl()->requestPermission(callback); … … 68 68 return jsUndefined(); 69 69 70 impl()->addEventListener(args.at(0).toString(exec), JSEventListener::create(asObject(listener) ), false, currentWorld(exec)), args.at(2).toBoolean(exec));70 impl()->addEventListener(args.at(0).toString(exec), JSEventListener::create(asObject(listener), this, false, currentWorld(exec)), args.at(2).toBoolean(exec)); 71 71 return jsUndefined(); 72 72 } … … 78 78 return jsUndefined(); 79 79 80 impl()->removeEventListener(args.at(0).toString(exec), JSEventListener::create(asObject(listener), false, currentWorld(exec)).get(), args.at(2).toBoolean(exec));80 impl()->removeEventListener(args.at(0).toString(exec), JSEventListener::create(asObject(listener), this, false, currentWorld(exec)).get(), args.at(2).toBoolean(exec)); 81 81 return jsUndefined(); 82 82 } -
trunk/WebKit/qt/Api/qwebpage.cpp
r57327 r57408 81 81 #include "runtime/InitializeThreading.h" 82 82 #include "PageGroup.h" 83 #include "NotificationPresenterClientQt.h" 83 84 #include "QWebPageClient.h" 84 85 #include "WorkerThread.h" … … 490 491 491 492 PageGroup::setShouldTrackVisitedLinks(true); 493 494 #if ENABLE(NOTIFICATIONS) 495 notificationPresenterClient = new NotificationPresenterClientQt(); 496 #endif 492 497 } 493 498 … … 502 507 delete settings; 503 508 delete page; 509 510 #if ENABLE(NOTIFICATIONS) 511 delete notificationPresenterClient; 512 #endif 504 513 } 505 514 -
trunk/WebKit/qt/Api/qwebpage.h
r57327 r57408 56 56 class InspectorClientQt; 57 57 class InspectorFrontendClientQt; 58 class NotificationPresenterClientQt; 58 59 class ResourceHandle; 59 60 class HitTestResult; … … 370 371 friend class WebCore::InspectorClientQt; 371 372 friend class WebCore::InspectorFrontendClientQt; 373 friend class WebCore::NotificationPresenterClientQt; 372 374 friend class WebCore::ResourceHandle; 373 375 friend class WebCore::QNetworkReplyHandler; -
trunk/WebKit/qt/Api/qwebpage_p.h
r56740 r57408 45 45 class Element; 46 46 class InspectorController; 47 class NotificationPresenterClientQt; 47 48 class Node; 48 49 class Page; … … 186 187 bool inspectorIsInternalOnly; // True if created through the Inspect context menu action 187 188 Qt::DropAction m_lastDropAction; 189 190 WebCore::NotificationPresenterClientQt* notificationPresenterClient; 188 191 189 192 QString viewMode; -
trunk/WebKit/qt/ChangeLog
r57397 r57408 1 2010-04-10 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Implement Desktop Notifications API for QtWebKit 6 https://bugs.webkit.org/show_bug.cgi?id=35503 7 8 Map WebKit notifications to Qt's SystemTray API and 9 implement DRT tracing. 10 11 This patch does not implement the security part of 12 WebKit notifications. 13 14 * Api/qwebpage.cpp: 15 (QWebPagePrivate::QWebPagePrivate): 16 * Api/qwebpage.h: 17 * Api/qwebpage_p.h: 18 * WebCoreSupport/ChromeClientQt.cpp: 19 (WebCore::ChromeClientQt::notificationPresenter): 20 * WebCoreSupport/ChromeClientQt.h: 21 * WebCoreSupport/NotificationPresenterClientQt.cpp: Added. 22 (qt_dump_notification): 23 (NotificationPresenterClientQt::NotificationPresenterClientQt): 24 (NotificationPresenterClientQt::show): 25 (NotificationPresenterClientQt::cancel): 26 (NotificationPresenterClientQt::notificationObjectDestroyed): 27 (NotificationPresenterClientQt::requestPermission): 28 (NotificationPresenterClientQt::checkPermission): 29 * WebCoreSupport/NotificationPresenterClientQt.h: Added. 30 1 31 2010-04-09 Tasuku Suzuki <tasuku.suzuki@nokia.com> 2 32 -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r57357 r57408 38 38 #include "HitTestResult.h" 39 39 #include "Icon.h" 40 #include "NotificationPresenterClientQt.h" 40 41 #include "NotImplemented.h" 41 42 #include "ScrollbarTheme.h" … … 471 472 // FIXME: Free some space. 472 473 notImplemented(); 474 } 475 #endif 476 477 #if ENABLE(NOTIFICATIONS) 478 NotificationPresenter* ChromeClientQt::notificationPresenter() const 479 { 480 return m_webPage->d->notificationPresenterClient; 473 481 } 474 482 #endif -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r56851 r57408 129 129 #endif 130 130 131 #if ENABLE(NOTIFICATIONS) 132 virtual NotificationPresenter* notificationPresenter() const; 133 #endif 134 131 135 #if USE(ACCELERATED_COMPOSITING) 132 136 // see ChromeClient.h -
trunk/WebKitTools/ChangeLog
r57407 r57408 1 2010-04-10 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Implement Desktop Notifications API for QtWebKit 6 https://bugs.webkit.org/show_bug.cgi?id=35503 7 8 DRT stubs for notification. Enables to run and pass 9 3 (currently disabled) tests. 10 11 * DumpRenderTree/qt/LayoutTestControllerQt.cpp: 12 (LayoutTestController::LayoutTestController): 13 (LayoutTestController::grantDesktopNotificationPermission): 14 (LayoutTestController::checkDesktopNotificationPermission): 15 * DumpRenderTree/qt/LayoutTestControllerQt.h: 16 1 17 2010-04-09 Dumitru Daniliuc <dumi@chromium.org> 2 18 -
trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
r57294 r57408 60 60 extern void qt_drt_webinspector_close(QWebPage *page); 61 61 extern void qt_drt_enableCaretBrowsing(QWebPage* page, bool value); 62 extern void qt_dump_notification(bool b); 62 63 63 64 LayoutTestController::LayoutTestController(WebCore::DumpRenderTree* drt) … … 66 67 { 67 68 reset(); 69 qt_dump_notification(true); 68 70 } 69 71 … … 197 199 } 198 200 201 void LayoutTestController::grantDesktopNotificationPermission(const QString& origin) 202 { 203 // FIXME: Implement for notification security 204 } 205 206 bool LayoutTestController::checkDesktopNotificationPermission(const QString& origin) 207 { 208 // FIXME: Implement for notification security 209 return true; 210 } 211 199 212 void LayoutTestController::display() 200 213 { -
trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
r57277 r57408 111 111 void setCloseRemainingWindowsWhenComplete(bool = false) {} 112 112 int windowCount(); 113 void grantDesktopNotificationPermission(const QString& origin); 114 bool checkDesktopNotificationPermission(const QString& origin); 113 115 void display(); 114 116 void clearBackForwardList();
Note: See TracChangeset
for help on using the changeset viewer.