Title: [242690] trunk/Source/WebKit
- Revision
- 242690
- Author
- [email protected]
- Date
- 2019-03-10 16:49:10 -0700 (Sun, 10 Mar 2019)
Log Message
Fix some misleading function and variable names in WKContentViewInteraction.mm
https://bugs.webkit.org/show_bug.cgi?id=195536
Reviewed by Tim Horton.
* UIProcess/ios/WKContentViewInteraction.mm:
(shouldDeferZoomingToSelectionWhenRevealingFocusedElement):
Rename shouldZoomToRevealSelectionRect to shouldDeferZoomingToSelectionWhenRevealingFocusedElement; this
function is used to determine whether we should zoom to the selection rect when revealing the focused element,
and therefore affects whether we need to defer zooming until we get selection information.
(rectToRevealWhenZoomingToFocusedElement):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
Rename shouldShowKeyboard to shouldShowInputView; this boolean indicates whether we should show not only the
keyboard, but other UI for user input such as date and select pickers.
(-[WKContentView _didReceiveEditorStateUpdateAfterFocus]):
(shouldZoomToRevealSelectionRect): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (242689 => 242690)
--- trunk/Source/WebKit/ChangeLog 2019-03-10 20:08:54 UTC (rev 242689)
+++ trunk/Source/WebKit/ChangeLog 2019-03-10 23:49:10 UTC (rev 242690)
@@ -1,3 +1,26 @@
+2019-03-10 Wenson Hsieh <[email protected]>
+
+ Fix some misleading function and variable names in WKContentViewInteraction.mm
+ https://bugs.webkit.org/show_bug.cgi?id=195536
+
+ Reviewed by Tim Horton.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (shouldDeferZoomingToSelectionWhenRevealingFocusedElement):
+
+ Rename shouldZoomToRevealSelectionRect to shouldDeferZoomingToSelectionWhenRevealingFocusedElement; this
+ function is used to determine whether we should zoom to the selection rect when revealing the focused element,
+ and therefore affects whether we need to defer zooming until we get selection information.
+
+ (rectToRevealWhenZoomingToFocusedElement):
+ (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
+
+ Rename shouldShowKeyboard to shouldShowInputView; this boolean indicates whether we should show not only the
+ keyboard, but other UI for user input such as date and select pickers.
+
+ (-[WKContentView _didReceiveEditorStateUpdateAfterFocus]):
+ (shouldZoomToRevealSelectionRect): Deleted.
+
2019-03-10 Simon Fraser <[email protected]>
ScrollingTree should have the final say on where layers go
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (242689 => 242690)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-03-10 20:08:54 UTC (rev 242689)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-03-10 23:49:10 UTC (rev 242690)
@@ -4723,7 +4723,7 @@
return _formAccessoryView.get();
}
-static bool shouldZoomToRevealSelectionRect(WebKit::InputType type)
+static bool shouldDeferZoomingToSelectionWhenRevealingFocusedElement(WebKit::InputType type)
{
switch (type) {
case WebKit::InputType::ContentEditable:
@@ -4748,7 +4748,7 @@
if (elementInfo.elementRect.contains(elementInfo.lastInteractionLocation))
elementInteractionRect = { elementInfo.lastInteractionLocation, { 1, 1 } };
- if (!shouldZoomToRevealSelectionRect(elementInfo.elementType))
+ if (!shouldDeferZoomingToSelectionWhenRevealingFocusedElement(elementInfo.elementType))
return elementInteractionRect;
if (editorState.isMissingPostLayoutData) {
@@ -4840,7 +4840,7 @@
else
[self _stopSuppressingSelectionAssistantForReason:WebKit::FocusedElementIsTooSmall];
- BOOL shouldShowKeyboard = [&] {
+ BOOL shouldShowInputView = [&] {
switch (startInputSessionPolicy) {
case _WKFocusStartsInputSessionPolicyAuto:
// The default behavior is to allow node assistance if the user is interacting.
@@ -4887,7 +4887,7 @@
[_drawingCoordinator installInkPickerForDrawing:information.embeddedViewID];
#endif
- if (!shouldShowKeyboard)
+ if (!shouldShowInputView)
return;
if (!isAssistableInputType(information.elementType))
@@ -4951,7 +4951,7 @@
if (editableChanged)
[_webView _scheduleVisibleContentRectUpdate];
- if (!shouldZoomToRevealSelectionRect(_focusedElementInformation.elementType))
+ if (!shouldDeferZoomingToSelectionWhenRevealingFocusedElement(_focusedElementInformation.elementType))
[self _zoomToRevealFocusedElement];
[self _ensureFormAccessoryView];
@@ -5106,7 +5106,7 @@
// FIXME: If the initial writing direction just changed, we should wait until we get the next post-layout editor state
// before zooming to reveal the selection rect.
- if (shouldZoomToRevealSelectionRect(_focusedElementInformation.elementType))
+ if (shouldDeferZoomingToSelectionWhenRevealingFocusedElement(_focusedElementInformation.elementType))
[self _zoomToRevealFocusedElement];
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes