Title: [201758] trunk/Source/WebKit/mac
- Revision
- 201758
- Author
- [email protected]
- Date
- 2016-06-07 11:13:26 -0700 (Tue, 07 Jun 2016)
Log Message
Adopt [PDFView documentScrollView]
https://bugs.webkit.org/show_bug.cgi?id=158454
rdar://problem/25875390
Reviewed by Tim Horton.
* WebView/PDFViewSPI.h: Added.
* WebView/WebPDFView.mm:
(-[WebPDFView _clipViewForPDFDocumentView]):
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (201757 => 201758)
--- trunk/Source/WebKit/mac/ChangeLog 2016-06-07 17:53:15 UTC (rev 201757)
+++ trunk/Source/WebKit/mac/ChangeLog 2016-06-07 18:13:26 UTC (rev 201758)
@@ -1,3 +1,15 @@
+2016-06-07 Alex Christensen <[email protected]>
+
+ Adopt [PDFView documentScrollView]
+ https://bugs.webkit.org/show_bug.cgi?id=158454
+ rdar://problem/25875390
+
+ Reviewed by Tim Horton.
+
+ * WebView/PDFViewSPI.h: Added.
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView _clipViewForPDFDocumentView]):
+
2016-06-05 Anders Carlsson <[email protected]>
Attempt to fix plug-in hangs by adding back empty slots for the removed messages.
Added: trunk/Source/WebKit/mac/WebView/PDFViewSPI.h (0 => 201758)
--- trunk/Source/WebKit/mac/WebView/PDFViewSPI.h (rev 0)
+++ trunk/Source/WebKit/mac/WebView/PDFViewSPI.h 2016-06-07 18:13:26 UTC (rev 201758)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2016 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 USE(APPLE_INTERNAL_SDK)
+
+#import <PDFKit/PDFViewPriv.h>
+
+#else
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+
+@interface PDFView ()
+- (PDFKitPlatformScrollView *)documentScrollView;
+@end
+
+#endif
+
+#endif
Modified: trunk/Source/WebKit/mac/WebView/WebPDFView.mm (201757 => 201758)
--- trunk/Source/WebKit/mac/WebView/WebPDFView.mm 2016-06-07 17:53:15 UTC (rev 201757)
+++ trunk/Source/WebKit/mac/WebView/WebPDFView.mm 2016-06-07 18:13:26 UTC (rev 201758)
@@ -32,6 +32,7 @@
#import "DOMNodeInternal.h"
#import "DOMRangeInternal.h"
+#import "PDFViewSPI.h"
#import "WebDataSourceInternal.h"
#import "WebDelegateImplementationCaching.h"
#import "WebDocumentInternal.h"
@@ -1134,7 +1135,11 @@
- (NSClipView *)_clipViewForPDFDocumentView
{
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+ NSClipView *clipView = (NSClipView *)[[PDFSubview documentScrollView] contentView];
+#else
NSClipView *clipView = (NSClipView *)[[PDFSubview documentView] _web_superviewOfClass:[NSClipView class]];
+#endif
ASSERT(clipView);
return clipView;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes