[webkit-changes] [WebKit/WebKit] 5a8883: HTMLSelectElement::listItems should use WeakPtr
Aditya Keerthi
noreply at github.com
Thu Sep 15 11:13:30 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5a8883c75f0a425515a601a4eb8de66e88ada97d
https://github.com/WebKit/WebKit/commit/5a8883c75f0a425515a601a4eb8de66e88ada97d
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2022-09-15 (Thu, 15 Sep 2022)
Changed paths:
M Source/WebCore/accessibility/AccessibilityListBox.cpp
M Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
M Source/WebCore/html/HTMLSelectElement.cpp
M Source/WebCore/html/HTMLSelectElement.h
M Source/WebCore/rendering/RenderListBox.cpp
M Source/WebCore/rendering/RenderMenuList.cpp
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
M Source/WebKitLegacy/mac/DOM/DOMUIKitExtensions.mm
Log Message:
-----------
HTMLSelectElement::listItems should use WeakPtr
https://bugs.webkit.org/show_bug.cgi?id=245149
rdar://99878672
Reviewed by Ryosuke Niwa.
Use WeakPtr in HTMLSelectElement::listItems. Additionally, modernize code by using
`dynamicDowncast`, `Vector::findIf`, and range-based loops where appropriate.
* Source/WebCore/accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::addChildren):
* Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::addChildren):
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::stringValue const):
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::stringValue const):
* Source/WebCore/html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::value const):
(WebCore::HTMLSelectElement::setValue):
(WebCore::HTMLSelectElement::listItems const):
(WebCore::HTMLSelectElement::selectOption):
(WebCore:: const): Deleted.
* Source/WebCore/html/HTMLSelectElement.h:
* Source/WebCore/rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::optionRowIndex const):
(WebCore::RenderListBox::localBoundsOfOptGroup const):
(WebCore::RenderListBox::addFocusRingRects):
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
(WebCore::RenderListBox::nodeAtPoint):
* Source/WebCore/rendering/RenderMenuList.cpp:
(WebCore::selectedOptionCount):
(RenderMenuList::updateOptionsWidth):
(RenderMenuList::setTextFromOption):
(RenderMenuList::itemAccessibilityText const):
(RenderMenuList::itemToolTip const):
(RenderMenuList::itemIsEnabled const):
(RenderMenuList::itemStyle const):
(RenderMenuList::getItemBackgroundColor const):
(RenderMenuList::itemIsSeparator const):
(RenderMenuList::itemIsLabel const):
(RenderMenuList::itemIsSelected const):
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::focusedElementInformation):
* Source/WebKitLegacy/mac/DOM/DOMUIKitExtensions.mm:
(-[DOMHTMLSelectElement listItemAtIndex:]):
Canonical link: https://commits.webkit.org/254522@main
More information about the webkit-changes
mailing list