Title: [229595] tags/Safari-606.1.9/Source/WebKit

Diff

Modified: tags/Safari-606.1.9/Source/WebKit/ChangeLog (229594 => 229595)


--- tags/Safari-606.1.9/Source/WebKit/ChangeLog	2018-03-14 01:00:13 UTC (rev 229594)
+++ tags/Safari-606.1.9/Source/WebKit/ChangeLog	2018-03-14 01:00:17 UTC (rev 229595)
@@ -1,5 +1,9 @@
 2018-03-13  Jason Marcell  <jmarc...@apple.com>
 
+        Revert r229512. rdar://problem/38435829
+
+2018-03-13  Jason Marcell  <jmarc...@apple.com>
+
         Revert r229592. rdar://problem/38435829
 
 2018-03-13  Jason Marcell  <jmarc...@apple.com>

Copied: tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/WKFullScreenWindowControllerIOS.h (from rev 229594, tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h) (0 => 229595)


--- tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/WKFullScreenWindowControllerIOS.h	                        (rev 0)
+++ tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/WKFullScreenWindowControllerIOS.h	2018-03-14 01:00:17 UTC (rev 229595)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if ENABLE(FULLSCREEN_API) && PLATFORM(IOS)
+
+#import <UIKit/UIViewControllerTransitioning.h>
+
+namespace WebKit { 
+class WebPageProxy;
+}
+
+namespace WebCore {
+class IntRect;
+}
+
+@class WebCoreFullScreenPlaceholderView;
+@class WKWebView;
+
+@interface WKFullScreenWindowController : NSObject <UIViewControllerTransitioningDelegate>
+
+- (id)initWithWebView:(WKWebView *)webView;
+
+- (WebCoreFullScreenPlaceholderView*)webViewPlaceholder;
+
+- (BOOL)isFullScreen;
+
+- (void)enterFullScreen;
+- (void)exitFullScreen;
+- (void)requestExitFullScreen;
+- (void)close;
+- (void)beganEnterFullScreenWithInitialFrame:(CGRect)initialFrame finalFrame:(CGRect)finalFrame;
+- (void)beganExitFullScreenWithInitialFrame:(CGRect)initialFrame finalFrame:(CGRect)finalFrame;
+- (void)webViewDidRemoveFromSuperviewWhileInFullscreen;
+- (void)videoControlsManagerDidChange;
+
+@end
+
+#endif

Added: tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/WKFullScreenWindowControllerIOS.mm (0 => 229595)


--- tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/WKFullScreenWindowControllerIOS.mm	                        (rev 0)
+++ tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/WKFullScreenWindowControllerIOS.mm	2018-03-14 01:00:17 UTC (rev 229595)
@@ -0,0 +1,887 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+
+#if PLATFORM(IOS) && ENABLE(FULLSCREEN_API)
+#import "WKFullScreenWindowControllerIOS.h"
+
+#import "UIKitSPI.h"
+#import "WKWebView.h"
+#import "WKWebViewInternal.h"
+#import "WKWebViewPrivate.h"
+#import "WebFullScreenManagerProxy.h"
+#import "WebPageProxy.h"
+#import <Foundation/Foundation.h>
+#import <Security/SecCertificate.h>
+#import <Security/SecTrust.h>
+#import <UIKit/UIVisualEffectView.h>
+#import <WebCore/FloatRect.h>
+#import <WebCore/GeometryUtilities.h>
+#import <WebCore/IntRect.h>
+#import <WebCore/LocalizedStrings.h>
+#import <WebCore/WebCoreNSURLExtras.h>
+#import <pal/spi/cf/CFNetworkSPI.h>
+#import <pal/spi/cocoa/LinkPresentationSPI.h>
+#import <pal/spi/cocoa/NSStringSPI.h>
+#import <pal/spi/cocoa/QuartzCoreSPI.h>
+#import <wtf/SoftLinking.h>
+#import <wtf/spi/cocoa/SecuritySPI.h>
+
+using namespace WebKit;
+using namespace WebCore;
+
+SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(LinkPresentation)
+
+namespace WebKit {
+
+static const NSTimeInterval showHideAnimationDuration = 0.1;
+static const NSTimeInterval autoHideDelay = 4.0;
+static const CGFloat fontSize = 12;
+
+static void replaceViewWithView(UIView *view, UIView *otherView)
+{
+    [CATransaction begin];
+    [CATransaction setDisableActions:YES];
+    [otherView setFrame:[view frame]];
+    [otherView setAutoresizingMask:[view autoresizingMask]];
+    [[view superview] insertSubview:otherView aboveSubview:view];
+    [view removeFromSuperview];
+    [CATransaction commit];
+}
+
+enum FullScreenState : NSInteger {
+    NotInFullScreen,
+    WaitingToEnterFullScreen,
+    EnteringFullScreen,
+    InFullScreen,
+    WaitingToExitFullScreen,
+    ExitingFullScreen,
+};
+
+struct WKWebViewState {
+    float _savedTopContentInset = 0.0;
+    CGFloat _savedPageScale = 1;
+    CGFloat _savedViewScale = 1.0;
+    CGFloat _savedZoomScale = 1;
+    UIEdgeInsets _savedEdgeInset = UIEdgeInsetsZero;
+    UIEdgeInsets _savedObscuredInsets = UIEdgeInsetsZero;
+    UIEdgeInsets _savedScrollIndicatorInsets = UIEdgeInsetsZero;
+    CGPoint _savedContentOffset = CGPointZero;
+
+    void applyTo(WKWebView* webView)
+    {
+        [webView _setPageScale:_savedPageScale withOrigin:CGPointMake(0, 0)];
+        [webView _setObscuredInsets:_savedObscuredInsets];
+        [[webView scrollView] setContentInset:_savedEdgeInset];
+        [[webView scrollView] setContentOffset:_savedContentOffset];
+        [[webView scrollView] setScrollIndicatorInsets:_savedScrollIndicatorInsets];
+        [webView _page]->setTopContentInset(_savedTopContentInset);
+        [webView _setViewScale:_savedViewScale];
+        [[webView scrollView] setZoomScale:_savedZoomScale];
+    }
+    
+    void store(WKWebView* webView)
+    {
+        _savedPageScale = [webView _pageScale];
+        _savedObscuredInsets = [webView _obscuredInsets];
+        _savedEdgeInset = [[webView scrollView] contentInset];
+        _savedContentOffset = [[webView scrollView] contentOffset];
+        _savedScrollIndicatorInsets = [[webView scrollView] scrollIndicatorInsets];
+        _savedTopContentInset = [webView _page]->topContentInset();
+        _savedViewScale = [webView _viewScale];
+        _savedZoomScale = [[webView scrollView] zoomScale];
+    }
+};
+    
+} // namespace WebKit
+
+
+@interface _WKFullScreenViewController : UIViewController <UIGestureRecognizerDelegate>
+@property (retain, nonatomic) NSArray *savedConstraints;
+@property (retain, nonatomic) UIView *contentView;
+@property (retain, nonatomic) id target;
+@property (assign, nonatomic) SEL action;
+@end
+
+@implementation _WKFullScreenViewController {
+    RetainPtr<UIView> _backgroundView;
+    RetainPtr<UILongPressGestureRecognizer> _touchGestureRecognizer;
+    RetainPtr<UIButton> _cancelButton;
+    RetainPtr<UIButton> _locationButton;
+    RetainPtr<UIVisualEffectView> _visualEffectView;
+}
+
+- (void)dealloc
+{
+    [NSObject cancelPreviousPerformRequestsWithTarget:self];
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+
+    [super dealloc];
+}
+
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
+{
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition: ^(id<UIViewControllerTransitionCoordinatorContext> context) {
+
+        void (^webViewUpdateBlock)() = ^{
+            [(WKWebView *)[self contentView] _overrideLayoutParametersWithMinimumLayoutSize:size maximumUnobscuredSizeOverride:size];
+        };
+
+        [(WKWebView *)[self contentView] _beginAnimatedResizeWithUpdates:webViewUpdateBlock];
+        [(WKWebView *)[self contentView] _setInterfaceOrientationOverride:[UIApp statusBarOrientation]];
+    } completion:^(id <UIViewControllerTransitionCoordinatorContext>context) {
+        [(WKWebView *)[self contentView] _endAnimatedResize];
+    }];
+}
+
++ (void)configureView:(UIView *)view withBackgroundFillOfColor:(UIColor *)fillColor opacity:(CGFloat)opacity filter:(NSString *)filter
+{
+    _UIVisualEffectLayerConfig *baseLayerConfig = [_UIVisualEffectLayerConfig layerWithFillColor:fillColor opacity:opacity filterType:filter];
+    [[[_UIVisualEffectConfig configWithContentConfig:baseLayerConfig] contentConfig] configureLayerView:view];
+}
+
+- (void)_updateTransparencyOfVisualEffectView:(UIVisualEffectView *)visualEffectView
+{
+    RetainPtr<UIVisualEffect> visualEffect;
+
+    if (UIAccessibilityIsReduceTransparencyEnabled()) {
+        visualEffect = [UIVisualEffect emptyEffect];
+        [[visualEffectView contentView] setBackgroundColor:[UIColor colorWithRed:(43.0 / 255.0) green:(46.0 / 255.0) blue:(48.0 / 255.0) alpha:1.0]];
+    } else {
+        RetainPtr<UIColorEffect> saturationEffect = [UIColorEffect colorEffectSaturate:1.8];
+        RetainPtr<UIBlurEffect> blurEffect = [UIBlurEffect effectWithBlurRadius:UIRoundToScreenScale(17.5, [UIScreen mainScreen])];
+        RetainPtr<UIVisualEffect> combinedEffects = [UIVisualEffect effectCombiningEffects:@[blurEffect.get(), saturationEffect.get()]];
+        visualEffect = combinedEffects;
+        [[visualEffectView contentView] setBackgroundColor:nil];
+    }
+
+    [visualEffectView setEffect:visualEffect.get()];
+}
+
+- (UIVisualEffectView *)visualEffectViewWithFrame:(CGRect)frame
+{
+    RetainPtr<UIVisualEffectView> visualEffectView = adoptNS([[UIVisualEffectView alloc] initWithEffect:[UIVisualEffect emptyEffect]]);
+    [self _updateTransparencyOfVisualEffectView:visualEffectView.get()];
+
+    RetainPtr<UIView> backLayerTintView = adoptNS([[UIView alloc] initWithFrame:[visualEffectView bounds]]);
+    [backLayerTintView setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+    [backLayerTintView setUserInteractionEnabled:NO];
+    [[self class] configureView:backLayerTintView.get() withBackgroundFillOfColor:[UIColor colorWithWhite:0.0 alpha:0.55] opacity:1.0 filter:kCAFilterNormalBlendMode];
+    [[visualEffectView contentView] addSubview:backLayerTintView.get()];
+
+    RetainPtr<UIView> topLayerTintView = adoptNS([[UIView alloc] initWithFrame:[visualEffectView bounds]]);
+    [topLayerTintView setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+    [topLayerTintView setUserInteractionEnabled:NO];
+    [[self class] configureView:topLayerTintView.get() withBackgroundFillOfColor:[UIColor colorWithWhite:1.0 alpha:0.14] opacity:1.0 filter:kCAFilterNormalBlendMode];
+    [[visualEffectView contentView] addSubview:topLayerTintView.get()];
+
+    [self _updateTransparencyOfVisualEffectView:visualEffectView.get()];
+
+    return visualEffectView.autorelease();
+}
+
+static UIEdgeInsets mirrorEdgeInsets(UIEdgeInsets insets)
+{
+    return UIEdgeInsetsMake(insets.top, insets.right, insets.bottom, insets.left);
+}
+
+- (void)_updateLayoutMargins
+{
+    UIView *view = [self view];
+    [view setPreservesSuperviewLayoutMargins:NO];
+
+    UIEdgeInsets targetInsets = [view safeAreaInsets];
+    targetInsets.top = std::max(targetInsets.top, 20.0);
+    [view setLayoutMargins:targetInsets];
+}
+
+- (void)viewDidLayoutSubviews
+{
+    [self _updateLayoutMargins];
+}
+
+-  (void)setLocation:(NSString *)locationName secure:(BOOL)secure trustedName:(BOOL)trustedName trustedSite:(BOOL)trustedSite
+{
+    UIColor *greenTint = [UIColor colorWithRed:100 / 255.0 green:175 / 255.0 blue:99 / 255.0 alpha:1.0];
+    UIColor *whiteTint = [UIColor whiteColor];
+
+    float hPadding = 14;
+    NSString *lockImageName = @"LockMini";
+
+    float lockSpacing = secure ? 10 : 0;
+
+    UIEdgeInsets locationContentEdgeInsets = UIEdgeInsetsMake(0, hPadding+lockSpacing, 0, hPadding);
+    UIEdgeInsets locationImageEdgeInsets = UIEdgeInsetsMake(0, -lockSpacing, 0, 0);
+
+    if ([UIView userInterfaceLayoutDirectionForSemanticContentAttribute:[[self view] semanticContentAttribute]] == UIUserInterfaceLayoutDirectionRightToLeft) {
+        locationContentEdgeInsets = mirrorEdgeInsets(locationContentEdgeInsets);
+        locationImageEdgeInsets = mirrorEdgeInsets(locationImageEdgeInsets);
+        [_locationButton setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight];
+    }
+
+    [_locationButton setTitleColor:(trustedName ? greenTint : whiteTint) forState:UIControlStateNormal];
+
+    if (secure) {
+        NSBundle *bundle = [NSBundle bundleForClass:[WKFullScreenWindowController class]];
+        UIImage *lockImage = [UIImage imageNamed:lockImageName inBundle:bundle compatibleWithTraitCollection:nil];
+        [_locationButton setImage:[lockImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal];
+        [[_locationButton imageView] setTintColor:trustedSite ? greenTint : whiteTint];
+        [_locationButton setTintColor:trustedSite ? greenTint : whiteTint];
+    } else
+        [_locationButton setImage:nil forState:UIControlStateNormal];
+
+    [_locationButton setContentEdgeInsets:locationContentEdgeInsets];
+    [_locationButton setImageEdgeInsets:locationImageEdgeInsets];
+    [_locationButton setTitle:locationName forState:UIControlStateNormal];
+}
+
+- (void)createSubviews
+{
+    _visualEffectView = [self visualEffectViewWithFrame:CGRectMake(0, 0, 20, 20)];
+
+    [_visualEffectView setTranslatesAutoresizingMaskIntoConstraints:NO];
+    [[self view] addSubview:_visualEffectView.get()];
+
+    _cancelButton = [UIButton buttonWithType:UIButtonTypeSystem];
+    [_cancelButton setTranslatesAutoresizingMaskIntoConstraints:NO];
+    [_cancelButton setAdjustsImageWhenHighlighted:NO];
+    [_cancelButton setBackgroundColor: [UIColor blackColor]];
+    [[_cancelButton layer] setCompositingFilter:[CAFilter filterWithType:kCAFilterPlusL]];
+    [_cancelButton setTitle:WEB_UI_STRING("Done", "Text of button that exits element fullscreen.") forState:UIControlStateNormal];
+    [_cancelButton setTintColor:[UIColor whiteColor]];
+    [[_cancelButton titleLabel] setFont:[UIFont systemFontOfSize:fontSize]];
+    [_cancelButton addTarget:self action:@selector(cancelAction:) forControlEvents:UIControlEventTouchUpInside];
+
+    [[self view] addSubview:_cancelButton.get()];
+
+    _locationButton = [UIButton buttonWithType:UIButtonTypeSystem];
+    [_locationButton setTranslatesAutoresizingMaskIntoConstraints:NO];
+    [_locationButton setAdjustsImageWhenHighlighted:NO];
+    [_locationButton setBackgroundColor:[UIColor blackColor]];
+    [[_locationButton layer] setCompositingFilter:[CAFilter filterWithType:kCAFilterPlusL]];
+    [[_locationButton titleLabel] setLineBreakMode:NSLineBreakByTruncatingTail];
+    [[_locationButton titleLabel] setAdjustsFontSizeToFitWidth:NO];
+    [[_locationButton titleLabel] setFont:[UIFont systemFontOfSize:fontSize]];
+    [[self view] addSubview:_locationButton.get()];
+
+    UILayoutGuide* containerGuide = [[self view] layoutMarginsGuide];
+
+    [[[_visualEffectView leftAnchor] constraintEqualToAnchor:[[self view] leftAnchor]] setActive:YES];
+    [[[_visualEffectView rightAnchor] constraintEqualToAnchor:[[self view] rightAnchor]] setActive:YES];
+    [[[_visualEffectView topAnchor] constraintEqualToAnchor:[[self view] topAnchor]] setActive:YES];
+    [[[_visualEffectView heightAnchor] constraintGreaterThanOrEqualToConstant:20] setActive:YES];
+
+    NSLayoutConstraint *bottom = [[_visualEffectView bottomAnchor] constraintEqualToAnchor:[containerGuide topAnchor]];
+    [bottom setPriority:UILayoutPriorityRequired - 1];
+    [bottom setActive:YES];
+
+    [[[_cancelButton leadingAnchor] constraintEqualToAnchor:[containerGuide leadingAnchor]] setActive:YES];
+    [[[_cancelButton topAnchor] constraintEqualToAnchor:[[self view] topAnchor]] setActive:YES];
+    [[[_cancelButton bottomAnchor] constraintEqualToAnchor:[_visualEffectView bottomAnchor]] setActive:YES];
+
+    [[[_locationButton heightAnchor] constraintEqualToConstant:20] setActive:YES];
+    [[[_locationButton bottomAnchor] constraintEqualToAnchor:[_visualEffectView bottomAnchor]] setActive:YES];
+    [[[_locationButton leadingAnchor] constraintGreaterThanOrEqualToAnchor:[_cancelButton trailingAnchor]] setActive:YES];
+    [[[_locationButton trailingAnchor] constraintLessThanOrEqualToAnchor:[[self view] trailingAnchor]] setActive:YES];
+    NSLayoutConstraint *centeringConstraint = [[_locationButton centerXAnchor] constraintEqualToAnchor:[[self view] centerXAnchor]];
+    [centeringConstraint setPriority:UILayoutPriorityDefaultLow];
+    [centeringConstraint setActive:YES];
+
+    [_visualEffectView setAlpha:0];
+    [_cancelButton setAlpha:0];
+    [_locationButton setAlpha:0];
+
+    [_visualEffectView setHidden:YES];
+    [_cancelButton setHidden:YES];
+    [_locationButton setHidden:YES];
+}
+
+- (void)loadView
+{
+    [self setView:adoptNS([[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]).get()];
+    [[self view] setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+
+    _touchGestureRecognizer = adoptNS([[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(showCancelButton:)]);
+    [_touchGestureRecognizer setDelegate:self];
+    [_touchGestureRecognizer setCancelsTouchesInView:NO];
+    [_touchGestureRecognizer setMinimumPressDuration:0];
+    [[self view] addGestureRecognizer:_touchGestureRecognizer.get()];
+    [self createSubviews];
+}
+
+- (void)viewWillAppear:(BOOL)animated
+{
+    [[self contentView] setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+    [[self contentView] setFrame:[[self view] bounds]];
+    [[self view] insertSubview:[self contentView] atIndex:0];
+}
+
+- (void)viewDidAppear:(BOOL)animated
+{
+    [self _updateLayoutMargins];
+}
+
+- (void)cancelAction:(id)sender
+{
+    [[self target] performSelector:[self action]];
+}
+
+- (void)hideCancelButton
+{
+    [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(hideCancelButton) object:nil];
+    [UIView animateWithDuration:showHideAnimationDuration animations:^{
+        [_visualEffectView setAlpha:0];
+        [_cancelButton setAlpha:0];
+        [_locationButton setAlpha:0];
+    } completion:^(BOOL finished){
+        if (finished) {
+            [_cancelButton setHidden:YES];
+            [_locationButton setHidden:YES];
+            [_visualEffectView setHidden:YES];
+        }
+    }];
+}
+
+- (void)showCancelButton:(id)sender
+{
+    [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(hideCancelButton) object:nil];
+    [self performSelector:@selector(hideCancelButton) withObject:nil afterDelay:autoHideDelay];
+    [UIView animateWithDuration:showHideAnimationDuration animations: ^{
+        [_visualEffectView setHidden:NO];
+        [_cancelButton setHidden:NO];
+        [_locationButton setHidden:NO];
+        [_visualEffectView setAlpha:1];
+        [_cancelButton setAlpha:1];
+        [_locationButton setAlpha:1];
+    }];
+}
+
+- (void)setTarget:(id)target action:(SEL)action
+{
+    [self setTarget:target];
+    [self setAction:action];
+}
+
+// MARK - UIGestureRecognizerDelegate
+
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
+{
+    return YES;
+}
+
+@end
+
+@interface _WKFullscreenRootViewController : UIViewController
+@end
+
+@implementation _WKFullscreenRootViewController {
+    BOOL _showsStatusBar;
+}
+
+- (void)setShowsStatusBar:(BOOL)value
+{
+    _showsStatusBar = value;
+    [self setNeedsStatusBarAppearanceUpdate];
+}
+
+- (BOOL)prefersStatusBarHidden
+{
+    return !_showsStatusBar;
+}
+
+@end
+
+@interface WKFullscreenAnimationController : NSObject <UIViewControllerAnimatedTransitioning>
+@property (retain, nonatomic) UIViewController* viewController;
+@property (nonatomic) CGRect initialFrame;
+@property (nonatomic) CGRect finalFrame;
+@property (nonatomic, getter=isAnimatingIn) BOOL animatingIn;
+@end
+
+@implementation WKFullscreenAnimationController
+
+- (NSTimeInterval)transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext
+{
+    const NSTimeInterval animationDuration = 0.2;
+    return animationDuration;
+}
+
+- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext
+{
+    UIView *containerView = [transitionContext containerView];
+    UIView *fromView = [transitionContext viewForKey:UITransitionContextFromViewKey];
+    UIView *toView = [transitionContext viewForKey:UITransitionContextToViewKey];
+
+    CGRect inlineFrame = _animatingIn ? _initialFrame : _finalFrame;
+    CGRect fullscreenFrame = _animatingIn ? _finalFrame : _initialFrame;
+    UIView *animatingView = _animatingIn ? toView : fromView;
+    
+    CGRect boundsRect = largestRectWithAspectRatioInsideRect(FloatRect(inlineFrame).size().aspectRatio(), fullscreenFrame);
+    boundsRect.origin = CGPointZero;
+    RetainPtr<UIView> maskView = adoptNS([[UIView alloc] init]);
+    [maskView setBackgroundColor:[UIColor blackColor]];
+    [maskView setBounds:_animatingIn ? boundsRect : [animatingView bounds]];
+    [maskView setCenter:CGPointMake(CGRectGetMidX([animatingView bounds]), CGRectGetMidY([animatingView bounds]))];
+    [animatingView setMaskView:maskView.get()];
+    
+    FloatRect scaleRect = smallestRectWithAspectRatioAroundRect(FloatRect(fullscreenFrame).size().aspectRatio(), inlineFrame);
+    CGAffineTransform scaleTransform = CGAffineTransformMakeScale(scaleRect.width() / fullscreenFrame.size.width, scaleRect.height() / fullscreenFrame.size.height);
+    CGAffineTransform translateTransform = CGAffineTransformMakeTranslation(CGRectGetMidX(inlineFrame) - CGRectGetMidX(fullscreenFrame), CGRectGetMidY(inlineFrame) - CGRectGetMidY(fullscreenFrame));
+    
+    CGAffineTransform finalTransform = CGAffineTransformConcat(scaleTransform, translateTransform);
+
+    [animatingView setTransform:_animatingIn ? finalTransform : CGAffineTransformIdentity];
+    
+    [containerView addSubview:animatingView];
+
+    [UIView animateWithDuration:[self transitionDuration:transitionContext] delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
+        [animatingView setTransform:_animatingIn ? CGAffineTransformIdentity : finalTransform];
+        [maskView setBounds:_animatingIn ? animatingView.bounds : boundsRect];
+        [maskView setCenter:CGPointMake(CGRectGetMidX([animatingView bounds]), CGRectGetMidY([animatingView bounds]))];
+    } completion:^(BOOL finished){
+        BOOL success = ![transitionContext transitionWasCancelled];
+
+        if (([self isAnimatingIn] && !success) || (![self isAnimatingIn] && success))
+            [animatingView removeFromSuperview];
+
+        [transitionContext completeTransition:success];
+        [animatingView setMaskView:nil];
+    }];
+}
+
+- (void)animationEnded:(BOOL)transitionCompleted
+{
+}
+
+@end
+
+@implementation WKFullScreenWindowController {
+    WKWebView *_webView; // Cannot be retained, see <rdar://problem/14884666>.
+    RetainPtr<UIView> _webViewPlaceholder;
+
+    FullScreenState _fullScreenState;
+    WKWebViewState _viewState;
+
+    RetainPtr<UIWindow> _window;
+    RetainPtr<_WKFullscreenRootViewController> _rootViewController;
+
+    RefPtr<WebKit::VoidCallback> _repaintCallback;
+    RetainPtr<UIViewController> _viewControllerForPresentation;
+    RetainPtr<_WKFullScreenViewController> _fullscreenViewController;
+
+    CGRect _initialFrame;
+    CGRect _finalFrame;
+
+    RetainPtr<NSString> _EVOrganizationName;
+    BOOL _EVOrganizationNameIsValid;
+
+}
+
+#pragma mark -
+#pragma mark Initialization
+- (id)initWithWebView:(WKWebView *)webView
+{
+    if (![super init])
+        return nil;
+    _webView = webView;
+
+    return self;
+}
+
+- (void)dealloc
+{
+    [NSObject cancelPreviousPerformRequestsWithTarget:self];
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+
+    [super dealloc];
+}
+
+#pragma mark -
+#pragma mark Accessors
+
+- (BOOL)isFullScreen
+{
+    return _fullScreenState == WaitingToEnterFullScreen
+        || _fullScreenState == EnteringFullScreen
+        || _fullScreenState == InFullScreen;
+}
+
+- (WebCoreFullScreenPlaceholderView *)webViewPlaceholder
+{
+    return nil;
+}
+
+#pragma mark -
+#pragma mark Exposed Interface
+
+- (void)_invalidateEVOrganizationName
+{
+    _EVOrganizationName = nil;
+    _EVOrganizationNameIsValid = NO;
+}
+
+- (BOOL)isSecure
+{
+    return _webView.hasOnlySecureContent;
+}
+
+- (SecTrustRef)_serverTrust
+{
+    return _webView.serverTrust;
+}
+
+- (NSString *)_EVOrganizationName
+{
+    if (!self.isSecure)
+        return nil;
+
+    if (_EVOrganizationNameIsValid)
+        return _EVOrganizationName.get();
+
+    ASSERT(!_EVOrganizationName.get());
+    _EVOrganizationNameIsValid = YES;
+
+    SecTrustRef trust = [self _serverTrust];
+    if (!trust)
+        return nil;
+
+    NSDictionary *infoDictionary = [(__bridge NSDictionary *)SecTrustCopyInfo(trust) autorelease];
+    // If SecTrustCopyInfo returned NULL then it's likely that the SecTrustRef has not been evaluated
+    // and the only way to get the information we need is to call SecTrustEvaluate ourselves.
+    if (!infoDictionary) {
+        SecTrustResultType result = kSecTrustResultProceed;
+        OSStatus err = SecTrustEvaluate(trust, &result);
+        if (err == noErr && result == kSecTrustResultProceed)
+            infoDictionary = [(__bridge NSDictionary *)SecTrustCopyInfo(trust) autorelease];
+        if (!infoDictionary)
+            return nil;
+    }
+
+    // Make sure that the EV certificate is valid against our certificate chain.
+    id hasEV = [infoDictionary objectForKey:(__bridge NSString *)kSecTrustInfoExtendedValidationKey];
+    if (![hasEV isKindOfClass:[NSValue class]] || ![hasEV boolValue])
+        return nil;
+
+    // Make sure that we could contact revocation server and it is still valid.
+    id isNotRevoked = [infoDictionary objectForKey:(__bridge NSString *)kSecTrustInfoRevocationKey];
+    if (![isNotRevoked isKindOfClass:[NSValue class]] || ![isNotRevoked boolValue])
+        return nil;
+
+    _EVOrganizationName = [infoDictionary objectForKey:(__bridge NSString *)kSecTrustInfoCompanyNameKey];
+    return _EVOrganizationName.get();
+}
+
+- (void)updateLocationInfo
+{
+    NSURL* url = ""
+
+    NSString *EVOrganizationName = [self _EVOrganizationName];
+    BOOL showsEVOrganizationName = [EVOrganizationName length] > 0;
+
+    NSString *domain = nil;
+
+    if (LinkPresentationLibrary())
+        domain = [url _lp_simplifiedDisplayString];
+    else
+        domain = userVisibleString(url);
+
+    NSString *text = nil;
+    if ([[url scheme] caseInsensitiveCompare:@"data"] == NSOrderedSame)
+        text = @"data:";
+    else if (showsEVOrganizationName)
+        text = EVOrganizationName;
+    else
+        text = domain;
+
+    [_fullscreenViewController setLocation:text secure:self.isSecure trustedName:showsEVOrganizationName trustedSite:!!EVOrganizationName];
+}
+
+- (void)enterFullScreen
+{
+    if ([self isFullScreen])
+        return;
+
+    [self _invalidateEVOrganizationName];
+
+    _fullScreenState = WaitingToEnterFullScreen;
+
+    _window = adoptNS([[UIWindow alloc] init]);
+    [_window setBackgroundColor:[UIColor clearColor]];
+    _rootViewController = adoptNS([[_WKFullscreenRootViewController alloc] init]);
+    [_window setRootViewController:_rootViewController.get()];
+    [[_window rootViewController] setView:adoptNS([[UIView alloc] initWithFrame:[_window bounds]]).get()];
+    [[[_window rootViewController] view] setBackgroundColor:[UIColor clearColor]];
+    [[[_window rootViewController] view] setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+    [_window setWindowLevel:UIWindowLevelNormal - 1];
+    [_window setHidden:NO];
+    _viewControllerForPresentation = [_window rootViewController];
+
+    _fullscreenViewController = adoptNS([[_WKFullScreenViewController alloc] init]);
+    [_fullscreenViewController setTransitioningDelegate:self];
+    [_fullscreenViewController setModalPresentationStyle:UIModalPresentationCustom];
+    [_fullscreenViewController setTarget:self action:@selector(requestExitFullScreen)];
+    [[_fullscreenViewController view] setFrame:[[_viewControllerForPresentation view] bounds]];
+    [self updateLocationInfo];
+
+    [self _manager]->saveScrollPosition();
+
+    [_webView _page]->setSuppressVisibilityUpdates(true);
+
+    _viewState.store(_webView);
+
+    _webViewPlaceholder = adoptNS([[UIView alloc] init]);
+    [[_webViewPlaceholder layer] setName:@"Fullscreen Placeholder Vfiew"];
+
+    WKSnapshotConfiguration* config = nil;
+    [_webView takeSnapshotWithConfiguration:config completionHandler:^(UIImage * snapshotImage, NSError * error){
+        if (![_webView _page])
+            return;
+
+        [CATransaction begin];
+        [CATransaction setDisableActions:YES];
+        
+        [[_webViewPlaceholder layer] setContents:(id)[snapshotImage CGImage]];
+        replaceViewWithView(_webView, _webViewPlaceholder.get());
+
+        WKWebViewState().applyTo(_webView);
+        
+        [_webView setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+        [_webView setFrame:[_window bounds]];
+        [_window insertSubview:_webView atIndex:0];
+        [_webView _overrideLayoutParametersWithMinimumLayoutSize:[_window bounds].size maximumUnobscuredSizeOverride:[_window bounds].size];
+
+        [_webView setNeedsLayout];
+        [_webView layoutIfNeeded];
+        
+        [self _manager]->setAnimatingFullScreen(true);
+
+        _repaintCallback = VoidCallback::create([protectedSelf = retainPtr(self), self](WebKit::CallbackBase::Error) {
+            _repaintCallback = nullptr;
+            if (![_webView _page])
+                return;
+
+            [protectedSelf _manager]->willEnterFullScreen();
+        });
+        [_webView _page]->forceRepaint(_repaintCallback.copyRef());
+
+        [CATransaction commit];
+    }];
+}
+
+- (void)beganEnterFullScreenWithInitialFrame:(CGRect)initialFrame finalFrame:(CGRect)finalFrame
+{
+    if (_fullScreenState != WaitingToEnterFullScreen)
+        return;
+    _fullScreenState = EnteringFullScreen;
+
+    _initialFrame = initialFrame;
+    _finalFrame = finalFrame;
+
+    [CATransaction begin];
+    [CATransaction setDisableActions:YES];
+
+    [_webView removeFromSuperview];
+    [_fullscreenViewController setContentView:_webView];
+
+    [_window setWindowLevel:UIWindowLevelNormal];
+    [_window makeKeyAndVisible];
+    [_rootViewController setShowsStatusBar:YES];
+
+    [CATransaction commit];
+
+    [_viewControllerForPresentation presentViewController:_fullscreenViewController.get() animated:YES completion:^{
+        [self completedEnterFullScreen];
+        [_rootViewController setShowsStatusBar:NO];
+    }];
+}
+
+- (void)completedEnterFullScreen
+{
+    if (![_webView _page])
+        return;
+
+    _fullScreenState = InFullScreen;
+
+    [self _manager]->didEnterFullScreen();
+    [self _manager]->setAnimatingFullScreen(false);
+
+    [_webView _page]->setSuppressVisibilityUpdates(false);
+}
+
+- (void)exitFullScreen
+{
+    if (![self isFullScreen])
+        return;
+    _fullScreenState = WaitingToExitFullScreen;
+
+    [self _manager]->setAnimatingFullScreen(true);
+    [self _manager]->willExitFullScreen();
+}
+
+- (void)requestExitFullScreen
+{
+    [self _manager]->requestExitFullScreen();
+}
+
+- (void)beganExitFullScreenWithInitialFrame:(CGRect)initialFrame finalFrame:(CGRect)finalFrame
+{
+    if (_fullScreenState != WaitingToExitFullScreen)
+        return;
+    _fullScreenState = ExitingFullScreen;
+
+    _initialFrame = initialFrame;
+    _finalFrame = finalFrame;
+    
+    [_webView _page]->setSuppressVisibilityUpdates(true);
+
+    [_rootViewController setShowsStatusBar:YES];
+    [_fullscreenViewController dismissViewControllerAnimated:YES completion:^{
+        if (![_webView _page])
+            return;
+
+        [self completedExitFullScreen];
+        [_rootViewController setShowsStatusBar:NO];
+    }];
+}
+
+- (void)completedExitFullScreen
+{
+    if (_fullScreenState != ExitingFullScreen)
+        return;
+    _fullScreenState = NotInFullScreen;
+
+    [CATransaction begin];
+    [CATransaction setDisableActions:YES];
+
+    [[_webViewPlaceholder superview] insertSubview:_webView belowSubview:_webViewPlaceholder.get()];
+    [_webView setFrame:[_webViewPlaceholder frame]];
+    [_webView setAutoresizingMask:[_webViewPlaceholder autoresizingMask]];
+
+    [[_webView window] makeKeyAndVisible];
+
+    _viewState.applyTo(_webView);
+
+    [_webView setNeedsLayout];
+    [_webView layoutIfNeeded];
+
+    [CATransaction commit];
+
+    [_window setHidden:YES];
+    _window = nil;
+
+    [self _manager]->setAnimatingFullScreen(false);
+    [self _manager]->didExitFullScreen();
+
+    if (_repaintCallback) {
+        _repaintCallback->invalidate(WebKit::CallbackBase::Error::OwnerWasInvalidated);
+        ASSERT(!_repaintCallback);
+    }
+
+    _repaintCallback = VoidCallback::create([protectedSelf = retainPtr(self), self](WebKit::CallbackBase::Error) {
+        _repaintCallback = nullptr;
+        [_webViewPlaceholder removeFromSuperview];
+
+        if (![_webView _page])
+            return;
+
+        [_webView _page]->setSuppressVisibilityUpdates(false);
+    });
+
+    [_webView _page]->forceRepaint(_repaintCallback.copyRef());
+}
+
+- (void)exitFullscreenImmediately
+{
+    if (![self isFullScreen])
+        return;
+
+    if (![_webView _page])
+        return;
+
+    [self _manager]->requestExitFullScreen();
+    [self exitFullScreen];
+    _fullScreenState = ExitingFullScreen;
+    [self completedExitFullScreen];
+    replaceViewWithView(_webViewPlaceholder.get(), _webView);
+    [_webView _page]->setSuppressVisibilityUpdates(false);
+    [self _manager]->didExitFullScreen();
+    [self _manager]->setAnimatingFullScreen(false);
+    _webViewPlaceholder = nil;
+}
+
+- (void)close
+{
+    [self exitFullscreenImmediately];
+    _webView = nil;
+}
+
+- (void)webViewDidRemoveFromSuperviewWhileInFullscreen
+{
+    if (_fullScreenState == InFullScreen && _webView.window != _window.get())
+        [self exitFullscreenImmediately];
+}
+
+- (void)videoControlsManagerDidChange
+{
+}
+
+#pragma mark -
+#pragma mark Internal Interface
+
+- (WebFullScreenManagerProxy*)_manager
+{
+    if (![_webView _page])
+        return nullptr;
+    return [_webView _page]->fullScreenManager();
+}
+
+#pragma mark -
+#pragma mark UIViewControllerTransitioningDelegate
+
+- (id<UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source
+{
+    RetainPtr<WKFullscreenAnimationController> animationController = adoptNS([[WKFullscreenAnimationController alloc] init]);
+    [animationController setViewController:presented];
+    [animationController setInitialFrame:_initialFrame];
+    [animationController setFinalFrame:_finalFrame];
+    [animationController setAnimatingIn:YES];
+    return animationController.autorelease();
+}
+
+- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed
+{
+    RetainPtr<WKFullscreenAnimationController> animationController = adoptNS([[WKFullscreenAnimationController alloc] init]);
+    [animationController setViewController:dismissed];
+    [animationController setInitialFrame:_initialFrame];
+    [animationController setFinalFrame:_finalFrame];
+    [animationController setAnimatingIn:NO];
+    return animationController.autorelease();
+}
+
+@end
+
+#endif // PLATFORM(IOS) && ENABLE(FULLSCREEN_API)

Deleted: tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.cpp (229594 => 229595)


--- tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.cpp	2018-03-14 01:00:13 UTC (rev 229594)
+++ tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.cpp	2018-03-14 01:00:17 UTC (rev 229595)
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "FullscreenTouchSecheuristic.h"
-
-#if ENABLE(FULLSCREEN_API) && PLATFORM(IOS)
-
-#include <wtf/MonotonicTime.h>
-
-namespace WebKit {
-
-double FullscreenTouchSecheuristic::scoreOfNextTouch(CGPoint location)
-{
-    Seconds now = MonotonicTime::now().secondsSinceEpoch();
-
-    if (!m_lastTouchTime) {
-        m_lastTouchTime = WTFMove(now);
-        m_lastTouchLocation = WTFMove(location);
-        return 0;
-    }
-
-    Seconds deltaTime = now - m_lastTouchTime;
-
-    double coefficient = attenuationFactor(deltaTime);
-    m_lastScore = coefficient * distanceScore(location, m_lastTouchLocation, deltaTime) + (1 - coefficient) * m_lastScore;
-
-    m_lastTouchTime = now;
-    m_lastTouchLocation = location;
-    return m_lastScore;
-}
-
-void FullscreenTouchSecheuristic::reset()
-{
-    m_lastTouchTime = 0_s;
-    m_lastTouchLocation = { };
-    m_lastScore = 0;
-}
-
-double FullscreenTouchSecheuristic::distanceScore(const CGPoint& nextLocation, const CGPoint& lastLocation, const Seconds& deltaTime)
-{
-    double distance = sqrt(
-        m_xWeight * pow(nextLocation.x - lastLocation.x, 2) +
-        m_yWeight * pow(nextLocation.y - lastLocation.y, 2));
-    double sizeFactor = sqrt(
-        m_xWeight * pow(m_size.width, 2) +
-        m_yWeight * pow(m_size.height, 2));
-    double scaledDistance = distance / sizeFactor;
-    if (scaledDistance <= m_cutoff)
-        return scaledDistance * (m_rampUpSpeed / deltaTime);
-
-    double exponentialDistance = m_cutoff + pow((scaledDistance - m_cutoff) / (1 - m_cutoff), m_gamma);
-    return exponentialDistance * (m_rampUpSpeed / deltaTime);
-}
-
-double FullscreenTouchSecheuristic::attenuationFactor(Seconds delta)
-{
-    double normalizedTimeDelta = delta / m_rampDownSpeed;
-    return normalizedTimeDelta * m_weight;
-}
-
-}
-
-#endif // ENABLE(FULLSCREEN_API) && PLATFORM(IOS)

Deleted: tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.h (229594 => 229595)


--- tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.h	2018-03-14 01:00:13 UTC (rev 229594)
+++ tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.h	2018-03-14 01:00:17 UTC (rev 229595)
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if ENABLE(FULLSCREEN_API) && PLATFORM(IOS)
-
-#include <wtf/Seconds.h>
-
-namespace WebKit {
-
-class FullscreenTouchSecheuristic {
-public:
-    double scoreOfNextTouch(CGPoint location);
-    void reset();
-
-    void setRampUpSpeed(Seconds speed) { m_rampUpSpeed = speed; }
-    void setRampDownSpeed(Seconds speed) { m_rampDownSpeed = speed; }
-    void setXWeight(double weight) { m_xWeight = weight; }
-    void setYWeight(double weight) { m_yWeight = weight; }
-    void setSize(CGSize size) { m_size = size; }
-    void setGamma(double gamma) { m_gamma = gamma; }
-    void setGammaCutoff(double cutoff) { m_cutoff = cutoff; }
-
-private:
-    double distanceScore(const CGPoint& nextLocation, const CGPoint& lastLocation, const Seconds& deltaTime);
-    double attenuationFactor(Seconds delta);
-
-    double m_weight { 0.1 };
-    Seconds m_rampUpSpeed { 1 };
-    Seconds m_rampDownSpeed { 1 };
-    double m_xWeight { 1 };
-    double m_yWeight { 1 };
-    double m_gamma { 1 };
-    double m_cutoff { 1 };
-    CGSize m_size { };
-    Seconds m_lastTouchTime { 0 };
-    CGPoint m_lastTouchLocation { };
-    double m_lastScore { 0 };
-};
-
-}
-
-#endif // ENABLE(FULLSCREEN_API) && PLATFORM(IOS)

Deleted: tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.h (229594 => 229595)


--- tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.h	2018-03-14 01:00:13 UTC (rev 229594)
+++ tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.h	2018-03-14 01:00:17 UTC (rev 229595)
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if ENABLE(FULLSCREEN_API) && PLATFORM(IOS)
-
-#import <UIKit/UIViewController.h>
-
-@class WKWebView;
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface WKFullScreenViewController : UIViewController
-@property (retain, nonatomic) id target;
-@property (assign, nonatomic) SEL action;
-@property (retain, nonatomic) NSString *location;
-@property (assign, nonatomic) BOOL prefersStatusBarHidden;
-@property (assign, nonatomic, getter=isPlaying) BOOL playing;
-@property (assign, nonatomic, getter=isPictureInPictureActive) BOOL pictureInPictureActive;
-
-- (id)initWithWebView:(WKWebView *)webView;
-- (void)showUI;
-- (void)hideUI;
-- (void)videoControlsManagerDidChange;
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif // ENABLE(FULLSCREEN_API) && PLATFORM(IOS)

Deleted: tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm (229594 => 229595)


--- tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm	2018-03-14 01:00:13 UTC (rev 229594)
+++ tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm	2018-03-14 01:00:17 UTC (rev 229595)
@@ -1,443 +0,0 @@
-/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-
-#if ENABLE(FULLSCREEN_API) && PLATFORM(IOS)
-#import "WKFullScreenViewController.h"
-
-#import "FullscreenTouchSecheuristic.h"
-#import "PlaybackSessionManagerProxy.h"
-#import "UIKitSPI.h"
-#import "WKFullscreenStackView.h"
-#import "WKWebViewInternal.h"
-#import "WebFullScreenManagerProxy.h"
-#import "WebPageProxy.h"
-#import <WebCore/LocalizedStrings.h>
-#import <wtf/RetainPtr.h>
-
-using namespace WebCore;
-using namespace WebKit;
-
-static const NSTimeInterval showHideAnimationDuration = 0.1;
-static const NSTimeInterval autoHideDelay = 4.0;
-static const double requiredScore = 0.1;
-
-@class WKFullscreenStackView;
-
-class WKFullScreenViewControllerPlaybackSessionModelClient : PlaybackSessionModelClient {
-public:
-    void setParent(WKFullScreenViewController *parent) { m_parent = parent; }
-
-    void rateChanged(bool isPlaying, float) override
-    {
-        m_parent.playing = isPlaying;
-    }
-
-    void pictureInPictureActiveChanged(bool active) override
-    {
-        m_parent.pictureInPictureActive = active;
-    }
-
-    void setInterface(PlaybackSessionInterfaceAVKit* interface)
-    {
-        if (m_interface == interface)
-            return;
-
-        if (m_interface && m_interface->playbackSessionModel())
-            interface->playbackSessionModel()->removeClient(*this);
-        m_interface = interface;
-        if (m_interface && m_interface->playbackSessionModel())
-            interface->playbackSessionModel()->addClient(*this);
-    }
-
-private:
-    WKFullScreenViewController *m_parent { nullptr };
-    RefPtr<PlaybackSessionInterfaceAVKit> m_interface;
-};
-
-#pragma mark - _WKExtrinsicButton
-
-@interface _WKExtrinsicButton : UIButton
-@property (assign, nonatomic) CGSize extrinsicContentSize;
-@end
-
-@implementation _WKExtrinsicButton
-- (void)setExtrinsicContentSize:(CGSize)size
-{
-    _extrinsicContentSize = size;
-    [self invalidateIntrinsicContentSize];
-}
-
-- (CGSize)intrinsicContentSize
-{
-    return _extrinsicContentSize;
-}
-@end
-
-#pragma mark - WKFullScreenViewController
-
-@interface WKFullScreenViewController () <UIGestureRecognizerDelegate, UIToolbarDelegate>
-@property (assign, nonatomic) WKWebView *_webView; // Cannot be retained, see <rdar://problem/14884666>.
-@property (readonly, nonatomic) WebFullScreenManagerProxy* _manager;
-@property (readonly, nonatomic) CGFloat _effectiveFullscreenInsetTop;
-@end
-
-@implementation WKFullScreenViewController {
-    RetainPtr<UILongPressGestureRecognizer> _touchGestureRecognizer;
-    RetainPtr<WKFullscreenStackView> _stackView;
-    RetainPtr<_WKExtrinsicButton> _cancelButton;
-    RetainPtr<_WKExtrinsicButton> _pipButton;
-    RetainPtr<UIButton> _locationButton;
-    RetainPtr<UILayoutGuide> _topGuide;
-    RetainPtr<NSLayoutConstraint> _topConstraint;
-    WebKit::FullscreenTouchSecheuristic _secheuristic;
-    WKFullScreenViewControllerPlaybackSessionModelClient _playbackClient;
-    BOOL _hasControlsManager;
-    CGFloat _nonZeroStatusBarHeight;
-}
-
-#pragma mark - External Interface
-
-- (id)initWithWebView:(WKWebView *)webView
-{
-    self = [super init];
-    if (!self)
-        return nil;
-
-    _nonZeroStatusBarHeight = UIApplication.sharedApplication.statusBarFrame.size.height;
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_statusBarFrameDidChange:) name:UIApplicationDidChangeStatusBarFrameNotification object:nil];
-    _secheuristic.setRampUpSpeed(Seconds(0.25));
-    _secheuristic.setRampDownSpeed(Seconds(1.));
-    _secheuristic.setXWeight(0);
-    _secheuristic.setGamma(0.1);
-    _secheuristic.setGammaCutoff(0.08);
-
-    self._webView = webView;
-
-    _playbackClient.setParent(self);
-
-    return self;
-}
-
-- (void)dealloc
-{
-    [NSObject cancelPreviousPerformRequestsWithTarget:self];
-    [[NSNotificationCenter defaultCenter] removeObserver:self];
-
-    _playbackClient.setInterface(nullptr);
-
-    [super dealloc];
-}
-
-- (void)showUI
-{
-    [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(hideUI) object:nil];
-
-    if (_playing) {
-        NSTimeInterval hideDelay = autoHideDelay;
-        [self performSelector:@selector(hideUI) withObject:nil afterDelay:hideDelay];
-    }
-    [UIView animateWithDuration:showHideAnimationDuration animations:^{
-        [_stackView setHidden:NO];
-        [_stackView setAlpha:1];
-        self.prefersStatusBarHidden = NO;
-    }];
-}
-
-- (void)hideUI
-{
-    [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(hideUI) object:nil];
-    [UIView animateWithDuration:showHideAnimationDuration animations:^{
-        [self.view removeConstraints:@[_topConstraint.get()]];
-        _topConstraint = [[_topGuide topAnchor] constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor constant:self.view.safeAreaInsets.top];
-        [_topConstraint setActive:YES];
-        [_stackView setAlpha:0];
-        self.prefersStatusBarHidden = YES;
-    } completion:^(BOOL finished) {
-        if (!finished)
-            return;
-
-        [self.view removeConstraints:@[_topConstraint.get()]];
-        _topConstraint = [[_topGuide topAnchor] constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor];
-        [_topConstraint setActive:YES];
-        [_stackView setHidden:YES];
-    }];
-}
-
-- (void)videoControlsManagerDidChange
-{
-    WebPageProxy* page = [self._webView _page];
-    PlaybackSessionManagerProxy* playbackSessionManager = page ? page->playbackSessionManager() : nullptr;
-    PlatformPlaybackSessionInterface* playbackSessionInterface = playbackSessionManager ? playbackSessionManager->controlsManagerInterface() : nullptr;
-    _playbackClient.setInterface(playbackSessionInterface);
-
-    PlaybackSessionModel* playbackSessionModel = playbackSessionInterface ? playbackSessionInterface->playbackSessionModel() : nullptr;
-    _hasControlsManager = playbackSessionModel;
-    self.playing = playbackSessionModel ? playbackSessionModel->isPlaying() : NO;
-    [_pipButton setHidden:!playbackSessionModel];
-}
-
-@synthesize prefersStatusBarHidden=_prefersStatusBarHidden;
-
-- (void)setPrefersStatusBarHidden:(BOOL)value
-{
-    _prefersStatusBarHidden = value;
-    [self setNeedsStatusBarAppearanceUpdate];
-    [self _updateWebViewFullscreenInsets];
-}
-
-- (void)setPlaying:(BOOL)isPlaying
-{
-    if (_playing == isPlaying)
-        return;
-
-    _playing = isPlaying;
-    if (!_playing)
-        [self showUI];
-    else {
-        [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(hideUI) object:nil];
-        NSTimeInterval hideDelay = autoHideDelay;
-        [self performSelector:@selector(hideUI) withObject:nil afterDelay:hideDelay];
-    }
-}
-
-- (void)setPictureInPictureActive:(BOOL)active
-{
-    if (_pictureInPictureActive == active)
-        return;
-
-    _pictureInPictureActive = active;
-    [_pipButton setSelected:active];
-}
-
-#pragma mark - UIViewController Overrides
-
-- (void)loadView
-{
-    [self setView:adoptNS([[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]).get()];
-    self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
-
-    _cancelButton = [_WKExtrinsicButton buttonWithType:UIButtonTypeSystem];
-    [_cancelButton setTranslatesAutoresizingMaskIntoConstraints:NO];
-    [_cancelButton setAdjustsImageWhenHighlighted:NO];
-    [_cancelButton setExtrinsicContentSize:CGSizeMake(60.0, 47.0)];
-    [WKFullscreenStackView applyPrimaryGlyphTintToView:_cancelButton.get()];
-    NSBundle *bundle = [NSBundle bundleForClass:self.class];
-    UIImage *doneImage = [UIImage imageNamed:@"Done" inBundle:bundle compatibleWithTraitCollection:nil];
-    [_cancelButton setImage:[doneImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal];
-    [_cancelButton setTintColor:[UIColor whiteColor]];
-    [_cancelButton sizeToFit];
-    [_cancelButton addTarget:self action:@selector(_cancelAction:) forControlEvents:UIControlEventTouchUpInside];
-
-    _pipButton = [_WKExtrinsicButton buttonWithType:UIButtonTypeSystem];
-    [_pipButton setTranslatesAutoresizingMaskIntoConstraints:NO];
-    [_pipButton setAdjustsImageWhenHighlighted:NO];
-    [_pipButton setExtrinsicContentSize:CGSizeMake(60.0, 47.0)];
-    [WKFullscreenStackView applyPrimaryGlyphTintToView:_pipButton.get()];
-    UIImage *startPiPImage = [UIImage imageNamed:@"StartPictureInPictureButton" inBundle:bundle compatibleWithTraitCollection:nil];
-    UIImage *stopPiPImage = [UIImage imageNamed:@"StopPictureInPictureButton" inBundle:bundle compatibleWithTraitCollection:nil];
-    [_pipButton setImage:[startPiPImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal];
-    [_pipButton setImage:[stopPiPImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateSelected];
-    [_pipButton setTintColor:[UIColor whiteColor]];
-    [_pipButton sizeToFit];
-    [_pipButton addTarget:self action:@selector(_togglePiPAction:) forControlEvents:UIControlEventTouchUpInside];
-
-    _stackView = adoptNS([[WKFullscreenStackView alloc] initWithArrangedSubviews:@[_cancelButton.get(), _pipButton.get()] axis:UILayoutConstraintAxisHorizontal]);
-    [_stackView setTranslatesAutoresizingMaskIntoConstraints:NO];
-    [_stackView setTargetViewForSecondaryMaterialOverlay:_cancelButton.get()];
-    [[self view] addSubview:_stackView.get()];
-
-    UILayoutGuide *safeArea = self.view.safeAreaLayoutGuide;
-    UILayoutGuide *margins = self.view.layoutMarginsGuide;
-
-    _topGuide = adoptNS([[UILayoutGuide alloc] init]);
-    [self.view addLayoutGuide:_topGuide.get()];
-    NSLayoutAnchor *topAnchor = [_topGuide topAnchor];
-    _topConstraint = [topAnchor constraintEqualToAnchor:safeArea.topAnchor];
-    [NSLayoutConstraint activateConstraints:@[
-        _topConstraint.get(),
-        [[_stackView topAnchor] constraintEqualToAnchor:topAnchor],
-        [[_stackView leadingAnchor] constraintEqualToAnchor:margins.leadingAnchor],
-    ]];
-
-    [_stackView setAlpha:0];
-    [_stackView setHidden:YES];
-    [self videoControlsManagerDidChange];
-
-    _touchGestureRecognizer = adoptNS([[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(_touchDetected:)]);
-    [_touchGestureRecognizer setCancelsTouchesInView:NO];
-    [_touchGestureRecognizer setMinimumPressDuration:0];
-    [_touchGestureRecognizer setDelegate:self];
-    [self.view addGestureRecognizer:_touchGestureRecognizer.get()];
-}
-
-- (void)viewWillAppear:(BOOL)animated
-{
-    self._webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
-    self._webView.frame = self.view.bounds;
-    [self.view insertSubview:self._webView atIndex:0];
-
-    if (auto* manager = self._manager)
-        manager->setFullscreenAutoHideDelay(autoHideDelay);
-}
-
-- (void)viewDidLayoutSubviews
-{
-    [self _updateWebViewFullscreenInsets];
-    _secheuristic.setSize(self.view.bounds.size);
-}
-
-- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
-{
-    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
-    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
-        [self._webView _beginAnimatedResizeWithUpdates:^{
-            [self._webView _overrideLayoutParametersWithMinimumLayoutSize:size maximumUnobscuredSizeOverride:size];
-        }];
-        [self._webView _setInterfaceOrientationOverride:[UIApp statusBarOrientation]];
-    } completion:^(id <UIViewControllerTransitionCoordinatorContext>context) {
-        [self._webView _endAnimatedResize];
-    }];
-}
-
-- (UIStatusBarStyle)preferredStatusBarStyle
-{
-    return UIStatusBarStyleLightContent;
-}
-
-- (BOOL)prefersStatusBarHidden
-{
-    return _prefersStatusBarHidden;
-}
-
-#pragma mark - UIGestureRecognizerDelegate
-
-- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
-{
-    return YES;
-}
-
-- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
-{
-    [self showUI];
-    return YES;
-}
-
-#pragma mark - Internal Interface
-
-@dynamic _manager;
-- (WebFullScreenManagerProxy*)_manager
-{
-    if (auto* page = [self._webView _page])
-        return page->fullScreenManager();
-    return nullptr;
-}
-
-@dynamic _effectiveFullscreenInsetTop;
-- (CGFloat)_effectiveFullscreenInsetTop
-{
-    if (!self.prefersStatusBarHidden)
-        return 0;
-
-    CGRect cancelFrame = _cancelButton.get().frame;
-    CGPoint maxXY = CGPointMake(CGRectGetMaxX(cancelFrame), CGRectGetMaxY(cancelFrame));
-    return [_cancelButton convertPoint:maxXY toView:self.view].y;
-}
-
-- (void)_cancelAction:(id)sender
-{
-    [[self target] performSelector:[self action]];
-}
-
-- (void)_togglePiPAction:(id)sender
-{
-    WebPageProxy* page = [self._webView _page];
-    if (!page)
-        return;
-
-    PlaybackSessionManagerProxy* playbackSessionManager = page->playbackSessionManager();
-    if (!playbackSessionManager)
-        return;
-
-    PlatformPlaybackSessionInterface* playbackSessionInterface = playbackSessionManager->controlsManagerInterface();
-    if (!playbackSessionInterface)
-        return;
-
-    PlaybackSessionModel* playbackSessionModel = playbackSessionInterface->playbackSessionModel();
-    if (!playbackSessionModel)
-        return;
-
-    playbackSessionModel->togglePictureInPicture();
-}
-
-- (void)_touchDetected:(id)sender
-{
-    if ([_touchGestureRecognizer state] != UIGestureRecognizerStateBegan || [_touchGestureRecognizer state] == UIGestureRecognizerStateEnded) {
-        double score = _secheuristic.scoreOfNextTouch([_touchGestureRecognizer locationInView:self.view]);
-        if (score > requiredScore)
-            [self _showPhishingAlert];
-    }
-    [self showUI];
-}
-
-- (void)_statusBarFrameDidChange:(NSNotificationCenter *)notification
-{
-    CGFloat height = UIApplication.sharedApplication.statusBarFrame.size.height;
-    if (!height || height == _nonZeroStatusBarHeight)
-        return;
-
-    _nonZeroStatusBarHeight = height;
-    [self _updateWebViewFullscreenInsets];
-}
-
-- (void)_updateWebViewFullscreenInsets
-{
-    if (auto* manager = self._manager)
-        manager->setFullscreenInsetTop(self._effectiveFullscreenInsetTop);
-}
-
-- (void)_showPhishingAlert
-{
-    NSString *alertTitle = WEB_UI_STRING("Deceptive Website Warning", "Fullscreen Deceptive Website Warning Sheet Title");
-    NSString *alertMessage = [NSString stringWithFormat:WEB_UI_STRING("The website \"%@\" may be a deceptive website. Would you like to exit fullscreen?", "Fullscreen Deceptive Website Warning Sheet Content Text") , (NSString *)self.location];
-    UIAlertController* alert = [UIAlertController alertControllerWithTitle:alertTitle message:alertMessage preferredStyle:UIAlertControllerStyleAlert];
-
-    UIAlertAction* exitAction = [UIAlertAction actionWithTitle:WEB_UI_STRING("Exit Fullscreen", "Fullscreen Deceptive Website Exit Action") style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) {
-        [self _cancelAction:action];
-    }];
-
-    UIAlertAction* stayAction = [UIAlertAction actionWithTitle:WEB_UI_STRING("Stay in Fullscreen", "Fullscreen Deceptive Website Stay Action") style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
-        _secheuristic.reset();
-    }];
-
-    [alert addAction:exitAction];
-    [alert addAction:stayAction];
-    [self presentViewController:alert animated:YES completion:nil];
-}
-
-@end
-
-#endif // ENABLE(FULLSCREEN_API) && PLATFORM(IOS)

Deleted: tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h (229594 => 229595)


--- tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h	2018-03-14 01:00:13 UTC (rev 229594)
+++ tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h	2018-03-14 01:00:17 UTC (rev 229595)
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if ENABLE(FULLSCREEN_API) && PLATFORM(IOS)
-
-#import <UIKit/UIViewControllerTransitioning.h>
-
-@class WebCoreFullScreenPlaceholderView;
-@class WKWebView;
-
-@interface WKFullScreenWindowController : NSObject <UIViewControllerTransitioningDelegate>
-@property (readonly, retain, nonatomic) WebCoreFullScreenPlaceholderView *webViewPlaceholder;
-@property (readonly, assign, nonatomic) BOOL isFullScreen;
-
-- (id)initWithWebView:(WKWebView *)webView;
-- (void)enterFullScreen;
-- (void)beganEnterFullScreenWithInitialFrame:(CGRect)initialFrame finalFrame:(CGRect)finalFrame;
-- (void)requestExitFullScreen;
-- (void)exitFullScreen;
-- (void)beganExitFullScreenWithInitialFrame:(CGRect)initialFrame finalFrame:(CGRect)finalFrame;
-- (void)close;
-- (void)webViewDidRemoveFromSuperviewWhileInFullscreen;
-- (void)videoControlsManagerDidChange;
-
-@end
-
-#endif

Deleted: tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullscreenStackView.h (229594 => 229595)


--- tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullscreenStackView.h	2018-03-14 01:00:13 UTC (rev 229594)
+++ tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullscreenStackView.h	2018-03-14 01:00:17 UTC (rev 229595)
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if ENABLE(FULLSCREEN_API) && PLATFORM(IOS)
-
-#import <UIKit/UIView.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface WKFullscreenStackView : UIView
-+ (void)applyPrimaryGlyphTintToView:(UIView *)view;
-+ (void)applySecondaryGlyphTintToView:(UIView *)view;
-
-- (instancetype)initWithArrangedSubviews:(NSArray<UIView *> *)arrangedSubviews axis:(UILayoutConstraintAxis)axis;
-
-@property (nonatomic, retain, nullable) UIView *targetViewForSecondaryMaterialOverlay;
-@property (nonatomic, readonly) UIView *contentView;
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif // ENABLE(FULLSCREEN_API) && PLATFORM(IOS)

Deleted: tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullscreenStackView.mm (229594 => 229595)


--- tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullscreenStackView.mm	2018-03-14 01:00:13 UTC (rev 229594)
+++ tags/Safari-606.1.9/Source/WebKit/UIProcess/ios/fullscreen/WKFullscreenStackView.mm	2018-03-14 01:00:17 UTC (rev 229595)
@@ -1,236 +0,0 @@
-/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(FULLSCREEN_API) && PLATFORM(IOS)
-#include "WKFullscreenStackView.h"
-
-#import "UIKitSPI.h"
-#import <QuartzCore/CAFilter.h>
-#import <UIKit/UIVisualEffectView.h>
-#import <wtf/NeverDestroyed.h>
-#import <wtf/RetainPtr.h>
-
-static NSArray<UIVisualEffect *>* reducedTransparencyEffects()
-{
-    static NeverDestroyed<RetainPtr<NSArray<UIVisualEffect *>>> effects;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-        effects.get() = @[[UIVisualEffect effectCompositingColor:[UIColor colorWithRed:(43.0 / 255.0) green:(46.0 / 255.0) blue:(48.0 / 255.0) alpha:1.0] withMode:UICompositingModeNormal alpha:1.0]];
-    });
-    return effects.get().get();
-}
-
-static NSArray<UIVisualEffect *>* normalTransparencyEffects()
-{
-    static NeverDestroyed<RetainPtr<NSArray<UIVisualEffect *>>> effects;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-        effects.get() = @[
-            [UIVisualEffect effectCompositingColor:[UIColor blackColor] withMode:UICompositingModeNormal alpha:0.55],
-            [UIBlurEffect effectWithBlurRadius:UIRoundToScreenScale(17.5, [UIScreen mainScreen])],
-            [UIColorEffect colorEffectSaturate:1.8],
-            [UIVisualEffect effectCompositingColor:[UIColor whiteColor] withMode:UICompositingModeNormal alpha:0.14]
-        ];
-    });
-    return effects.get().get();
-}
-
-@interface UIVisualEffectView (WebKitPrivate)
-@property (nonatomic, readwrite, copy) NSArray<UIVisualEffect *> *backgroundEffects;
-@end
-
-@interface WKFullscreenStackView ()
-@property (nonatomic, readonly) UIStackView *_stackView;
-@property (nonatomic, readonly) UIVisualEffectView *_visualEffectView;
-@property (nonatomic) UIVisualEffectView *secondaryMaterialOverlayView;
-@property (nonatomic) NSArray<NSLayoutConstraint *> *secondaryMaterialOverlayViewConstraints;
-@end
-
-@implementation WKFullscreenStackView
-
-#pragma mark - Class Methods
-+ (NSArray<UIVisualEffect *> *)baseEffects
-{
-    if (UIAccessibilityIsReduceTransparencyEnabled())
-        return reducedTransparencyEffects();
-    return normalTransparencyEffects();
-}
-
-+ (void)configureView:(UIView *)view forTintEffectWithColor:(UIColor *)tintColor filterType:(NSString *)filterType
-{
-    if ([view isKindOfClass:[UILabel class]]) {
-        [(UILabel *)view setTextColor:tintColor];
-        [view setTintColor:tintColor];
-        [[view layer] setCompositingFilter:[CAFilter filterWithType:kCAFilterPlusL]];
-        return;
-    }
-
-    _UIVisualEffectTintLayerConfig *tintLayerConfig = [_UIVisualEffectTintLayerConfig layerWithTintColor:tintColor filterType:filterType];
-    [[[_UIVisualEffectConfig configWithContentConfig:tintLayerConfig] contentConfig] configureLayerView:view];
-}
-
-+ (void)configureView:(UIView *)view withBackgroundFillOfColor:(UIColor *)fillColor opacity:(CGFloat)opacity filter:(NSString *)filter
-{
-    _UIVisualEffectLayerConfig *baseLayerConfig = [_UIVisualEffectLayerConfig layerWithFillColor:fillColor opacity:opacity filterType:filter];
-    [[[_UIVisualEffectConfig configWithContentConfig:baseLayerConfig] contentConfig] configureLayerView:view];
-}
-
-+ (UIVisualEffectView *)secondaryMaterialOverlayView
-{
-    UIVisualEffectView *secondaryMaterialOverlayView = [[UIVisualEffectView alloc] initWithEffect:nil];
-    [secondaryMaterialOverlayView setUserInteractionEnabled:NO];
-    [secondaryMaterialOverlayView setBackgroundEffects:@[[UIVisualEffect effectCompositingColor:[UIColor blackColor] withMode:UICompositingModePlusDarker alpha:0.06]]];
-    return secondaryMaterialOverlayView;
-}
-
-#pragma mark - External Interface
-
-+ (void)applyPrimaryGlyphTintToView:(UIView *)view
-{
-    [self configureView:view forTintEffectWithColor:[UIColor colorWithWhite:1.0 alpha:0.75] filterType:kCAFilterPlusL];
-}
-
-+ (void)applySecondaryGlyphTintToView:(UIView *)view
-{
-    [self configureView:view forTintEffectWithColor:[UIColor colorWithWhite:1.0 alpha:0.55] filterType:kCAFilterPlusL];
-}
-
-- (instancetype)initWithArrangedSubviews:(NSArray<UIView *> *)arrangedSubviews axis:(UILayoutConstraintAxis)axis
-{
-    self = [self initWithFrame:CGRectMake(0, 0, 100, 100)];
-
-    if (!self)
-        return nil;
-
-    [self setClipsToBounds:YES];
-
-    _visualEffectView = [[UIVisualEffectView alloc] initWithEffect:nil];
-    [self addSubview:_visualEffectView];
-    [_visualEffectView setBackgroundEffects:[[self class] baseEffects]];
-
-    _stackView = [[UIStackView alloc] initWithArrangedSubviews:arrangedSubviews];
-    [_stackView setAxis:axis];
-    [_stackView setLayoutMarginsRelativeArrangement:YES];
-    [_stackView setInsetsLayoutMarginsFromSafeArea:NO];
-    [self insertSubview:_stackView above:_visualEffectView];
-
-    [self _setArrangedSubviews:arrangedSubviews axis:axis];
-
-    return self;
-}
-
-- (void)setTargetViewForSecondaryMaterialOverlay:(UIView *)targetViewForSecondaryMaterialOverlay
-{
-    if (_targetViewForSecondaryMaterialOverlay == targetViewForSecondaryMaterialOverlay)
-        return;
-
-    _targetViewForSecondaryMaterialOverlay = targetViewForSecondaryMaterialOverlay;
-    [self setNeedsUpdateConstraints];
-}
-
-- (UIView *)contentView
-{
-    return [_visualEffectView contentView];
-}
-
-#pragma mark - Internal Interface
-
-@synthesize _stackView=_stackView;
-@synthesize _visualEffectView=_visualEffectView;
-
-- (void)_setArrangedSubviews:(NSArray<UIView *> *)arrangedSubviews axis:(UILayoutConstraintAxis)axis
-{
-    for (UIView *view in [_stackView arrangedSubviews])
-        [view removeFromSuperview];
-
-    for (UIView *view in arrangedSubviews)
-        [_stackView addArrangedSubview:view];
-
-    [_stackView setAxis:axis];
-}
-
-#pragma mark - UIView Overrides
-
-- (void)setBounds:(CGRect)bounds
-{
-    CGSize oldSize = [self bounds].size;
-
-    [super setBounds:bounds];
-
-    if (!CGSizeEqualToSize(oldSize, bounds.size))
-        [self _setContinuousCornerRadius:((CGRectGetHeight(bounds) > 40.0) ? 16.0 : 8.0)];
-}
-
-- (void)updateConstraints
-{
-    if ([_stackView translatesAutoresizingMaskIntoConstraints] || [_visualEffectView translatesAutoresizingMaskIntoConstraints]) {
-        [_visualEffectView setTranslatesAutoresizingMaskIntoConstraints:NO];
-        [_stackView setTranslatesAutoresizingMaskIntoConstraints:NO];
-
-        NSArray<NSLayoutConstraint *> *constraints = @[
-            [[_visualEffectView leadingAnchor] constraintEqualToAnchor:[self leadingAnchor]],
-            [[_visualEffectView topAnchor] constraintEqualToAnchor:[self topAnchor]],
-            [[_visualEffectView trailingAnchor] constraintEqualToAnchor:[self trailingAnchor]],
-            [[_visualEffectView bottomAnchor] constraintEqualToAnchor:[self bottomAnchor]],
-            [[_stackView leadingAnchor] constraintEqualToAnchor:[self leadingAnchor]],
-            [[_stackView topAnchor] constraintEqualToAnchor:[self topAnchor]],
-            [[_stackView trailingAnchor] constraintEqualToAnchor:[self trailingAnchor]],
-            [[_stackView bottomAnchor] constraintEqualToAnchor:[self bottomAnchor]],
-        ];
-
-        for (NSLayoutConstraint *constraint in constraints)
-            [constraint setPriority:(UILayoutPriorityRequired - 1)];
-
-        [NSLayoutConstraint activateConstraints:constraints];
-    }
-
-    if ([[self targetViewForSecondaryMaterialOverlay] isDescendantOfView:self]) {
-        if (!_secondaryMaterialOverlayView) {
-            [self setSecondaryMaterialOverlayView:[[self class] secondaryMaterialOverlayView]];
-            [self addSubview:[self secondaryMaterialOverlayView]];
-        }
-
-        if ([[self secondaryMaterialOverlayView] isDescendantOfView:self] && !_secondaryMaterialOverlayViewConstraints) {
-            [[self secondaryMaterialOverlayView] setTranslatesAutoresizingMaskIntoConstraints:NO];
-            NSArray<NSLayoutConstraint *> *constraints = @[
-                [[_secondaryMaterialOverlayView centerXAnchor] constraintEqualToAnchor:[_targetViewForSecondaryMaterialOverlay centerXAnchor]],
-                [[_secondaryMaterialOverlayView centerYAnchor] constraintEqualToAnchor:[_targetViewForSecondaryMaterialOverlay centerYAnchor]],
-                [[_secondaryMaterialOverlayView widthAnchor] constraintEqualToAnchor:[_targetViewForSecondaryMaterialOverlay widthAnchor]],
-                [[_secondaryMaterialOverlayView heightAnchor] constraintEqualToAnchor:[_targetViewForSecondaryMaterialOverlay heightAnchor]]
-            ];
-            [self setSecondaryMaterialOverlayViewConstraints:constraints];
-            [NSLayoutConstraint activateConstraints:[self secondaryMaterialOverlayViewConstraints]];
-        }
-    } else
-        [_secondaryMaterialOverlayView removeFromSuperview];
-
-    [super updateConstraints];
-}
-
-@end
-
-#endif // ENABLE(FULLSCREEN_API) && PLATFORM(IOS)

Modified: tags/Safari-606.1.9/Source/WebKit/WebKit.xcodeproj/project.pbxproj (229594 => 229595)


--- tags/Safari-606.1.9/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2018-03-14 01:00:13 UTC (rev 229594)
+++ tags/Safari-606.1.9/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2018-03-14 01:00:17 UTC (rev 229595)
@@ -2025,12 +2025,8 @@
 		C9CD439E1B4B025300239E33 /* WKMediaSessionMetadata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C9CD43991B4B024200239E33 /* WKMediaSessionMetadata.cpp */; };
 		CD003A5219D49B5D005ABCE0 /* WebMediaKeyStorageManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD003A5019D49B5D005ABCE0 /* WebMediaKeyStorageManager.cpp */; };
 		CD003A5319D49B5D005ABCE0 /* WebMediaKeyStorageManager.h in Headers */ = {isa = PBXBuildFile; fileRef = CD003A5119D49B5D005ABCE0 /* WebMediaKeyStorageManager.h */; };
-		CD0C6831201FD10100A59409 /* WKFullScreenViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = CD0C682F201FD10100A59409 /* WKFullScreenViewController.h */; };
-		CD0C6832201FD10100A59409 /* WKFullScreenViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD0C6830201FD10100A59409 /* WKFullScreenViewController.mm */; };
 		CD19A26D1A13E82A008D650E /* WebDiagnosticLoggingClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD19A2691A13E820008D650E /* WebDiagnosticLoggingClient.cpp */; };
 		CD19A26E1A13E834008D650E /* WebDiagnosticLoggingClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CD19A26A1A13E821008D650E /* WebDiagnosticLoggingClient.h */; };
-		CD19D2EA2046406F0017074A /* FullscreenTouchSecheuristic.h in Headers */ = {isa = PBXBuildFile; fileRef = CD19D2E82046406F0017074A /* FullscreenTouchSecheuristic.h */; };
-		CD19D2EB2046406F0017074A /* FullscreenTouchSecheuristic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD19D2E92046406F0017074A /* FullscreenTouchSecheuristic.cpp */; };
 		CD491B071E70D05F00009066 /* UserMediaCaptureManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD491B051E70D05F00009066 /* UserMediaCaptureManager.cpp */; };
 		CD491B081E70D05F00009066 /* UserMediaCaptureManager.h in Headers */ = {isa = PBXBuildFile; fileRef = CD491B061E70D05F00009066 /* UserMediaCaptureManager.h */; };
 		CD491B0D1E732E4D00009066 /* UserMediaCaptureManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD491B0B1E732E4D00009066 /* UserMediaCaptureManagerMessageReceiver.cpp */; };
@@ -2060,8 +2056,6 @@
 		CDA29A291CBEB67A00901CCF /* PlaybackSessionManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = CDA29A251CBEB67A00901CCF /* PlaybackSessionManagerMessages.h */; };
 		CDA29A2A1CBEB67A00901CCF /* PlaybackSessionManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA29A261CBEB67A00901CCF /* PlaybackSessionManagerProxyMessageReceiver.cpp */; };
 		CDA29A2B1CBEB67A00901CCF /* PlaybackSessionManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = CDA29A271CBEB67A00901CCF /* PlaybackSessionManagerProxyMessages.h */; };
