Make WebCore::FocusDirection to enum class
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Oct 2020 09:03:25 +0000 (09:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Oct 2020 09:03:25 +0000 (09:03 +0000)
commit3ff3d6a2bbdffddd95a18a1049d0c21cd247c9ad
tree5ac656d182a4930241603109c66b4c2a5c2ba8ef
parent639c41ec1fe0764e37fcba899e64a3d6ff6ba1ba
Make WebCore::FocusDirection to enum class
https://bugs.webkit.org/show_bug.cgi?id=218162

Patch by Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> on 2020-10-27
Reviewed by Darin Adler.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::adjustFocusedNodeOnNodeRemoval):
(WebCore::Document::focusNavigationStartingNode const):
* dom/Document.h:
* dom/Element.h:
* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::handleFocusEvent):
* page/EventHandler.cpp:
(WebCore::focusDirectionForKey):
(WebCore::handleKeyboardSelectionMovement):
(WebCore::EventHandler::accessibilityPreventsEventPropagation):
(WebCore::EventHandler::defaultKeyboardEventHandler):
(WebCore::EventHandler::defaultTabEventHandler):
* page/FocusController.cpp:
(WebCore::dispatchEventsOnWindowAndFocusedElement):
(WebCore::FocusController::advanceFocus):
(WebCore::FocusController::findFocusableElementAcrossFocusScope):
(WebCore::FocusController::findFocusableElementWithinScope):
(WebCore::FocusController::findFocusableElementOrScopeOwner):
(WebCore::FocusController::findElementWithExactTabIndex):
(WebCore::FocusController::nextFocusableElementOrScopeOwner):
(WebCore::FocusController::previousFocusableElementOrScopeOwner):
* page/FocusController.h:
* page/FocusDirection.h:
* page/SpatialNavigation.cpp:
(WebCore::isHorizontalMove):
(WebCore::areRectsFullyAligned):
(WebCore::areRectsMoreThanFullScreenApart):
(WebCore::isRectInDirection):
(WebCore::hasOffscreenRect):
(WebCore::scrollInDirection):
(WebCore::canScrollInDirection):
(WebCore::entryAndExitPointsForDirection):
(WebCore::isValidCandidate):
(WebCore::distanceDataForNode):
(WebCore::canBeScrolledIntoView):
(WebCore::virtualRectForDirection):
* page/SpatialNavigation.h:

Source/WebKit:

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::takeFocus):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::takeFocus):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::takeFocus):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::handleKeyEventByRelinquishingFocusToChrome):
(WebKit::WebPage::setInitialFocus):

Source/WebKitLegacy/mac:

* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::takeFocus):
* WebView/WebHTMLView.mm:
(-[WebHTMLView becomeFirstResponder]):

Source/WebKitLegacy/win:

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::canTakeFocus):
(WebChromeClient::takeFocus):
* WebView.cpp:
(WebView::setInitialFocus):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Element.h
Source/WebCore/html/BaseDateAndTimeInputType.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/FocusController.cpp
Source/WebCore/page/FocusController.h
Source/WebCore/page/FocusDirection.h
Source/WebCore/page/SpatialNavigation.cpp
Source/WebCore/page/SpatialNavigation.h
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebPageProxy.messages.in
Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebCoreSupport/WebChromeClient.cpp
Source/WebKitLegacy/win/WebView.cpp