2011-03-07 Damian Kaleta Reviewed by Anders Carlsson. QuickTime plugin should opt in to a 32-bit non-executable heap https://bugs.webkit.org/show_bug.cgi?id=55704 * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::pluginNeedsExecutableHeap): Decides per plugin if it should opt-in to a 32-bit non-executable heap. By default it should opt-out. (WebKit::PluginProcessProxy::PluginProcessProxy): 2011-03-07 Sam Weinig Reviewed by Anders Carlsson. Add unableToImplementPolicy callback for WebKit2 policy client https://bugs.webkit.org/show_bug.cgi?id=55884 * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::unableToImplementPolicy): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebPolicyClient.cpp: (WebKit::WebPolicyClient::unableToImplementPolicy): * UIProcess/WebPolicyClient.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp: (WebKit::InjectedBundlePagePolicyClient::unableToImplementPolicy): * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy): Pipe unableToImplementPolicy through both the bundle and the main WebKit2 API. 2011-03-07 Sam Weinig Reviewed by Anders Carlsson. Replace WebKit2's decidePolicyForMIMEType with decidePolicyForResponse https://bugs.webkit.org/show_bug.cgi?id=55827 - Renamed FrameLoaderClient::dispatchDecidePolicyForMIMEType to dispatchDecidePolicyForResponse and pass the entire response, instead of just the MIMEType. - Updated both UIProcess API and bundle API to also be based on the whole response, not just the MIMEType. * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::decidePolicyForResponse): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebPolicyClient.cpp: (WebKit::WebPolicyClient::decidePolicyForResponse): * UIProcess/WebPolicyClient.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp: (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse): * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 2011-03-06 Jessie Berlin Reviewed by Sam Weinig. WebKit2: Use CFNetwork Sessions API. https://bugs.webkit.org/show_bug.cgi?id=55435. When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the Private Browsing Storage Session. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Add support for using the new WKSI functions in WebCore. 2011-03-06 Oleg Romashin Reviewed by Kenneth Rohde Christiansen. [Qt][WK2] Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part1 Adding dummy Qt files for Plugin Process implementation, Adding missing sources into Qt pro files https://bugs.webkit.org/show_bug.cgi?id=55719 * DerivedSources.pro: * PluginProcess/qt: Added. * PluginProcess/qt/PluginControllerProxyQt.cpp: Added. (WebKit::PluginControllerProxy::platformInitialize): (WebKit::PluginControllerProxy::platformDestroy): (WebKit::PluginControllerProxy::platformGeometryDidChange): * PluginProcess/qt/PluginProcessMainQt.cpp: Added. (WebKit::PluginProcessMain): * PluginProcess/qt/PluginProcessQt.cpp: Added. (WebKit::PluginProcess::platformInitialize): * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: Added. (WebKit::PluginProcessProxy::platformInitializePluginProcess): * WebKit2.pri: * WebKit2.pro: * WebKit2API.pri: * WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp: Added. (WebKit::PluginProxy::needsBackingStore): 2011-03-05 Sam Weinig Reviewed by Dan Bernstein. Remove unneeded onPageClose function from DrawingArea https://bugs.webkit.org/show_bug.cgi?id=55836 * WebProcess/WebPage/DrawingArea.h: Remove empty function. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): Remove only called 2011-03-04 Jon Honeycutt WK2 Mac build fix. * UIProcess/API/C/WKPage.cpp: (WKPageComputePagesForPrinting): (WKPageBeginPrinting): * UIProcess/API/C/WKPagePrivate.h: 2011-03-04 Jon Honeycutt WK2 Mac build fix. * UIProcess/API/C/WKPagePrivate.h: 2011-03-04 Jon Honeycutt WK2 needs printing support on Windows https://bugs.webkit.org/show_bug.cgi?id=55800 Reviewed by Darin Adler. * UIProcess/API/C/WKPage.cpp: (ComputedPagesContext::ComputedPagesContext): (computedPagesCallback): From the Vector of WebCore::IntRects, build up a Vector of WKRects. Call the callback, passing these rects and the scale factor. (printInfoFromWKPrintInfo): Return a PrintInfo structure from the WKPrintInfo. (WKPageComputePagesForPrinting): Call WebPageProxy::computePagesForPrinting(). Pass computedPagesCallback as the callback function, so that we can translate the WebCore rect type to WKRect before calling the caller's callback function. (WKPageBeginPrinting): Call WebPageProxy::beginPrinting(). (WKPageDrawPagesToPDF): Call WebPageProxy::drawPagesToPDF(). * UIProcess/API/C/WKPagePrivate.h: Declare the WKPrintInfo type and new functions. * UIProcess/WebPageProxy.cpp: Compile this code on Windows. * UIProcess/WebPageProxy.h: Ditto. * UIProcess/win/WebView.cpp: (WebKit::WebView::paint): We're painting the window; leave printing mode. * WebProcess/WebPage/WebPage.cpp: Compile this code on Windows. * WebProcess/WebPage/WebPage.h: Ditto. * WebProcess/WebPage/WebPage.messages.in: Ditto. 2011-03-04 Steve Falkenburg Reviewed by Darin Adler. Adopt VersionStamper tool for Windows WebKit DLLs https://bugs.webkit.org/show_bug.cgi?id=55784 We now use a tool to stamp the version number onto the Apple WebKit DLLs during the post-build step. Fetch the WebKit version from a string resource instead of the version resource. * UIProcess/win/WebPageProxyWin.cpp: (WebKit::userVisibleWebKitVersionString): Fetch version from a string resource. * win/WebKit2.rc: Removed version, added stringtable. * win/WebKit2WebProcess.rc: Removed. * win/WebKit2WebProcess.vcproj: * win/WebKit2WebProcessPostBuild.cmd: Don't run autoversion script. It isn't used in this project. * win/WebKit2WebProcessPreBuild.cmd: Stamp version. * win/WebKitPostBuild.cmd: Stamp version. 2011-03-04 Jeff Miller Reviewed by Darin Adler. Add WKPageValidateCommand() https://bugs.webkit.org/show_bug.cgi?id=55793 On the Mac, validation of edit menu commands is handled within WebKit2 in WKView.mm. However, on Windows we need to do this in the client, so expose this functionality in the API via WKPageValidateCommand(). Change the Mac implementation to call WebPageProxy::validateCommand() with a callback to match this new API, so it no longer has to go through PageClient to get notified when a command is validated. This makes PageClient::setEditCommandState() obsolete, so I removed the stub implementations in qt and gtk as well. * UIProcess/API/C/WKPage.cpp: (WKPageValidateCommand): Added. * UIProcess/API/C/WKPage.h: Added WKPageValidateCommand(). * UIProcess/API/mac/PageClientImpl.h: Removed setEditCommandState(). * UIProcess/API/mac/PageClientImpl.mm: Removed setEditCommandState(). * UIProcess/API/mac/WKView.mm: (validateCommandCallback): Added. (-[WKView validateUserInterfaceItem:]): Pass callback to validateCommand(). * UIProcess/API/qt/qwkpage.cpp: Removed setEditCommandState(). * UIProcess/API/qt/qwkpage_p.h: Removed setEditCommandState(). * UIProcess/PageClient.h: Removed setEditCommandState(). * UIProcess/WebPageProxy.cpp: Removed didValidateCommand(). (WebKit::WebPageProxy::validateCommand): This now takes a callback. (WebKit::WebPageProxy::validateCommandCallback): Added. (WebKit::WebPageProxy::processDidCrash): Invalidate m_validateCommandCallbacks. * UIProcess/WebPageProxy.h: Removed didValidateCommand(), validateCommand() now takes a callback. (WebKit::ValidateCommandCallback::create): Added. (WebKit::ValidateCommandCallback::~ValidateCommandCallback): Added. (WebKit::ValidateCommandCallback::performCallbackWithReturnValue): Added. (WebKit::ValidateCommandCallback::invalidate): Added. (WebKit::ValidateCommandCallback::ValidateCommandCallback): Added. * UIProcess/WebPageProxy.messages.in: Removed DidValidateCommand, added ValidateCommandCallback. * UIProcess/gtk/WebView.cpp: Removed setEditCommandState(). * UIProcess/gtk/WebView.h: Removed setEditCommandState(). * UIProcess/win/WebView.cpp: Removed setEditCommandState(). * UIProcess/win/WebView.h: Removed setEditCommandState(). * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::validateCommand): This now takes a callbackID. * WebProcess/WebPage/WebPage.h: validateCommand now takes a callbackID. * WebProcess/WebPage/WebPage.messages.in: ValidateCommand now takes a callbackID. 2011-03-04 Brian Weinstein Reviewed by Darin Adler. Reference-counting for WKBundlePageResourceLoadClient::willSendRequestForFrame seems unclear/wrong https://bugs.webkit.org/show_bug.cgi?id=53919 Adopt the result of m_client.willSendRequestForFrame (which will be leaked by the client). * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp: (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame): 2011-03-04 Darin Adler Reviewed by Mark Rowe. WebKit2 session state should include even loads too new to be in the back/forward list https://bugs.webkit.org/show_bug.cgi?id=55781 part of * UIProcess/cf/WebPageProxyCF.cpp: (WebKit::WebPageProxy::sessionStateData): Save URLs that are early enough in the loading process to not be included in the back/forward list yet: The pending API request URL and the provisional URL. (WebKit::WebPageProxy::restoreFromSessionStateData): Call loadURL if the back/forward list is not restored and a URL is present. Later we can improve the way we handle the case where we have both a back/forward list and a URL. 2011-03-04 Jessie Berlin Reviewed by Darin Adler. WebKit2: Use CFNetwork Sessions API. https://bugs.webkit.org/show_bug.cgi?id=55435. Add in the CFURLSTORAGESESSIONS guards that I incorrectly left out because the code was contained within guards that made USE(CFURLSTORAGESESSIONS) always be true. * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess): 2011-03-04 Jessie Berlin Reviewed by Maciej Stachowiak. WebKit2: Use CFNetwork Sessions API. https://bugs.webkit.org/show_bug.cgi?id=55435. When Private Browsing is enabled, get the cached url response from the cache associated with the Private Browsing Storage Session. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::platformHasLocalDataForURL): If Private Browsing is enabled, call into WKSI to get the response. (WebKit::WebPage::cachedResponseMIMETypeForURL): Ditto. * WebProcess/WebPage/win/WebPageWin.cpp: (WebKit::WebPage::platformHasLocalDataForURL): If Private Browsing is enabled, call into WKSI to get the CFURLCacheRef. (WebKit::WebPage::cachedResponseMIMETypeForURL): Ditto. 2011-03-04 Jeff Miller Reviewed by Darin Adler. Move WKViewExecuteCommand() to WKPageExecuteCommand() https://bugs.webkit.org/show_bug.cgi?id=55744 Executing a command operates on a page, so it makes more sense for it to be in WKPage. This also makes it available on all platforms, not just Windows. * UIProcess/API/C/WKPage.cpp: (WKPageExecuteCommand): Added. * UIProcess/API/C/WKPage.h: Add WKPageExecuteCommand(). * UIProcess/API/C/win/WKView.cpp: Remove WKViewExecuteCommand(). * UIProcess/API/C/win/WKView.h: Remove WKViewExecuteCommand(). 2011-03-04 Dan Bernstein LLVM Compiler build fix. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::runJavaScriptInMainFrame): 2011-03-03 Timothy Hatcher Make the WKPageRunJavaScriptFunction callback take a WKSerializedScriptValueRef. https://webkit.org/b/55623 Reviewed by Darin Adler. * UIProcess/API/C/WKPage.cpp: (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback. (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef. * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks. (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback. (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue from the DataReference before calling the callback. (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks. * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks. * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue. And use ScriptValueCallback to send the message back. 2011-03-03 Brian Weinstein Reviewed by Adam Roben. Cleanup from https://bugs.webkit.org/show_bug.cgi?id=55427. Call WebCore::startObservingCookieChanges and WebCore::stopObservingCookieChanges on all platforms, and stub the functions on platforms that don't implement them. * WebProcess/Cookies/WebCookieManager.cpp: (WebKit::WebCookieManager::startObservingCookieChanges): (WebKit::WebCookieManager::stopObservingCookieChanges): 2011-03-03 Jeff Miller Reviewed by Darin Adler. Refactor classes in GenericCallback.h https://bugs.webkit.org/show_bug.cgi?id=55732 Since we're going to need to add additional callback classes, make a CallbackBase class that manages the context and the callback ID. The existing callback classes (VoidCallback, GenericCallback, and ComputedPagesCallback) now all derive from CallbackBase. Fix bug in VoidCallback where we meant to implement the destructor, but we were implementing the default constructor instead (we forgot the leading ~). * UIProcess/GenericCallback.h: (WebKit::CallbackBase::~CallbackBase): (WebKit::CallbackBase::callbackID): (WebKit::CallbackBase::CallbackBase): (WebKit::CallbackBase::context): (WebKit::CallbackBase::generateCallbackID): (WebKit::VoidCallback::~VoidCallback): (WebKit::VoidCallback::performCallback): (WebKit::VoidCallback::invalidate): (WebKit::VoidCallback::VoidCallback): (WebKit::GenericCallback::create): (WebKit::GenericCallback::~GenericCallback): (WebKit::GenericCallback::performCallbackWithReturnValue): (WebKit::GenericCallback::invalidate): (WebKit::GenericCallback::GenericCallback): (WebKit::ComputedPagesCallback::create): (WebKit::ComputedPagesCallback::~ComputedPagesCallback): (WebKit::ComputedPagesCallback::performCallbackWithReturnValue): (WebKit::ComputedPagesCallback::invalidate): (WebKit::ComputedPagesCallback::ComputedPagesCallback): 2011-03-03 Adam Roben Don't assume the web process has had a chance to paint before the view has to paint Fixes REGRESSION (r80307): Lots of tests crashing in BackingStore::paint Reviewed by Anders Carlsson. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::paint): Bail if the web process hasn't had a chance to paint yet. 2011-03-03 Adam Roben Throw away DrawingAreaProxyImpl's backing store after not painting for 5 seconds The intent is to save memory for views that aren't painting. Fixes WebPageProxy should delete its backing store after not painting for a while Reviewed by Anders Carlsson. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize our timer. (WebKit::DrawingAreaProxyImpl::paint): Don't bail if we don't have a backing store (but do bail if we're in accelerated compositing mode); we might have thrown it away to save memory but now are being asked to paint by the view. The existing code in this function will handle getting a new backing store if possible by blocking for a little while to try to receive a DidUpdateBackingStoreState message. Added an assertion that we do have a backing store if we don't have any outstanding UpdateBackingStoreState requests. After painting, call discardBackingStoreSoon to update our timer. (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Set the timer for 5 seconds in the future. (WebKit::DrawingAreaProxyImpl::discardBackingStore): Throw away the backing store, and tell the web process we'll need a full backing store update on the next paint. * UIProcess/DrawingAreaProxyImpl.h: Added m_discardBackingStoreTimer. 2011-03-03 Adam Roben Add a way to tell the web process to perform a full backing store update on its next paint Messages::DrawingArea::UpdateBackingStoreState now takes a boolean specifying whether the full backing store update should happen immediately or should be deferred until the next paint or compositing mode change occurs. The deferred update isn't used yet, but will be used when we start throwing away backing stores to save memory. Fixes UI process needs a way to tell the web process its backing store needs a full update on the next paint Reviewed by Anders Carlsson. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::paint): If we have an outstanding backing store state change request, tell the web process to perform the backing store update right away, in case we previously told it it could defer the update. (WebKit::DrawingAreaProxyImpl::sizeDidChange): Specify that we need an immediate backing store update. (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): We can no longer assert that we were waiting for a DidUpdateBackingStoreState message when we receive one, as it's possible for the web process to decide to send us this message on its own (if we asked it to do a deferred backing store update and then it needed to paint some part of the page). Specify that we need an immediate backing store update if the web process hasn't updated to our latest state, as we're about to draw potentially out-of-date bits to the screen and want to get the right bits as soon as possible. Also added a FIXME about a potential optimization. (WebKit::DrawingAreaProxyImpl::backingStoreStateDidChange): Added a RespondImmediatelyOrNot parameter, which is just passed through to sendUpdateBackingStoreState. (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): Added a RespondImmediatelyOrNot parameter that is used to specify to the web process whether to perform the full backing store update immediately. We now only wait for a DidUpdateBackingStoreState message (and thus suppress any more UpdateBackingStoreState messages until one is received) when we ask the web process for an immediate response; otherwise we could end up accidentally calling waitForAndDispatchDidUpdateBackingStoreState when the web process hasn't been told to send us such a message. * UIProcess/DrawingAreaProxyImpl.h: Added RespondImmediatelyOrNot. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::updateBackingStoreState): Added respondImmediately argument. * WebProcess/WebPage/DrawingArea.messages.in: Added respondImmediately argument to UpdateBackingStoreState message. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize new member that's used to track whether we should send a DidUpdateBackingStoreState message instead of an Update or compositing mode change message. This will be set to true when a deferred backing store update is pending. (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): If a deferred update is pending, send a DidUpdateBackingStoreState message instead of a compositing mode change message. (WebKit::DrawingAreaImpl::updateBackingStoreState): Added respondImmediately argument. If we've already been told about this state ID (as can happen when the UI process decides it needs an immediate update to a state that it previously requested a deferred update to), don't bother updating the page's size, etc. In addition, if we've already sent a DidUpdateBackingStoreState message for this state, we don't have to do anything at all. Moved code to send the DidUpdateBackingStoreState message from here... (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): ...to here. (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Always update our dirty region, even if painting is suspended or we're in the process of updating the backing store state. It causes no harm and simplifies the code. If a deferred update is pending, send a DidUpdateBackingStoreState message instead of a compositing mode change message. Also removed a redundant if. (WebKit::DrawingAreaImpl::display): Added an assertion that this isn't called while updating backing store state, as otherwise we might end up sending two DidUpdateBackingStoreState messages. If a deferred update is pending, send a DidUpdateBackingStoreState message instead of an Update message. * WebProcess/WebPage/DrawingAreaImpl.h: Updated updateBackingStoreState to match the base class. Added sendDidUpdateBackingStoreState and m_shouldSendDidUpdateBackingStoreState. 2011-03-03 Andy Estes Reviewed by Darin Adler. When displaying the missing plug-in sheet, pass the 'pluginspage' attribute to the UI process. https://bugs.webkit.org/show_bug.cgi?id=55553 * UIProcess/API/C/WKPage.h: Add pluginsPageURL as the third argument to missingPluginButtonClicked. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::missingPluginButtonClicked): Ditto. * UIProcess/WebPageProxy.h: Ditto. * UIProcess/WebPageProxy.messages.in: Ditto. * UIProcess/WebUIClient.cpp: (WebKit::WebUIClient::missingPluginButtonClicked): Ditto. * UIProcess/WebUIClient.h: Ditto. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::missingPluginButtonClicked): Get the value of pluginspageAttr. 2011-03-03 Alexey Proskuryakov Suggested by Dan Bernstein. Move "const" around "NSString *", so that it suddenly begins to make sense. * WebProcess/mac/FullKeyboardAccessWatcher.mm: 2011-03-03 Jeff Miller Reviewed by Anders Carlsson. WebKit2: Add WKViewRef API for executing edit commands https://bugs.webkit.org/show_bug.cgi?id=49829 Added WKViewExecuteCommand() and documented some of the WebCore EditorCommand strings. * UIProcess/API/C/win/WKView.cpp: (WKViewExecuteCommand): Added. * UIProcess/API/C/win/WKView.h: Added WKViewExecuteCommand() and comment block with WebCore EditorCommand strings. 2011-03-03 Jessie Berlin Reviewed by Adam Roben. WebKit2: Use CFNetwork Sessions API. https://bugs.webkit.org/show_bug.cgi?id=55435 Set the Private Browsing Storage Session on requests when Private Browsing is enabled. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Support using WKCopyRequestWithStorageSession in WebCore. 2011-03-03 Adam Roben Don't try to paint outside the page's bounds When the page is resized smaller, we would allocate a ShareableBitmap at the old, larger size, even though we only needed to paint at the new, smaller size. The assertion added in this patch will fire during the WebKit2/ResizeViewWhileHidden API test if this fix gets broken in the future. Fixes DrawingAreaImpl allocates more memory than necessary when the page is resized smaller Reviewed by Anders Carlsson. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::updateBackingStoreState): Update our dirty region even if painting is suspended (but still refrain from updating it when in accelerated compositing mode). Rather than unite our existing dirty region with the page's new bounds, overwrite our dirty region with the page's new bounds. This prevents us from accumulating a dirty region that is larger than the page in the case where the page is being resized smaller. (WebKit::DrawingAreaImpl::display): Added an assertion that we're not trying to paint outside of the page's bounds. 2011-03-03 Maciej Stachowiak Reviewed by Brady Eidson. WebProcess is calling CFURLCacheRemoveAllCachedResponses when loading, results in origin-load for all resources https://bugs.webkit.org/show_bug.cgi?id=55701 * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize cache-clearing flag parameters to false. (WebKit::WebProcessCreationParameters::encode): Serialize them properly. (WebKit::WebProcessCreationParameters::decode): And deserialize. 2011-03-03 Alexey Proskuryakov Reviewed by Darin Adler. REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access https://bugs.webkit.org/show_bug.cgi?id=55633 * WebKit2.xcodeproj/project.pbxproj: * WebProcess/mac/FullKeyboardAccessWatcher.h: Added. * WebProcess/mac/FullKeyboardAccessWatcher.mm: Added. (-[FullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]): (-[FullKeyboardAccessWatcher init]): (+[FullKeyboardAccessWatcher fullKeyboardAccessEnabled]): Get the current state of full keyboard access, listening for change notifications. * WebProcess/WebProcess.h: Added fullKeyboardAccessEnabled(). * WebProcess/WebProcess.cpp: (WebKit::WebProcess::fullKeyboardAccessEnabled): WebKit1 also doesn't implement this on platforms other than Mac. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::fullKeyboardAccessEnabled): Just ask FullKeyboardAccessWatcher. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::keyboardUIMode): * WebProcess/WebCoreSupport/WebChromeClient.h: Added keyboardUIMode(), removed tabsToLinks(). * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyboardUIMode): * WebProcess/WebPage/WebPage.h: Generate keyboard UI mode from tabToLinks preference and current state of FKA. 2011-03-03 Sam Weinig Reviewed by Anders Carlsson. Give the Bundle's policy client the option of deciding the policy https://bugs.webkit.org/show_bug.cgi?id=55699 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add WKBundlePagePolicyAction enum and make it the return value of the WKBundlePagePolicyClient functions. * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp: (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction): (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction): (WebKit::InjectedBundlePagePolicyClient::decidePolicyForMIMEType): * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h: Pass the return value back to the caller. For unimplemented functions, return WKBundlePagePolicyActionPassThrough. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Call the policy function early if the bundle handles it. 2011-03-02 Brian Weinstein Reviewed by Adam Roben. Rest of WebKit2: Need a way to send notifications to client when cookies change https://bugs.webkit.org/show_bug.cgi?id=55427 This patch adds the communication from the WebProcess <-> UIProcess about starting/stopping listening for cookies changing, and adds a mechanism for the WebProcess to notify the UIProcess when the cookies have changed. The WebProcess sends a message to the UIProcess when the cookies change, and the UIProcess passes this along to the WebCookieManagerProxyClient. * UIProcess/API/C/WKCookieManager.cpp: (WKCookieManagerSetClient): Call through to WebCookieManagerProxy. (WKCookieManagerStartObservingCookieChanges): Ditto. (WKCookieManagerStopObservingCookieChanges): Ditto. * UIProcess/API/C/WKCookieManager.h: Add new functions and a WKCookieManagerClient which is responsible for cookiesDidChange. * UIProcess/WebCookieManagerProxy.cpp: (WebKit::WebCookieManagerProxy::initializeClient): (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Send the message down to the web process. (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto. (WebKit::WebCookieManagerProxy::cookiesDidChange): Tell the WKCookieManagerClient the cookies were modified. * UIProcess/WebCookieManagerProxy.h: * UIProcess/WebCookieManagerProxy.messages.in: Add new messages. * UIProcess/WebCookieManagerProxyClient.cpp: Added. (WebKit::WebCookieManagerProxyClient::cookiesDidChange): Calls through to the client saying that cookies changed. * UIProcess/WebCookieManagerProxyClient.h: Added. * WebProcess/Cookies/WebCookieManager.cpp: (WebKit::WebCookieManager::startObservingCookieChanges): Call through to WebCore::startObservingCookieChanges (on platforms that support it). (WebKit::WebCookieManager::stopObservingCookieChanges): Ditto (for stopObservingCookieChanges). (WebKit::WebCookieManager::dispatchDidModifyCookies): Send a message to the UI process that cookies changed. * WebProcess/Cookies/WebCookieManager.h: * WebProcess/Cookies/WebCookieManager.messages.in: Add new files. * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * GNUmakefile.am: * win/WebKit2.vcproj: 2011-03-03 Anders Carlsson Reviewed by Darin Adler. Remove CanRunBeforeUnloadConfirmPanel sync message https://bugs.webkit.org/show_bug.cgi?id=55689 * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): Encode and decode canRunBeforeUnloadConfirmPanel, as well as canRunModal, which wasn't being encoded/decoded. * Shared/WebPageCreationParameters.h: Add canRunBeforeUnloadConfirmPanel. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::initializeUIClient): Send SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages. (WebKit::WebPageProxy::creationParameters): Initialize parameters.canRunBeforeUnloadConfirmPanel. * UIProcess/WebPageProxy.messages.in: Remove CanRunBeforeUnloadConfirmPanel message. * UIProcess/WebUIClient.cpp: (WebKit::WebUIClient::canRunBeforeUnloadConfirmPanel): * UIProcess/WebUIClient.h: Make canRunBeforeUnloadConfirmPanel const. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::canRunBeforeUnloadConfirmPanel): Ask the web page instead of sending a synchronous message. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Initialize m_canRunBeforeUnloadConfirmPanel. * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::canRunBeforeUnloadConfirmPanel): (WebKit::WebPage::setCanRunBeforeUnloadConfirmPanel): Add getter and setter for m_canRunBeforeUnloadConfirmPanel. (WebKit::WebPage::setCanRunModal): Add setter for m_canRunModal. * WebProcess/WebPage/WebPage.messages.in: Add SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages. 2011-03-03 Adam Roben Create the CFBundleRef for WebKit.dll on Windows if needed WebKit part of All inspector tests time out or crash on Windows 7 Release (WebKit2 Tests) Reviewed by Darin Adler. * Shared/win/WebKitBundle.cpp: Added. (WebKit::createWebKitBundle): Returns a pre-existing bundle, if possible, otherwise creates and returns a new bundle. (WebKit::webKitBundle): Creates and caches a bundle, and returns it. * Shared/win/WebKitBundle.h: Added. * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::inspectorPageURL): * WebProcess/WebPage/win/WebInspectorWin.cpp: (WebKit::WebInspector::localizedStringsURL): Changed to use webKitBundle() to ensure that the bundle has been created. * win/WebKit2.vcproj: Added new files. 2011-03-03 Peter Kasting Reviewed by James Robinson. Drop redundant "Windows; " from the Windows-specific User Agent string. https://bugs.webkit.org/show_bug.cgi?id=54567 * UIProcess/win/WebPageProxyWin.cpp: (WebKit::WebPageProxy::standardUserAgent): 2011-03-02 Sheriff Bot Unreviewed, rolling out r80188. http://trac.webkit.org/changeset/80188 https://bugs.webkit.org/show_bug.cgi?id=55647 Broke the WebKit API tests. (Requested by xenon on #webkit). * UIProcess/API/C/WKPage.cpp: (WKPageRunJavaScriptInMainFrame): (callRunJavaScriptBlockAndRelease): * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::runJavaScriptInMainFrame): (WebKit::WebPageProxy::processDidCrash): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::runJavaScriptInMainFrame): 2011-03-02 Jeff Miller Reviewed by Darin Adler. Rename WebKit::WebPage::validateMenuItem() to validateCommand() https://bugs.webkit.org/show_bug.cgi?id=55636 Since this method can validate more than menu items, validateCommand() is a better name. Also rename various messages and WebKit::WebPageProxy::didValidateMenuItem() to didValidateCommand(). * UIProcess/API/mac/WKView.mm: (-[WKView validateUserInterfaceItem:]): Call validateCommand() instead of validateMenuItem(). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::validateCommand): Renamed from validateMenuItem(). (WebKit::WebPageProxy::didValidateCommand): Renamed from didValidateMenuItem(). * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: Renamed DidValidateMenuItem to DidValidateCommand. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::validateCommand): Renamed from validateMenuItem(). * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Renamed ValidateMenuItem to ValidateCommand. 2011-03-02 Anders Carlsson Reviewed by Sam Weinig. WKPageSetMemoryCacheClientCallsEnabled doesn't persist if web process crashes https://bugs.webkit.org/show_bug.cgi?id=55635 * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): Encode and decode areMemoryCacheClientCallsEnabled. * Shared/WebPageCreationParameters.h: Add areMemoryCacheClientCallsEnabled member variable. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): Initialize m_areMemoryCacheClientCallsEnabled. (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled): Update m_areMemoryCacheClientCallsEnabled. Send a message if necessary. (WebKit::WebPageProxy::creationParameters): Set areMemoryCacheClientCallsEnabled. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Call WebPage::setMemoryCacheMessagesEnabled. 2011-03-02 Timothy Hatcher Make the runJavaScriptInMainFrame callback send a WKSerializedScriptValueRef. https://webkit.org/b/55623 Reviewed by Darin Adler. * UIProcess/API/C/WKPage.cpp: (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback. (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef. * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks. (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback. (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue from the DataReference before calling the callback. (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks. * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks. * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue. And use ScriptValueCallback to send the message back. 2011-03-02 Jessie Berlin Reviewed by Adam Roben. WebKit2: Use CFNetwork Sessions API. https://bugs.webkit.org/show_bug.cgi?id=55435 Add the ability to create a Private Browsing Storage Session. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): Encode the UI Process bundle identifier. (WebKit::WebProcessCreationParameters::decode): Decode the UI Process bundle identifier. * Shared/WebProcessCreationParameters.h: * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): Grab the bundle identifier and use it to set the WebProcessCreationParameter. * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess): Ditto. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Support using the wkCreatePrivateStorageSession WKSI in WebCore. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Set the base for the Private Browsing Storage Session identifier to be the bundle identifier from the UI Process so that WebKit1 would create a Private Browsing Storage Session with the same identifier as WebKit2. 2011-03-01 Brian Weinstein Reviewed by Adam Roben. Part of WebKit2: Need a way to send notifications to client when cookies change https://bugs.webkit.org/show_bug.cgi?id=55427 * WebProcess/Cookies/WebCookieManager.cpp: (WebKit::WebCookieManager::dispatchDidModifyCookies): Add a stub with a FIXME to send a message to the UI process. * WebProcess/Cookies/WebCookieManager.h: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::createCookiesStrategy): (WebKit::WebPlatformStrategies::notifyCookiesChanged): Call WebCookieManager::dispatchDidModifyCookies. * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 2011-03-02 Andras Becsi Reviewed by Laszlo Gombos. [Qt][WK2] generate-forwarding-headers.pl should generate paths with framework names https://bugs.webkit.org/show_bug.cgi?id=55478 On case insensitive systems the generated forwarding headers cause build problems. * Scripts/generate-forwarding-headers.pl: The generated header should also contain the framework name. 2011-03-01 Jeff Miller Reviewed by Darin Adler. Expose some selection state fields in WKPage https://bugs.webkit.org/show_bug.cgi?id=55541 Added WKPageCanDelete(), WKPageHasSelectedRange(), and WKPageIsContentEditable() so we can enable some Edit menu items properly on Windows when using WebKit2. * UIProcess/API/C/WKPage.cpp: (WKPageCanDelete): Added. (WKPageHasSelectedRange): Added. (WKPageIsContentEditable): Added. * UIProcess/API/C/WKPage.h: Added new functions. * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::canDelete): Added. (WebKit::WebPageProxy::hasSelectedRange): Added. (WebKit::WebPageProxy::isContentEditable): Added. 2011-03-01 Mark Rowe Hide the typeinfo name symbols for std::exception and std::bad_alloc too. * Configurations/Base.xcconfig: 2011-03-01 Mark Rowe Reviewed by Sam Weinig. Add verification scripts to WebKit2 project and fix the issues they reveal. * Configurations/Base.xcconfig: Add linker flags to prevent C++ standard library functions from being exported as weak externals. * Configurations/WebKit2.xcconfig: Inherit linker flags from the project level. * Shared/WebContextMenuItem.cpp: (WebKit::WebContextMenuItem::separatorItem): Use DEFINE_STATIC_LOCAL. * UIProcess/WebPageGroup.cpp: (WebKit::webPageGroupMap): Ditto. * WebKit2.xcodeproj/project.pbxproj: Don't copy .in files in to the framework. Run verification scripts at the appropriate times. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::didBeginEditing): Use DEFINE_STATIC_LOCAL. (WebKit::WebEditorClient::respondToChangedContents): Ditto. (WebKit::WebEditorClient::respondToChangedSelection): Ditto. (WebKit::WebEditorClient::didEndEditing): Ditto. * WebProcess/WebPage/WebBackForwardListProxy.cpp: (WebKit::idToHistoryItemMap): Ditto. (WebKit::historyItemToIDMap): Ditto. 2011-03-01 Joseph Pecoraro Unreviewed. Roll out r80068 and r80073 due to breaking WebKit2 Qt port. * UIProcess/API/qt/qwkpage.cpp: (QWKPage::viewportAttributesForSize): 2011-03-01 Joseph Pecoraro Unreviewed, missed updating a call to WebCore::computeViewportAttributes who's prototype changed. Viewport Warning/Error Messages Are Now Inaccurate https://bugs.webkit.org/show_bug.cgi?id=53707 * UIProcess/API/qt/qwkpage.cpp: (QWKPage::viewportAttributesForSize): pass in a value for the document argument. 2011-03-01 Anders Carlsson Reviewed by Sam Weinig. WKPluginSiteDataManagerClearAllSiteData is not working https://bugs.webkit.org/show_bug.cgi?id=55528 * Shared/Plugins/Netscape/NetscapePluginModule.cpp: (WebKit::NetscapePluginModule::tryGetSitesWithData): Remove version checks, checking that the function pointer is not null is enough. (WebKit::NetscapePluginModule::tryClearSiteData): Remove version checks, checking that the function pointer is not null is enough. Also, correctly convert a null String to a null CString. 2011-03-01 Adam Roben Incorporate a review comment I missed in r80051 * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Clarified error message. 2011-03-01 Adam Roben Make the PLUGIN_ARCHITECTURE() macro work with MSVC Fixes REGRESSION (r79925): Lots of plugins tests crashing in NetscapePlugin::initialize on Windows Reviewed by Anders Carlsson. * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Added a compile-time check to make sure PLUGIN_ARCHITECTURE() is defined for some platform. * config.h: Removed the parentheses from the use of "defined" in the PLUGIN_ARCHITECTURE() macro. This matches PLATFORM(), OS(), etc., and makes the macro work on Windows. Also replaced the nonsense OS(WIN) with OS(WINDOWS). * win/WebKit2.vcproj: Added config.h for editing convenience. Let VS do its thang. 2011-03-01 Sam Weinig Reviewed by Timothy Hatcher. WebKit2 needs to be made localizable https://bugs.webkit.org/show_bug.cgi?id=55483 * PluginProcess/mac/PluginProcessMainMac.mm: * WebProcess/mac/WebProcessMainMac.mm: Set the default localization from the passed in parameter. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: Add the preferred localization as a parameter when launching processes so that they can set their localization to match the launching app. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Use WebCore's localizedString function on the mac, to actually localize these strings. (WebKit::WebPlatformStrategies::imageTitle): Switch to using replace, instead of concatenation, to give localizers a chance to rearrange the wording. 2011-03-01 Balazs Kelemen Reviewed by Anders Carlsson. [Qt][WK2] Plugin initialization https://bugs.webkit.org/show_bug.cgi?id=48127 Apply the quirks that are necessary for the flash plugin to not crash on X11. * Platform/qt/ModuleQt.cpp: (WebKit::Module::load): Use the ResolveAllSymbols hint as we do in WebCore. * Shared/Plugins/Netscape/NetscapePluginModule.cpp: (WebKit::NetscapePluginModule::tryLoad): Call applyX11QuirksBeforeLoad if PLUGIN_ARCHITECTURE is X11. * Shared/Plugins/Netscape/NetscapePluginModule.h: * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::initializeGTK): The same hack that we do in WebCore. Call gtk_init because flash don't do it for itself. (WebKit::NetscapePluginModule::applyX11QuirksBeforeLoad): Added for X11. Do the hacks that we need to do before calling NP_Initialize on the flash plugin to save it form crashing. * Shared/Plugins/PluginQuirks.h: Use PLUGIN_ARCHITECTURE macros. Added RequiresGTKToolKit quirk for X11. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Handle the RequiresGTKToolKit quirk on X11. * WebProcess/Plugins/Netscape/NetscapePlugin.h: (WebKit::NetscapePlugin::quirks): Added getter for the PluginModule's quirks to be available in NPN_GetValue. 2011-03-01 Adam Roben Convert seconds to milliseconds before calling ::SetTimer Fixes RunLoop::Timer fires 1000x too early on Windows Reviewed by Anders Carlsson. * Platform/win/RunLoopWin.cpp: (RunLoop::TimerBase::start): Convert the timeout interval to milliseconds, since that's what ::SetTimer expects. 2011-03-01 Andras Becsi Reviewed by Csaba Osztrogonác. [Qt] Clean up the project files and move common options to WebKit.pri. * WebKit2.pro: Deduplicate options. 2011-03-01 Juha Savolainen Reviewed by Andreas Kling. [Qt] WebKit2 needs to support font size changing and getting default font size https://bugs.webkit.org/show_bug.cgi?id=53671 Added new enum for font size type and added methods to set and get default font sizes. * UIProcess/API/qt/qwkpreferences.cpp: (QWKPreferences::setFontSize): Added. (QWKPreferences::fontSize): Added. * UIProcess/API/qt/qwkpreferences.h: 2011-02-28 Alice Liu Reviewed by Adam Roben and Gavin Barraclough. https://bugs.webkit.org/show_bug.cgi?id=54898 InjectedBundleNodeHandle dies too early in WKBundleHitTestResultGetNodeHandle * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: (WKBundleHitTestResultCopyNodeHandle): Instead of .get(), call .release.leakRef() like other functions that return WKBundleNodeHandleRef. * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: Renamed from "get" to "copy", because it leaksRef. 2011-02-28 Alice Liu Reviewed by Gavin Barraclough. https://bugs.webkit.org/show_bug.cgi?id=55442 Webarchives don't contain subframe content * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::getWebArchiveOfFrame): Pass the frame's document instead of just the frame, to use a different LegacyWebArchive::create function. 2011-02-28 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. [Qt][WK2] Add a way to test the WebKit 2 APIs https://bugs.webkit.org/show_bug.cgi?id=55408 Add an initial test for the WebKit 2 APIs of Qt. * UIProcess/API/qt/tests/html/basic_page.html: Added. * UIProcess/API/qt/tests/qgraphicswkview/qgraphicswkview.pro: Added. * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp: Added. (View::View): (View::resizeEvent): (tst_QGraphicsWKView::init): (tst_QGraphicsWKView::cleanup): (tst_QGraphicsWKView::loadEmptyPage): * UIProcess/API/qt/tests/tests.pri: Added. * UIProcess/API/qt/tests/tests.pro: Added. * UIProcess/API/qt/tests/util.h: Added. (waitForSignal): 2011-02-28 Anders Carlsson Fix clang build. * UIProcess/API/mac/FindIndicatorWindow.mm: * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp: (WebKit::ChunkedUpdateDrawingAreaProxy::deprecatedUpdate): (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveMessage): * UIProcess/ChunkedUpdateDrawingAreaProxy.h: * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp: (WebKit::ChunkedUpdateDrawingArea::deprecatedResumePainting): (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage): * WebProcess/WebPage/ChunkedUpdateDrawingArea.h: 2011-02-28 Dan Bernstein Rubber-stamped by Anders Carlsson. Do not copy config.h into WebKit2. * WebKit2.xcodeproj/project.pbxproj: 2011-02-28 Dan Bernstein LLVM Compiler build fix. * Scripts/webkit2/messages.py: * UIProcess/WebPageProxy.h: 2011-02-28 Anders Carlsson Reviewed by Dan Bernstein, Sam Weinig, Alexey Proskuryakov and Darin Adler. Open PDF in Preview doesn't work https://bugs.webkit.org/show_bug.cgi?id=55400 * UIProcess/API/mac/PDFViewController.mm: (-[WKPDFView initWithFrame:PDFViewController:]): Set the WKPDFView as the delegate of itself. (-[WKPDFView PDFViewOpenPDFInNativeApplication:]): Call PDFViewController::openPDFInFinder. (WebKit::PDFViewController::PDFViewController): Initialize m_hasWrittenPDFToDisk to false. (WebKit::PDFViewController::openPDFInFinder): Write the PDF to disk if needed and then open it using -[NSWorkspace openFile:]. (WebKit::temporaryPDFDirectoryPath): Create a directory to put PDFs in. (WebKit::PDFViewController::pathToPDFOnDisk): Return a path to a (non-existent) file in the temporary PDF directory. 2011-02-28 Alexey Proskuryakov Reviewed by Dan Bernstein. Frequent crashes in CFURLCache code on Snow Leopard https://bugs.webkit.org/show_bug.cgi?id=55412 CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation() creates a string with maximum possible buffer size. A path with garbage at the end confused CFURLCache into corrupting its data structures. * Shared/WebProcessCreationParameters.h: Added a FIXME about merging Mac and Windows code. This problem wouldn't have occured if we didn't use CString in the first place. * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): Added an assertion matching Windows behavior (seems likely that NSURLCache also wouldn't have liked trailing slash). * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess): Made slash removal conditional for robustness. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): Use actual string length, not CString::length(). 2011-02-28 Balazs Kelemen Reviewed by Anders Carlsson. [Qt][WK2] Plugin initialization https://bugs.webkit.org/show_bug.cgi?id=48127 Specialize the way of initializing the plugin for X11. Introduce PLUGIN_ARCHITECTURE macros to allow code sharing across platforms. * Shared/Plugins/Netscape/NetscapePluginModule.cpp: (WebKit::NetscapePluginModule::tryLoad): * config.h: 2011-02-28 Sam Weinig Reviewed by Brady Eidson. WK2 Context Menus - Implement LookUpInDictionary https://bugs.webkit.org/show_bug.cgi?id=55405 * Shared/DictionaryPopupInfo.cpp: (WebKit::DictionaryPopupInfo::encode): (WebKit::DictionaryPopupInfo::decode): * Shared/DictionaryPopupInfo.h: Add type to differentiate between HotKey and ContextMenu triggered dictionary popups. This is necessary since HotKey triggered ones want to override the style to always be overlay. * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::didPerformDictionaryLookup): Only force the overlay style for HotKey triggered dictionary lookups. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::performDictionaryLookupAtLocation): (WebKit::WebPage::performDictionaryLookupForRange): Factor out shared functionality into performDictionaryLookupForRange. * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: (WebKit::WebContextMenuClient::lookUpInDictionary): Get selected range and call newly factored out performDictionaryLookupForRange. 2011-02-28 Anders Carlsson Reviewed by Dan Bernstein. PDFViewController should hold a reference to the PDF data https://bugs.webkit.org/show_bug.cgi?id=55394 * UIProcess/API/mac/PDFViewController.h: * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::setPDFDocumentData): 2011-02-28 Sam Weinig Reviewed by Darin Adler. Size of text in popup menu doesn't match size of text in