Title: [177475] branches/safari-600.3-branch/Source

Diff

Modified: branches/safari-600.3-branch/Source/WebCore/ChangeLog (177474 => 177475)


--- branches/safari-600.3-branch/Source/WebCore/ChangeLog	2014-12-18 00:25:14 UTC (rev 177474)
+++ branches/safari-600.3-branch/Source/WebCore/ChangeLog	2014-12-18 00:25:19 UTC (rev 177475)
@@ -1,3 +1,20 @@
+2014-12-17  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r177409. rdar://problem/19271854
+
+    2014-12-16  Beth Dakin  <bda...@apple.com>
+
+            REGRESSION: Preview popovers obscure the link, look wrong
+            https://bugs.webkit.org/show_bug.cgi?id=139711
+            -and corresponding-
+            rdar://problem/19271854
+
+            Reviewed by Tim Horton.
+
+            New SPI.
+            * WebCore.xcodeproj/project.pbxproj:
+            * platform/spi/mac/NSPopoverSPI.h: Added.
+
 2014-12-16  Dana Burkart  <dburk...@apple.com>
 
         Merged r177326. <rdar://problem/19198414>

Modified: branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (177474 => 177475)


--- branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-12-18 00:25:14 UTC (rev 177474)
+++ branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-12-18 00:25:19 UTC (rev 177475)
@@ -3404,6 +3404,7 @@
 		93F1D5BB12D532C400832BEC /* WebGLLoseContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F1D5B812D532C400832BEC /* WebGLLoseContext.h */; };
 		93F1D5C012D5335600832BEC /* JSWebGLLoseContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F1D5BE12D5335600832BEC /* JSWebGLLoseContext.cpp */; };
 		93F1D5C112D5335600832BEC /* JSWebGLLoseContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F1D5BF12D5335600832BEC /* JSWebGLLoseContext.h */; };
+		93F1E1EC1A40FDDC00348D13 /* NSPopoverSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F1E1EB1A40FDDC00348D13 /* NSPopoverSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		93F6F1ED127F70B10055CB06 /* WebGLContextEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F6F1EA127F70B10055CB06 /* WebGLContextEvent.cpp */; };
 		93F6F1EE127F70B10055CB06 /* WebGLContextEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F6F1EB127F70B10055CB06 /* WebGLContextEvent.h */; };
 		93F925430F7EF5B8007E37C9 /* CheckedRadioButtons.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F925410F7EF5B8007E37C9 /* CheckedRadioButtons.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -10563,6 +10564,7 @@
 		93F1D5B912D532C400832BEC /* WebGLLoseContext.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGLLoseContext.idl; path = canvas/WebGLLoseContext.idl; sourceTree = "<group>"; };
 		93F1D5BE12D5335600832BEC /* JSWebGLLoseContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLLoseContext.cpp; sourceTree = "<group>"; };
 		93F1D5BF12D5335600832BEC /* JSWebGLLoseContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLLoseContext.h; sourceTree = "<group>"; };
+		93F1E1EB1A40FDDC00348D13 /* NSPopoverSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSPopoverSPI.h; sourceTree = "<group>"; };
 		93F6F1EA127F70B10055CB06 /* WebGLContextEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLContextEvent.cpp; path = canvas/WebGLContextEvent.cpp; sourceTree = "<group>"; };
 		93F6F1EB127F70B10055CB06 /* WebGLContextEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLContextEvent.h; path = canvas/WebGLContextEvent.h; sourceTree = "<group>"; };
 		93F6F1EC127F70B10055CB06 /* WebGLContextEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGLContextEvent.idl; path = canvas/WebGLContextEvent.idl; sourceTree = "<group>"; };
@@ -17656,6 +17658,7 @@
 				2D413F601A187A3F0041A521 /* LookupSPI.h */,
 				9321D58F1A3906FA008052BE /* NSImmediateActionGestureRecognizerSPI.h */,
 				937F4CCD1A2D4B0100BB39F5 /* NSMenuSPI.h */,
+				93F1E1EB1A40FDDC00348D13 /* NSPopoverSPI.h */,
 				2DCB837719F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h */,
 				2DCB837819F99BBA00A7FBE4 /* NSSharingServiceSPI.h */,
 				9348428119F1A9190009D5AE /* NSViewSPI.h */,
@@ -26020,6 +26023,7 @@
 				BC6D6E2609AF943500F59759 /* ScrollView.h in Headers */,
 				F55B3DD21251F12D003EF269 /* SearchInputType.h in Headers */,
 				AB7170890B3118080017123E /* SearchPopupMenu.h in Headers */,
+				93F1E1EC1A40FDDC00348D13 /* NSPopoverSPI.h in Headers */,
 				976F36EB14686225005E93B4 /* SecurityContext.h in Headers */,
 				BCD0E0FB0E972C3500265DEA /* SecurityOrigin.h in Headers */,
 				BCD0E0FC0E972C3500265DEA /* SecurityOriginHash.h in Headers */,

Added: branches/safari-600.3-branch/Source/WebCore/platform/spi/mac/NSPopoverSPI.h (0 => 177475)


--- branches/safari-600.3-branch/Source/WebCore/platform/spi/mac/NSPopoverSPI.h	                        (rev 0)
+++ branches/safari-600.3-branch/Source/WebCore/platform/spi/mac/NSPopoverSPI.h	2014-12-18 00:25:19 UTC (rev 177475)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2014 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. ``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
+ * 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  __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+
+#import "NSImmediateActionGestureRecognizerSPI.h"
+
+// FIXME: This header should include system headers when possible.
+
+@interface NSPopoverAnimationController : NSObject <NSImmediateActionAnimationController>
++ (instancetype)popoverAnimationControllerWithPopover:(NSPopover *)popover;
+
+@property (readonly) NSPopover *popover;
+@property NSRectEdge preferredEdge;
+@property (weak) NSView *anchorView;
+@property NSRect positioningRect;
+@end
+
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000

Modified: branches/safari-600.3-branch/Source/WebKit2/ChangeLog (177474 => 177475)


--- branches/safari-600.3-branch/Source/WebKit2/ChangeLog	2014-12-18 00:25:14 UTC (rev 177474)
+++ branches/safari-600.3-branch/Source/WebKit2/ChangeLog	2014-12-18 00:25:19 UTC (rev 177475)
@@ -1,5 +1,23 @@
 2014-12-17  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r177409. rdar://problem/19271854
+
+    2014-12-16  Beth Dakin  <bda...@apple.com>
+
+            REGRESSION: Preview popovers obscure the link, look wrong
+            https://bugs.webkit.org/show_bug.cgi?id=139711
+            -and corresponding-
+            rdar://problem/19271854
+
+            Reviewed by Tim Horton.
+
+            Switch to using NSPopoverAnimationController.
+            * UIProcess/mac/WKImmediateActionController.mm:
+            (-[WKImmediateActionController _defaultAnimationController]):
+            (-[WKImmediateActionController _animationControllerForCustomPreview]):
+
+2014-12-17  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r177402. rdar://problem/19266297
 
     2014-12-16  Conrad Shultz  <conrad_shu...@apple.com>

Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm (177474 => 177475)


--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm	2014-12-18 00:25:14 UTC (rev 177474)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm	2014-12-18 00:25:19 UTC (rev 177475)
@@ -39,6 +39,7 @@
 #import <WebCore/GeometryUtilities.h>
 #import <WebCore/LookupSPI.h>
 #import <WebCore/NSMenuSPI.h>
+#import <WebCore/NSPopoverSPI.h>
 #import <WebCore/QuickLookMacSPI.h>
 #import <WebCore/SoftLinking.h>
 #import <WebCore/URL.h>
@@ -225,6 +226,8 @@
 
 #if WK_API_ENABLED
         [self _createPreviewPopoverIfNeededForURL:absoluteLinkURL];
+        if (id<NSImmediateActionAnimationController> previewController = [self _animationControllerForCustomPreview])
+            return previewController;
         return (id<NSImmediateActionAnimationController>)_previewPopover.get();
 #else
         return nil;
@@ -416,6 +419,18 @@
     return computedTargetSize;
 }
 
+- (id<NSImmediateActionAnimationController>)_animationControllerForCustomPreview
+{
+    Class nsPopoverAnimationControllerClass = NSClassFromString(@"NSPopoverAnimationController");
+    if (!nsPopoverAnimationControllerClass)
+        return nil;
+    NSPopoverAnimationController *popoverController = [NSPopoverAnimationController popoverAnimationControllerWithPopover:_previewPopover.get()];
+    popoverController.preferredEdge = NSMaxYEdge;
+    popoverController.anchorView = _wkView;
+    popoverController.positioningRect = _popoverOriginRect;
+    return popoverController;
+}
+
 #pragma mark WKPagePreviewViewControllerDelegate
 
 - (NSView *)pagePreviewViewController:(WKPagePreviewViewController *)pagePreviewViewController viewForPreviewingURL:(NSURL *)url initialFrameSize:(NSSize)initialFrameSize
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to