diff options
Diffstat (limited to 'WebKit/mac')
19 files changed, 249 insertions, 116 deletions
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog index 7d88fed..c6151ad 100644 --- a/WebKit/mac/ChangeLog +++ b/WebKit/mac/ChangeLog @@ -1,3 +1,187 @@ +2010-06-14 Ilya Tikhonovsky <loislo@chromium.org> + + Reviewed by Pavel Feldman. + + WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc + data from inspected page to WebInspector as JSON string via http. The native + serialization to JSON string is supported by InspectorValue's classes. This patch + has the implementation of sendMessageToFrontend function. WebKit version of it still + uses ScriptFunctionCall and will be switched to another transport a little bit later. + https://bugs.webkit.org/show_bug.cgi?id=40134 + + * WebCoreSupport/WebInspectorClient.h: + * WebCoreSupport/WebInspectorClient.mm: + (WebInspectorClient::WebInspectorClient): + (WebInspectorClient::openInspectorFrontend): + +2010-06-10 David Hyatt <hyatt@apple.com> + + Reviewed by John Sullivan. + + https://bugs.webkit.org/show_bug.cgi?id=40441, back out the original fix for 29601, since it has broken continuous + wheel delta values. + + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView scrollWheel:]): + +2010-06-09 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r60889. + http://trac.webkit.org/changeset/60889 + https://bugs.webkit.org/show_bug.cgi?id=40365 + + gtk bot has some kind of memory corruption (Requested by + loislo on #webkit). + + * WebCoreSupport/WebInspectorClient.h: + * WebCoreSupport/WebInspectorClient.mm: + (WebInspectorClient::WebInspectorClient): + (WebInspectorClient::openInspectorFrontend): + (-[WebInspectorWindowController destroyInspectorView]): + +2010-06-07 Ilya Tikhonovsky <loislo@chromium.org> + + Reviewed by Pavel Feldman. + + WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc + data from inspected page to WebInspector as JSON string via http. The native + serialization to JSON string is supported by InspectorValue's classes. This patch + has the implementation of sendMessageToFrontend function. WebKit version of it still + uses ScriptFunctionCall and will be switched to another transport a little bit later. + https://bugs.webkit.org/show_bug.cgi?id=40134 + + * WebCoreSupport/WebInspectorClient.h: + * WebCoreSupport/WebInspectorClient.mm: + (WebInspectorClient::WebInspectorClient): + (WebInspectorClient::openInspectorFrontend): + +2010-06-08 Mark Rowe <mrowe@apple.com> + + Reviewed by Adele Peterson. + + <rdar://problem/8072136> REGRESSION (r56051): Inspect Element context menu does nothing in applications linked against 10.4 SDK + + * WebCoreSupport/WebContextMenuClient.mm: + (fixMenusReceivedFromOldClients): Fix up the tag on the Inspect Element menu item. This ensures that even if the + context menu layout doesn't match our expectations that the menu item will continue to trigger the web inspector. + +2010-06-08 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by Ojan Vafai and Darin Adler. + + Refactor platform dependent editing behavior code out of Settings + https://bugs.webkit.org/show_bug.cgi?id=39854 + + EditingBehavior enum was renamed to EditingBehaviorTypes and moved out from Settings.h to + EditingBehaviorTypes.h . Call sites in WebKit/ adjusted accordingly. + + * WebView/WebFrame.mm: + (core): + * WebView/WebFrameInternal.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2010-06-06 MORITA Hajime <morrita@google.com> + + Unreviewd, follow up to r60820 + + https://bugs.webkit.org/show_bug.cgi?id=40219 + [Mac] ENABLE_METER_TAG should be enabled + + Added ENABLE_METER_TAG. + + * Configurations/FeatureDefines.xcconfig: + +2010-06-06 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 40214 - Clean up error construction / throwing in JSC. + + The one egregious insanity here is that creating an error requires + a VM-entry-esqe-host call (the string argument is wrapped as a JS + object & pushed on the RegisterFile, then unwrapped back to a + UString). Changing this also means you only require a global + object, not an ExecState, to create an error. + + The methods to create error objects are also parameterized + requiring a switch on the type, which can be made cleaner and + faster by moving to a separate method per error type. Code to add + divot information to error had been duplicated, and is coalesced + back into a single function. + + Convenience methods added to create & throw type & syntax error + with a default error message, since this is a common case. + + Also, errors are currently thrown either using + "throwError(exec, error)" or "exec->setException(error)" - unify + on the former, since this is more commonly used. Add + "throwVMError(exec, error)" equivalents, as a convenience for + cases where the result was being wrapped in "JSValue::encode(...)". + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState): + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::invokeMethod): + +2010-06-02 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 40094 - The return type of NativeFunction should be EncodedJSValue + On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::invoke): + +2010-06-02 Sterling Swigart <sswigart@google.com> + + Reviewed by David Levin. + + Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches. + https://bugs.webkit.org/show_bug.cgi?id=39906 + + * Configurations/FeatureDefines.xcconfig: + +2010-06-01 David Hyatt <hyatt@apple.com> + + Reviewed by Anders Carlsson. + + Add a preference for paginating during layout (the new model for computing page breaks). + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (-[WebPreferences paginateDuringLayoutEnabled]): + (-[WebPreferences setPaginateDuringLayoutEnabled:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2010-06-01 Kevin Decker <kdecker@apple.com> + + Reviewed by Simon Fraser. + + https://bugs.webkit.org/show_bug.cgi?id=40025 + <rdar://problem/8046273> All Flash content crashes after installing CS5 Design Premium. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView supportsSnapshotting]): Do not support snapshotting Flash 10.1 if + the version is less than 10.1.53.60. + +2010-06-01 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=39434 + REGRESSION (r59811): Geolocation callbacks cannot be created + + Removing unused WebGeolocationMock. + + * WebCoreSupport/WebGeolocationMock.mm: Removed. + * WebCoreSupport/WebGeolocationMockPrivate.h: Removed. + * WebKit.exp: + 2010-05-30 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig index c64d94c..5b52793 100644 --- a/WebKit/mac/Configurations/FeatureDefines.xcconfig +++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig @@ -55,9 +55,11 @@ ENABLE_FILE_READER = ENABLE_FILE_READER; ENABLE_FILE_WRITER = ; ENABLE_GEOLOCATION = ENABLE_GEOLOCATION; ENABLE_ICONDATABASE = ENABLE_ICONDATABASE; +ENABLE_IMAGE_RESIZER = ; ENABLE_INDEXED_DATABASE = ; ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER; ENABLE_MATHML = ; +ENABLE_METER_TAG = ENABLE_METER_TAG; ENABLE_NOTIFICATIONS = ; ENABLE_OFFLINE_WEB_APPLICATIONS = ENABLE_OFFLINE_WEB_APPLICATIONS; ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG; @@ -79,4 +81,4 @@ ENABLE_XHTMLMP = ; ENABLE_XPATH = ENABLE_XPATH; ENABLE_XSLT = ENABLE_XSLT; -FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB_SLICE) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(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_BLOB_SLICE) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(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/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h index 62c0f38..7391c1e 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h @@ -47,6 +47,7 @@ namespace JSC { class Instance; class RootObject; } + class ArgList; } @class WebHostedNetscapePluginView; @class WebFrame; diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm index 8b0a2bf..9c90dae 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm @@ -901,7 +901,7 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me JSLock lock(SilenceAssertionsOnly); JSValue function = object->get(exec, methodName); CallData callData; - CallType callType = function.getCallData(callData); + CallType callType = getCallData(function, callData); if (callType == CallTypeNone) return false; @@ -1659,7 +1659,7 @@ void NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(ExecState* exec { JSLock lock(SilenceAssertionsOnly); - throwError(exec, GeneralError, stringToUString(globalExceptionString())); + throwError(exec, createError(exec, stringToUString(globalExceptionString()))); } globalExceptionString() = String(); diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm index b9a674d..b3799ca 100644 --- a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm +++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm @@ -199,7 +199,7 @@ JSValue ProxyInstance::getMethod(JSC::ExecState* exec, const JSC::Identifier& pr JSValue ProxyInstance::invokeMethod(ExecState* exec, JSC::RuntimeMethod* runtimeMethod) { if (!asObject(runtimeMethod)->inherits(&ProxyRuntimeMethod::s_info)) - return throwError(exec, TypeError, "Attempt to invoke non-plug-in method on plug-in object."); + return throwError(exec, createTypeError(exec, "Attempt to invoke non-plug-in method on plug-in object.")); const MethodList& methodList = *runtimeMethod->methods(); diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm index acd5152..a75251e 100644 --- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm +++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm @@ -584,8 +584,14 @@ String WebHaltablePlugin::pluginName() const // Flash has a bogus Info.plist entry for CFBundleVersionString, so use CFBundleShortVersionString. NSString *versionString = [pluginBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; - // Flash 10.1d51 has a crashing bug if sent a drawRect event when using the CA rendering model: <rdar://problem/7739922> - return ![versionString isEqual:@"10.1.51.95"]; + + static const NSString *flash10dotOnePrefix = @"10.1"; + if (![versionString hasPrefix:flash10dotOnePrefix]) + return YES; + + // Some prerelease versions of Flash 10.1 crash when sent a drawRect event using the CA drawing model: <rdar://problem/7739922> + static const CFStringRef knownGoodFlash10dot1Release = CFSTR("10.1.53.60"); + return CFStringCompare((CFStringRef)versionString, knownGoodFlash10dot1Release, kCFCompareNumerically) != kCFCompareLessThan; } - (BOOL)hasBeenHalted diff --git a/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm b/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm index 639f3c1..e4e069a 100644 --- a/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm +++ b/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm @@ -213,6 +213,8 @@ static void fixMenusReceivedFromOldClients(NSMutableArray *newMenuItems, NSMutab modernTag = WebMenuItemTagLeftToRight; else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagRightToLeft]]) modernTag = WebMenuItemTagRightToLeft; + else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagInspectElement]]) + modernTag = WebMenuItemTagInspectElement; else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagCorrectSpellingAutomatically]]) modernTag = WebMenuItemTagCorrectSpellingAutomatically; else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSubstitutionsMenu]]) diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm b/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm deleted file mode 100644 index 1bdb616..0000000 --- a/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2009 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. - */ - -#import "WebGeolocationMockPrivate.h" - -#import <WebCore/GeolocationServiceMock.h> -#import <WebCore/Geoposition.h> -#import <WebCore/PositionError.h> -#import <wtf/CurrentTime.h> - - -using namespace WebCore; -using namespace WTF; - -@implementation WebGeolocationMock - -+ (void)setPosition:(double)latitude:(double)longitude:(double)accuracy -{ -#if ENABLE(GEOLOCATION) - RefPtr<Coordinates> coordinates = Coordinates::create(latitude, - longitude, - false, 0.0, // altitude - accuracy, - false, 0.0, // altitudeAccuracy - false, 0.0, // heading - false, 0.0); // speed - RefPtr<Geoposition> position = Geoposition::create(coordinates.release(), currentTime() * 1000.0); - GeolocationServiceMock::setPosition(position.release()); -#endif -} - -+ (void)setError:(int)code:(NSString *)message -{ -#if ENABLE(GEOLOCATION) - PositionError::ErrorCode codeEnum = static_cast<PositionError::ErrorCode>(code); - RefPtr<PositionError> error = PositionError::create(codeEnum, message); - GeolocationServiceMock::setError(error.release()); -#endif -} - -@end diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationMockPrivate.h b/WebKit/mac/WebCoreSupport/WebGeolocationMockPrivate.h deleted file mode 100644 index 28895f2..0000000 --- a/WebKit/mac/WebCoreSupport/WebGeolocationMockPrivate.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2009 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. - */ - -#import <Foundation/Foundation.h> - -@interface WebGeolocationMock : NSObject { -} - -+ (void)setPosition:(double)latitude:(double)longitude:(double)accuracy; -+ (void)setError:(int)code:(NSString *)message; -@end diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.h b/WebKit/mac/WebCoreSupport/WebInspectorClient.h index ee81b25..bd52954 100644 --- a/WebKit/mac/WebCoreSupport/WebInspectorClient.h +++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.h @@ -42,6 +42,12 @@ class WebNodeHighlighter; class WebView; #endif +namespace WebCore { + +class Page; + +} + class WebInspectorClient : public WebCore::InspectorClient { public: WebInspectorClient(WebView *); @@ -56,26 +62,32 @@ public: virtual void populateSetting(const WebCore::String& key, WebCore::String* value); virtual void storeSetting(const WebCore::String& key, const WebCore::String& value); + virtual bool sendMessageToFrontend(const WebCore::String&); + + void releaseFrontendPage(); + private: WebView *m_webView; RetainPtr<WebNodeHighlighter> m_highlighter; + WebCore::Page* m_frontendPage; }; + class WebInspectorFrontendClient : public WebCore::InspectorFrontendClientLocal { public: WebInspectorFrontendClient(WebView*, WebInspectorWindowController*, WebCore::InspectorController*, WebCore::Page*); virtual void frontendLoaded(); - + virtual WebCore::String localizedStringsURL(); virtual WebCore::String hiddenPanels(); - + virtual void bringToFront(); virtual void closeWindow(); - + virtual void attachWindow(); virtual void detachWindow(); - + virtual void setAttachedWindowHeight(unsigned height); virtual void inspectedURLChanged(const WebCore::String& newURL); diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm index 661b0d2..d59109e 100644 --- a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm +++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm @@ -50,6 +50,7 @@ using namespace WebCore; WebView *_inspectedWebView; WebView *_webView; WebInspectorFrontendClient* _frontendClient; + WebInspectorClient* _inspectorClient; BOOL _attachedToInspectedWebView; BOOL _shouldAttach; BOOL _visible; @@ -61,6 +62,7 @@ using namespace WebCore; - (void)detach; - (BOOL)attached; - (void)setFrontendClient:(WebInspectorFrontendClient*)frontendClient; +- (void)setInspectorClient:(WebInspectorClient*)inspectorClient; - (void)setAttachedWindowHeight:(unsigned)height; - (void)destroyInspectorView; @end @@ -83,6 +85,7 @@ using namespace WebCore; WebInspectorClient::WebInspectorClient(WebView *webView) : m_webView(webView) , m_highlighter(AdoptNS, [[WebNodeHighlighter alloc] initWithInspectedWebView:webView]) +, m_frontendPage(0) { } @@ -94,9 +97,9 @@ void WebInspectorClient::inspectorDestroyed() void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorController) { RetainPtr<WebInspectorWindowController> windowController(AdoptNS, [[WebInspectorWindowController alloc] initWithInspectedWebView:m_webView]); - Page* frontendPage = core([windowController.get() webView]); - - frontendPage->inspectorController()->setInspectorFrontendClient(new WebInspectorFrontendClient(m_webView, windowController.get(), inspectorController, frontendPage)); + [windowController.get() setInspectorClient:this]; + m_frontendPage = core([windowController.get() webView]); + m_frontendPage->inspectorController()->setInspectorFrontendClient(new WebInspectorFrontendClient(m_webView, windowController.get(), inspectorController, m_frontendPage)); } void WebInspectorClient::highlight(Node* node) @@ -407,6 +410,11 @@ void WebInspectorFrontendClient::updateWindowTitle() const _frontendClient = frontendClient; } +- (void)setInspectorClient:(WebInspectorClient*)inspectorClient +{ + _inspectorClient = inspectorClient; +} + - (void)setAttachedWindowHeight:(unsigned)height { if (!_attachedToInspectedWebView) @@ -439,6 +447,8 @@ void WebInspectorFrontendClient::updateWindowTitle() const if (Page* inspectedPage = [_inspectedWebView page]) inspectedPage->inspectorController()->disconnectFrontend(); + _inspectorClient->releaseFrontendPage(); + [_webView close]; } diff --git a/WebKit/mac/WebKit.exp b/WebKit/mac/WebKit.exp index d14d805..b2ddb18 100644 --- a/WebKit/mac/WebKit.exp +++ b/WebKit/mac/WebKit.exp @@ -12,7 +12,6 @@ .objc_class_name_WebFormDelegate .objc_class_name_WebFrame .objc_class_name_WebFrameView -.objc_class_name_WebGeolocationMock .objc_class_name_WebGeolocationPosition .objc_class_name_WebHTMLRepresentation .objc_class_name_WebHTMLView diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsView.mm b/WebKit/mac/WebView/WebDynamicScrollBarsView.mm index 2041ac0..86090be 100644 --- a/WebKit/mac/WebView/WebDynamicScrollBarsView.mm +++ b/WebKit/mac/WebView/WebDynamicScrollBarsView.mm @@ -470,10 +470,8 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; { float deltaX; float deltaY; - float wheelTicksX; - float wheelTicksY; BOOL isContinuous; - WKGetWheelEventDeltas(event, &deltaX, &deltaY, &wheelTicksX, &wheelTicksY, &isContinuous); + WKGetWheelEventDeltas(event, &deltaX, &deltaY, &isContinuous); BOOL isLatchingEvent = WKIsLatchingWheelEvent(event); diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm index 999f177..7c59615 100644 --- a/WebKit/mac/WebView/WebFrame.mm +++ b/WebKit/mac/WebView/WebFrame.mm @@ -196,7 +196,7 @@ EditableLinkBehavior core(WebKitEditableLinkBehavior editableLinkBehavior) return EditableLinkDefaultBehavior; } -WebCore::EditingBehavior core(WebKitEditingBehavior behavior) +WebCore::EditingBehaviorType core(WebKitEditingBehavior behavior) { switch (behavior) { case WebKitEditingMacBehavior: diff --git a/WebKit/mac/WebView/WebFrameInternal.h b/WebKit/mac/WebView/WebFrameInternal.h index 9b2248a..586b4c3 100644 --- a/WebKit/mac/WebView/WebFrameInternal.h +++ b/WebKit/mac/WebView/WebFrameInternal.h @@ -71,7 +71,7 @@ WebView *kit(WebCore::Page*); WebCore::EditableLinkBehavior core(WebKitEditableLinkBehavior); WebCore::TextDirectionSubmenuInclusionBehavior core(WebTextDirectionSubmenuInclusionBehavior); -WebCore::EditingBehavior core(WebKitEditingBehavior); +WebCore::EditingBehaviorType core(WebKitEditingBehavior); WebView *getWebView(WebFrame *webFrame); diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h index ba4df8f..c38b395 100644 --- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h +++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h @@ -94,6 +94,7 @@ #define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime" #define WebKitFrameFlatteningEnabledPreferenceKey @"WebKitFrameFlatteningEnabled" #define WebKitHTML5ParserEnabledPreferenceKey @"WebKitHTML5ParserEnabled" +#define WebKitPaginateDuringLayoutEnabledPreferenceKey @"WebKitPaginateDuringLayoutEnabled" // 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 ac98282..36aef1f 100644 --- a/WebKit/mac/WebView/WebPreferences.mm +++ b/WebKit/mac/WebView/WebPreferences.mm @@ -1248,6 +1248,16 @@ static NSString *classIBCreatorID = nil; [self _setBoolValue:flag forKey:WebKitHTML5ParserEnabledPreferenceKey]; } +- (BOOL)paginateDuringLayoutEnabled +{ + return [self _boolValueForKey:WebKitPaginateDuringLayoutEnabledPreferenceKey]; +} + +- (void)setPaginateDuringLayoutEnabled:(BOOL)flag +{ + [self _setBoolValue:flag forKey:WebKitPaginateDuringLayoutEnabledPreferenceKey]; +} + - (WebKitEditingBehavior)editingBehavior { return static_cast<WebKitEditingBehavior>([self _integerValueForKey:WebKitEditingBehaviorPreferenceKey]); diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h index 0031860..c9a89ee 100644 --- a/WebKit/mac/WebView/WebPreferencesPrivate.h +++ b/WebKit/mac/WebView/WebPreferencesPrivate.h @@ -178,6 +178,9 @@ extern NSString *WebPreferencesRemovedNotification; - (BOOL)html5ParserEnabled; - (void)setHTML5ParserEnabled:(BOOL)flag; +- (BOOL)paginateDuringLayoutEnabled; +- (void)setPaginateDuringLayoutEnabled:(BOOL)flag; + - (BOOL)usesProxiedOpenPanel; - (void)setUsesProxiedOpenPanel:(BOOL)enabled; diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm index 97c799b..0023509 100644 --- a/WebKit/mac/WebView/WebView.mm +++ b/WebKit/mac/WebView/WebView.mm @@ -1369,7 +1369,7 @@ static bool fastDocumentTeardownEnabled() settings->setTextAreasAreResizable([preferences textAreasAreResizable]); settings->setShrinksStandaloneImagesToFit([preferences shrinksStandaloneImagesToFit]); settings->setEditableLinkBehavior(core([preferences editableLinkBehavior])); - settings->setEditingBehavior(core([preferences editingBehavior])); + settings->setEditingBehaviorType(core([preferences editingBehavior])); settings->setTextDirectionSubmenuInclusionBehavior(core([preferences textDirectionSubmenuInclusionBehavior])); settings->setDOMPasteAllowed([preferences isDOMPasteAllowed]); settings->setUsesPageCache([self usesPageCache]); @@ -1408,6 +1408,7 @@ static bool fastDocumentTeardownEnabled() settings->setLoadDeferringEnabled(shouldEnableLoadDeferring()); settings->setFrameFlatteningEnabled([preferences isFrameFlatteningEnabled]); settings->setHTML5ParserEnabled([preferences html5ParserEnabled]); + settings->setPaginateDuringLayoutEnabled([preferences paginateDuringLayoutEnabled]); } static inline IMP getMethod(id o, SEL s) |