-		CDC2831D201BD79D00E6E745 /* WKFullscreenStackView.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC2831B201BD79D00E6E745 /* WKFullscreenStackView.h */; };
-		CDC2831E201BD79D00E6E745 /* WKFullscreenStackView.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC2831C201BD79D00E6E745 /* WKFullscreenStackView.mm */; };
 		CDC382FE17211799008A2FC3 /* SecItemShimLibrary.mm in Sources */ = {isa = PBXBuildFile; fileRef = 511F8A78138B460900A95F44 /* SecItemShimLibrary.mm */; };
 		CDC38307172117DD008A2FC3 /* CookieStorageShimLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDC382F9172116D3008A2FC3 /* CookieStorageShimLibrary.cpp */; };
 		CDC3830C17212282008A2FC3 /* CookieStorageShimLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC3830B172121CE008A2FC3 /* CookieStorageShimLibrary.h */; };
@@ -3293,8 +3287,8 @@
 		3F87B9BA15893F630090FF62 /* WebColorChooser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorChooser.cpp; sourceTree = "<group>"; };
 		3F87B9BB15893F630090FF62 /* WebColorChooser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorChooser.h; sourceTree = "<group>"; };
 		3F87B9BF158940D80090FF62 /* WebColorPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorPicker.h; sourceTree = "<group>"; };
-		3F915C0E1F564DED00183CE9 /* WKFullScreenWindowControllerIOS.mm */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFullScreenWindowControllerIOS.mm; path = ios/fullscreen/WKFullScreenWindowControllerIOS.mm; sourceTree = "<group>"; };
-		3F915C0F1F564DED00183CE9 /* WKFullScreenWindowControllerIOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKFullScreenWindowControllerIOS.h; path = ios/fullscreen/WKFullScreenWindowControllerIOS.h; sourceTree = "<group>"; };
+		3F915C0E1F564DED00183CE9 /* WKFullScreenWindowControllerIOS.mm */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFullScreenWindowControllerIOS.mm; path = ios/WKFullScreenWindowControllerIOS.mm; sourceTree = "<group>"; };
+		3F915C0F1F564DED00183CE9 /* WKFullScreenWindowControllerIOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKFullScreenWindowControllerIOS.h; path = ios/WKFullScreenWindowControllerIOS.h; sourceTree = "<group>"; };
 		3FB08E421F60B240005E5312 /* iOS.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = iOS.xcassets; sourceTree = "<group>"; };
 		410482CB1DDD2FB500F006D0 /* RTCNetwork.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCNetwork.cpp; sourceTree = "<group>"; };
 		410482CC1DDD2FB500F006D0 /* RTCNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCNetwork.h; sourceTree = "<group>"; };
@@ -4539,12 +4533,8 @@
 		C9CD439A1B4B024200239E33 /* WKMediaSessionMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKMediaSessionMetadata.h; sourceTree = "<group>"; };
 		CD003A5019D49B5D005ABCE0 /* WebMediaKeyStorageManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebMediaKeyStorageManager.cpp; path = MediaCache/WebMediaKeyStorageManager.cpp; sourceTree = "<group>"; };
 		CD003A5119D49B5D005ABCE0 /* WebMediaKeyStorageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebMediaKeyStorageManager.h; path = MediaCache/WebMediaKeyStorageManager.h; sourceTree = "<group>"; };
-		CD0C682F201FD10100A59409 /* WKFullScreenViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKFullScreenViewController.h; path = ios/fullscreen/WKFullScreenViewController.h; sourceTree = "<group>"; };
-		CD0C6830201FD10100A59409 /* WKFullScreenViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFullScreenViewController.mm; path = ios/fullscreen/WKFullScreenViewController.mm; sourceTree = "<group>"; };
 		CD19A2691A13E820008D650E /* WebDiagnosticLoggingClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebDiagnosticLoggingClient.cpp; sourceTree = "<group>"; };
 		CD19A26A1A13E821008D650E /* WebDiagnosticLoggingClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDiagnosticLoggingClient.h; sourceTree = "<group>"; };
-		CD19D2E82046406F0017074A /* FullscreenTouchSecheuristic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FullscreenTouchSecheuristic.h; path = ios/fullscreen/FullscreenTouchSecheuristic.h; sourceTree = "<group>"; };
-		CD19D2E92046406F0017074A /* FullscreenTouchSecheuristic.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = FullscreenTouchSecheuristic.cpp; path = ios/fullscreen/FullscreenTouchSecheuristic.cpp; sourceTree = "<group>"; };
 		CD491B051E70D05F00009066 /* UserMediaCaptureManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMediaCaptureManager.cpp; sourceTree = "<group>"; };
 		CD491B061E70D05F00009066 /* UserMediaCaptureManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserMediaCaptureManager.h; sourceTree = "<group>"; };
 		CD491B0A1E732D1200009066 /* UserMediaCaptureManager.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = UserMediaCaptureManager.messages.in; sourceTree = "<group>"; };
@@ -4584,8 +4574,6 @@
 		CDA29A251CBEB67A00901CCF /* PlaybackSessionManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaybackSessionManagerMessages.h; sourceTree = "<group>"; };
 		CDA29A261CBEB67A00901CCF /* PlaybackSessionManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlaybackSessionManagerProxyMessageReceiver.cpp; sourceTree = "<group>"; };
 		CDA29A271CBEB67A00901CCF /* PlaybackSessionManagerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaybackSessionManagerProxyMessages.h; sourceTree = "<group>"; };
-		CDC2831B201BD79D00E6E745 /* WKFullscreenStackView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKFullscreenStackView.h; path = ios/fullscreen/WKFullscreenStackView.h; sourceTree = "<group>"; };
-		CDC2831C201BD79D00E6E745 /* WKFullscreenStackView.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFullscreenStackView.mm; path = ios/fullscreen/WKFullscreenStackView.mm; sourceTree = "<group>"; };
 		CDC382F717211506008A2FC3 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = /System/Library/Frameworks/CFNetwork.framework; sourceTree = "<absolute>"; };
 		CDC382F9172116D3008A2FC3 /* CookieStorageShimLibrary.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CookieStorageShimLibrary.cpp; sourceTree = "<group>"; };
 		CDC3830617211799008A2FC3 /* WebProcessShim.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = WebProcessShim.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -5777,7 +5765,6 @@
 			isa = PBXGroup;
 			children = (
 				C54256AE18BEC16100DE4179 /* forms */,
