diff options
Diffstat (limited to 'WebKit/mac')
26 files changed, 380 insertions, 124 deletions
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog index 8bbd4de..b545a40 100644 --- a/WebKit/mac/ChangeLog +++ b/WebKit/mac/ChangeLog @@ -1,3 +1,189 @@ +2010-02-12 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/7615234> REGRESSION (r48586): Loading an HTML page causes + PDFKit to be loaded + + * WebView/WebPDFDocumentExtras.h: Removed the category declaration and + addWebPDFDocumentExtras(). Declare allScriptsInPDFDocument(). + * WebView/WebPDFDocumentExtras.mm: + (allScriptsInPDFDocument): Changed the -_web_allScripts method into this function. + * WebView/WebPDFRepresentation.mm: Removed +initialize. + (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Use + allScriptsInPDFDocument() instead of -_web_allScripts. + +2010-02-10 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Exported some new JavaScript heap introspection. + + * Misc/WebCoreStatistics.h: + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics javaScriptObjectTypeCounts]): Just like + javaScriptProtectedObjectTypeCounts, except this function enumerates all + live objects, not just protected objects. + +2010-02-08 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Cameron Zwarich. + + Restore ENABLE_RUBY flag so vendors can ship with Ruby disabled if they choose. + https://bugs.webkit.org/show_bug.cgi?id=34698 + + * Configurations/FeatureDefines.xcconfig: + +2010-02-09 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Geoffrey Garen. + + https://bugs.webkit.org/show_bug.cgi?id=34490 + WebCore::ImageEventSender::dispatchPendingEvents() crashes in certain conditions + + * ForwardingHeaders/wtf/ValueCheck.h: Added. + +2010-02-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + Support frameset flattening + https://bugs.webkit.org/show_bug.cgi?id=32717 + + Add support for enabling/disabling FrameSet Flattening on the Mac port. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences isFrameSetFlatteningEnabled]): + (-[WebPreferences setFrameSetFlatteningEnabled:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2010-02-09 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Anders Carlsson. + + https://bugs.webkit.org/show_bug.cgi?id=34771 + A stray mouse moved event is sent to plug-ins after mouse exit + + * WebCoreSupport/WebFrameLoaderClient.mm: (NetscapePluginWidget::handleEvent): A mouseout + DOM event is dispatched while handling NSMouseMoved - but we shouldn't be sending a + mouse moved event to plug-ins at this point. + +2010-02-09 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Darin Adler. + + Provide a way to get total number of pages to be printed + https://bugs.webkit.org/show_bug.cgi?id=34699 + + * Misc/WebCoreStatistics.h: + * Misc/WebCoreStatistics.mm: + (-[WebFrame numberOfPages:pageWidthInPixels:]): + +2010-02-08 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=34727 + Assertion crashes and freezes when plug-in property access results in an exception + + * Plugins/Hosted/WebKitPluginClient.defs: Made PCSetProperty and PCRemoveProperty async. + A plug-in can call back whil processing this call (e.g. for NPN_SetException), so we need + to listen for messages while waiting for reply. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCEvaluate): If there is no instance proxy, return KERN_FAILURE. This improves consistency + between method implementations, and leaves us with one less IPC call to make in failure case + (returning false with KERN_SUCCESS and returning KERN_FAILURE looks the same from plugin + host code). + (WKPCInvoke): Ditto. + (WKPCInvokeDefault): Ditto. + (WKPCGetProperty): Ditto. + (WKPCSetProperty): Send a reply once done. + (WKPCRemoveProperty): Ditto. + (WKPCHasProperty): If there is no instance proxy, return KERN_FAILURE. + (WKPCHasMethod): Ditto. + (WKPCEnumerate): Ditto. + +2010-02-08 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Anders Carlsson. + + <rdar://problem/6530010> OOP: Support NPN_SetException + + Tested by plugins/netscape-throw-exception.html (removed it from skipped list). + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCSetException): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::globalExceptionString): + (WebKit::NetscapePluginInstanceProxy::setGlobalException): + (WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState): + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::invoke): + (WebKit::ProxyInstance::getPropertyNames): + (WebKit::ProxyInstance::fieldValue): + (WebKit::ProxyInstance::setFieldValue): + * Plugins/Hosted/WebKitPluginClient.defs: + Route exception string to a global that's checked after calling into plug-in (just like in + in-process case). + +2010-02-05 Kevin Decker <kdecker@apple.com> + + Reviewed by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=34661 + <rdar://problem/7614067> REGRESSION (Safari 4.0-> Safari 4.0.4): NPP_SetWindow no longer sets a clipRect of (0,0,0,0) when it becomes hidden + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView updateAndSetWindow]): When clipping out NPDrawingModelCoreAnimation plug-ins, provide a zero'd out clipRect. + * Plugins/WebBaseNetscapePluginView.h: Moved superviewsHaveSuperviews to the base class. + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView superviewsHaveSuperviews]): Added to the base class; extracted from WebNetscapePluginView. + (-[WebBaseNetscapePluginView shouldClipOutPlugin]): Added new method with code extracted from WebNetscapePluginView. + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]): When clipping out NPDrawingModelCoreAnimation plug-ins, provide a zero'd out clipRect. + +2010-02-04 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Dan Bernstein. + + Fix the ability to #include <WebKit/DOMFile.h>. + + * MigrateHeaders.make: Mark DOMBlob.h as a public header since the already-public DOMFile.h depends on it. + +2010-02-04 John Sullivan <sullivan@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=34611 + WebLocalizedString() could use an assertion that it is being called on the main thread + + Reviewed by Tim Hatcher. + + * Misc/WebLocalizableStrings.m: Removed. + * Misc/WebLocalizableStrings.mm: Copied from mac/Misc/WebLocalizableStrings.m. + Renamed to use .mm extension so it can include a C++ header. + (WebLocalizedString): + Added an assertion that this is being called on the main thread. + +2010-02-04 Dan Bernstein <mitz@apple.com> + + Reviewed by Simon Fraser. + + REGRESSION (r53718): When scrolling a tall window by page, the overlap between pages is too big + https://bugs.webkit.org/show_bug.cgi?id=34371 + + * WebView/WebFrameView.mm: + (-[WebFrameView _verticalPageScrollDistance]): Use Scrollbar methods instead of + constants, and cap the scroll distance. + (-[WebFrameView initWithFrame:]): Use Scrollbar::pixelsPerLineStep() instead of + cScrollbarPixelsPerLineStep. + (-[WebFrameView _horizontalPageScrollDistance]):Use Scrollbar methods instead of + constants, and cap the scroll distance. + 2010-02-01 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Eric Seidel. diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig index 24589c7..8343ce7 100644 --- a/WebKit/mac/Configurations/FeatureDefines.xcconfig +++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig @@ -56,6 +56,7 @@ ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER; ENABLE_MATHML = ; ENABLE_NOTIFICATIONS = ; ENABLE_OFFLINE_WEB_APPLICATIONS = ENABLE_OFFLINE_WEB_APPLICATIONS; +ENABLE_RUBY = ENABLE_RUBY; ENABLE_SHARED_WORKERS = ENABLE_SHARED_WORKERS; ENABLE_SVG = ENABLE_SVG; ENABLE_SVG_ANIMATION = ENABLE_SVG_ANIMATION; @@ -72,4 +73,4 @@ ENABLE_XHTMLMP = ; ENABLE_XPATH = ENABLE_XPATH; ENABLE_XSLT = ENABLE_XSLT; -FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT); +FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_RUBY) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT); diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig index 75f9bd4..0e289b1 100644 --- a/WebKit/mac/Configurations/Version.xcconfig +++ b/WebKit/mac/Configurations/Version.xcconfig @@ -21,8 +21,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -MAJOR_VERSION = 532; -MINOR_VERSION = 9; +MAJOR_VERSION = 533; +MINOR_VERSION = 1; TINY_VERSION = 0; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION); diff --git a/WebKit/mac/ForwardingHeaders/wtf/ValueCheck.h b/WebKit/mac/ForwardingHeaders/wtf/ValueCheck.h new file mode 100644 index 0000000..7a067ff --- /dev/null +++ b/WebKit/mac/ForwardingHeaders/wtf/ValueCheck.h @@ -0,0 +1 @@ +#import <JavaScriptCore/ValueCheck.h> diff --git a/WebKit/mac/MigrateHeaders.make b/WebKit/mac/MigrateHeaders.make index 7d01c99..f4bf744 100644 --- a/WebKit/mac/MigrateHeaders.make +++ b/WebKit/mac/MigrateHeaders.make @@ -36,7 +36,7 @@ all : \ $(PUBLIC_HEADERS_DIR)/DOM.h \ $(PUBLIC_HEADERS_DIR)/DOMAbstractView.h \ $(PUBLIC_HEADERS_DIR)/DOMAttr.h \ - $(PRIVATE_HEADERS_DIR)/DOMBlob.h \ + $(PUBLIC_HEADERS_DIR)/DOMBlob.h \ $(INTERNAL_HEADERS_DIR)/DOMBlobInternal.h \ $(PUBLIC_HEADERS_DIR)/DOMCDATASection.h \ $(PUBLIC_HEADERS_DIR)/DOMCSS.h \ diff --git a/WebKit/mac/Misc/WebCoreStatistics.h b/WebKit/mac/Misc/WebCoreStatistics.h index 6c45fb9..d205083 100644 --- a/WebKit/mac/Misc/WebCoreStatistics.h +++ b/WebKit/mac/Misc/WebCoreStatistics.h @@ -43,6 +43,7 @@ + (size_t)javaScriptProtectedObjectsCount; + (size_t)javaScriptProtectedGlobalObjectsCount; + (NSCountedSet *)javaScriptProtectedObjectTypeCounts; ++ (NSCountedSet *)javaScriptObjectTypeCounts; + (void)garbageCollectJavaScriptObjects; + (void)garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:(BOOL)waitUntilDone; @@ -85,4 +86,5 @@ - (NSString *)renderTreeAsExternalRepresentation; - (NSString *)counterValueForElement:(DOMElement*)element; - (int)pageNumberForElement:(DOMElement*)element:(float)pageWidthInPixels:(float)pageHeightInPixels; +- (int)numberOfPages:(float)pageWidthInPixels:(float)pageHeightInPixels; @end diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm index b18ee29..9e8ae05 100644 --- a/WebKit/mac/Misc/WebCoreStatistics.mm +++ b/WebKit/mac/Misc/WebCoreStatistics.mm @@ -93,6 +93,21 @@ using namespace WebCore; return result; } ++ (NSCountedSet *)javaScriptObjectTypeCounts +{ + JSLock lock(SilenceAssertionsOnly); + + NSCountedSet *result = [NSCountedSet set]; + + OwnPtr<HashCountedSet<const char*> > counts(JSDOMWindow::commonJSGlobalData()->heap.objectTypeCounts()); + HashCountedSet<const char*>::iterator end = counts->end(); + for (HashCountedSet<const char*>::iterator it = counts->begin(); it != end; ++it) + for (unsigned i = 0; i < it->second; ++i) + [result addObject:[NSString stringWithUTF8String:it->first]]; + + return result; +} + + (void)garbageCollectJavaScriptObjects { gcController().garbageCollectNow(); @@ -256,4 +271,9 @@ using namespace WebCore; return PrintContext::pageNumberForElement(core(element), FloatSize(pageWidthInPixels, pageHeightInPixels)); } +- (int)numberOfPages:(float)pageWidthInPixels:(float)pageHeightInPixels +{ + return PrintContext::numberOfPages(_private->coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels)); +} + @end diff --git a/WebKit/mac/Misc/WebLocalizableStrings.m b/WebKit/mac/Misc/WebLocalizableStrings.mm index 0babfbc..4006bb7 100644 --- a/WebKit/mac/Misc/WebLocalizableStrings.m +++ b/WebKit/mac/Misc/WebLocalizableStrings.mm @@ -29,11 +29,18 @@ #import <WebKit/WebLocalizableStrings.h> #import <wtf/Assertions.h> +#import <wtf/Threading.h> WebLocalizableStringsBundle WebKitLocalizableStringsBundle = { "com.apple.WebKit", 0 }; NSString *WebLocalizedString(WebLocalizableStringsBundle *stringsBundle, const char *key) { + // This function is not thread-safe due at least to its unguarded use of the mainBundle static variable + // and its use of [NSBundle localizedStringForKey:::], which is not guaranteed to be thread-safe. If + // we decide we need to use this on background threads, we'll need to add locking here and make sure + // it doesn't affect performance. + ASSERT(isMainThread()); + NSBundle *bundle; if (stringsBundle == NULL) { static NSBundle *mainBundle; diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm index 0e6c9a3..c5beb07 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm @@ -39,6 +39,7 @@ #import <WebCore/Frame.h> #import <WebCore/IdentifierRep.h> #import <WebCore/ScriptController.h> +#import <string> extern "C" { #import "WebKitPluginHost.h" @@ -568,10 +569,8 @@ kern_return_t WKPCEvaluate(mach_port_t clientPort, uint32_t pluginID, uint32_t r return KERN_FAILURE; NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID); - if (!instanceProxy) { - _WKPHBooleanAndDataReply(hostProxy->port(), pluginID, requestID, false, 0, 0); - return KERN_SUCCESS; - } + if (!instanceProxy) + return KERN_FAILURE; PluginDestroyDeferrer deferrer(instanceProxy); @@ -625,18 +624,14 @@ kern_return_t WKPCInvoke(mach_port_t clientPort, uint32_t pluginID, uint32_t req return KERN_FAILURE; NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID); - if (!instanceProxy) { - _WKPHBooleanAndDataReply(hostProxy->port(), pluginID, requestID, false, 0, 0); - return KERN_SUCCESS; - } + if (!instanceProxy) + return KERN_FAILURE; PluginDestroyDeferrer deferrer(instanceProxy); IdentifierRep* identifier = reinterpret_cast<IdentifierRep*>(serverIdentifier); - if (!IdentifierRep::isValid(identifier)) { - _WKPHBooleanAndDataReply(hostProxy->port(), instanceProxy->pluginID(), requestID, false, 0, 0); - return KERN_SUCCESS; - } + if (!IdentifierRep::isValid(identifier)) + return KERN_FAILURE; Identifier methodNameIdentifier = identifierFromIdentifierRep(identifier); @@ -661,10 +656,8 @@ kern_return_t WKPCInvokeDefault(mach_port_t clientPort, uint32_t pluginID, uint3 return KERN_FAILURE; NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID); - if (!instanceProxy) { - _WKPHBooleanAndDataReply(hostProxy->port(), pluginID, requestID, false, 0, 0); - return KERN_SUCCESS; - } + if (!instanceProxy) + return KERN_FAILURE; PluginDestroyDeferrer deferrer(instanceProxy); @@ -707,16 +700,12 @@ kern_return_t WKPCGetProperty(mach_port_t clientPort, uint32_t pluginID, uint32_ return KERN_FAILURE; NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID); - if (!instanceProxy) { - _WKPHBooleanAndDataReply(hostProxy->port(), pluginID, requestID, false, 0, 0); - return KERN_SUCCESS; - } + if (!instanceProxy) + return KERN_FAILURE; IdentifierRep* identifier = reinterpret_cast<IdentifierRep*>(serverIdentifier); - if (!IdentifierRep::isValid(identifier)) { - _WKPHBooleanAndDataReply(hostProxy->port(), pluginID, requestID, false, 0, 0); - return KERN_SUCCESS; - } + if (!IdentifierRep::isValid(identifier)) + return KERN_FAILURE; PluginDestroyDeferrer deferrer(instanceProxy); @@ -737,7 +726,7 @@ kern_return_t WKPCGetProperty(mach_port_t clientPort, uint32_t pluginID, uint32_ return KERN_SUCCESS; } -kern_return_t WKPCSetProperty(mach_port_t clientPort, uint32_t pluginID, uint32_t objectID, uint64_t serverIdentifier, data_t valueData, mach_msg_type_number_t valueLength, boolean_t* returnValue) +kern_return_t WKPCSetProperty(mach_port_t clientPort, uint32_t pluginID, uint32_t requestID, uint32_t objectID, uint64_t serverIdentifier, data_t valueData, mach_msg_type_number_t valueLength) { DataDeallocator deallocator(valueData, valueLength); @@ -753,18 +742,21 @@ kern_return_t WKPCSetProperty(mach_port_t clientPort, uint32_t pluginID, uint32_ IdentifierRep* identifier = reinterpret_cast<IdentifierRep*>(serverIdentifier); if (!IdentifierRep::isValid(identifier)) - *returnValue = false; - + return KERN_FAILURE; + + bool result; if (identifier->isString()) { Identifier propertyNameIdentifier = identifierFromIdentifierRep(identifier); - *returnValue = instanceProxy->setProperty(objectID, propertyNameIdentifier, valueData, valueLength); + result = instanceProxy->setProperty(objectID, propertyNameIdentifier, valueData, valueLength); } else - *returnValue = instanceProxy->setProperty(objectID, identifier->number(), valueData, valueLength); - + result = instanceProxy->setProperty(objectID, identifier->number(), valueData, valueLength); + + _WKPHBooleanReply(hostProxy->port(), instanceProxy->pluginID(), requestID, result); + return KERN_SUCCESS; } -kern_return_t WKPCRemoveProperty(mach_port_t clientPort, uint32_t pluginID, uint32_t objectID, uint64_t serverIdentifier, boolean_t* returnValue) +kern_return_t WKPCRemoveProperty(mach_port_t clientPort, uint32_t pluginID, uint32_t requestID, uint32_t objectID, uint64_t serverIdentifier) { NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort); if (!hostProxy) @@ -779,13 +771,16 @@ kern_return_t WKPCRemoveProperty(mach_port_t clientPort, uint32_t pluginID, uint IdentifierRep* identifier = reinterpret_cast<IdentifierRep*>(serverIdentifier); if (!IdentifierRep::isValid(identifier)) return KERN_FAILURE; - + + bool result; if (identifier->isString()) { Identifier propertyNameIdentifier = identifierFromIdentifierRep(identifier); - *returnValue = instanceProxy->removeProperty(objectID, propertyNameIdentifier); + result = instanceProxy->removeProperty(objectID, propertyNameIdentifier); } else - *returnValue = instanceProxy->removeProperty(objectID, identifier->number()); - + result = instanceProxy->removeProperty(objectID, identifier->number()); + + _WKPHBooleanReply(hostProxy->port(), instanceProxy->pluginID(), requestID, result); + return KERN_SUCCESS; } @@ -796,18 +791,14 @@ kern_return_t WKPCHasProperty(mach_port_t clientPort, uint32_t pluginID, uint32_ return KERN_FAILURE; NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID); - if (!instanceProxy) { - _WKPHBooleanReply(hostProxy->port(), pluginID, requestID, false); - return KERN_SUCCESS; - } + if (!instanceProxy) + return KERN_FAILURE; PluginDestroyDeferrer deferrer(instanceProxy); IdentifierRep* identifier = reinterpret_cast<IdentifierRep*>(serverIdentifier); - if (!IdentifierRep::isValid(identifier)) { - _WKPHBooleanReply(hostProxy->port(), instanceProxy->pluginID(), requestID, false); - return KERN_SUCCESS; - } + if (!IdentifierRep::isValid(identifier)) + return KERN_FAILURE; boolean_t returnValue; if (identifier->isString()) { @@ -828,18 +819,14 @@ kern_return_t WKPCHasMethod(mach_port_t clientPort, uint32_t pluginID, uint32_t return KERN_FAILURE; NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID); - if (!instanceProxy) { - _WKPHBooleanReply(hostProxy->port(), pluginID, requestID, false); - return KERN_SUCCESS; - } + if (!instanceProxy) + return KERN_FAILURE; PluginDestroyDeferrer deferrer(instanceProxy); IdentifierRep* identifier = reinterpret_cast<IdentifierRep*>(serverIdentifier); - if (!IdentifierRep::isValid(identifier)) { - _WKPHBooleanReply(hostProxy->port(), instanceProxy->pluginID(), requestID, false); - return KERN_SUCCESS; - } + if (!IdentifierRep::isValid(identifier)) + return KERN_FAILURE; Identifier methodNameIdentifier = identifierFromIdentifierRep(identifier); boolean_t returnValue = instanceProxy->hasMethod(objectID, methodNameIdentifier); @@ -880,10 +867,8 @@ kern_return_t WKPCEnumerate(mach_port_t clientPort, uint32_t pluginID, uint32_t return KERN_FAILURE; NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID); - if (!instanceProxy) { - _WKPHBooleanAndDataReply(hostProxy->port(), pluginID, requestID, false, 0, 0); - return KERN_SUCCESS; - } + if (!instanceProxy) + return KERN_FAILURE; data_t resultData = 0; mach_msg_type_number_t resultLength = 0; @@ -1149,4 +1134,14 @@ kern_return_t WKPCRunSyncOpenPanel(mach_port_t clientPort, data_t panelData, mac } #endif // !defined(BUILDING_ON_SNOW_LEOPARD) +kern_return_t WKPCSetException(mach_port_t clientPort, data_t message, mach_msg_type_number_t messageCnt) +{ + DataDeallocator deallocator(message, messageCnt); + + string str(message, messageCnt); + NetscapePluginInstanceProxy::setGlobalException(str.c_str()); + + return KERN_SUCCESS; +} + #endif // USE(PLUGIN_HOST_PROCESS) diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h index 2ef6b02..76981a4 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h @@ -140,7 +140,7 @@ public: data_t& usernameData, mach_msg_type_number_t& usernameLength, data_t& passwordData, mach_msg_type_number_t& passwordLength); bool convertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double& destX, double& destY, NPCoordinateSpace destSpace); - + PassRefPtr<JSC::Bindings::Instance> createBindingsInstance(PassRefPtr<JSC::Bindings::RootObject>); RetainPtr<NSData *> marshalValues(JSC::ExecState*, const JSC::ArgList& args); void marshalValue(JSC::ExecState*, JSC::JSValue value, data_t& resultData, mach_msg_type_number_t& resultLength); @@ -167,6 +167,9 @@ public: void didDraw(); void privateBrowsingModeDidChange(bool isPrivateBrowsingEnabled); + static void setGlobalException(const WebCore::String&); + static void moveGlobalExceptionToExecState(JSC::ExecState*); + // Reply structs struct Reply { enum Type { diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm index e4fe1d2..c09e3ea 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm @@ -40,6 +40,7 @@ #import "WebUIDelegate.h" #import "WebUIDelegatePrivate.h" #import "WebViewInternal.h" +#import <JavaScriptCore/Error.h> #import <JavaScriptCore/JSLock.h> #import <JavaScriptCore/PropertyNameArray.h> #import <WebCore/CString.h> @@ -1492,6 +1493,30 @@ void NetscapePluginInstanceProxy::privateBrowsingModeDidChange(bool isPrivateBro _WKPHPluginInstancePrivateBrowsingModeDidChange(m_pluginHostProxy->port(), m_pluginID, isPrivateBrowsingEnabled); } +static String& globalExceptionString() +{ + DEFINE_STATIC_LOCAL(String, exceptionString, ()); + return exceptionString; +} + +void NetscapePluginInstanceProxy::setGlobalException(const String& exception) +{ + globalExceptionString() = exception; +} + +void NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(ExecState* exec) +{ + if (globalExceptionString().isNull()) + return; + + { + JSLock lock(SilenceAssertionsOnly); + throwError(exec, GeneralError, globalExceptionString()); + } + + globalExceptionString() = UString(); +} + } // namespace WebKit #endif // USE(PLUGIN_HOST_PROCESS) diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm index 1af2ef8..1587ad0 100644 --- a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm +++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm @@ -147,6 +147,7 @@ JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t id return jsUndefined(); auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); + NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec); if (!reply.get() || !reply->m_returnValue) return jsUndefined(); @@ -253,7 +254,7 @@ void ProxyInstance::getPropertyNames(ExecState* exec, PropertyNameArray& nameArr return; auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); - + NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec); if (!reply.get() || !reply->m_returnValue) return; @@ -361,6 +362,7 @@ JSC::JSValue ProxyInstance::fieldValue(ExecState* exec, const Field* field) cons return jsUndefined(); auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); + NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec); if (!reply.get() || !reply->m_returnValue) return jsUndefined(); @@ -387,6 +389,7 @@ void ProxyInstance::setFieldValue(ExecState* exec, const Field* field, JSValue v return; auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); + NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec); } void ProxyInstance::invalidate() diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm index 9baa328..42f0877 100644 --- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm +++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm @@ -161,12 +161,24 @@ extern "C" { // Use AppKit to convert view coordinates to NSWindow coordinates. NSRect boundsInWindow = [self convertRect:[self bounds] toView:nil]; - NSRect visibleRectInWindow = [self convertRect:[self visibleRect] toView:nil]; + NSRect visibleRectInWindow; + + // Core Animation plug-ins need to be updated (with a 0,0,0,0 clipRect) when + // moved to a background tab. We don't do this for Core Graphics plug-ins as + // older versions of Flash have historical WebKit-specific code that isn't + // compatible with this behavior. + BOOL shouldClipOutPlugin = _pluginLayer && [self shouldClipOutPlugin]; + if (!shouldClipOutPlugin) + visibleRectInWindow = [self convertRect:[self visibleRect] toView:nil]; + else + visibleRectInWindow = NSZeroRect; // Flip Y to convert NSWindow coordinates to top-left-based window coordinates. float borderViewHeight = [[self currentWindow] frame].size.height; boundsInWindow.origin.y = borderViewHeight - NSMaxY(boundsInWindow); - visibleRectInWindow.origin.y = borderViewHeight - NSMaxY(visibleRectInWindow); + + if (!shouldClipOutPlugin) + visibleRectInWindow.origin.y = borderViewHeight - NSMaxY(visibleRectInWindow); BOOL sizeChanged = !NSEqualSizes(_previousSize, boundsInWindow.size); _previousSize = boundsInWindow.size; diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs index 0cf4005..58a7996 100644 --- a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs +++ b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs @@ -149,18 +149,18 @@ simpleroutine PCGetProperty(clientPort :mach_port_t; objectID :uint32_t; propertyNameIdentifier :uint64_t); -routine PCSetProperty(clientPort :mach_port_t; +simpleroutine PCSetProperty(clientPort :mach_port_t; pluginID :uint32_t; + requestID :uint32_t; objectID :uint32_t; propertyNameIdentifier :uint64_t; - value :data_t; - out returnValue :boolean_t); + value :data_t); -routine PCRemoveProperty(clientPort :mach_port_t; +simpleroutine PCRemoveProperty(clientPort :mach_port_t; pluginID :uint32_t; + requestID :uint32_t; objectID :uint32_t; - propertyNameIdentifier :uint64_t; - out returnValue :boolean_t); + propertyNameIdentifier :uint64_t); simpleroutine PCHasProperty(clientPort :mach_port_t; pluginID :uint32_t; @@ -236,3 +236,6 @@ simpleroutine PCRunSyncOpenPanel(clientPort :mach_port_t; simpleroutine PCSetFullScreenWindowIsShowing(clientPort :mach_port_t; isShowing :boolean_t); + +simpleroutine PCSetException(clientPort :mach_port_t; + message :data_t); diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h index 246fcf1..029a058 100644 --- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h +++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h @@ -119,6 +119,7 @@ class WebHaltablePlugin; - (void)addWindowObservers; - (void)removeWindowObservers; +- (BOOL)shouldClipOutPlugin; - (BOOL)convertFromX:(double)sourceX andY:(double)sourceY space:(NPCoordinateSpace)sourceSpace toX:(double *)destX andY:(double *)destY space:(NPCoordinateSpace)destSpace; diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm index bf8b80b..e93509a 100644 --- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm +++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm @@ -545,6 +545,22 @@ String WebHaltablePlugin::pluginName() const return _isHalted; } +- (BOOL)superviewsHaveSuperviews +{ + NSView *contentView = [[self window] contentView]; + for (NSView *view = self; view; view = [view superview]) { + if (view == contentView) + return YES; + } + return NO; +} + +- (BOOL)shouldClipOutPlugin +{ + NSWindow *window = [self window]; + return !window || [window isMiniaturized] || [NSApp isHidden] || ![self superviewsHaveSuperviews] || [self isHiddenOrHasHiddenAncestor]; +} + - (BOOL)hasBeenHalted { return _hasBeenHalted; diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm index 4a4a435..e96abe8 100644 --- a/WebKit/mac/Plugins/WebNetscapePluginView.mm +++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm @@ -197,19 +197,6 @@ typedef struct { #pragma mark EVENTS -- (BOOL)superviewsHaveSuperviews -{ - NSView *contentView = [[self window] contentView]; - NSView *view; - for (view = self; view != nil; view = [view superview]) { - if (view == contentView) { - return YES; - } - } - return NO; -} - - // The WindowRef created by -[NSWindow windowRef] has a QuickDraw GrafPort that covers // the entire window frame (or structure region to use the Carbon term) rather then just the window content. // We can remove this when <rdar://problem/4201099> is fixed. @@ -329,12 +316,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) // 3) the window is miniaturized or the app is hidden // 4) we're inside of viewWillMoveToWindow: with a nil window. In this case, superviews may already have nil // superviews and nil windows and results from convertRect:toView: are incorrect. - NSWindow *realWindow = [self window]; - if (window.width <= 0 || window.height <= 0 || window.x < -100000 - || realWindow == nil || [realWindow isMiniaturized] - || [NSApp isHidden] - || ![self superviewsHaveSuperviews] - || [self isHiddenOrHasHiddenAncestor]) { + if (window.width <= 0 || window.height <= 0 || window.x < -100000 || [self shouldClipOutPlugin]) { // The following code tries to give plug-ins the same size they will eventually have. // The specifiedWidth and specifiedHeight variables are used to predict the size that @@ -351,6 +333,13 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) window.clipRect.bottom = window.clipRect.top; window.clipRect.left = window.clipRect.right; + + // Core Animation plug-ins need to be updated (with a 0,0,0,0 clipRect) when + // moved to a background tab. We don't do this for Core Graphics plug-ins as + // older versions of Flash have historical WebKit-specific code that isn't + // compatible with this behavior. + if (drawingModel == NPDrawingModelCoreAnimation) + getNPRect(NSZeroRect, window.clipRect); } else { getNPRect(visibleRectInWindow, window.clipRect); } diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm index 5934d7c..eaec807 100644 --- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm +++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm @@ -1484,15 +1484,15 @@ public: { } - virtual void handleEvent(Event*) + virtual void handleEvent(Event* event) { Frame* frame = Frame::frameForWidget(this); if (!frame) return; - NSEvent* event = frame->eventHandler()->currentNSEvent(); - if ([event type] == NSMouseMoved) - [(WebBaseNetscapePluginView *)platformWidget() handleMouseMoved:event]; + NSEvent* currentNSEvent = frame->eventHandler()->currentNSEvent(); + if (event->type() == eventNames().mousemoveEvent) + [(WebBaseNetscapePluginView *)platformWidget() handleMouseMoved:currentNSEvent]; } }; diff --git a/WebKit/mac/WebView/WebFrameView.mm b/WebKit/mac/WebView/WebFrameView.mm index 565e64d..b6b1941 100644 --- a/WebKit/mac/WebView/WebFrameView.mm +++ b/WebKit/mac/WebView/WebFrameView.mm @@ -201,7 +201,7 @@ enum { - (float)_verticalPageScrollDistance { float height = [[self _contentView] bounds].size.height; - return max(height * cFractionToStepWhenPaging, 1.f); + return max<float>(height * Scrollbar::minFractionToStepWhenPaging(), height - Scrollbar::maxOverlapBetweenPages()); } static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCClass, NSArray *supportTypes) @@ -342,7 +342,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl [scrollView setHasVerticalScroller:NO]; [scrollView setHasHorizontalScroller:NO]; [scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; - [scrollView setLineScroll:cScrollbarPixelsPerLineStep]; + [scrollView setLineScroll:Scrollbar::pixelsPerLineStep()]; [self addSubview:scrollView]; // Don't call our overridden version of setNextKeyView here; we need to make the standard NSView @@ -613,7 +613,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl - (float)_horizontalPageScrollDistance { float width = [[self _contentView] bounds].size.width; - return max(width * cFractionToStepWhenPaging, 1.f); + return max<float>(width * Scrollbar::minFractionToStepWhenPaging(), width - Scrollbar::maxOverlapBetweenPages()); } - (BOOL)_pageVertically:(BOOL)up diff --git a/WebKit/mac/WebView/WebPDFDocumentExtras.h b/WebKit/mac/WebView/WebPDFDocumentExtras.h index 5a33ccf..0dce43e 100644 --- a/WebKit/mac/WebView/WebPDFDocumentExtras.h +++ b/WebKit/mac/WebView/WebPDFDocumentExtras.h @@ -23,10 +23,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#import <PDFKit/PDFDocument.h> +@class PDFDocument; -@interface PDFDocument (WebPDFDocumentExtras) -- (NSArray *)_web_allScripts; -@end - -void addWebPDFDocumentExtras(Class); +NSArray *allScriptsInPDFDocument(PDFDocument *); diff --git a/WebKit/mac/WebView/WebPDFDocumentExtras.mm b/WebKit/mac/WebView/WebPDFDocumentExtras.mm index ec580ec..b7043df 100644 --- a/WebKit/mac/WebView/WebPDFDocumentExtras.mm +++ b/WebKit/mac/WebView/WebPDFDocumentExtras.mm @@ -68,10 +68,10 @@ static void getAllValuesInPDFNameTree(CGPDFDictionaryRef tree, Vector<CGPDFObjec appendValuesInPDFNameSubtreeToVector(tree, allValues); } -static NSArray *web_PDFDocumentAllScripts(id self, SEL _cmd) +NSArray *allScriptsInPDFDocument(PDFDocument *document) { NSMutableArray *scripts = [NSMutableArray array]; - CGPDFDocumentRef pdfDocument = [self documentRef]; + CGPDFDocumentRef pdfDocument = [document documentRef]; if (!pdfDocument) return scripts; @@ -129,13 +129,3 @@ static NSArray *web_PDFDocumentAllScripts(id self, SEL _cmd) return scripts; } - -void addWebPDFDocumentExtras(Class pdfDocumentClass) -{ -#ifndef BUILDING_ON_TIGER - class_addMethod(pdfDocumentClass, @selector(_web_allScripts), (IMP)web_PDFDocumentAllScripts, "@@:"); -#else - static struct objc_method_list methodList = { 0, 1, { @selector(_web_allScripts), (char*)"@@:", (IMP)web_PDFDocumentAllScripts } }; - class_addMethods(pdfDocumentClass, &methodList); -#endif -} diff --git a/WebKit/mac/WebView/WebPDFRepresentation.mm b/WebKit/mac/WebView/WebPDFRepresentation.mm index 924bda8..36449f3 100644 --- a/WebKit/mac/WebView/WebPDFRepresentation.mm +++ b/WebKit/mac/WebView/WebPDFRepresentation.mm @@ -70,16 +70,6 @@ return PDFDocumentClass; } -+ (void)initialize -{ - if (self != [WebPDFRepresentation class]) - return; - - Class pdfDocumentClass = [self PDFDocumentClass]; - if (pdfDocumentClass) - addWebPDFDocumentExtras(pdfDocumentClass); -} - - (void)setDataSource:(WebDataSource *)dataSource; { } @@ -136,7 +126,7 @@ PDFDocument *doc = [[[[self class] PDFDocumentClass] alloc] initWithData:data]; [view setPDFDocument:doc]; - NSArray *scripts = [doc _web_allScripts]; + NSArray *scripts = allScriptsInPDFDocument(doc); [doc release]; doc = nil; diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h index 7085cec..b8e912e 100644 --- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h +++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h @@ -90,6 +90,7 @@ #define WebKitWebGLEnabledPreferenceKey @"WebKitWebGLEnabled" #define WebKitUsesProxiedOpenPanelPreferenceKey @"WebKitUsesProxiedOpenPanel" #define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime" +#define WebKitFrameSetFlatteningEnabledPreferenceKey @"WebKitFrameSetFlatteningEnabled" // These are private both because callers should be using the cover methods and because the // cover methods themselves are private. diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm index d06cc13..a1176a9 100644 --- a/WebKit/mac/WebView/WebPreferences.mm +++ b/WebKit/mac/WebView/WebPreferences.mm @@ -356,6 +356,7 @@ static WebCacheModel cacheModelForMainBundle(void) [NSNumber numberWithBool:NO], WebKitWebGLEnabledPreferenceKey, [NSNumber numberWithBool:NO], WebKitUsesProxiedOpenPanelPreferenceKey, [NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey, + [NSNumber numberWithBool:NO], WebKitFrameSetFlatteningEnabledPreferenceKey, nil]; // This value shouldn't ever change, which is assumed in the initialization of WebKitPDFDisplayModePreferenceKey above @@ -1204,6 +1205,16 @@ static NSString *classIBCreatorID = nil; return [self _setIntegerValue:allowedRunTime forKey:WebKitPluginAllowedRunTimePreferenceKey]; } +- (BOOL)isFrameSetFlatteningEnabled +{ + return [self _boolValueForKey:WebKitFrameSetFlatteningEnabledPreferenceKey]; +} + +- (void)setFrameSetFlatteningEnabled:(BOOL)flag +{ + [self _setBoolValue:flag forKey:WebKitFrameSetFlatteningEnabledPreferenceKey]; +} + - (void)didRemoveFromWebView { ASSERT(_private->numWebViews); diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h index 20c98b2..7c84d8d 100644 --- a/WebKit/mac/WebView/WebPreferencesPrivate.h +++ b/WebKit/mac/WebView/WebPreferencesPrivate.h @@ -113,6 +113,9 @@ extern NSString *WebPreferencesRemovedNotification; - (unsigned)pluginAllowedRunTime; - (void)setPluginAllowedRunTime:(unsigned)allowedRunTime; +- (BOOL)isFrameSetFlatteningEnabled; +- (void)setFrameSetFlatteningEnabled:(BOOL)flag; + // zero means do AutoScale - (float)PDFScaleFactor; - (void)setPDFScaleFactor:(float)scale; diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm index e583bb5..4b449de 100644 --- a/WebKit/mac/WebView/WebView.mm +++ b/WebKit/mac/WebView/WebView.mm @@ -1334,6 +1334,7 @@ static bool fastDocumentTeardownEnabled() settings->setPluginAllowedRunTime([preferences pluginAllowedRunTime]); settings->setWebGLEnabled([preferences webGLEnabled]); settings->setLoadDeferringEnabled(shouldEnableLoadDeferring()); + settings->setFrameSetFlatteningEnabled([preferences isFrameSetFlatteningEnabled]); } static inline IMP getMethod(id o, SEL s) |