Title: [287704] trunk/Source/WebCore
- Revision
- 287704
- Author
- [email protected]
- Date
- 2022-01-06 11:44:38 -0800 (Thu, 06 Jan 2022)
Log Message
Replace WTFMove + clear with std::exchange for AXObjectCache notification queues.
https://bugs.webkit.org/show_bug.cgi?id=234919
<rdar://problem/87194936>
Reviewed by Chris Fleizach.
Code clean up, per Darin Adler's comment in
https://bugs.webkit.org/show_bug.cgi?id=234355.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):
(WebCore::AXObjectCache::passwordNotificationPostTimerFired):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (287703 => 287704)
--- trunk/Source/WebCore/ChangeLog 2022-01-06 19:41:35 UTC (rev 287703)
+++ trunk/Source/WebCore/ChangeLog 2022-01-06 19:44:38 UTC (rev 287704)
@@ -1,3 +1,18 @@
+2022-01-06 Andres Gonzalez <[email protected]>
+
+ Replace WTFMove + clear with std::exchange for AXObjectCache notification queues.
+ https://bugs.webkit.org/show_bug.cgi?id=234919
+ <rdar://problem/87194936>
+
+ Reviewed by Chris Fleizach.
+
+ Code clean up, per Darin Adler's comment in
+ https://bugs.webkit.org/show_bug.cgi?id=234355.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::notificationPostTimerFired):
+ (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
+
2022-01-06 Tim Horton <[email protected]>
Always assume Safari is "linked-on-or-after" any SDK version
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (287703 => 287704)
--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2022-01-06 19:41:35 UTC (rev 287703)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2022-01-06 19:44:38 UTC (rev 287704)
@@ -111,6 +111,7 @@
#include "TextBoundaries.h"
#include "TextControlInnerElements.h"
#include "TextIterator.h"
+#include <utility>
#include <wtf/DataLog.h>
#include <wtf/SetForScope.h>
@@ -1081,8 +1082,7 @@
// In tests, posting notifications has a tendency to immediately queue up other notifications, which can lead to unexpected behavior
// when the notification list is cleared at the end. Instead copy this list at the start.
- auto notifications = WTFMove(m_notificationsToPost);
- m_notificationsToPost.clear();
+ auto notifications = std::exchange(m_notificationsToPost, { });
// Filter out the notifications that are not going to be posted to platform clients.
Vector<std::pair<RefPtr<AXCoreObject>, AXNotification>> notificationsToPost;
@@ -1133,8 +1133,7 @@
// In tests, posting notifications has a tendency to immediately queue up other notifications, which can lead to unexpected behavior
// when the notification list is cleared at the end. Instead copy this list at the start.
- auto notifications = WTFMove(m_passwordNotificationsToPost);
- m_passwordNotificationsToPost.clear();
+ auto notifications = std::exchange(m_passwordNotificationsToPost, { });
for (auto& notification : notifications)
postTextStateChangePlatformNotification(notification.get(), AXTextEditTypeInsert, " ", VisiblePosition());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes