Title: [108563] trunk/Source/WebKit2
- Revision
- 108563
- Author
- [email protected]
- Date
- 2012-02-22 15:43:17 -0800 (Wed, 22 Feb 2012)
Log Message
Code cleanup in WebNotificationManager (79285)
https://bugs.webkit.org/show_bug.cgi?id=79285
<rdar://problem/10914522>
Reviewed by Anders Carlsson.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show): Simplify adding a blank vector to the map using .add(),
similar to what is found in WebNotificationClient.mm in WebKit 1.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (108562 => 108563)
--- trunk/Source/WebKit2/ChangeLog 2012-02-22 23:40:01 UTC (rev 108562)
+++ trunk/Source/WebKit2/ChangeLog 2012-02-22 23:43:17 UTC (rev 108563)
@@ -1,3 +1,15 @@
+2012-02-22 Jon Lee <[email protected]>
+
+ Code cleanup in WebNotificationManager (79285)
+ https://bugs.webkit.org/show_bug.cgi?id=79285
+ <rdar://problem/10914522>
+
+ Reviewed by Anders Carlsson.
+
+ * WebProcess/Notifications/WebNotificationManager.cpp:
+ (WebKit::WebNotificationManager::show): Simplify adding a blank vector to the map using .add(),
+ similar to what is found in WebNotificationClient.mm in WebKit 1.
+
2012-02-21 Ryosuke Niwa <[email protected]>
Remove the remaining uses of CSSStyleDeclaration in Editor
Modified: trunk/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp (108562 => 108563)
--- trunk/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp 2012-02-22 23:40:01 UTC (rev 108562)
+++ trunk/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp 2012-02-22 23:43:17 UTC (rev 108563)
@@ -114,11 +114,7 @@
m_notificationMap.set(notification, notificationID);
m_notificationIDMap.set(notificationID, notification);
- NotificationContextMap::iterator it = m_notificationContextMap.find(notification->scriptExecutionContext());
- if (it == m_notificationContextMap.end()) {
- pair<NotificationContextMap::iterator, bool> addedPair = m_notificationContextMap.add(notification->scriptExecutionContext(), Vector<uint64_t>());
- it = addedPair.first;
- }
+ NotificationContextMap::iterator it = m_notificationContextMap.add(notification->scriptExecutionContext(), Vector<uint64_t>()).first;
it->second.append(notificationID);
m_process->connection()->send(Messages::WebPageProxy::ShowNotification(notification->contents().title, notification->contents().body, notification->iconURL().string(), notification->scriptExecutionContext()->securityOrigin()->toString(), notificationID), page->pageID());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes