Changeset 245196 in webkit
- Timestamp:
- May 10, 2019, 2:28:06 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
WebProcess/WebPage/WebPage.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r245195 r245196 1 2019-05-10 Brent Fulgham <bfulgham@apple.com> 2 3 Streamline test-and-clear operation for ContextMenu 4 https://bugs.webkit.org/show_bug.cgi?id=197795 5 <rdar://problem/50473746> 6 7 Reviewed by Wenson Hsieh. 8 9 Rather than performing a check when entering the function, doing work, 10 then clearing the member variable, perform the check and clear in 11 a single operation. Only perform the selection if the menu exists. 12 13 * WebProcess/WebPage/WebPage.cpp: 14 (WebKit::WebPage::didSelectItemFromActiveContextMenu): 15 1 16 2019-05-10 Megan Gardner <megan_gardner@apple.com> 2 17 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r245187 r245196 4237 4237 void WebPage::didSelectItemFromActiveContextMenu(const WebContextMenuItemData& item) 4238 4238 { 4239 if (!m_contextMenu) 4240 return; 4241 4242 m_contextMenu->itemSelected(item); 4243 m_contextMenu = nullptr; 4239 if (auto contextMenu = std::exchange(m_contextMenu, nullptr)) 4240 contextMenu->itemSelected(item); 4244 4241 } 4245 4242 #endif
Note:
See TracChangeset
for help on using the changeset viewer.