summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/WebView
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-04-27 16:23:55 +0100
committerSteve Block <steveblock@google.com>2010-04-27 17:07:03 +0100
commit692e5dbf12901edacf14812a6fae25462920af42 (patch)
treed62802373a429e0a9dc093b6046c166b2c514285 /WebKit/mac/WebView
parente24bea4efef1c414137d36a9778aa4e142e10c7d (diff)
downloadexternal_webkit-692e5dbf12901edacf14812a6fae25462920af42.zip
external_webkit-692e5dbf12901edacf14812a6fae25462920af42.tar.gz
external_webkit-692e5dbf12901edacf14812a6fae25462920af42.tar.bz2
Merge webkit.org at r55033 : Initial merge by git
Change-Id: I98a4af828067cc243ec3dc5e5826154dd88074b5
Diffstat (limited to 'WebKit/mac/WebView')
-rw-r--r--WebKit/mac/WebView/WebDataSource.mm20
-rw-r--r--WebKit/mac/WebView/WebFrame.mm39
-rw-r--r--WebKit/mac/WebView/WebFrameInternal.h3
-rw-r--r--WebKit/mac/WebView/WebFrameView.mm24
-rw-r--r--WebKit/mac/WebView/WebHTMLRepresentation.mm19
-rw-r--r--WebKit/mac/WebView/WebHTMLView.mm22
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h1
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm11
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h3
-rw-r--r--WebKit/mac/WebView/WebView.mm57
-rw-r--r--WebKit/mac/WebView/WebViewData.h2
-rw-r--r--WebKit/mac/WebView/WebViewInternal.h2
-rw-r--r--WebKit/mac/WebView/WebViewPrivate.h7
13 files changed, 157 insertions, 53 deletions
diff --git a/WebKit/mac/WebView/WebDataSource.mm b/WebKit/mac/WebView/WebDataSource.mm
index 8a3842e..d9622b3 100644
--- a/WebKit/mac/WebView/WebDataSource.mm
+++ b/WebKit/mac/WebView/WebDataSource.mm
@@ -70,6 +70,7 @@ using namespace WebCore;
id <WebDocumentRepresentation> representation;
BOOL representationFinishedLoading;
+ BOOL includedInWebKitStatistics;
}
@end
@@ -372,10 +373,11 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
_private->loader = loader.releaseRef();
LOG(Loading, "creating datasource for %@", static_cast<NSURL *>(_private->loader->request().url()));
-
- ++WebDataSourceCount;
-
- return self;
+
+ if ((_private->includedInWebKitStatistics = [[self webFrame] _isIncludedInWebKitStatistics]))
+ ++WebDataSourceCount;
+
+ return self;
}
@end
@@ -389,16 +391,18 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (void)dealloc
{
- --WebDataSourceCount;
-
+ if (_private && _private->includedInWebKitStatistics)
+ --WebDataSourceCount;
+
[_private release];
-
+
[super dealloc];
}
- (void)finalize
{
- --WebDataSourceCount;
+ if (_private && _private->includedInWebKitStatistics)
+ --WebDataSourceCount;
[super finalize];
}
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index 41d7e01..267d319 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -87,6 +87,7 @@
#import <WebCore/htmlediting.h>
#import <WebCore/markup.h>
#import <WebCore/visible_units.h>
+#import <WebKitSystemInterface.h>
#import <runtime/JSLock.h>
#import <runtime/JSObject.h>
#import <runtime/JSValue.h>
@@ -269,6 +270,11 @@ WebView *getWebView(WebFrame *webFrame)
return [self _createFrameWithPage:ownerElement->document()->frame()->page() frameName:name frameView:frameView ownerElement:ownerElement];
}
+- (BOOL)_isIncludedInWebKitStatistics
+{
+ return _private && _private->includedInWebKitStatistics;
+}
+
- (void)_attachScriptDebugger
{
ScriptController* scriptController = _private->coreFrame->script();
@@ -308,6 +314,11 @@ WebView *getWebView(WebFrame *webFrame)
_private = [[WebFramePrivate alloc] init];
+ // Set includedInWebKitStatistics before calling WebFrameView _setWebFrame, since
+ // it calls WebFrame _isIncludedInWebKitStatistics.
+ if ((_private->includedInWebKitStatistics = [[v class] shouldIncludeInWebKitStatistics]))
+ ++WebFrameCount;
+
if (fv) {
[_private setWebFrameView:fv];
[fv _setWebFrame:self];
@@ -315,8 +326,6 @@ WebView *getWebView(WebFrame *webFrame)
_private->shouldCreateRenderers = YES;
- ++WebFrameCount;
-
return self;
}
@@ -523,14 +532,27 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (void)_drawRect:(NSRect)rect contentsOnly:(BOOL)contentsOnly
{
- PlatformGraphicsContext* platformContext = static_cast<PlatformGraphicsContext*>([[NSGraphicsContext currentContext] graphicsPort]);
ASSERT([[NSGraphicsContext currentContext] isFlipped]);
- GraphicsContext context(platformContext);
+
+ CGContextRef ctx = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]);
+ GraphicsContext context(ctx);
+
+ FrameView* view = _private->coreFrame->view();
+
+ bool shouldFlatten = WKCGContextIsBitmapContext(ctx) && [getWebView(self) _includesFlattenedCompositingLayersWhenDrawingToBitmap];
+ PaintBehavior oldBehavior = PaintBehaviorNormal;
+ if (shouldFlatten) {
+ oldBehavior = view->paintBehavior();
+ view->setPaintBehavior(oldBehavior | PaintBehaviorFlattenCompositingLayers);
+ }
if (contentsOnly)
_private->coreFrame->view()->paintContents(&context, enclosingIntRect(rect));
else
_private->coreFrame->view()->paint(&context, enclosingIntRect(rect));
+
+ if (shouldFlatten)
+ view->setPaintBehavior(oldBehavior);
}
// Used by pagination code called from AppKit when a standalone web page is printed.
@@ -1276,14 +1298,19 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
- (void)dealloc
{
+ if (_private && _private->includedInWebKitStatistics)
+ --WebFrameCount;
+
[_private release];
- --WebFrameCount;
+
[super dealloc];
}
- (void)finalize
{
- --WebFrameCount;
+ if (_private && _private->includedInWebKitStatistics)
+ --WebFrameCount;
+
[super finalize];
}
diff --git a/WebKit/mac/WebView/WebFrameInternal.h b/WebKit/mac/WebView/WebFrameInternal.h
index 0dcf19b..4c1ee40 100644
--- a/WebKit/mac/WebView/WebFrameInternal.h
+++ b/WebKit/mac/WebView/WebFrameInternal.h
@@ -81,6 +81,7 @@ WebView *getWebView(WebFrame *webFrame);
WebScriptDebugger* scriptDebugger;
id internalLoadDelegate;
BOOL shouldCreateRenderers;
+ BOOL includedInWebKitStatistics;
}
@end
@@ -96,6 +97,8 @@ WebView *getWebView(WebFrame *webFrame);
- (void)_clearCoreFrame;
+- (BOOL)_isIncludedInWebKitStatistics;
+
- (void)_updateBackgroundAndUpdatesWhileOffscreen;
- (void)_setInternalLoadDelegate:(id)internalLoadDelegate;
- (id)_internalLoadDelegate;
diff --git a/WebKit/mac/WebView/WebFrameView.mm b/WebKit/mac/WebView/WebFrameView.mm
index b6b1941..422b605 100644
--- a/WebKit/mac/WebView/WebFrameView.mm
+++ b/WebKit/mac/WebView/WebFrameView.mm
@@ -92,6 +92,7 @@ enum {
@public
WebFrame *webFrame;
WebDynamicScrollBarsView *frameScrollView;
+ BOOL includedInWebKitStatistics;
}
@end
@@ -187,6 +188,11 @@ enum {
// Not retained because the WebView owns the WebFrame, which owns the WebFrameView.
_private->webFrame = webFrame;
+
+ if (!_private->includedInWebKitStatistics && [webFrame _isIncludedInWebKitStatistics]) {
+ _private->includedInWebKitStatistics = YES;
+ ++WebFrameViewCount;
+ }
}
- (WebDynamicScrollBarsView *)_scrollView
@@ -286,15 +292,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
@implementation WebFrameView
-- initWithCoder:(NSCoder *)decoder
-{
- // Older nibs containing WebViews will also contain WebFrameViews. We need to keep track of
- // their count also to match the decrement in -dealloc.
- ++WebFrameViewCount;
- return [super initWithCoder:decoder];
-}
-
-- initWithFrame:(NSRect)frame
+- (id)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
if (!self)
@@ -350,14 +348,13 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
// This works together with our becomeFirstResponder and setNextKeyView overrides.
[super setNextKeyView:scrollView];
- ++WebFrameViewCount;
-
return self;
}
- (void)dealloc
{
- --WebFrameViewCount;
+ if (_private && _private->includedInWebKitStatistics)
+ --WebFrameViewCount;
[_private release];
_private = nil;
@@ -367,7 +364,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (void)finalize
{
- --WebFrameViewCount;
+ if (_private && _private->includedInWebKitStatistics)
+ --WebFrameViewCount;
[super finalize];
}
diff --git a/WebKit/mac/WebView/WebHTMLRepresentation.mm b/WebKit/mac/WebView/WebHTMLRepresentation.mm
index 41ce9f9..3aaa914 100644
--- a/WebKit/mac/WebView/WebHTMLRepresentation.mm
+++ b/WebKit/mac/WebView/WebHTMLRepresentation.mm
@@ -66,6 +66,8 @@ using namespace HTMLNames;
WebDataSource *dataSource;
BOOL hasSentResponseToPlugin;
+ BOOL includedInWebKitStatistics;
+
id <WebPluginManualLoader> manualLoader;
NSView *pluginView;
}
@@ -117,16 +119,15 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
return nil;
_private = [[WebHTMLRepresentationPrivate alloc] init];
-
- ++WebHTMLRepresentationCount;
-
+
return self;
}
- (void)dealloc
{
- --WebHTMLRepresentationCount;
-
+ if (_private && _private->includedInWebKitStatistics)
+ --WebHTMLRepresentationCount;
+
[_private release];
[super dealloc];
@@ -134,7 +135,8 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
- (void)finalize
{
- --WebHTMLRepresentationCount;
+ if (_private && _private->includedInWebKitStatistics)
+ --WebHTMLRepresentationCount;
[super finalize];
}
@@ -148,6 +150,11 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
- (void)setDataSource:(WebDataSource *)dataSource
{
_private->dataSource = dataSource;
+
+ if (!_private->includedInWebKitStatistics && [[dataSource webFrame] _isIncludedInWebKitStatistics]) {
+ _private->includedInWebKitStatistics = YES;
+ ++WebHTMLRepresentationCount;
+ }
}
- (BOOL)_isDisplayingWebArchive
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index 54a177e..aa65920 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -1239,15 +1239,6 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
if (_private->enumeratingSubviews)
LOG(View, "A view of class %s was added during subview enumeration for layout or printing mode change. This view might paint without first receiving layout.", object_getClassName([subview class]));
}
-
-- (void)willRemoveSubview:(NSView *)subview
-{
- // Have to null-check _private, since this can be called via -dealloc when
- // cleaning up the the layerHostingView.
- if (_private && _private->enumeratingSubviews)
- LOG(View, "A view of class %s was removed during subview enumeration for layout or printing mode change. We will still do layout or the printing mode change even though this view is no longer in the view hierarchy.", object_getClassName([subview class]));
-}
-
#endif
#ifdef BUILDING_ON_TIGER
@@ -2924,7 +2915,9 @@ WEBCORE_COMMAND(yankAndSelect)
[self _removeWindowObservers];
[self _removeSuperviewObservers];
[self _cancelUpdateMouseoverTimer];
-
+
+ // FIXME: This accomplishes the same thing as the call to setCanStartMedia(false) in
+ // WebView. It would be nice to have a single mechanism instead of two.
[[self _pluginController] stopAllPlugins];
}
@@ -2944,6 +2937,8 @@ WEBCORE_COMMAND(yankAndSelect)
[self addSuperviewObservers];
[self addMouseMovedObserver];
+ // FIXME: This accomplishes the same thing as the call to setCanStartMedia(true) in
+ // WebView. It would be nice to have a single mechanism instead of two.
[[self _pluginController] startAllPlugins];
_private->lastScrollPosition = NSZeroPoint;
@@ -2971,6 +2966,13 @@ WEBCORE_COMMAND(yankAndSelect)
- (void)willRemoveSubview:(NSView *)subview
{
+#ifndef NDEBUG
+ // Have to null-check _private, since this can be called via -dealloc when
+ // cleaning up the the layerHostingView.
+ if (_private && _private->enumeratingSubviews)
+ LOG(View, "A view of class %s was removed during subview enumeration for layout or printing mode change. We will still do layout or the printing mode change even though this view is no longer in the view hierarchy.", object_getClassName([subview class]));
+#endif
+
if ([WebPluginController isPlugInView:subview])
[[self _pluginController] destroyPlugin:subview];
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index b8e912e..150a020 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -51,6 +51,7 @@
#define WebKitJavaScriptEnabledPreferenceKey @"WebKitJavaScriptEnabled"
#define WebKitWebSecurityEnabledPreferenceKey @"WebKitWebSecurityEnabled"
#define WebKitAllowUniversalAccessFromFileURLsPreferenceKey @"WebKitAllowUniversalAccessFromFileURLs"
+#define WebKitAllowFileAccessFromFileURLsPreferenceKey @"WebKitAllowFileAccessFromFileURLs"
#define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey @"WebKitJavaScriptCanOpenWindowsAutomatically"
#define WebKitPluginsEnabledPreferenceKey @"WebKitPluginsEnabled"
#define WebKitDatabasesEnabledPreferenceKey @"WebKitDatabasesEnabledPreferenceKey"
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index a1176a9..bd3c2a7 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -316,6 +316,7 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:YES], WebKitJavaScriptEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitWebSecurityEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAllowUniversalAccessFromFileURLsPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitAllowFileAccessFromFileURLsPreferenceKey,
[NSNumber numberWithBool:YES], WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey,
[NSNumber numberWithBool:YES], WebKitPluginsEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDatabasesEnabledPreferenceKey,
@@ -920,6 +921,16 @@ static WebCacheModel cacheModelForMainBundle(void)
[self _setBoolValue: flag forKey: WebKitAllowUniversalAccessFromFileURLsPreferenceKey];
}
+- (BOOL)allowFileAccessFromFileURLs
+{
+ return [self _boolValueForKey: WebKitAllowFileAccessFromFileURLsPreferenceKey];
+}
+
+- (void)setAllowFileAccessFromFileURLs:(BOOL)flag
+{
+ [self _setBoolValue: flag forKey: WebKitAllowFileAccessFromFileURLsPreferenceKey];
+}
+
- (NSTimeInterval)_backForwardCacheExpirationInterval
{
// FIXME: There's probably no good reason to read from the standard user defaults instead of self.
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 7c84d8d..b516640 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -101,6 +101,9 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)allowUniversalAccessFromFileURLs;
- (void)setAllowUniversalAccessFromFileURLs:(BOOL)flag;
+- (BOOL)allowFileAccessFromFileURLs;
+- (void)setAllowFileAccessFromFileURLs:(BOOL)flag;
+
- (BOOL)zoomsTextOnly;
- (void)setZoomsTextOnly:(BOOL)zoomsTextOnly;
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 4b449de..44d4b58 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2006 David Smith (catfish.man@gmail.com)
*
* Redistribution and use in source and binary forms, with or without
@@ -600,6 +600,7 @@ static bool shouldEnableLoadDeferring()
_private->drawsBackground = YES;
_private->backgroundColor = [[NSColor colorWithDeviceWhite:1 alpha:1] retain];
_private->usesDocumentViews = usesDocumentViews;
+ _private->includesFlattenedCompositingLayersWhenDrawingToBitmap = YES;
WebFrameView *frameView = nil;
if (_private->usesDocumentViews) {
@@ -630,6 +631,7 @@ static bool shouldEnableLoadDeferring()
#endif
_private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self), new WebInspectorClient(self), new WebPluginHalterClient(self), geolocationControllerClient);
+ _private->page->setCanStartMedia([self window]);
_private->page->settings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]);
[WebFrame _createMainFrameWithPage:_private->page frameName:frameName frameView:frameView];
@@ -657,7 +659,8 @@ static bool shouldEnableLoadDeferring()
[frameView setNextKeyView:nextKeyView];
[super setNextKeyView:frameView];
- ++WebViewCount;
+ if ([[self class] shouldIncludeInWebKitStatistics])
+ ++WebViewCount;
[self _registerDraggedTypes];
@@ -1286,6 +1289,7 @@ static bool fastDocumentTeardownEnabled()
settings->setJavaScriptEnabled([preferences isJavaScriptEnabled]);
settings->setWebSecurityEnabled([preferences isWebSecurityEnabled]);
settings->setAllowUniversalAccessFromFileURLs([preferences allowUniversalAccessFromFileURLs]);
+ settings->setAllowFileAccessFromFileURLs([preferences allowFileAccessFromFileURLs]);
settings->setJavaScriptCanOpenWindowsAutomatically([preferences javaScriptCanOpenWindowsAutomatically]);
settings->setMinimumFontSize([preferences minimumFontSize]);
settings->setMinimumLogicalFontSize([preferences minimumLogicalFontSize]);
@@ -2141,19 +2145,42 @@ static inline IMP getMethod(id o, SEL s)
- (BOOL)_isUsingAcceleratedCompositing
{
#if USE(ACCELERATED_COMPOSITING)
- Frame* coreFrame = [self _mainCoreFrame];
if (_private->usesDocumentViews) {
+ Frame* coreFrame = [self _mainCoreFrame];
for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
NSView *documentView = [[kit(frame) frameView] documentView];
if ([documentView isKindOfClass:[WebHTMLView class]] && [(WebHTMLView *)documentView _isUsingAcceleratedCompositing])
return YES;
}
}
-
- return NO;
-#else
+#endif
return NO;
+}
+
+- (BOOL)_isSoftwareRenderable
+{
+#if USE(ACCELERATED_COMPOSITING)
+ if (_private->usesDocumentViews) {
+ Frame* coreFrame = [self _mainCoreFrame];
+ for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+ if (FrameView* view = frame->view()) {
+ if (!view->isSoftwareRenderable())
+ return NO;
+ }
+ }
+ }
#endif
+ return YES;
+}
+
+- (void)_setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:(BOOL)flag
+{
+ _private->includesFlattenedCompositingLayersWhenDrawingToBitmap = flag;
+}
+
+- (BOOL)_includesFlattenedCompositingLayersWhenDrawingToBitmap
+{
+ return _private->includesFlattenedCompositingLayersWhenDrawingToBitmap;
}
static WebBaseNetscapePluginView *_pluginViewForNode(DOMNode *node)
@@ -2743,8 +2770,9 @@ static bool needsWebViewInitThreadWorkaround()
// this maintains our old behavior for existing applications
[self close];
- --WebViewCount;
-
+ if ([[self class] shouldIncludeInWebKitStatistics])
+ --WebViewCount;
+
if ([self _needsFrameLoadDelegateRetainQuirk])
[_private->frameLoadDelegate release];
@@ -2824,8 +2852,10 @@ static bool needsWebViewInitThreadWorkaround()
// and over, so do them when we move into a window.
[window setAcceptsMouseMovedEvents:YES];
WKSetNSWindowShouldPostEventNotifications(window, YES);
- } else
+ } else {
+ _private->page->setCanStartMedia(false);
_private->page->willMoveOffscreen();
+ }
if (window != [self window]) {
[self removeWindowObservers];
@@ -2842,8 +2872,10 @@ static bool needsWebViewInitThreadWorkaround()
if (!_private || _private->closed)
return;
- if ([self window])
+ if ([self window]) {
+ _private->page->setCanStartMedia(true);
_private->page->didMoveOnscreen();
+ }
[self _updateActiveState];
}
@@ -5335,6 +5367,11 @@ static WebFrameView *containingFrameView(NSView *view)
@implementation WebView (WebViewInternal)
++ (BOOL)shouldIncludeInWebKitStatistics
+{
+ return NO;
+}
+
- (BOOL)_becomingFirstResponderFromOutside
{
return _private->becomingFirstResponderFromOutside;
diff --git a/WebKit/mac/WebView/WebViewData.h b/WebKit/mac/WebView/WebViewData.h
index b0569a2..2b51f3c 100644
--- a/WebKit/mac/WebView/WebViewData.h
+++ b/WebKit/mac/WebView/WebViewData.h
@@ -137,6 +137,8 @@ extern int pluginDatabaseClientCount;
// When this flag is set, we will not make any subviews underneath this WebView. This means no WebFrameViews and no WebHTMLViews.
BOOL usesDocumentViews;
+
+ BOOL includesFlattenedCompositingLayersWhenDrawingToBitmap;
#if USE(ACCELERATED_COMPOSITING)
// When this flag is set, next time a WebHTMLView draws, it needs to temporarily disable screen updates
diff --git a/WebKit/mac/WebView/WebViewInternal.h b/WebKit/mac/WebView/WebViewInternal.h
index 6c2ae50..3f38d58 100644
--- a/WebKit/mac/WebView/WebViewInternal.h
+++ b/WebKit/mac/WebView/WebViewInternal.h
@@ -64,6 +64,8 @@ namespace WebCore {
@interface WebView (WebViewInternal)
++ (BOOL)shouldIncludeInWebKitStatistics;
+
- (WebCore::Frame*)_mainCoreFrame;
- (WebFrame *)_selectedOrMainFrame;
diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h
index 4d1145e..b0a7039 100644
--- a/WebKit/mac/WebView/WebViewPrivate.h
+++ b/WebKit/mac/WebView/WebViewPrivate.h
@@ -470,6 +470,13 @@ Could be worth adding to the API.
- (void)_setPostsAcceleratedCompositingNotifications:(BOOL)flag;
- (BOOL)_isUsingAcceleratedCompositing;
+// Returns YES if NSView -displayRectIgnoringOpacity:inContext: will produce a faithful representation of the content.
+- (BOOL)_isSoftwareRenderable;
+// When drawing into a bitmap context, we normally flatten compositing layers (and distort 3D transforms).
+// Clients who are able to capture their own copy of the compositing layers need to be able to disable this.
+- (void)_setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:(BOOL)flag;
+- (BOOL)_includesFlattenedCompositingLayersWhenDrawingToBitmap;
+
// SPI for PluginHalter
+ (BOOL)_isNodeHaltedPlugin:(DOMNode *)node;
+ (BOOL)_hasPluginForNodeBeenHalted:(DOMNode *)node;