[webkit-changes] [WebKit/WebKit] c2dea7: [IsDeprecatedWeakRefSmartPointerException] Make We...

Rupin Mittal noreply at github.com
Wed Oct 16 22:12:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c2dea7aaf6eb365fe0ff325254c1a44aba2e6572
      https://github.com/WebKit/WebKit/commit/c2dea7aaf6eb365fe0ff325254c1a44aba2e6572
  Author: Rupin Mittal <rupin at apple.com>
  Date:   2024-10-16 (Wed, 16 Oct 2024)

  Changed paths:
    M Source/WebCore/html/TextFieldInputType.cpp
    M Source/WebCore/html/TextFieldInputType.h
    M Source/WebCore/loader/EmptyClients.cpp
    M Source/WebCore/loader/EmptyClients.h
    M Source/WebCore/page/Chrome.cpp
    M Source/WebCore/page/Chrome.h
    M Source/WebCore/page/ChromeClient.h
    M Source/WebCore/platform/DataListSuggestionPicker.h
    M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
    M Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h
    M Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm

  Log Message:
  -----------
  [IsDeprecatedWeakRefSmartPointerException] Make WebDataListSuggestionPicker ref-counted
https://bugs.webkit.org/show_bug.cgi?id=281341
rdar://137771975

Reviewed by Chris Dumez.

Remove IsDeprecatedWeakRefSmartPointerException] by making WebDataListSuggestionPicker
ref-counted. Since WebDataListSuggestionPicker could now outlive WebPage or
DataListSuggestionsClient, we make those members WeakPtr and CheckedPtr and null-check
them before use. Accordingly, we ensure the DataListSuggestionsClient is set to nullptr
before the DataListSuggestionsClient is destroyed.

* Source/WebCore/html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::~TextFieldInputType):
(WebCore::TextFieldInputType::handleKeydownEvent):
(WebCore::TextFieldInputType::didCloseSuggestions):
(WebCore::TextFieldInputType::displaySuggestions):
(WebCore::TextFieldInputType::closeSuggestions):
* Source/WebCore/html/TextFieldInputType.h:
* Source/WebCore/loader/EmptyClients.cpp:
(WebCore::EmptyChromeClient::createDataListSuggestionPicker):
* Source/WebCore/loader/EmptyClients.h:
* Source/WebCore/page/Chrome.cpp:
(WebCore::Chrome::createDataListSuggestionPicker):
* Source/WebCore/page/Chrome.h:
* Source/WebCore/page/ChromeClient.h:
* Source/WebCore/platform/DataListSuggestionPicker.h:
(WebCore::DataListSuggestionPicker::detach):
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createDataListSuggestionPicker):
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.cpp:
(WebKit::WebDataListSuggestionPicker::handleKeydownWithIdentifier):
(WebKit::WebDataListSuggestionPicker::didSelectOption):
(WebKit::WebDataListSuggestionPicker::didCloseSuggestions):
(WebKit::WebDataListSuggestionPicker::close):
(WebKit::WebDataListSuggestionPicker::displayWithActivationType):
(WebKit::WebDataListSuggestionPicker::detach):
* Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didSelectDataListOption):
(WebKit::WebPage::didCloseSuggestions):
* Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h:
* Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::createDataListSuggestionPicker):

Canonical link: https://commits.webkit.org/285306@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list