Modified: trunk/Source/WebCore/ChangeLog (264566 => 264567)
--- trunk/Source/WebCore/ChangeLog 2020-07-18 10:33:54 UTC (rev 264566)
+++ trunk/Source/WebCore/ChangeLog 2020-07-18 12:24:59 UTC (rev 264567)
@@ -1,3 +1,16 @@
+2020-07-18 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r264563.
+ https://bugs.webkit.org/show_bug.cgi?id=214518
+
+ Broke the watchOS build
+
+ Reverted changeset:
+
+ "Add OK button to Date/Time form controls."
+ https://bugs.webkit.org/show_bug.cgi?id=214195
+ https://trac.webkit.org/changeset/264563
+
2020-07-18 Rob Buis <[email protected]>
Only use enum classes in HTTPParsers
Modified: trunk/Source/WebCore/en.lproj/Localizable.strings (264566 => 264567)
--- trunk/Source/WebCore/en.lproj/Localizable.strings 2020-07-18 10:33:54 UTC (rev 264566)
+++ trunk/Source/WebCore/en.lproj/Localizable.strings 2020-07-18 12:24:59 UTC (rev 264567)
@@ -544,9 +544,6 @@
/* OK button label in document password failure alert */
"OK (document password failure alert)" = "OK";
-/* Title of the OK button in date/time form controls. */
-"OK (OK button title in date/time picker)" = "OK";
-
/* Menu item label for the track that represents disabling closed captions */
"Off" = "Off";
Modified: trunk/Source/WebKit/ChangeLog (264566 => 264567)
--- trunk/Source/WebKit/ChangeLog 2020-07-18 10:33:54 UTC (rev 264566)
+++ trunk/Source/WebKit/ChangeLog 2020-07-18 12:24:59 UTC (rev 264567)
@@ -1,3 +1,16 @@
+2020-07-18 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r264563.
+ https://bugs.webkit.org/show_bug.cgi?id=214518
+
+ Broke the watchOS build
+
+ Reverted changeset:
+
+ "Add OK button to Date/Time form controls."
+ https://bugs.webkit.org/show_bug.cgi?id=214195
+ https://trac.webkit.org/changeset/264563
+
2020-07-18 Rob Buis <[email protected]>
Only use enum classes in HTTPParsers
Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (264566 => 264567)
--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2020-07-18 10:33:54 UTC (rev 264566)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2020-07-18 12:24:59 UTC (rev 264567)
@@ -1177,7 +1177,6 @@
@interface UIContextMenuInteraction ()
@property (nonatomic, readonly) UIGestureRecognizer *gestureRecognizerForFailureRelationships;
- (void)_presentMenuAtLocation:(CGPoint)location;
-- (void)dismissMenu;
@end
#endif // USE(UICONTEXTMENU)
Modified: trunk/Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm (264566 => 264567)
--- trunk/Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm 2020-07-18 10:33:54 UTC (rev 264566)
+++ trunk/Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm 2020-07-18 12:24:59 UTC (rev 264567)
@@ -36,7 +36,6 @@
#import <UIKit/UIBarButtonItem.h>
#import <UIKit/UIDatePicker.h>
#import <WebCore/LocalizedStrings.h>
-#import <algorithm>
#import <wtf/RetainPtr.h>
using namespace WebKit;
@@ -77,7 +76,7 @@
- (CGSize)preferredContentSize
{
// FIXME: Workaround, should be able to be readdressed after <rdar://problem/64143534>
- UIView *view = self.view.subviews[0];
+ UIView *view = self.view;
if (UIEdgeInsetsEqualToEdgeInsets(view.layoutMargins, UIEdgeInsetsZero)) {
view.translatesAutoresizingMaskIntoConstraints = NO;
[view layoutIfNeeded];
@@ -84,10 +83,8 @@
view.translatesAutoresizingMaskIntoConstraints = YES;
view.layoutMargins = UIEdgeInsetsMake(16, 16, 16, 16);
}
- auto size = [view systemLayoutSizeFittingSize:UILayoutFittingCompressedSize];
-
- size.width = std::max(size.width, 250.0);
- return size;
+
+ return [view systemLayoutSizeFittingSize:UILayoutFittingCompressedSize];
}
@end
@@ -171,31 +168,16 @@
[_viewController setView:nil];
_viewController = adoptNS([[WKDateTimeContextMenuViewController alloc] init]);
RetainPtr<UINavigationController> navigationController = adoptNS([[UINavigationController alloc] initWithRootViewController:_viewController.get()]);
-
NSString *resetString = WEB_UI_STRING_KEY("Reset", "Reset Button Date/Time Context Menu", "Reset button in date input context menu");
- NSString *okString = WEB_UI_STRING_KEY("OK", "OK (OK button title in date/time picker)", "Title of the OK button in date/time form controls.");
- RetainPtr<UIBarButtonItem> okBarButton = adoptNS([[UIBarButtonItem alloc] initWithTitle:okString style:UIBarButtonItemStyleDone target:self action:@selector(ok:)]);
RetainPtr<UIBarButtonItem> blankBarButton = adoptNS([[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]);
RetainPtr<UIBarButtonItem> resetBarButton = adoptNS([[UIBarButtonItem alloc] initWithTitle:resetString style:UIBarButtonItemStylePlain target:self action:@selector(reset:)]);
- [_viewController setToolbarItems:@[resetBarButton.get(), blankBarButton.get(), okBarButton.get()]];
+ [_viewController setToolbarItems:@[blankBarButton.get(), resetBarButton.get()]];
[navigationController setToolbarHidden:NO];
-
- auto centeringView = adoptNS([[UIView alloc] init]);
-
- [centeringView addSubview:_datePicker.get()];
-
- _datePicker.get().translatesAutoresizingMaskIntoConstraints = NO;
- auto widthConstraint = [[centeringView widthAnchor] constraintGreaterThanOrEqualToAnchor:[_datePicker widthAnchor]];
- auto heightConstraint = [[centeringView heightAnchor] constraintEqualToAnchor:[_datePicker heightAnchor]];
- auto horizontalConstraint = [[centeringView centerXAnchor] constraintEqualToAnchor:[_datePicker centerXAnchor]];
- auto verticalConstraint = [[centeringView centerYAnchor] constraintEqualToAnchor:[_datePicker centerYAnchor]];
- [NSLayoutConstraint activateConstraints:@[verticalConstraint, horizontalConstraint, widthConstraint, heightConstraint]];
+ [_viewController setView:_datePicker.get()];
- [_viewController setView:centeringView.get()];
-
NSString *titleText = _view.inputLabelText;
if (![titleText isEqual:@""]) {
RetainPtr<UILabel> title = adoptNS([[UILabel alloc] init]);
@@ -208,10 +190,10 @@
} else
[navigationController setNavigationBarHidden:YES animated:NO];
+ [navigationController navigationBar].backgroundColor = UIColor.clearColor;
[navigationController navigationBar].translucent = NO;
- [navigationController navigationBar].barTintColor = [UIColor systemBackgroundColor];
+ [navigationController toolbar].backgroundColor = UIColor.clearColor;
[navigationController toolbar].translucent = NO;
- [navigationController toolbar].barTintColor = [UIColor systemBackgroundColor];
return navigationController.get();
} actionProvider:nil];
}
@@ -220,8 +202,7 @@
{
[animator addCompletion:[weakSelf = WeakObjCPtr<WKDateTimePicker>(self)] {
auto strongSelf = weakSelf.get();
- if (strongSelf)
- [strongSelf->_view.webView _didShowContextMenu];
+ [strongSelf->_view.webView _didShowContextMenu];
}];
}
@@ -229,10 +210,8 @@
{
[animator addCompletion:[weakSelf = WeakObjCPtr<WKDateTimePicker>(self)] {
auto strongSelf = weakSelf.get();
- if (strongSelf) {
- [strongSelf->_view accessoryDone];
- [strongSelf->_view.webView _didDismissContextMenu];
- }
+ [strongSelf->_view accessoryDone];
+ [strongSelf->_view.webView _didDismissContextMenu];
}];
}
@@ -270,13 +249,6 @@
[_view page]->setFocusedElementValue(String());
}
-- (void)ok:(id)sender
-{
-#if USE(UICONTEXTMENU)
- [_dateTimeContextMenuInteraction dismissMenu];
-#endif
-}
-
- (NSString *)calendarType
{
return [_datePicker calendar].calendarIdentifier;