Reviewed by Kevin Decker
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Oct 2006 18:43:01 +0000 (18:43 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Oct 2006 18:43:01 +0000 (18:43 +0000)
        - fixed <rdar://problem/4792761> Safari should use fancier embedded PDFKit stuff when it's available

        * WebKit.xcodeproj/project.pbxproj:
        version wars

        * WebView/WebFrameView.m:
        (-[WebFrameView _makeDocumentViewForDataSource:]):
        initialize document view with frame view's rect instead of empty rect. This avoids some problems when
        constructing view hierarchies from nibs

        * WebView/WebPreferencesPrivate.h:
        declare new _usePDFPreviewView and _setUsePDFPreviewView:, used for debugging
        * WebView/WebPreferenceKeysPrivate.h:
        declare new preference key string
        * WebView/WebPreferences.m:
        (+[WebPreferences initialize]):
        initialize new preference to true (we will by default use the new view if it's available)
        (-[WebPreferences _usePDFPreviewView]):
        new accessor for new pref
        (-[WebPreferences _setUsePDFPreviewView:]):
        ditto

        * WebView/WebPDFView.h:
        new previewView ivar

        * WebView/WebPDFView.m:
        (+[WebPDFView PDFPreviewViewClass]):
        new method, returns class to use for fancier embedded PDFKit stuff, or nil if fancy stuff isn't available
        (-[WebPDFView initWithFrame:]):
        now tries to use fancier embedded PDFKit stuff if it's available and the pref is set to use it; falls back
        to old behavior otherwise
        (-[WebPDFView dealloc]):
        release new previewView ivar (retained in initWithFrame:)
        (-[WebPDFView viewWillMoveToWindow:]):
        stop observing PDFKit notification when we're removed from window
        (-[WebPDFView viewDidMoveToWindow]):
        start observing PDFKit notification when we're added to window
        (-[WebPDFView _receivedPDFKitLaunchNotification:]):
        respond to this new PDFKit notification by opening the document via NSWorkspace

        * English.lproj/StringsNotToBeLocalized.txt:
        updated for lots of recent changes

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

WebKit/ChangeLog
WebKit/English.lproj/StringsNotToBeLocalized.txt
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView/WebFrameView.m
WebKit/WebView/WebPDFView.h
WebKit/WebView/WebPDFView.m
WebKit/WebView/WebPreferenceKeysPrivate.h
WebKit/WebView/WebPreferences.m
WebKit/WebView/WebPreferencesPrivate.h

index 1cbb01fd50493f1dda2d81c7fd62a801b83e32b7..8a88bc6a65e911fff592a20ac5d9a77644f496db 100644 (file)
@@ -1,3 +1,50 @@
+2006-10-19  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Kevin Decker
+        
+        - fixed <rdar://problem/4792761> Safari should use fancier embedded PDFKit stuff when it's available
+
+        * WebKit.xcodeproj/project.pbxproj:
+        version wars
+        
+        * WebView/WebFrameView.m:
+        (-[WebFrameView _makeDocumentViewForDataSource:]):
+        initialize document view with frame view's rect instead of empty rect. This avoids some problems when 
+        constructing view hierarchies from nibs
+        
+        * WebView/WebPreferencesPrivate.h:
+        declare new _usePDFPreviewView and _setUsePDFPreviewView:, used for debugging
+        * WebView/WebPreferenceKeysPrivate.h:
+        declare new preference key string
+        * WebView/WebPreferences.m:
+        (+[WebPreferences initialize]):
+        initialize new preference to true (we will by default use the new view if it's available)
+        (-[WebPreferences _usePDFPreviewView]):
+        new accessor for new pref
+        (-[WebPreferences _setUsePDFPreviewView:]):
+        ditto
+
+        * WebView/WebPDFView.h:
+        new previewView ivar
+        
+        * WebView/WebPDFView.m:
+        (+[WebPDFView PDFPreviewViewClass]):
+        new method, returns class to use for fancier embedded PDFKit stuff, or nil if fancy stuff isn't available
+        (-[WebPDFView initWithFrame:]):
+        now tries to use fancier embedded PDFKit stuff if it's available and the pref is set to use it; falls back
+        to old behavior otherwise
+        (-[WebPDFView dealloc]):
+        release new previewView ivar (retained in initWithFrame:)
+        (-[WebPDFView viewWillMoveToWindow:]):
+        stop observing PDFKit notification when we're removed from window
+        (-[WebPDFView viewDidMoveToWindow]):
+        start observing PDFKit notification when we're added to window
+        (-[WebPDFView _receivedPDFKitLaunchNotification:]):
+        respond to this new PDFKit notification by opening the document via NSWorkspace
+        
+        * English.lproj/StringsNotToBeLocalized.txt:
+        updated for lots of recent changes
+        
 2006-10-19  Sam Weinig  <sam.weinig@gmail.com>
 
         Reviewed by ap.
index fd9cd290676d3f8ebe583e502c3343497fc7a719..53516dffbc7e3c282dd0b6391ea5362efcc7595c 100644 (file)
@@ -1,6 +1,4 @@
 "    "
-"   %s -> %6ld : %.0f : %.0f\n"
-"   %s : %6ld : %.0f : %.0f\n"
 " "
 " #%*[^\n\r]%*[\n\r]"
 " %32[^# \t\n\r]%*[^# \t\n\r] "
@@ -13,6 +11,7 @@
 "%"
 "%.1lf"
 "%.2lu/%.2lu/%.10lu-%.10lu.cache"
+"%.2u/%.2u/%.10u-%.10u.cache"
 "%2d) "
 "%@ %.0fpx %.0fpx %.0fpx"
 "%@ %.0fpx %.0fpx"
 "%@/.tmp%d"
 "%@/Library/Preferences/%@"
 "%@:%u"
-"%@://%@"
 "%d"
 "%dpx"
-"%lld"
 ","
 "-"
 "-1px"
@@ -40,7 +37,6 @@
 "/Frameworks/PDFKit.framework"
 "/Library/Internet Plug-Ins"
 "/Volumes"
-"/favicon.ico"
 "/image.pict"
 "/image.tiff"
 "/tmp/"
 "BP_CreatePluginMIMETypesPreferences"
 "Cache-Control"
 "Content-Length"
-"Content-Type"
 "Courier"
 "DOCBASE"
 "DYLD_FRAMEWORK_PATH"
 "FrameName"
-"GET"
 "GroupName"
 "Helvetica"
 "ISO-8859-1"
 "LTR"
 "LangAnalysis"
 "Library/Internet Plug-Ins"
-"List count: %d items\n"
-"List total size: %d bytes\n"
 "Look Up in Dictionary menu title."
 "MenuCommands"
 "Mozilla/5.0 (Macintosh; U; "
 "NSErrorFailingURLKey"
 "NSErrorFailingURLStringKey"
 "NSEvent"
-"NSFileModificationDate"
-"NSFileOwnerAccountName"
-"NSFilePosixPermissions"
 "NSView"
 "NeXT smart paste pasteboard type"
 "PDFDocument"
+"PDFPreviewLaunchPreview"
+"PDFPreviewView"
 "PDFView"
 "POST"
 "PPC"
 "Papyrus"
 "Quartz.framework"
 "RTL"
-"Referer"
 "SAMILang"
 "SAMIStyle"
 "Search in Google menu title."
 "Times"
 "UTF-8"
 "UseBackForwardList"
-"User-Agent"
 "Volumes"
 "WEBKIT_UNSET_DYLD_FRAMEWORK_PATH"
 "WebActionButtonKey"
 "WebActionOriginalURLKey"
 "WebAuthenticationPanel"
 "WebBackForwardList:\n"
-"WebDataRequest"
 "WebElementDOMNode"
 "WebElementFrame"
 "WebElementImage"
 "WebElementLinkURL"
 "WebElementTargetFrame"
 "WebElementTitle"
-"WebFrameStateCommittedPage"
-"WebFrameStateComplete"
-"WebFrameStateProvisional"
 "WebHistoryAllItemsRemovedNotification"
 "WebHistoryDates"
 "WebHistoryFileVersion"
 "WebIconDatabaseEnabled"
 "WebIconDatabaseVersion"
 "WebIconNotificationUserInfoURLKey"
-"WebIconURLToSiteURLs"
-"WebIconsOnDisk"
 "WebJavaScriptTextInputPanel"
-"WebKitAllowAnimatedImageLoopingPreferenceKey"
-"WebKitAllowAnimatedImagesPreferenceKey"
-"WebKitBackForwardCacheExpirationIntervalKey"
-"WebKitCursiveFont"
-"WebKitDefaultFixedFontSize"
-"WebKitDefaultFontSize"
-"WebKitDefaultTextEncodingName"
 "WebKitDeveloperExtras"
-"WebKitDisplayImagesKey"
 "WebKitDisplayThrottleRunLoopMode"
-"WebKitEnableInspectElementContextMenuItem"
 "WebKitErrorDomain"
 "WebKitErrorMIMETypeKey"
 "WebKitErrorPlugInNameKey"
 "WebKitErrorPlugInPageURLStringKey"
-"WebKitFantasyFont"
-"WebKitFixedFont"
 "WebKitHistoryAgeInDaysLimit"
 "WebKitHistoryItemLimit"
-"WebKitJavaEnabled"
-"WebKitJavaScriptCanOpenWindowsAutomatically"
-"WebKitJavaScriptEnabled"
-"WebKitLogLevel"
-"WebKitMinimumFontSize"
-"WebKitMinimumLogicalFontSize"
-"WebKitObjectCacheSizePreferenceKey"
 "WebKitOmitPDFSupport"
-"WebKitPDFDisplayMode"
-"WebKitPDFScaleFactor"
-"WebKitPageCacheSizePreferenceKey"
-"WebKitPluginsEnabled"
-"WebKitPrivateBrowsingEnabled"
-"WebKitRespectStandardStyleKeyEquivalents"
-"WebKitSansSerifFont"
-"WebKitSerifFont"
-"WebKitShouldPrintBackgroundsPreferenceKey"
-"WebKitShowsURLsInToolTips"
-"WebKitStandardFont"
-"WebKitTabToLinksPreferenceKey"
-"WebKitTextAreasAreResizable"
-"WebKitThrottleWindowDisplay"
-"WebKitUserStyleSheetEnabledPreferenceKey"
-"WebKitUserStyleSheetLocationPreferenceKey"
+"WebKitScriptDebuggerEnabled"
 "WebLoginWindowDidSwitchFromUserNotification"
 "WebLoginWindowDidSwitchToUserNotification"
 "WebMainResource"
 "\n    "
 "\n"
 "\n--------------------------------------------\n"
-"\nDict data: %ld items\n"
-"\nHeap data: %ld items\n"
-"\nList root path: %s\n"
 "\r"
 "\r\n"
 "\t"
 "a"
 "about:"
 "about:blank"
-"applewebdata"
 "application/atom+xml"
 "application/octet-stream"
 "application/pdf"
 "doctype"
 "en"
 "estimatedProgress"
-"file:"
 "ftp:"
 "htm"
 "html"
 "mainFrameIcon"
 "mainFrameTitle"
 "mainFrameURL"
-"max-age=0"
 "missing_image"
-"multipart/x-mixed-replace"
 "must-revalidate"
 "nullplugin"
 "pluginspage"
 "text/x-vcalendar"
 "text/x-vcard"
 "text/x-vcf"
-"text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
 "tiff"
 "txt"
 "u"
-"url_icon"
-"utf-16"
 "visitCount"
-"webarchive"
 "webplugin"
 "x"
 "x-apple-web-kit/"
@@ -400,27 +339,27 @@ DOM/WebDOMOperations.m:"stylesheet"
 DefaultDelegates/WebDefaultContextMenuDelegate.m:"Look Up in Dictionary"
 DefaultDelegates/WebDefaultContextMenuDelegate.m:"Search in Google"
 DefaultDelegates/WebDefaultContextMenuDelegate.m:"Search in Spotlight"
+DefaultDelegates/WebScriptDebugServer.m
 History/WebHistoryItem.m:" in \"%@\""
 History/WebHistoryItem.m:"children"
 History/WebHistoryItem.m:"title"
 Misc/WebKitLogging.m
+Misc/WebKitVersionChecks.m
 Misc/WebNSURLExtras.m:"IDNScriptWhiteList"
 Misc/WebNSURLExtras.m:"IDNScriptWhiteList.txt"
 Misc/WebNSURLExtras.m:"file"
+Misc/WebNSURLRequestExtras.m
 Plugins/WebBaseNetscapePluginView.m:"height"
 Plugins/WebBaseNetscapePluginView.m:"width"
 Plugins/WebBasePluginPackage.m:"Java Applet Plugin Enabler"
 Plugins/WebBasePluginPackage.m:"name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@"
 Plugins/WebNetscapePluginPackage.m:"RealPlayer Plugin"
 Plugins/WebNetscapePluginPackage.m:"main"
-Plugins/WebPluginDocumentView.m:"type"
 WebCoreSupport/WebFrameBridge.m:"height"
 WebCoreSupport/WebFrameBridge.m:"width"
 WebInspector/WebInspector.m
 WebInspector/WebInspectorPanel.m:"control"
 WebInspector/WebInspectorPanel.m:"resize"
-WebView/WebFrame.m:"Accept"
-WebView/WebFrame.m:"Refresh"
 WebView/WebHTMLView.m:"%0.fpx"
 WebView/WebHTMLView.m:"'%@'"
 WebView/WebHTMLView.m:"Version:"
@@ -452,10 +391,12 @@ WebView/WebHTMLView.m:"super"
 WebView/WebHTMLView.m:"transparent"
 WebView/WebHTMLView.m:"underline"
 WebView/WebHTMLView.m:"white"
+WebView/WebPreferenceKeysPrivate.h
 WebView/WebPreferences.m:"Identifier"
 WebView/WebPreferences.m:"Values"
 WebView/WebPreferences.m:"WebPreferences%d"
 WebView/WebRenderNode.m
+WebView/WebScriptDebugDelegate.m
 WebView/WebView.m:"Preferences"
 WebView/WebView.m:"Search With Google"
 WebView/WebView.m:"Show DOM Tree"
index 510d2bed68710cb75c25639387b0bae0fd3c602c..0c5775ad1157f2d65474c1488b53f78e4098b906 100644 (file)
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
+                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                        mainGroup = 0867D691FE84028FC02AAC07 /* WebKit */;
                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
                        projectDirPath = "";
+                       projectRoot = "";
+                       shouldCheckCompatibility = 1;
                        targets = (
                                9398100A0824BF01008DF038 /* WebKit */,
                        );
index 62a2980a04ff97958c467736d072e5ac9590cb37..bcd01d127ca5a7c0a4385fd39a250ebd041c2e5f 100644 (file)
@@ -205,7 +205,7 @@ enum {
         if (dataSourceRepresentation && [dataSourceRepresentation class] == viewClass)
             documentView = (NSView <WebDocumentView> *)[dataSourceRepresentation retain];
         else
-            documentView = [[viewClass alloc] init];
+            documentView = [[viewClass alloc] initWithFrame:[self bounds]];
     } else
         documentView = nil;
     
index 3170e9eab3cab3d0090bc2da580d5910a9292e75..86c1dc96e4bf92bd3f1ace653c24990901c3b7ae 100644 (file)
@@ -35,6 +35,7 @@
 
 @interface WebPDFView : NSView <WebDocumentView, WebDocumentSearching, WebDocumentSelection, WebDocumentElement, _WebDocumentViewState, _WebDocumentTextSizing>
 {
+    NSView *previewView;
     PDFView *PDFSubview;
     NSString *path;
     id trackedFirstResponder;
index 9831f069cc85ca0be8370588061ef91b9ffea8fc..14e01a70790d8ded5a1b702b856aab94db6b21c3 100644 (file)
@@ -48,6 +48,8 @@
 #import <WebCore/WebFrameLoader.h>
 #import <WebKitSystemInterface.h>
 
+#define PDFKitLaunchNotification @"PDFPreviewLaunchPreview"
+
 // QuartzPrivate.h doesn't include the PDFKit private headers, so we can't get at PDFViewPriv.h. (3957971)
 // Even if that was fixed, we'd have to tweak compile options to include QuartzPrivate.h. (3957839)
 
@@ -100,6 +102,20 @@ extern "C" NSString *_NSPathForSystemFramework(NSString *framework);
     return PDFViewClass;
 }
 
++ (Class)PDFPreviewViewClass
+{
+    static Class PDFPreviewViewClass = nil;
+    static BOOL checkedForPDFPreviewViewClass = NO;
+    
+    if (!checkedForPDFPreviewViewClass) {
+        checkedForPDFPreviewViewClass = YES;
+        PDFPreviewViewClass = [[WebPDFView PDFKitBundle] classNamed:@"PDFPreviewView"];
+    }
+    
+    // This class might not be available; callers need to deal with a nil return here.
+    return PDFPreviewViewClass;
+}
+
 + (NSArray *)supportedMIMETypes
 {
     return [WebPDFRepresentation supportedMIMETypes];
@@ -109,10 +125,33 @@ extern "C" NSString *_NSPathForSystemFramework(NSString *framework);
 {
     self = [super initWithFrame:frame];
     if (self) {
-        [self setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable];
-        PDFSubview = [[[[self class] PDFViewClass] alloc] initWithFrame:frame];
-        [PDFSubview setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable];
-        [self addSubview:PDFSubview];
+        [self setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
+        
+        Class previewViewClass = nil;
+        if ([[WebPreferences standardPreferences] _usePDFPreviewView])
+            previewViewClass = [[self class] PDFPreviewViewClass];
+        
+        // We might not have found a previewViewClass even if we looked for one.
+        // But if we found the class we should be able to create an instance.
+        if (previewViewClass) {
+            previewView = [[previewViewClass alloc] initWithFrame:frame];
+            ASSERT(previewView);
+        }
+        
+        NSView *topLevelPDFKitView = nil;
+        if (previewView) {
+            PDFSubview = [previewView performSelector:@selector(pdfView)];
+            topLevelPDFKitView = previewView;
+        } else {
+            PDFSubview = [[[[self class] PDFViewClass] alloc] initWithFrame:frame];
+            topLevelPDFKitView = PDFSubview;
+        }
+        
+        ASSERT(PDFSubview);
+        
+        [topLevelPDFKitView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
+        [self addSubview:topLevelPDFKitView];
+        
         [PDFSubview setDelegate:self];
         written = NO;
         // Messaging this proxy is the same as messaging PDFSubview, with the side effect that the
@@ -125,6 +164,7 @@ extern "C" NSString *_NSPathForSystemFramework(NSString *framework);
 - (void)dealloc
 {
     ASSERT(!trackedFirstResponder);
+    [previewView release];
     [PDFSubview release];
     [path release];
     [PDFSubviewProxy release];
@@ -394,7 +434,6 @@ static void applicationInfoForMIMEType(NSString *type, NSString **name, NSImage
     [self _applyPDFDefaults];
 }
 
-
 - (void)_trackFirstResponder
 {
     ASSERT([self window]);
@@ -422,9 +461,14 @@ static void applicationInfoForMIMEType(NSString *type, NSString **name, NSImage
     if (!oldWindow)
         return;
     
-    [[NSNotificationCenter defaultCenter] removeObserver:self
-                                                    name:NSWindowDidUpdateNotification
-                                                  object:oldWindow];
+    NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
+    [notificationCenter removeObserver:self
+                                  name:NSWindowDidUpdateNotification
+                                object:oldWindow];
+    if (previewView)
+        [notificationCenter removeObserver:self
+                                      name:PDFKitLaunchNotification
+                                    object:previewView];
     
     [trackedFirstResponder release];
     trackedFirstResponder = nil;
@@ -439,10 +483,17 @@ static void applicationInfoForMIMEType(NSString *type, NSString **name, NSImage
         return;
     
     [self _trackFirstResponder];
-    [[NSNotificationCenter defaultCenter] addObserver:self
-                                             selector:@selector(_trackFirstResponder) 
-                                                 name:NSWindowDidUpdateNotification
-                                               object:newWindow];
+    NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
+    [notificationCenter addObserver:self
+                           selector:@selector(_trackFirstResponder) 
+                               name:NSWindowDidUpdateNotification
+                             object:newWindow];
+    
+    if (previewView)
+        [notificationCenter addObserver:self
+                               selector:@selector(_receivedPDFKitLaunchNotification:)
+                                   name:PDFKitLaunchNotification
+                                 object:previewView];
 }
 
 - (void)viewWillMoveToHostWindow:(NSWindow *)hostWindow
@@ -470,6 +521,12 @@ static void applicationInfoForMIMEType(NSString *type, NSString **name, NSImage
     }
 }
 
+- (void)_receivedPDFKitLaunchNotification:(NSNotification *)notification
+{
+    ASSERT([notification object] == previewView);
+    [self openWithFinder:self];
+}
+
 // FIXME 4182876: We can eliminate this function in favor if -isEqual: if [PDFSelection isEqual:] is overridden
 // to compare contents.
 static BOOL PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selectionB)
index c3ebbfd67b41e730ddd404470dbd378a15a425a7..9f85ae0ce9cbabc8e9fa874254f2d7b190950c06 100644 (file)
@@ -65,6 +65,7 @@
 #define WebKitShowsURLsInToolTipsPreferenceKey @"WebKitShowsURLsInToolTips"
 #define WebKitPDFDisplayModePreferenceKey @"WebKitPDFDisplayMode"
 #define WebKitPDFScaleFactorPreferenceKey @"WebKitPDFScaleFactor"
+#define WebKitUsePDFPreviewViewPreferenceKey @"WebKitUsePDFPreviewView"
 #define WebKitEditableLinkBehaviorPreferenceKey @"WebKitEditableLinkBehavior"
 
 
index 10c3cadfab9a3d9f63630388889b36f49c6906ea..cc8d5b52edd1f1378fb5d81312ba5c41a4263feb 100644 (file)
@@ -232,6 +232,7 @@ NS_ENDHANDLER
         [NSNumber numberWithBool:NO],   WebKitShowsURLsInToolTipsPreferenceKey,
         @"1",                           WebKitPDFDisplayModePreferenceKey,
         @"0",                           WebKitPDFScaleFactorPreferenceKey,
+        @"1",                           WebKitUsePDFPreviewViewPreferenceKey,
         [NSNumber numberWithInt:WebKitEditableLinkDefaultBehavior], 
                                         WebKitEditableLinkBehaviorPreferenceKey,
         nil];
@@ -660,6 +661,16 @@ NS_ENDHANDLER
     [self _setIntegerValue:mode forKey:WebKitPDFDisplayModePreferenceKey];
 }
 
+- (BOOL)_usePDFPreviewView
+{
+    return [self _boolValueForKey:WebKitUsePDFPreviewViewPreferenceKey];
+}
+
+- (void)_setUsePDFPreviewView:(BOOL)newValue
+{
+    [self _setBoolValue:newValue forKey:WebKitUsePDFPreviewViewPreferenceKey];
+}
+
 - (WebKitEditableLinkBehavior)editableLinkBehavior
 {
     WebKitEditableLinkBehavior value = [self _integerValueForKey:WebKitEditableLinkBehaviorPreferenceKey];
index 52ae412429f8060645147c6f37568fe301f0029b..f604aad64885965bde0efb714654c29495b9d11a 100644 (file)
@@ -72,6 +72,10 @@ typedef enum {
 - (WebKitEditableLinkBehavior)editableLinkBehavior;
 - (void)setEditableLinkBehavior:(WebKitEditableLinkBehavior)behavior;
 
+// For debugging purposes, can be removed when no longer needed
+- (BOOL)_usePDFPreviewView;
+- (void)_setUsePDFPreviewView:(BOOL)newValue;
+
 // Other private methods
 - (size_t)_pageCacheSize;
 - (size_t)_objectCacheSize;