WebKit Bugzilla
Attachment 359485 Details for
Bug 193572
: Remove some last vestiges of assisted node terminology in WebKit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193572-20190118073624.patch (text/plain), 7.91 KB, created by
Wenson Hsieh
on 2019-01-18 07:36:25 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2019-01-18 07:36:25 PST
Size:
7.91 KB
patch
obsolete
>Subversion Revision: 240139 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 1f3e4714dcd2e3b396fea6132afe33940c19d9bd..6e71a2039e4c222ec2c50ab799609e174eb2fc4d 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,27 @@ >+2019-01-18 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ Remove some last vestiges of assisted node terminology in WebKit >+ https://bugs.webkit.org/show_bug.cgi?id=193572 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/API/Cocoa/_WKFocusedElementInfo.h: >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView gestureRecognizerShouldBegin:]): >+ (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]): >+ (-[WKContentView _showKeyboard]): >+ (-[WKContentView _hideKeyboard]): >+ >+ Add a FIXME about invoking `-reloadInputViews` on watchOS when the focused element is blurred. >+ >+ (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]): >+ (-[WKContentView _elementDidBlur]): >+ (-[WKContentView updateCurrentFocusedElementInformation:]): >+ (-[WKContentView _startAssistingKeyboard]): Deleted. >+ (-[WKContentView _stopAssistingKeyboard]): Deleted. >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::getFocusedElementInformation): >+ > 2019-01-17 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOS] Content offset jumps erratically when autoscrolling near scroll view content inset areas >diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKFocusedElementInfo.h b/Source/WebKit/UIProcess/API/Cocoa/_WKFocusedElementInfo.h >index b19a3e02f155d98b9e4c2d02ebc401e6416c6938..b43fcaa7f1f2b2a82a2b1dd0bdeaac24294156bb 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/_WKFocusedElementInfo.h >+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKFocusedElementInfo.h >@@ -58,9 +58,9 @@ typedef NS_ENUM(NSInteger, WKInputType) { > }; > > /** >- * The _WKFocusedElementInfo provides basic information about an element >- * that has been focused (either programmatically or through user interaction) >- * but has not yet been assisted. >+ * The _WKFocusedElementInfo provides basic information about an element that >+ * has been focused (either programmatically or through user interaction) but >+ * is not causing any input UI (e.g. keyboard, date picker, etc.) to be shown. > */ > @protocol _WKFocusedElementInfo <NSObject> > >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index 3e5292a78c2acf461a68293b3aac422c90d7b3c5..e86b629c7fed4947afdee44f220cc2f26a4ab763 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -1736,7 +1736,7 @@ - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer > > if (hasFocusedElement(_focusedElementInformation)) { > // Request information about the position with sync message. >- // If the assisted node is the same, prevent the gesture. >+ // If the focused element is the same, prevent the gesture. > if (![self ensurePositionInformationIsUpToDate:WebKit::InteractionInformationRequest(WebCore::roundedIntPoint(point))]) > return NO; > if (_positionInformation.nodeAtPositionIsFocusedElement) >@@ -1746,7 +1746,7 @@ - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer > > if (gestureRecognizer == _highlightLongPressGestureRecognizer) { > if (hasFocusedElement(_focusedElementInformation)) { >- // This is a different node than the assisted one. >+ // This is a different element than the focused one. > // Prevent the gesture if there is no node. > // Allow the gesture if it is a node that wants highlight or if there is an action for it. > if (!_positionInformation.isElement) >@@ -1885,7 +1885,7 @@ - (BOOL)textInteractionGesture:(UIWKGestureType)gesture shouldBeginAtPoint:(CGPo > return NO; > #endif > >- // If we're currently editing an assisted node, only allow the selection to move within that assisted node. >+ // If we're currently focusing an editable element, only allow the selection to move within that focused element. > if (self.isFocusingElement) > return _positionInformation.nodeAtPositionIsFocusedElement; > >@@ -4318,10 +4318,7 @@ - (void)takeTraitsFrom:(UITextInputTraits *)traits > [[self textInputTraits] takeTraitsFrom:traits]; > } > >-// FIXME: I want to change the name of these functions, but I'm leaving it for now >-// to make it easier to look up the corresponding functions in UIKit. >- >-- (void)_startAssistingKeyboard >+- (void)_showKeyboard > { > [self setUpTextSelectionAssistant]; > >@@ -4333,12 +4330,17 @@ - (void)_startAssistingKeyboard > #endif > } > >-- (void)_stopAssistingKeyboard >+- (void)_hideKeyboard > { > self.inputDelegate = nil; > [self setUpTextSelectionAssistant]; > > [_textSelectionAssistant deactivateSelection]; >+ [_formAccessoryView hideAutoFillButton]; >+ >+ // FIXME: Does it make sense to call -reloadInputViews on watchOS? >+ [self reloadInputViews]; >+ [self _updateAccessory]; > } > > - (const WebKit::FocusedElementInformation&)focusedElementInformation >@@ -4565,7 +4567,7 @@ - (void)_elementDidFocus:(const WebKit::FocusedElementInformation&)information u > #endif > break; > default: >- [self _startAssistingKeyboard]; >+ [self _showKeyboard]; > break; > } > >@@ -4615,10 +4617,7 @@ - (void)_elementDidBlur > _inputPeripheral = nil; > _focusRequiresStrongPasswordAssistance = NO; > >- [self _stopAssistingKeyboard]; >- [_formAccessoryView hideAutoFillButton]; >- [self reloadInputViews]; >- [self _updateAccessory]; >+ [self _hideKeyboard]; > > #if PLATFORM(WATCHOS) > [self dismissAllInputViewControllers:YES]; >@@ -4671,7 +4670,7 @@ - (void)updateCurrentFocusedElementInformation:(Function<void(bool didUpdate)>&& > auto identifierBeforeUpdate = _focusedElementInformation.focusedElementIdentifier; > _page->requestFocusedElementInformation([callback = WTFMove(callback), identifierBeforeUpdate, weakSelf] (auto& info, auto error) { > if (!weakSelf || error != WebKit::CallbackBase::Error::None || info.focusedElementIdentifier != identifierBeforeUpdate) { >- // If the assisted node may have changed in the meantime, don't overwrite assisted node information. >+ // If the focused element may have changed in the meantime, don't overwrite focused element information. > callback(false); > return; > } >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index 9b09a0afcbb2aa86700f7da2b54ea97875cb0cea..f391b5696a9771c2d533fe5e24564897a4ab6cfe 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -2528,10 +2528,10 @@ void WebPage::getFocusedElementInformation(FocusedElementInformation& informatio > } else if (m_focusedElement->hasEditableStyle()) { > information.elementType = InputType::ContentEditable; > if (is<HTMLElement>(*m_focusedElement)) { >- auto& assistedElement = downcast<HTMLElement>(*m_focusedElement); >- information.isAutocorrect = assistedElement.shouldAutocorrect(); >- information.autocapitalizeType = assistedElement.autocapitalizeType(); >- information.inputMode = assistedElement.canonicalInputMode(); >+ auto& focusedElement = downcast<HTMLElement>(*m_focusedElement); >+ information.isAutocorrect = focusedElement.shouldAutocorrect(); >+ information.autocapitalizeType = focusedElement.autocapitalizeType(); >+ information.inputMode = focusedElement.canonicalInputMode(); > } else { > information.isAutocorrect = true; > information.autocapitalizeType = AutocapitalizeTypeDefault;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193572
: 359485