-				CDC2831A201BD75600E6E745 /* fullscreen */,
 				A115DC6E191D82AB00DA8072 /* _WKWebViewPrintFormatter.h */,
 				A115DC6D191D82AB00DA8072 /* _WKWebViewPrintFormatter.mm */,
 				A19DD3BF1D07D16800AC823B /* _WKWebViewPrintFormatterInternal.h */,
@@ -5809,6 +5796,8 @@
 				0FCB4E3D18BBE044000FCFC9 /* WKContentView.mm */,
 				0FCB4E6A18BBF26A000FCFC9 /* WKContentViewInteraction.h */,
 				0FCB4E6B18BBF26A000FCFC9 /* WKContentViewInteraction.mm */,
+				3F915C0F1F564DED00183CE9 /* WKFullScreenWindowControllerIOS.h */,
+				3F915C0E1F564DED00183CE9 /* WKFullScreenWindowControllerIOS.mm */,
 				0FCB4E3F18BBE044000FCFC9 /* WKGeolocationProviderIOS.h */,
 				0FCB4E4018BBE044000FCFC9 /* WKGeolocationProviderIOS.mm */,
 				0FCB4E4118BBE044000FCFC9 /* WKGeolocationProviderIOSObjCSecurityOrigin.mm */,
@@ -8489,21 +8478,6 @@
 			name = FullScreen;
 			sourceTree = "<group>";
 		};
