Changeset 245355 in webkit
- Timestamp:
- May 15, 2019, 2:45:02 PM (7 years ago)
- Location:
- branches/safari-607-branch/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
WebProcess/WebPage/WebPage.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607-branch/Source/WebKit/ChangeLog
r245346 r245355 1 2019-05-14 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r245196. rdar://problem/50753938 4 5 Streamline test-and-clear operation for ContextMenu 6 https://bugs.webkit.org/show_bug.cgi?id=197795 7 <rdar://problem/50473746> 8 9 Reviewed by Wenson Hsieh. 10 11 Rather than performing a check when entering the function, doing work, 12 then clearing the member variable, perform the check and clear in 13 a single operation. Only perform the selection if the menu exists. 14 15 * WebProcess/WebPage/WebPage.cpp: 16 (WebKit::WebPage::didSelectItemFromActiveContextMenu): 17 18 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245196 268f45cc-cd09-0410-ab3c-d52691b4dbfc 19 20 2019-05-10 Brent Fulgham <bfulgham@apple.com> 21 22 Streamline test-and-clear operation for ContextMenu 23 https://bugs.webkit.org/show_bug.cgi?id=197795 24 <rdar://problem/50473746> 25 26 Reviewed by Wenson Hsieh. 27 28 Rather than performing a check when entering the function, doing work, 29 then clearing the member variable, perform the check and clear in 30 a single operation. Only perform the selection if the menu exists. 31 32 * WebProcess/WebPage/WebPage.cpp: 33 (WebKit::WebPage::didSelectItemFromActiveContextMenu): 34 1 35 2019-05-14 Kocsen Chung <kocsen_chung@apple.com> 2 36 -
branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r243097 r245355 4125 4125 void WebPage::didSelectItemFromActiveContextMenu(const WebContextMenuItemData& item) 4126 4126 { 4127 if (!m_contextMenu) 4128 return; 4129 4130 m_contextMenu->itemSelected(item); 4131 m_contextMenu = nullptr; 4127 if (auto contextMenu = std::exchange(m_contextMenu, nullptr)) 4128 contextMenu->itemSelected(item); 4132 4129 } 4133 4130 #endif
Note:
See TracChangeset
for help on using the changeset viewer.