Diff
Modified: trunk/Source/WebCore/ChangeLog (112820 => 112821)
--- trunk/Source/WebCore/ChangeLog 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebCore/ChangeLog 2012-04-01 23:15:44 UTC (rev 112821)
@@ -1,3 +1,28 @@
+2012-04-01 Jon Lee <jon...@apple.com>
+
+ Rename notification properties and functions
+ https://bugs.webkit.org/show_bug.cgi?id=80482
+ <rdar://problem/10912432>
+
+ Reviewed by Kentaro Hara.
+
+ Change method name to close(), and set tag property on Notifications, based on discussions in WG:
+ http://lists.w3.org/Archives/Public/public-web-notification/2012Mar/0024.html
+ http://lists.w3.org/Archives/Public/public-web-notification/2012Mar/0013.html
+
+ * notifications/Notification.cpp:
+ (WebCore::Notification::~Notification): Use close().
+ (WebCore::Notification::close):
+ * notifications/Notification.h:
+ (Notification):
+ (WebCore::Notification::cancel): Wrap in ENABLE(LEGACY_NOTIFICATIONS), and use close().
+ (WebCore::Notification::replaceId): Wrap in ENABLE(LEGACY_NOTIFICATIONS), and use tag().
+ (WebCore::Notification::setReplaceId): Wrap in ENABLE(LEGACY_NOTIFICATIONS), and use setTag().
+ (WebCore::Notification::tag):
+ (WebCore::Notification::setTag):
+ * notifications/Notification.idl: Preserve cancel() and replaceID in ENABLE(LEGACY_NOTIFICATIONS), and
+ close() and tag in ENABLE(NOTIFICATIONS).
+
2012-04-01 Eric Seidel <e...@webkit.org>
Unreviewed, rolling out r112760.
Modified: trunk/Source/WebCore/notifications/Notification.cpp (112820 => 112821)
--- trunk/Source/WebCore/notifications/Notification.cpp 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebCore/notifications/Notification.cpp 2012-04-01 23:15:44 UTC (rev 112821)
@@ -95,7 +95,7 @@
{
if (m_state == Loading) {
ASSERT_NOT_REACHED();
- cancel();
+ close();
}
}
@@ -143,7 +143,7 @@
#endif
}
-void Notification::cancel()
+void Notification::close()
{
switch (m_state) {
case Idle:
Modified: trunk/Source/WebCore/notifications/Notification.h (112820 => 112821)
--- trunk/Source/WebCore/notifications/Notification.h 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebCore/notifications/Notification.h 2012-04-01 23:15:44 UTC (rev 112821)
@@ -66,7 +66,10 @@
virtual ~Notification();
void show();
- void cancel();
+#if ENABLE(LEGACY_NOTIFICATIONS)
+ void cancel() { close(); }
+#endif
+ void close();
bool isHTML() const { return m_isHTML; }
void setHTML(bool isHTML) { m_isHTML = isHTML; }
@@ -80,10 +83,15 @@
String dir() const { return m_direction; }
void setDir(const String& dir) { m_direction = dir; }
-
- String replaceId() const { return m_replaceId; }
- void setReplaceId(const String& replaceId) { m_replaceId = replaceId; }
+#if ENABLE(LEGACY_NOTIFICATIONS)
+ String replaceId() const { return tag(); }
+ void setReplaceId(const String& replaceId) { setTag(replaceId); }
+#endif
+
+ String tag() const { return m_tag; }
+ void setTag(const String& tag) { m_tag = tag; }
+
TextDirection direction() const { return dir() == "rtl" ? RTL : LTR; }
DEFINE_ATTRIBUTE_EVENT_LISTENER(show);
@@ -146,7 +154,7 @@
KURL m_notificationURL;
String m_direction;
- String m_replaceId;
+ String m_tag;
enum NotificationState {
Idle = 0,
Modified: trunk/Source/WebCore/notifications/Notification.idl (112820 => 112821)
--- trunk/Source/WebCore/notifications/Notification.idl 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebCore/notifications/Notification.idl 2012-04-01 23:15:44 UTC (rev 112821)
@@ -38,7 +38,12 @@
OmitConstructor
] Notification {
void show();
+#if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
void cancel();
+#endif
+#if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
+ void close();
+#endif
attribute EventListener onshow;
#if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
@@ -49,7 +54,12 @@
attribute EventListener onclick;
attribute DOMString dir;
+#if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
attribute DOMString replaceId;
+#endif
+#if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
+ attribute DOMString tag;
+#endif
// EventTarget interface
void addEventListener(in DOMString type,
Modified: trunk/Source/WebKit/chromium/ChangeLog (112820 => 112821)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-04-01 23:15:44 UTC (rev 112821)
@@ -1,3 +1,14 @@
+2012-04-01 Jon Lee <jon...@apple.com>
+
+ Rename notification properties and functions
+ https://bugs.webkit.org/show_bug.cgi?id=80482
+ <rdar://problem/10912432>
+
+ Reviewed by Kentaro Hara.
+
+ * src/WebNotification.cpp:
+ (WebKit::WebNotification::replaceId): Refactor to call tag().
+
2012-03-29 Adam Barth <aba...@webkit.org>
[Chromium] Delete WebKit/chromium/bridge
Modified: trunk/Source/WebKit/chromium/src/WebNotification.cpp (112820 => 112821)
--- trunk/Source/WebKit/chromium/src/WebNotification.cpp 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit/chromium/src/WebNotification.cpp 2012-04-01 23:15:44 UTC (rev 112821)
@@ -106,7 +106,7 @@
WebString WebNotification::replaceId() const
{
- return m_private->replaceId();
+ return m_private->tag();
}
void WebNotification::detachPresenter()
Modified: trunk/Source/WebKit/mac/ChangeLog (112820 => 112821)
--- trunk/Source/WebKit/mac/ChangeLog 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit/mac/ChangeLog 2012-04-01 23:15:44 UTC (rev 112821)
@@ -1,3 +1,15 @@
+2012-04-01 Jon Lee <jon...@apple.com>
+
+ Rename notification properties and functions
+ https://bugs.webkit.org/show_bug.cgi?id=80482
+ <rdar://problem/10912432>
+
+ Reviewed by Kentaro Hara.
+
+ * WebView/WebNotification.h: Rename replaceID to tag.
+ * WebView/WebNotification.mm:
+ (-[WebNotification tag]):
+
2012-03-31 Timothy Hatcher <timo...@apple.com>
Prevent opening external URLs in the Web Inspector's WebView.
Modified: trunk/Source/WebKit/mac/WebView/WebNotification.h (112820 => 112821)
--- trunk/Source/WebKit/mac/WebView/WebNotification.h 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit/mac/WebView/WebNotification.h 2012-04-01 23:15:44 UTC (rev 112821)
@@ -36,7 +36,7 @@
- (NSString *)title;
- (NSString *)body;
-- (NSString *)replaceID;
+- (NSString *)tag;
- (WebSecurityOrigin *)origin;
- (uint64_t)notificationID;
Modified: trunk/Source/WebKit/mac/WebView/WebNotification.mm (112820 => 112821)
--- trunk/Source/WebKit/mac/WebView/WebNotification.mm 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit/mac/WebView/WebNotification.mm 2012-04-01 23:15:44 UTC (rev 112821)
@@ -101,11 +101,11 @@
#endif
}
-- (NSString *)replaceID
+- (NSString *)tag
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
- return core(self)->replaceId();
+ return core(self)->tag();
#else
return nil;
#endif
Modified: trunk/Source/WebKit/qt/ChangeLog (112820 => 112821)
--- trunk/Source/WebKit/qt/ChangeLog 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit/qt/ChangeLog 2012-04-01 23:15:44 UTC (rev 112821)
@@ -1,3 +1,15 @@
+2012-04-01 Jon Lee <jon...@apple.com>
+
+ Rename notification properties and functions
+ https://bugs.webkit.org/show_bug.cgi?id=80482
+ <rdar://problem/10912432>
+
+ Reviewed by Kentaro Hara.
+
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationPresenterClientQt::show): Refactor to call tag().
+ (WebCore::NotificationPresenterClientQt::removeReplacedNotificationFromQueue): Refactor to call tag().
+
2012-03-30 Emil A Eklund <e...@chromium.org>
Change WebKit/WebKit2 platform code to use pixel snapped values
Modified: trunk/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp (112820 => 112821)
--- trunk/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp 2012-04-01 23:15:44 UTC (rev 112821)
@@ -175,7 +175,7 @@
if (notification->scriptExecutionContext()->isWorkerContext())
return false;
notification->setPendingActivity(notification);
- if (!notification->replaceId().isEmpty())
+ if (!notification->tag().isEmpty())
removeReplacedNotificationFromQueue(notification);
if (dumpNotification)
dumpShowText(notification);
@@ -398,7 +398,7 @@
while (iter != end) {
Notification* existingNotification = iter.key();
- if (existingNotification->replaceId() == notification->replaceId() && existingNotification->url().protocol() == notification->url().protocol() && existingNotification->url().host() == notification->url().host()) {
+ if (existingNotification->tag() == notification->tag() && existingNotification->url().protocol() == notification->url().protocol() && existingNotification->url().host() == notification->url().host()) {
oldNotification = iter.key();
break;
}
Modified: trunk/Source/WebKit2/ChangeLog (112820 => 112821)
--- trunk/Source/WebKit2/ChangeLog 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit2/ChangeLog 2012-04-01 23:15:44 UTC (rev 112821)
@@ -1,3 +1,33 @@
+2012-04-01 Jon Lee <jon...@apple.com>
+
+ Rename notification properties and functions
+ https://bugs.webkit.org/show_bug.cgi?id=80482
+ <rdar://problem/10912432>
+
+ Reviewed by Kentaro Hara.
+
+ Rename APIs to use tag.
+ * UIProcess/API/C/WKNotification.cpp:
+ (WKNotificationCopyTag):
+ * UIProcess/API/C/WKNotification.h:
+ * UIProcess/Notifications/WebNotification.cpp:
+ (WebKit::WebNotification::WebNotification):
+ * UIProcess/Notifications/WebNotification.h:
+ (WebKit::WebNotification::create):
+ (WebKit::WebNotification::tag):
+ (WebNotification):
+ * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
+ (WebKit::WebNotificationManagerProxy::show):
+ * UIProcess/Notifications/WebNotificationManagerProxy.h:
+ (WebNotificationManagerProxy):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::showNotification):
+ * UIProcess/WebPageProxy.h:
+ (WebPageProxy):
+ * UIProcess/WebPageProxy.messages.in:
+ * WebProcess/Notifications/WebNotificationManager.cpp:
+ (WebKit::WebNotificationManager::show):
+
2012-03-31 Timothy Hatcher <timo...@apple.com>
Prevent opening external URLs in the Web Inspector's WebView.
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKNotification.cpp (112820 => 112821)
--- trunk/Source/WebKit2/UIProcess/API/C/WKNotification.cpp 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKNotification.cpp 2012-04-01 23:15:44 UTC (rev 112821)
@@ -52,9 +52,9 @@
return toCopiedAPI(toImpl(notification)->iconURL());
}
-WKStringRef WKNotificationCopyReplaceID(WKNotificationRef notification)
+WKStringRef WKNotificationCopyTag(WKNotificationRef notification)
{
- return toCopiedAPI(toImpl(notification)->replaceID());
+ return toCopiedAPI(toImpl(notification)->tag());
}
WKSecurityOriginRef WKNotificationGetSecurityOrigin(WKNotificationRef notification)
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKNotification.h (112820 => 112821)
--- trunk/Source/WebKit2/UIProcess/API/C/WKNotification.h 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKNotification.h 2012-04-01 23:15:44 UTC (rev 112821)
@@ -37,7 +37,7 @@
WK_EXPORT WKStringRef WKNotificationCopyTitle(WKNotificationRef notification);
WK_EXPORT WKStringRef WKNotificationCopyBody(WKNotificationRef notification);
WK_EXPORT WKStringRef WKNotificationCopyIconURL(WKNotificationRef notification);
-WK_EXPORT WKStringRef WKNotificationCopyReplaceID(WKNotificationRef notification);
+WK_EXPORT WKStringRef WKNotificationCopyTag(WKNotificationRef notification);
WK_EXPORT WKSecurityOriginRef WKNotificationGetSecurityOrigin(WKNotificationRef notification);
WK_EXPORT uint64_t WKNotificationGetID(WKNotificationRef notification);
Modified: trunk/Source/WebKit2/UIProcess/Notifications/WebNotification.cpp (112820 => 112821)
--- trunk/Source/WebKit2/UIProcess/Notifications/WebNotification.cpp 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit2/UIProcess/Notifications/WebNotification.cpp 2012-04-01 23:15:44 UTC (rev 112821)
@@ -33,11 +33,11 @@
namespace WebKit {
-WebNotification::WebNotification(const String& title, const String& body, const String& iconURL, const String& replaceID, const String& originString, uint64_t notificationID)
+WebNotification::WebNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID)
: m_title(title)
, m_body(body)
, m_iconURL(iconURL)
- , m_replaceID(replaceID)
+ , m_tag(tag)
, m_origin(WebSecurityOrigin::createFromString(originString))
, m_notificationID(notificationID)
{
Modified: trunk/Source/WebKit2/UIProcess/Notifications/WebNotification.h (112820 => 112821)
--- trunk/Source/WebKit2/UIProcess/Notifications/WebNotification.h 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit2/UIProcess/Notifications/WebNotification.h 2012-04-01 23:15:44 UTC (rev 112821)
@@ -45,28 +45,28 @@
public:
static const Type APIType = TypeNotification;
- static PassRefPtr<WebNotification> create(const String& title, const String& body, const String& iconURL, const String& replaceID, const String& originString, uint64_t notificationID)
+ static PassRefPtr<WebNotification> create(const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID)
{
- return adoptRef(new WebNotification(title, body, iconURL, replaceID, originString, notificationID));
+ return adoptRef(new WebNotification(title, body, iconURL, tag, originString, notificationID));
}
const String& title() const { return m_title; }
const String& body() const { return m_body; }
const String& iconURL() const { return m_iconURL; }
- const String& replaceID() const { return m_replaceID; }
+ const String& tag() const { return m_tag; }
WebSecurityOrigin* origin() const { return m_origin.get(); }
uint64_t notificationID() const { return m_notificationID; }
private:
- WebNotification(const String& title, const String& body, const String& iconURL, const String& replaceID, const String& originString, uint64_t notificationID);
+ WebNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID);
virtual Type type() const { return APIType; }
String m_title;
String m_body;
String m_iconURL;
- String m_replaceID;
+ String m_tag;
RefPtr<WebSecurityOrigin> m_origin;
uint64_t m_notificationID;
};
Modified: trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp (112820 => 112821)
--- trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp 2012-04-01 23:15:44 UTC (rev 112821)
@@ -76,12 +76,12 @@
didReceiveWebNotificationManagerProxyMessage(connection, messageID, arguments);
}
-void WebNotificationManagerProxy::show(WebPageProxy* page, const String& title, const String& body, const String& iconURL, const String& replaceID, const String& originString, uint64_t notificationID)
+void WebNotificationManagerProxy::show(WebPageProxy* page, const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID)
{
if (!isNotificationIDValid(notificationID))
return;
- RefPtr<WebNotification> notification = WebNotification::create(title, body, iconURL, replaceID, originString, notificationID);
+ RefPtr<WebNotification> notification = WebNotification::create(title, body, iconURL, tag, originString, notificationID);
m_notifications.set(notificationID, notification);
m_provider.show(page, notification.get());
}
Modified: trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h (112820 => 112821)
--- trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h 2012-04-01 23:15:44 UTC (rev 112821)
@@ -60,7 +60,7 @@
void initializeProvider(const WKNotificationProvider*);
void populateCopyOfNotificationPermissions(HashMap<String, bool>&);
- void show(WebPageProxy*, const String& title, const String& body, const String& iconURL, const String& replaceID, const String& originString, uint64_t notificationID);
+ void show(WebPageProxy*, const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID);
void providerDidShowNotification(uint64_t notificationID);
void providerDidClickNotification(uint64_t notificationID);
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (112820 => 112821)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2012-04-01 23:15:44 UTC (rev 112821)
@@ -3474,9 +3474,9 @@
request->deny();
}
-void WebPageProxy::showNotification(const String& title, const String& body, const String& iconURL, const String& replaceID, const String& originString, uint64_t notificationID)
+void WebPageProxy::showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID)
{
- m_process->context()->notificationManagerProxy()->show(this, title, body, iconURL, replaceID, originString, notificationID);
+ m_process->context()->notificationManagerProxy()->show(this, title, body, iconURL, tag, originString, notificationID);
}
float WebPageProxy::headerHeight(WebFrameProxy* frame)
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (112820 => 112821)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2012-04-01 23:15:44 UTC (rev 112821)
@@ -740,7 +740,7 @@
void reattachToWebProcessWithItem(WebBackForwardListItem*);
void requestNotificationPermission(uint64_t notificationID, const String& originString);
- void showNotification(const String& title, const String& body, const String& iconURL, const String& replaceID, const String& originString, uint64_t notificationID);
+ void showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID);
#if USE(TILED_BACKING_STORE)
void pageDidRequestScroll(const WebCore::IntPoint&);
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (112820 => 112821)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2012-04-01 23:12:24 UTC (rev 112820)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2012-04-01 23:15:44 UTC (rev 112821)
@@ -211,7 +211,7 @@
# Notification messages
RequestNotificationPermission(uint64_t requestID, WTF::String originIdentifier)
- ShowNotification(WTF::String title, WTF::String body, WTF::String iconURL, WTF::String replaceID, WTF::String originIdentifier, uint64_t notificationID)
+ ShowNotification(WTF::String title, WTF::String body, WTF::String iconURL, WTF::String tag, WTF::String originIdentifier, uint64_t notificationID)
# Spelling and grammar messages
#if USE(UNIFIED_TEXT_CHECKING)