-		CDC2831A201BD75600E6E745 /* fullscreen */ = {
-			isa = PBXGroup;
-			children = (
-				CDC2831B201BD79D00E6E745 /* WKFullscreenStackView.h */,
-				CDC2831C201BD79D00E6E745 /* WKFullscreenStackView.mm */,
-				CD0C682F201FD10100A59409 /* WKFullScreenViewController.h */,
-				CD0C6830201FD10100A59409 /* WKFullScreenViewController.mm */,
-				3F915C0F1F564DED00183CE9 /* WKFullScreenWindowControllerIOS.h */,
-				3F915C0E1F564DED00183CE9 /* WKFullScreenWindowControllerIOS.mm */,
-				CD19D2E82046406F0017074A /* FullscreenTouchSecheuristic.h */,
-				CD19D2E92046406F0017074A /* FullscreenTouchSecheuristic.cpp */,
-			);
-			name = fullscreen;
-			sourceTree = "<group>";
-		};
 		CDCA85E4132AD33000E961DF /* mac */ = {
 			isa = PBXGroup;
 			children = (
@@ -8829,7 +8803,6 @@
 				9955A6F51C7986E000EB6A93 /* AutomationBackendDispatchers.h in Headers */,
 				99C81D5A1C20E7E2005C4C82 /* AutomationClient.h in Headers */,
 				99249AD61F1F1E5F00B62FBB /* AutomationFrontendDispatchers.h in Headers */,
-				CD19D2EA2046406F0017074A /* FullscreenTouchSecheuristic.h in Headers */,
 				9955A6F71C7986E500EB6A93 /* AutomationProtocolObjects.h in Headers */,
 				990D28BB1C6539D300986977 /* AutomationSessionClient.h in Headers */,
 				CDA041F41ACE2105004A13EC /* BackBoardServicesSPI.h in Headers */,
@@ -8845,7 +8818,6 @@
 				1AA2E51D12E4C05E00BC4966 /* CGUtilities.h in Headers */,
 				1A2D956F12848564001EB962 /* ChildProcess.h in Headers */,
 				51FAEC3A1B0657630009C4E7 /* ChildProcessMessages.h in Headers */,
-				CDC2831D201BD79D00E6E745 /* WKFullscreenStackView.h in Headers */,
 				E1513C67166EABB200149FCB /* ChildProcessProxy.h in Headers */,
 				290F4272172A0C7400939FF0 /* ChildProcessSupplement.h in Headers */,
 				CE11AD521CBC482F00681EE5 /* CodeSigning.h in Headers */,
@@ -9390,7 +9362,6 @@
 				934B724419F5B9BE00AE96D6 /* WKActionMenuItemTypes.h in Headers */,
 				939F401C19FB0BBC002B2B42 /* WKActionMenuTypes.h in Headers */,
 				0FCB4E4818BBE044000FCFC9 /* WKActionSheet.h in Headers */,
-				CD0C6831201FD10100A59409 /* WKFullScreenViewController.h in Headers */,
 				0FCB4E4A18BBE044000FCFC9 /* WKActionSheetAssistant.h in Headers */,
 				C5FA1ED318E1062200B3F402 /* WKAirPlayRoutePicker.h in Headers */,
 				BCDDB32D124EC2E10048D13C /* WKAPICast.h in Headers */,
@@ -10483,7 +10454,6 @@
 				990D28BC1C6539DA00986977 /* AutomationSessionClient.mm in Sources */,
 				46A2B6081E5676A600C3DEDA /* BackgroundProcessResponsivenessTimer.cpp in Sources */,
 				E164A2F1191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.cpp in Sources */,
-				CD19D2EB2046406F0017074A /* FullscreenTouchSecheuristic.cpp in Sources */,
 				E170876B16D6CA6900F99226 /* BlobRegistryProxy.cpp in Sources */,
 				BCF18638167D071E00A1A85A /* CacheModel.cpp in Sources */,
 				41897ED71F415D8A0016FA42 /* CacheStorageEngine.cpp in Sources */,
@@ -10571,7 +10541,6 @@
 				1AE4987911FF7FAA0048B464 /* JSNPObject.cpp in Sources */,
 				BCE0937714FB128C001138D9 /* LayerHostingContext.mm in Sources */,
 				0F0C365E18C110A500F607D7 /* LayerRepresentation.mm in Sources */,
-				CDC2831E201BD79D00E6E745 /* WKFullscreenStackView.mm in Sources */,
 				1A92DC1312F8BAB90017AF65 /* LayerTreeContext.cpp in Sources */,
 				1AFDE64519510B5500C48FFA /* LegacyBundleForClass.mm in Sources */,
 				5CFECB041E1ED1CC00F88504 /* LegacyCustomProtocolManager.cpp in Sources */,
@@ -11070,7 +11039,6 @@
 				BC3066BE125A442100E71278 /* WebProcessMessageReceiver.cpp in Sources */,
 				7CE4D21A1A4914A300C7F152 /* WebProcessPool.cpp in Sources */,
 				7CE4D2161A49148400C7F152 /* WebProcessPoolCocoa.mm in Sources */,
-				CD0C6832201FD10100A59409 /* WKFullScreenViewController.mm in Sources */,
 				7CE4D2271A4916C200C7F152 /* WebProcessPoolMessageReceiver.cpp in Sources */,
 				BC111B11112F5E4F00337BAB /* WebProcessProxy.cpp in Sources */,
 				1A04F6191A4A3A7A00A21B6E /* WebProcessProxyCocoa.mm in Sources */,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to