Changeset 242587 in webkit
- Timestamp:
- Mar 6, 2019, 7:11:38 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/forms/datalist/change-input-type-after-closing-datalist-suggestions-expected.txt (added)
-
LayoutTests/fast/forms/datalist/change-input-type-after-closing-datalist-suggestions.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/DataListSuggestionPicker.h (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/WebProcess/WebPage/WebPage.cpp (modified) (1 diff)
-
Source/WebKit/WebProcess/WebPage/WebPage.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r242575 r242587 1 2019-03-06 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Crash when attempting to change input type while dismissing datalist suggestions 4 https://bugs.webkit.org/show_bug.cgi?id=195384 5 <rdar://problem/48563718> 6 7 Reviewed by Brent Fulgham. 8 9 Add a new layout test to exercise this scenario. 10 11 * fast/forms/datalist/change-input-type-after-closing-datalist-suggestions-expected.txt: Added. 12 * fast/forms/datalist/change-input-type-after-closing-datalist-suggestions.html: Added. 13 1 14 2019-03-06 Justin Fan <justin_fan@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r242586 r242587 1 2019-03-06 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Crash when attempting to change input type while dismissing datalist suggestions 4 https://bugs.webkit.org/show_bug.cgi?id=195384 5 <rdar://problem/48563718> 6 7 Reviewed by Brent Fulgham. 8 9 When closing a datalist suggestion menu, WebPageProxy sends a message to WebPage instructing it to tell its 10 active datalist suggestions picker to close. However, for a myriad of reasons, the suggestions picker (kept 11 alive by its text input type) may have already gone away by this point. To mitigate this, make WebPage weakly 12 reference its active datalist suggestions picker. 13 14 Test: fast/forms/datalist/change-input-type-after-closing-datalist-suggestions.html 15 16 * platform/DataListSuggestionPicker.h: 17 18 Make DataListSuggestionPicker capable of being weakly referenced. Additionally, fix some minor preexisting 19 issues in this header (#imports instead of #includes, as well as an unnecessary include of IntRect.h). 20 1 21 2019-03-06 Ryan Haddad <ryanhaddad@apple.com> 2 22 -
trunk/Source/WebCore/platform/DataListSuggestionPicker.h
r241183 r242587 28 28 #if ENABLE(DATALIST_ELEMENT) 29 29 30 #import "DataListSuggestionInformation.h" 31 #import "IntRect.h" 32 33 #import <wtf/text/WTFString.h> 30 #include "DataListSuggestionInformation.h" 31 #include <wtf/WeakPtr.h> 32 #include <wtf/text/WTFString.h> 34 33 35 34 namespace WebCore { 36 35 37 class DataListSuggestionPicker {36 class DataListSuggestionPicker : public CanMakeWeakPtr<DataListSuggestionPicker> { 38 37 WTF_MAKE_FAST_ALLOCATED; 39 38 public: -
trunk/Source/WebKit/ChangeLog
r242580 r242587 1 2019-03-06 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Crash when attempting to change input type while dismissing datalist suggestions 4 https://bugs.webkit.org/show_bug.cgi?id=195384 5 <rdar://problem/48563718> 6 7 Reviewed by Brent Fulgham. 8 9 See WebCore ChangeLog for more details. 10 11 * WebProcess/WebPage/WebPage.cpp: 12 (WebKit::WebPage::setActiveDataListSuggestionPicker): 13 (WebKit::WebPage::didSelectDataListOption): 14 (WebKit::WebPage::didCloseSuggestions): 15 * WebProcess/WebPage/WebPage.h: 16 17 Turn m_activeDataListSuggestionPicker from a raw pointer into a WeakPtr. 18 1 19 2019-03-06 Chris Dumez <cdumez@apple.com> 2 20 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r242580 r242587 3900 3900 void WebPage::setActiveDataListSuggestionPicker(WebDataListSuggestionPicker* dataListSuggestionPicker) 3901 3901 { 3902 m_activeDataListSuggestionPicker = dataListSuggestionPicker;3902 m_activeDataListSuggestionPicker = makeWeakPtr(dataListSuggestionPicker); 3903 3903 } 3904 3904 3905 3905 void WebPage::didSelectDataListOption(const String& selectedOption) 3906 3906 { 3907 m_activeDataListSuggestionPicker->didSelectOption(selectedOption); 3907 if (m_activeDataListSuggestionPicker) 3908 m_activeDataListSuggestionPicker->didSelectOption(selectedOption); 3908 3909 } 3909 3910 3910 3911 void WebPage::didCloseSuggestions() 3911 3912 { 3912 if (m_activeDataListSuggestionPicker) 3913 m_activeDataListSuggestionPicker->didCloseSuggestions(); 3914 m_activeDataListSuggestionPicker = nullptr; 3913 if (auto picker = std::exchange(m_activeDataListSuggestionPicker, nullptr)) 3914 picker->didCloseSuggestions(); 3915 3915 } 3916 3916 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r242551 r242587 1658 1658 1659 1659 #if ENABLE(DATALIST_ELEMENT) 1660 We bDataListSuggestionPicker* m_activeDataListSuggestionPicker { nullptr };1660 WeakPtr<WebDataListSuggestionPicker> m_activeDataListSuggestionPicker; 1661 1661 #endif 1662 1662
Note:
See TracChangeset
for help on using the changeset viewer.