Remove code to recompute rounded window corners
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jul 2015 00:00:12 +0000 (00:00 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jul 2015 00:00:12 +0000 (00:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146534

Reviewed by Simon Fraser.

This code is no longer needed since we're always layer-backed now.

* UIProcess/API/mac/WKView.mm:
(-[WKView displayIfNeeded]): Deleted.
(-[WKView _cacheWindowBottomCornerRect]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186204 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/API/mac/WKViewInternal.h

index 232b949..efe889b 100644 (file)
@@ -1,3 +1,17 @@
+2015-07-01  Anders Carlsson  <andersca@apple.com>
+
+        Remove code to recompute rounded window corners
+        https://bugs.webkit.org/show_bug.cgi?id=146534
+
+        Reviewed by Simon Fraser.
+
+        This code is no longer needed since we're always layer-backed now.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView displayIfNeeded]): Deleted.
+        (-[WKView _cacheWindowBottomCornerRect]): Deleted.
+        * UIProcess/API/mac/WKViewInternal.h:
+
 2015-07-01  Yongjun Zhang  <yongjun_zhang@apple.com>
 
         Web page doesn't update its loading state when web process becomes suspended if there are pending network requests (XHR).
index d619839..d5515ae 100644 (file)
 @end
 
 @interface NSWindow (WKNSWindowDetails)
-- (NSRect)_intersectBottomCornersWithRect:(NSRect)viewRect;
-- (void)_maskRoundedBottomCorners:(NSRect)clipRect;
 - (id)_newFirstResponderAfterResigning;
 @end
 
@@ -236,8 +234,6 @@ struct WKViewInterpretKeyEventsParameters {
 
     BOOL _inSecureInputState;
 
-    NSRect _windowBottomCornerIntersectionRect;
-    
     BOOL _shouldDeferViewInWindowChanges;
     NSWindow *_targetWindowForMovePreparation;
 
@@ -1201,25 +1197,6 @@ static NSToolbarItem *toolbarItem(id <NSValidatedUserInterfaceItem> item)
     _data->_page->capitalizeWord();
 }
 
-- (void)displayIfNeeded
-{
-    // FIXME: We should remove this code when <rdar://problem/9362085> is resolved. In the meantime,
-    // it is necessary to disable scren updates so we get a chance to redraw the corners before this 
-    // display is visible.
-    NSWindow *window = [self window];
-    BOOL shouldMaskWindow = window && !NSIsEmptyRect(_data->_windowBottomCornerIntersectionRect);
-    if (shouldMaskWindow)
-        NSDisableScreenUpdates();
-
-    [super displayIfNeeded];
-
-    if (shouldMaskWindow) {
-        [window _maskRoundedBottomCorners:_data->_windowBottomCornerIntersectionRect];
-        NSEnableScreenUpdates();
-        _data->_windowBottomCornerIntersectionRect = NSZeroRect;
-    }
-}
-
 // Events
 
 // Override this so that AppKit will send us arrow keys as key down events so we can
@@ -3728,18 +3705,6 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
     [self invalidateIntrinsicContentSize];
 }
 
-- (void)_cacheWindowBottomCornerRect
-{
-    // FIXME: We should remove this code when <rdar://problem/9362085> is resolved.
-    NSWindow *window = [self window];
-    if (!window)
-        return;
-
-    _data->_windowBottomCornerIntersectionRect = [window _intersectBottomCornersWithRect:[self convertRect:[self visibleRect] toView:nil]];
-    if (!NSIsEmptyRect(_data->_windowBottomCornerIntersectionRect))
-        [self setNeedsDisplayInRect:[self convertRect:_data->_windowBottomCornerIntersectionRect fromView:nil]];
-}
-
 - (NSInteger)spellCheckerDocumentTag
 {
     if (!_data->_hasSpellCheckerDocumentTag) {
index f0cb742..2eae69c 100644 (file)
@@ -112,8 +112,6 @@ struct WebPageConfiguration;
 
 - (WebKit::ColorSpaceData)_colorSpace;
 
-- (void)_cacheWindowBottomCornerRect;
-
 - (NSInteger)spellCheckerDocumentTag;
 - (void)handleAcceptedAlternativeText:(NSString*)text;