2009-03-02 Sam Weinig Reviewed by Mark Rowe. Enable Geolocation (except on Tiger and Leopard). * Configurations/WebKit.xcconfig: 2009-03-02 Anders Carlsson Reviewed by Dan Bernstein. WebKit part of . * Plugins/Hosted/NetscapePluginHostManager.h: * Plugins/Hosted/NetscapePluginHostManager.mm: (WebKit::NetscapePluginHostManager::createPropertyListFile): Spawn the plug-in host and wait for it to create the property list. * Plugins/WebBasePluginPackage.mm: (-[WebBasePluginPackage createPropertyListFile]): Factor code out into a new method. (-[WebBasePluginPackage pListForPath:createFile:]): Call the newly added createPropertyListFile method. * Plugins/WebNetscapePluginPackage.mm: (-[WebNetscapePluginPackage createPropertyListFile]): Tell the plug-in host manager to create a property list file for us. 2009-03-02 Sam Weinig Reviewed by Geoffrey Garen. Fix for Add Geolocation support. This is not yet turned on for any Mac platform. Add SPI to ask the embedding application whether to allow Geolocation for an origin. * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::shouldAllowGeolocationForFrame): * WebView/WebUIDelegatePrivate.h: 2009-03-02 Anders Carlsson Fix PowerPC build. * Plugins/WebNetscapePluginPackage.mm: (-[WebNetscapePluginPackage _tryLoad]): 2009-03-02 Anders Carlsson Reviewed by John Sullivan, Ada Chan. Factor loading code out into its own method and get rid of a bunch of gotos. * Plugins/WebNetscapePluginPackage.mm: (-[WebNetscapePluginPackage _tryLoad]): (-[WebNetscapePluginPackage load]): 2009-03-02 Anders Carlsson Build fix. * Plugins/WebNetscapeDeprecatedFunctions.h: 2009-03-02 Anders Carlsson Reviewed by John Sullivan. Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm * Plugins/WebNetscapePluginPackage.m: Removed. * Plugins/WebNetscapePluginPackage.mm: Copied from mac/Plugins/WebNetscapePluginPackage.m. 2009-03-01 Anders Carlsson Reviewed by Sam Weinig. WebKit side of Pass the visible name to the plug-in host. * Plugins/Hosted/NetscapePluginHostManager.mm: (WebKit::NetscapePluginHostManager::spawnPluginHost): 2009-02-27 Alice Liu Fix REGRESSION (r39185): adding ".jpeg" extension to images that already have .jpg extension Reviewed by Oliver Hunt. * WebView/WebHTMLView.mm: (-[NSString matchesExtensionEquivalent:]): (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Relax the check for the proper extension to allow for known equivalents, special-cased in matchesExtensionEquivalent function. 2009-02-27 Anders Carlsson Reviewed by Geoffrey Garen. CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::addValueToArray + 55 Port the NPN_Evaluate code over from WebCore instead of using the frame loader. * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::evaluate): 2009-02-27 Anders Carlsson Reviewed by Geoffrey Garen. WebKit side of . * Plugins/Hosted/NetscapePluginHostProxy.mm: (WKPCInvokeDefault): Make InvokeDefault async. * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::addValueToArray): Handle passing NPObjects back to the plug-in host. * Plugins/Hosted/ProxyInstance.h: (WebKit::ProxyInstance::objectID): Add objectID getter. * Plugins/Hosted/WebKitPluginClient.defs: Make InvokeDefault a simpleroutine. 2009-02-27 Timothy Hatcher Fixes an exception by null checking the WebResource before adding it to the subresources array. Bug in [WebDataSource subresources] can throw an exception Reviewed by Geoff Garen and Anders Carlsson. * WebView/WebDataSource.mm: (-[WebDataSource subresources]): Null check the WebResource before adding it. 2009-02-27 Timothy Hatcher Adds a workaround for Automator creating a WebView from a secondary thread. REGRESSION (Safari 4 Beta): Automator crash on secondary thread beneath -[WebView initWithFrame:frameName:groupName:] Reviewed by Geoff Garen. * WebView/WebView.mm: (needsWebViewInitThreadWorkaround): Check for com.apple.Automator. 2009-02-27 Adam Barth Reviewed by Eric Seidel. Add a preference to reduce the power of file:// URLs. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences allowUniversalAccessFromFileUrls]): (-[WebPreferences setAllowUniversalAccessFromFileUrls:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): 2009-02-27 Simon Fraser Reviewed by Anders Carlsson https://bugs.webkit.org/show_bug.cgi?id=24242 setCursor(), and resetCursorRects() on Tiger, were using global, not local coordinates for elementAtPoint: * WebView/WebHTMLView.mm: (resetCursorRects): (setCursor): 2009-02-27 Adam Barth Reviewed by Eric Seidel. Add a preference to reduce the power of file:// URLs. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences allowUniversalAccessFromFileUrls]): (-[WebPreferences setAllowUniversalAccessFromFileUrls:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): 2009-02-26 Adele Peterson Reviewed by Geoff Garen. Fix for https://bugs.webkit.org/show_bug.cgi?id=24216 (REGRESSION r36919) Safari 4 Beta causes MSN Messenger's text entry field to lose focus after entering a message During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status, we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing. This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive. In addition to updating editing/selection/designmode-no-caret.html results, I also made sure the test cases that were fixed in r36919 and r38570 are still fixed. * WebView/WebHTMLView.mm: (-[WebHTMLView resignFirstResponder]): Keep track if we're in the process of resigning first responder. (-[WebHTMLView _isResigningFirstResponder]): Added. * WebView/WebHTMLViewInternal.h: * WebView/WebView.mm: (-[WebView _updateFocusedAndActiveStateForFrame:]): Don't set the page to be active if the document view is currently resigning first responder. 2009-02-25 Anders Carlsson Reviewed by Kevin Decker. Fix . * Plugins/Hosted/NetscapePluginInstanceProxy.h: * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::print): Ask the plug-in host to print, create a CGImage of the returned bytes and draw the image into the passed in context. * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView drawRect:]): When printing, call NetscapePluginInstanceProxy::print. * Plugins/Hosted/WebKitPluginHost.defs: 2009-02-19 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=24024 REGRESSION (r39845): Assertion failure in -[WebHistoryItem dictionaryRepresentation] when archiving a submission to about:blank I don't know how to make an automated test for this bug. * History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Account for the fact that HTTP method may be non-empty for non-HTTP requests. 2009-02-25 Chris Fleizach Reviewed by Beth Dakin. Naming change from Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail https://bugs.webkit.org/show_bug.cgi?id=24143 * WebView/WebFrame.mm: (-[WebFrame _accessibilityTree]): 2009-02-25 Simon Fraser Build fix with ACCELERATED_COMPOSITING turned on. I missed a spot in my last commit in renaming to _stoppedAcceleratedCompositingForFrame: * WebView/WebHTMLView.mm: (-[WebHTMLView close]): 2009-02-25 Simon Fraser Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=23854 Make an observable property, _isUsingAcceleratedCompositing, on WebView that DumpRenderTree can use to specialize behavior. This is implemented via a count of Frames that are using accelerated compositing. * WebView/WebHTMLView.mm: (-[WebHTMLViewPrivate clear]): (-[WebHTMLView close]): (-[WebHTMLView attachRootLayer:]): (-[WebHTMLView detachRootLayer]): * WebView/WebView.mm: (+[WebView automaticallyNotifiesObserversForKey:]): (-[WebView _startedAcceleratedCompositingForFrame:]): (-[WebView _stoppedAcceleratedCompositingForFrame:]): (-[WebView _isUsingAcceleratedCompositing]): * WebView/WebViewInternal.h: * WebView/WebViewPrivate.h: 2009-02-24 Sam Weinig Reviewed by Geoffrey Garen. Related to Allow disabling javascript: urls. * WebView/WebView.mm: (-[WebView _setJavaScriptURLsAreAllowed:]): * WebView/WebViewPrivate.h: 2009-02-24 Mark Rowe Reviewed by Oliver Hunt. Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros * Carbon/CarbonUtils.h: * Carbon/HIWebView.h: * Plugins/WebPlugin.h: * Plugins/WebPluginViewFactory.h: * WebView/WebUIDelegate.h: 2009-02-24 Peter Ammon Reviewed by Mark Rowe. Fix Services can modify non-editable content in Safari * WebView/WebHTMLView.mm: (-[WebHTMLView validRequestorForSendType:returnType:]): Return self only if we can handle both the send and return type. We should also handle a nil send or return type by ignoring the argument and returning whether we can handle the other type passed in. 2009-02-23 Anders Carlsson Reviewed by Geoffrey Garen and Darin Adler. WebKit side of . Make sure to vm_deallocate all memory we get from MIG callbacks. * Plugins/Hosted/NetscapePluginHostProxy.mm: (DataDeallocator::DataDeallocator): (DataDeallocator::~DataDeallocator): Add a simple deallocator class. (WKPCStatusText): (WKPCLoadURL): (WKPCBooleanAndDataReply): (WKPCEvaluate): (WKPCGetStringIdentifier): (WKPCInvoke): (WKPCInvokeDefault): (WKPCConstruct): (WKPCSetProperty): Use the new deallocator class. 2009-02-23 Anders Carlsson Reviewed by Darin Adler. Fix . * Plugins/Hosted/NetscapePluginInstanceProxy.h: * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::insertText): Add insert text which just calls the new WKPH function. * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView inputContext]): Get the input context from the shared input panel. (-[WebHostedNetscapePluginView keyDown:]): Let the shared input panel have a go at the event first. * Plugins/Hosted/WebKitPluginHost.defs: Add new InsertText function. 2009-02-23 Mark Rowe Fix the build after r41126. * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::invoke): (WebKit::NetscapePluginInstanceProxy::invokeDefault): (WebKit::NetscapePluginInstanceProxy::construct): 2009-02-22 Dan Bernstein Reviewed by Darin Adler. - fix REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error in r30741, and assign the height value, rather than the width, to the "height" parameter. 2009-02-21 Anders Carlsson Fix build. * Plugins/Hosted/WebTextInputWindowController.m: 2009-02-20 Anders Carlsson Reviewed by Dan Bernstein. Add a shared floating text input window implementation, to be used by the hosted plug-in view. * Plugins/Hosted/WebTextInputWindowController.h: Added. * Plugins/Hosted/WebTextInputWindowController.m: Added. 2009-02-20 Kevin Decker Reviewed by andersca. Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data we are trying to set. Depending on what other I/O is going on, it can take some time. * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h (setMetaData): Added. Calls WKSetMetadataURL(). (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread 2009-02-19 Dan Bernstein Reviewed by Sam Weinig. - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027 Do not send loader callbacks during CSS styling * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): Reverted the iChat-specific quirk added in . 2009-02-18 Dan Bernstein Reviewed by Brady Eidson. - WebKit part of fixing Crash in iChat at CSSStyleSelector::adjustRenderStyle * WebView/WebView.mm: (-[WebView _preferencesChangedNotification:]): Activate the WebCore workaround for this crash in iChat. 2009-02-18 Anders Carlsson Reviewed by Sam Weinig. Fix for There's no need to call setDefersLoading here - we already defer anything a plug-in can do that would cause a load to begin. * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView sendEvent:isDrawRect:]): 2009-02-18 Adam Roben Add SPI to get WebKit's custom pointing-hand cursor Reviewed by John Sullivan. * WebView/WebView.mm: (+[WebView _pointingHandCursor]): Added. Returns the custom pointing-hand cursor that WebKit uses. * WebView/WebViewPrivate.h: Added +_pointingHandCursor. 2009-02-17 Eric Carlson Reviewed by Antti Koivisto. https://bugs.webkit.org/show_bug.cgi?id=23917 Allow a WebKit plug-in to act as a proxy for the