Changeset 230122 in webkit


Ignore:
Timestamp:
Mar 30, 2018 5:12:36 PM (6 years ago)
Author:
Wenson Hsieh
Message:

[Extra zoom mode] Adopt list view controller UI for numeric input types
https://bugs.webkit.org/show_bug.cgi?id=184184
<rdar://problem/37238916>

Reviewed by Timothy Hatcher.

Source/WebCore:

Add a localized string for the OK button shown on number pads in extra zoomed form controls.

  • English.lproj/Localizable.strings:
  • platform/LocalizedStrings.cpp:

(WebCore::numberPadOKButtonTitle):

  • platform/LocalizedStrings.h:

Source/WebKit:

Remove existing logic for presenting a number pad view controller, since number pads will now be handled as a
special case of general text form controls in extra zoom mode.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView presentViewControllerForCurrentAssistedNode]):
(-[WKContentView dismissAllInputViewControllers]):
(-[WKContentView _wheelChangedWithEvent:]):

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r230120 r230122  
     12018-03-30  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [Extra zoom mode] Adopt list view controller UI for numeric input types
     4        https://bugs.webkit.org/show_bug.cgi?id=184184
     5        <rdar://problem/37238916>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        Add a localized string for the OK button shown on number pads in extra zoomed form controls.
     10
     11        * English.lproj/Localizable.strings:
     12        * platform/LocalizedStrings.cpp:
     13        (WebCore::numberPadOKButtonTitle):
     14        * platform/LocalizedStrings.h:
     15
    1162018-03-30  Ryosuke Niwa  <rniwa@webkit.org>
    217
  • trunk/Source/WebCore/English.lproj/Localizable.strings

    r230054 r230122  
    440440"Numbered list" = "Numbered list";
    441441
     442/* Title of the OK button for the number pad in zoomed form controls. */
     443"OK (OK button title in extra zoomed number pad)" = "OK";
     444
    442445/* OK button label in document password failure alert */
    443446"OK (document password failure alert)" = "OK";
     
    12051208"stop displaying closed captions" = "stop displaying closed captions";
    12061209
     1210/* Label for the strong password auto fill button inside a text field. */
     1211"strong password auto fill" = "strong password auto fill";
     1212
    12071213/* Label for the strong password confirmation auto fill button inside a text field. */
    12081214"strong password confirmation auto fill" = "strong password confirmation auto fill";
    12091215
    1210 /* Label for the strong password auto fill button inside a text field. */
    1211 "strong password auto fill" = "strong password auto fill";
    1212 
    12131216/* The suboptimal value description for a meter element. */
    12141217"suboptimal value" = "suboptimal value";
  • trunk/Source/WebCore/platform/LocalizedStrings.cpp

    r230054 r230122  
    10371037#if ENABLE(EXTRA_ZOOM_MODE)
    10381038
     1039String numberPadOKButtonTitle()
     1040{
     1041    return WEB_UI_STRING_KEY("OK", "OK (OK button title in extra zoomed number pad)", "Title of the OK button for the number pad in zoomed form controls.");
     1042}
     1043
    10391044String formControlDoneButtonTitle()
    10401045{
  • trunk/Source/WebCore/platform/LocalizedStrings.h

    r229939 r230122  
    318318
    319319#if ENABLE(EXTRA_ZOOM_MODE)
     320    WEBCORE_EXPORT String numberPadOKButtonTitle();
    320321    WEBCORE_EXPORT String formControlCancelButtonTitle();
    321322    WEBCORE_EXPORT String formControlDoneButtonTitle();
  • trunk/Source/WebKit/ChangeLog

    r230121 r230122  
     12018-03-30  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [Extra zoom mode] Adopt list view controller UI for numeric input types
     4        https://bugs.webkit.org/show_bug.cgi?id=184184
     5        <rdar://problem/37238916>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        Remove existing logic for presenting a number pad view controller, since number pads will now be handled as a
     10        special case of general text form controls in extra zoom mode.
     11
     12        * UIProcess/ios/WKContentViewInteraction.h:
     13        * UIProcess/ios/WKContentViewInteraction.mm:
     14        (-[WKContentView presentViewControllerForCurrentAssistedNode]):
     15        (-[WKContentView dismissAllInputViewControllers]):
     16        (-[WKContentView _wheelChangedWithEvent:]):
     17
    1182018-03-30  Dan Bernstein  <mitz@apple.com>
    219
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h

    r229961 r230122  
    8787@class WKDatePickerViewController;
    8888@class WKFocusedFormControlViewController;
    89 @class WKNumberPadViewController;
    9089@class WKSelectMenuListViewController;
    9190@class WKTextInputListViewController;
     
    256255    RetainPtr<WKTextInputListViewController> _textInputListViewController;
    257256    RetainPtr<WKFocusedFormControlViewController> _focusedFormControlViewController;
    258     RetainPtr<WKNumberPadViewController> _numberPadViewController;
    259257    RetainPtr<WKSelectMenuListViewController> _selectMenuListViewController;
    260258    RetainPtr<WKTimePickerViewController> _timePickerViewController;
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r230029 r230122  
    5050#import "WKInspectorNodeSearchGestureRecognizer.h"
    5151#import "WKNSURLExtras.h"
    52 #import "WKNumberPadViewController.h"
    5352#import "WKPreviewActionItemIdentifiers.h"
    5453#import "WKPreviewActionItemInternal.h"
     
    42234222
    42244223    switch (_assistedNodeInformation.elementType) {
    4225     case InputType::Number:
    4226     case InputType::NumberPad:
    4227     case InputType::Phone:
    4228         if (!_numberPadViewController) {
    4229             _numberPadViewController = adoptNS([[WKNumberPadViewController alloc] initWithText:_assistedNodeInformation.value textSuggestions:@[]]);
    4230             [_numberPadViewController setDelegate:self];
    4231             [_focusedFormControlViewController presentViewController:_numberPadViewController.get() animated:YES completion:nil];
    4232         }
    4233         break;
    42344224    case InputType::Select:
    42354225        if (!_selectMenuListViewController) {
     
    42694259        [controller dismissViewControllerAnimated:YES completion:nil];
    42704260
    4271     if (auto controller = WTFMove(_numberPadViewController))
    4272         [controller dismissViewControllerAnimated:YES completion:nil];
    4273 
    42744261    if (auto controller = WTFMove(_selectMenuListViewController))
    42754262        [controller dismissViewControllerAnimated:YES completion:nil];
     
    44754462{
    44764463#if ENABLE(EXTRA_ZOOM_MODE)
    4477     if ([_numberPadViewController handleWheelEvent:event])
    4478         return;
    4479 
    44804464    if ([_timePickerViewController handleWheelEvent:event])
    44814465        return;
Note: See TracChangeset for help on using the changeset viewer.