Changeset 242858 in webkit
- Timestamp:
- Mar 13, 2019, 1:24:42 AM (7 years ago)
- Location:
- branches/safari-607-branch
- 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
-
branches/safari-607-branch/LayoutTests/ChangeLog
r242856 r242858 1 2019-03-13 Babak Shafiei <bshafiei@apple.com> 2 3 Cherry-pick r242587. rdar://problem/48839354 4 5 Crash when attempting to change input type while dismissing datalist suggestions 6 https://bugs.webkit.org/show_bug.cgi?id=195384 7 <rdar://problem/48563718> 8 9 Reviewed by Brent Fulgham. 10 11 Source/WebCore: 12 13 When closing a datalist suggestion menu, WebPageProxy sends a message to WebPage instructing it to tell its 14 active datalist suggestions picker to close. However, for a myriad of reasons, the suggestions picker (kept 15 alive by its text input type) may have already gone away by this point. To mitigate this, make WebPage weakly 16 reference its active datalist suggestions picker. 17 18 Test: fast/forms/datalist/change-input-type-after-closing-datalist-suggestions.html 19 20 * platform/DataListSuggestionPicker.h: 21 22 Make DataListSuggestionPicker capable of being weakly referenced. Additionally, fix some minor preexisting 23 issues in this header (#imports instead of #includes, as well as an unnecessary include of IntRect.h). 24 25 Source/WebKit: 26 27 See WebCore ChangeLog for more details. 28 29 * WebProcess/WebPage/WebPage.cpp: 30 (WebKit::WebPage::setActiveDataListSuggestionPicker): 31 (WebKit::WebPage::didSelectDataListOption): 32 (WebKit::WebPage::didCloseSuggestions): 33 * WebProcess/WebPage/WebPage.h: 34 35 Turn m_activeDataListSuggestionPicker from a raw pointer into a WeakPtr. 36 37 LayoutTests: 38 39 Add a new layout test to exercise this scenario. 40 41 * fast/forms/datalist/change-input-type-after-closing-datalist-suggestions-expected.txt: Added. 42 * fast/forms/datalist/change-input-type-after-closing-datalist-suggestions.html: Added. 43 44 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242587 268f45cc-cd09-0410-ab3c-d52691b4dbfc 45 46 2019-03-06 Wenson Hsieh <wenson_hsieh@apple.com> 47 48 Crash when attempting to change input type while dismissing datalist suggestions 49 https://bugs.webkit.org/show_bug.cgi?id=195384 50 <rdar://problem/48563718> 51 52 Reviewed by Brent Fulgham. 53 54 Add a new layout test to exercise this scenario. 55 56 * fast/forms/datalist/change-input-type-after-closing-datalist-suggestions-expected.txt: Added. 57 * fast/forms/datalist/change-input-type-after-closing-datalist-suggestions.html: Added. 58 1 59 2019-03-13 Babak Shafiei <bshafiei@apple.com> 2 60 -
branches/safari-607-branch/Source/WebCore/ChangeLog
r242856 r242858 1 2019-03-13 Babak Shafiei <bshafiei@apple.com> 2 3 Cherry-pick r242587. rdar://problem/48839354 4 5 Crash when attempting to change input type while dismissing datalist suggestions 6 https://bugs.webkit.org/show_bug.cgi?id=195384 7 <rdar://problem/48563718> 8 9 Reviewed by Brent Fulgham. 10 11 Source/WebCore: 12 13 When closing a datalist suggestion menu, WebPageProxy sends a message to WebPage instructing it to tell its 14 active datalist suggestions picker to close. However, for a myriad of reasons, the suggestions picker (kept 15 alive by its text input type) may have already gone away by this point. To mitigate this, make WebPage weakly 16 reference its active datalist suggestions picker. 17 18 Test: fast/forms/datalist/change-input-type-after-closing-datalist-suggestions.html 19 20 * platform/DataListSuggestionPicker.h: 21 22 Make DataListSuggestionPicker capable of being weakly referenced. Additionally, fix some minor preexisting 23 issues in this header (#imports instead of #includes, as well as an unnecessary include of IntRect.h). 24 25 Source/WebKit: 26 27 See WebCore ChangeLog for more details. 28 29 * WebProcess/WebPage/WebPage.cpp: 30 (WebKit::WebPage::setActiveDataListSuggestionPicker): 31 (WebKit::WebPage::didSelectDataListOption): 32 (WebKit::WebPage::didCloseSuggestions): 33 * WebProcess/WebPage/WebPage.h: 34 35 Turn m_activeDataListSuggestionPicker from a raw pointer into a WeakPtr. 36 37 LayoutTests: 38 39 Add a new layout test to exercise this scenario. 40 41 * fast/forms/datalist/change-input-type-after-closing-datalist-suggestions-expected.txt: Added. 42 * fast/forms/datalist/change-input-type-after-closing-datalist-suggestions.html: Added. 43 44 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242587 268f45cc-cd09-0410-ab3c-d52691b4dbfc 45 46 2019-03-06 Wenson Hsieh <wenson_hsieh@apple.com> 47 48 Crash when attempting to change input type while dismissing datalist suggestions 49 https://bugs.webkit.org/show_bug.cgi?id=195384 50 <rdar://problem/48563718> 51 52 Reviewed by Brent Fulgham. 53 54 When closing a datalist suggestion menu, WebPageProxy sends a message to WebPage instructing it to tell its 55 active datalist suggestions picker to close. However, for a myriad of reasons, the suggestions picker (kept 56 alive by its text input type) may have already gone away by this point. To mitigate this, make WebPage weakly 57 reference its active datalist suggestions picker. 58 59 Test: fast/forms/datalist/change-input-type-after-closing-datalist-suggestions.html 60 61 * platform/DataListSuggestionPicker.h: 62 63 Make DataListSuggestionPicker capable of being weakly referenced. Additionally, fix some minor preexisting 64 issues in this header (#imports instead of #includes, as well as an unnecessary include of IntRect.h). 65 1 66 2019-03-13 Babak Shafiei <bshafiei@apple.com> 2 67 -
branches/safari-607-branch/Source/WebCore/platform/DataListSuggestionPicker.h
r232640 r242858 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 public: 39 38 virtual ~DataListSuggestionPicker() = default; -
branches/safari-607-branch/Source/WebKit/ChangeLog
r242849 r242858 1 2019-03-13 Babak Shafiei <bshafiei@apple.com> 2 3 Cherry-pick r242587. rdar://problem/48839354 4 5 Crash when attempting to change input type while dismissing datalist suggestions 6 https://bugs.webkit.org/show_bug.cgi?id=195384 7 <rdar://problem/48563718> 8 9 Reviewed by Brent Fulgham. 10 11 Source/WebCore: 12 13 When closing a datalist suggestion menu, WebPageProxy sends a message to WebPage instructing it to tell its 14 active datalist suggestions picker to close. However, for a myriad of reasons, the suggestions picker (kept 15 alive by its text input type) may have already gone away by this point. To mitigate this, make WebPage weakly 16 reference its active datalist suggestions picker. 17 18 Test: fast/forms/datalist/change-input-type-after-closing-datalist-suggestions.html 19 20 * platform/DataListSuggestionPicker.h: 21 22 Make DataListSuggestionPicker capable of being weakly referenced. Additionally, fix some minor preexisting 23 issues in this header (#imports instead of #includes, as well as an unnecessary include of IntRect.h). 24 25 Source/WebKit: 26 27 See WebCore ChangeLog for more details. 28 29 * WebProcess/WebPage/WebPage.cpp: 30 (WebKit::WebPage::setActiveDataListSuggestionPicker): 31 (WebKit::WebPage::didSelectDataListOption): 32 (WebKit::WebPage::didCloseSuggestions): 33 * WebProcess/WebPage/WebPage.h: 34 35 Turn m_activeDataListSuggestionPicker from a raw pointer into a WeakPtr. 36 37 LayoutTests: 38 39 Add a new layout test to exercise this scenario. 40 41 * fast/forms/datalist/change-input-type-after-closing-datalist-suggestions-expected.txt: Added. 42 * fast/forms/datalist/change-input-type-after-closing-datalist-suggestions.html: Added. 43 44 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242587 268f45cc-cd09-0410-ab3c-d52691b4dbfc 45 46 2019-03-06 Wenson Hsieh <wenson_hsieh@apple.com> 47 48 Crash when attempting to change input type while dismissing datalist suggestions 49 https://bugs.webkit.org/show_bug.cgi?id=195384 50 <rdar://problem/48563718> 51 52 Reviewed by Brent Fulgham. 53 54 See WebCore ChangeLog for more details. 55 56 * WebProcess/WebPage/WebPage.cpp: 57 (WebKit::WebPage::setActiveDataListSuggestionPicker): 58 (WebKit::WebPage::didSelectDataListOption): 59 (WebKit::WebPage::didCloseSuggestions): 60 * WebProcess/WebPage/WebPage.h: 61 62 Turn m_activeDataListSuggestionPicker from a raw pointer into a WeakPtr. 63 1 64 2019-03-13 Babak Shafiei <bshafiei@apple.com> 2 65 -
branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r242133 r242858 3863 3863 void WebPage::setActiveDataListSuggestionPicker(WebDataListSuggestionPicker* dataListSuggestionPicker) 3864 3864 { 3865 m_activeDataListSuggestionPicker = dataListSuggestionPicker;3865 m_activeDataListSuggestionPicker = makeWeakPtr(dataListSuggestionPicker); 3866 3866 } 3867 3867 3868 3868 void WebPage::didSelectDataListOption(const String& selectedOption) 3869 3869 { 3870 m_activeDataListSuggestionPicker->didSelectOption(selectedOption); 3870 if (m_activeDataListSuggestionPicker) 3871 m_activeDataListSuggestionPicker->didSelectOption(selectedOption); 3871 3872 } 3872 3873 3873 3874 void WebPage::didCloseSuggestions() 3874 3875 { 3875 if (m_activeDataListSuggestionPicker) 3876 m_activeDataListSuggestionPicker->didCloseSuggestions(); 3877 m_activeDataListSuggestionPicker = nullptr; 3876 if (auto picker = std::exchange(m_activeDataListSuggestionPicker, nullptr)) 3877 picker->didCloseSuggestions(); 3878 3878 } 3879 3879 -
branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/WebPage.h
r241888 r242858 1631 1631 1632 1632 #if ENABLE(DATALIST_ELEMENT) 1633 We bDataListSuggestionPicker* m_activeDataListSuggestionPicker { nullptr };1633 WeakPtr<WebDataListSuggestionPicker> m_activeDataListSuggestionPicker; 1634 1634 #endif 1635 1635
Note:
See TracChangeset
for help on using the changeset viewer.