2010-11-24 Andras Becsi Reviewed by Kenneth Rohde Christiansen. Make WebKit2 compile with !ENABLE(INSPECTOR). https://bugs.webkit.org/show_bug.cgi?id=49973 * Shared/API/c/WKSharedAPICast.h: (WebKit::toAPI): (WebKit::toImpl): * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKInspector.cpp: * UIProcess/API/C/WKInspector.h: * UIProcess/API/C/WKPage.cpp: * UIProcess/API/C/WKPage.h: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebInspectorProxy.h: * UIProcess/WebInspectorProxy.messages.in: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::didReceiveMessage): (WebKit::WebPageProxy::didReceiveSyncMessage): (WebKit::WebPageProxy::processDidCrash): * UIProcess/WebPageProxy.h: * UIProcess/mac/WebInspectorProxyMac.mm: * UIProcess/qt/WebInspectorProxyQt.cpp: * UIProcess/win/WebInspectorProxyWin.cpp: * WebProcess/WebCoreSupport/WebInspectorClient.cpp: * WebProcess/WebCoreSupport/WebInspectorClient.h: * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: * WebProcess/WebPage/WebInspector.cpp: * WebProcess/WebPage/WebInspector.h: * WebProcess/WebPage/WebInspector.messages.in: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::close): (WebKit::WebPage::windowIsFocused): (WebKit::WebPage::didReceiveMessage): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/qt/WebInspectorQt.cpp: * WebProcess/WebPage/win/WebInspectorWin.cpp: 2010-11-24 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt][WK2] Make deep copies of tile images We need the tile images we get from UpdateChunk::createImage() to persist, so we should take a copy() of them. * UIProcess/qt/TiledDrawingAreaTileQt.cpp: (WebKit::TiledDrawingAreaTile::updateFromChunk): 2010-11-24 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt] Fix uninitialized variable in QGraphicsWKViewPrivate Always initialize QGWKVP::m_isChangingScale in the constructor. * UIProcess/API/qt/qgraphicswkview.cpp: (QGraphicsWKViewPrivate::QGraphicsWKViewPrivate): 2010-11-23 Kenneth Rohde Christiansen Reviewed by Andreas Kling. Adapt to setShouldDelegateScrolling not being a real setting anymore. We now similarily to setUseFixedLayout and setPaintEntireContents set it on the FrameView wen transitioning to a new page, etc. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setResizesToContentsUsingLayoutSize): 2010-11-22 Adam Roben Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files Apple's Windows build allows placing header files and import libraries for WebKit's dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the $WebKitLibrariesDir environment variable. This is both required for production builds and convenient for Apple-internal developer builds. Apple's production builds also require that WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production builds, the files are copied into that directory tree by the WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the copying is done by JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make. This .vsprops copying is problematic in one very important case: when a developer updates their source tree and then tries to build. Visual Studio only reads .vsprops files when a project is first loaded. So, when Visual Studio is first opened after the .vsprops files are updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into $WebKitLibrariesDir, but Visual Studio will not pick up the changes. The rest of the build will proceed with out-of-date .vsprops files, which will likely result in a build failure. To fix this, we now use normal relative paths to access the .vsprops files in the source tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is unset, so the normal relative paths are used to read the .vsprops files out of the source tree directly. In production builds, this environment variable is set to a fake directory that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path is resolved. For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops: $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds, JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to "$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for FeatureDefines.vsprops becomes: $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops which resolves to: $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops (We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3" actually exist since they are matched by an equal number of ".." path components.) Note that Visual Studio still won't pick up changes made to .vsprops files while Visual Studio is open, but that problem hasn't seemed to cause developers many headaches so far. Fixes Windows build fails mysteriously when .vsprops files are updated Reviewed by Dave Hyatt. * win/WebKit2.make: Set $WebKitVSPropsRedirectionDir so that production builds can find the .vsprops files. * win/WebKit2.vcproj: * win/WebKit2WebProcess.vcproj: Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files. 2010-11-22 Kenneth Rohde Christiansen Reviewed by Andreas Kling. Make WebKit2 compile with ENABLE_JAVASCRIPT_DEBUGGER=0 * WebProcess/WebPage/WebInspector.cpp: Add missing ENABLE(JAVASCRIPT_DEBUGGER) guards. (WebKit::WebInspector::startJavaScriptDebugging): (WebKit::WebInspector::stopJavaScriptDebugging): (WebKit::WebInspector::startJavaScriptProfiling): (WebKit::WebInspector::stopJavaScriptProfiling): 2010-11-21 Sam Weinig Reviewed by Dan Bernstein. Textareas should be resizable by default https://bugs.webkit.org/show_bug.cgi?id=49892 Test: WebKit2/WKPreferences * Shared/WebPreferencesStore.cpp: (WebKit::WebPreferencesStore::WebPreferencesStore): (WebKit::WebPreferencesStore::encode): (WebKit::WebPreferencesStore::decode): * Shared/WebPreferencesStore.h: Add textAreasAreResizable bit. * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetJavaEnabled): (WKPreferencesGetJavaEnabled): Fix typo, WKPRe... -> WKPre... (WKPreferencesSetMinimumFontSize): (WKPreferencesGetMinimumFontSize): Fix comment to correctly reflect that the default minimumFontSize is 0, not 1. (WKPreferencesSetTextAreasAreResizable): (WKPreferencesGetTextAreasAreResizable): * UIProcess/API/C/WKPreferences.h: Add API. * UIProcess/API/C/WKPreferencesPrivate.h: Don't use PLATFORM in API headers. * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::setTextAreasAreResizable): (WebKit::WebPreferences::textAreasAreResizable): * UIProcess/WebPreferences.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Pipe bit through to the WebProcess and onto WebCore::Settings. 2010-11-19 Zalan Bujtas Reviewed by Andreas Kling. WebUIClient::createNewPage() expects a retained WKPageRef. https://bugs.webkit.org/show_bug.cgi?id=48549 * UIProcess/API/qt/ClientImpl.cpp: (qt_wk_createNewPage): 2010-11-19 Anders Carlsson Reviewed by Sam Weinig. Add a didFail WKContextDownloadClient callback https://bugs.webkit.org/show_bug.cgi?id=49847 * UIProcess/API/C/WKContext.h: Add didFail callback. * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::didFail): Call WebDownloadClient::didFail. * UIProcess/WebDownloadClient.cpp: (WebKit::WebDownloadClient::didFail): Call the didFail client function. 2010-11-19 Anders Carlsson Reviewed by Sam Weinig. Extend sandbox when downloading files https://bugs.webkit.org/show_bug.cgi?id=49844 * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Add new overload. * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename): Create a sandbox extension handle if necessary. * UIProcess/Downloads/DownloadProxy.messages.in: Add a sandbox extension handle out parameter to the DecideDestinationWithSuggestedFilename message. * WebProcess/Downloads/Download.cpp: (WebKit::Download::decideDestinationWithSuggestedFilename): Create and consume the returned sandbox extension handle. (WebKit::Download::didFinish): (WebKit::Download::didFail): Invalidate the sandbox extension handles. * WebProcess/Downloads/mac/DownloadMac.mm: (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]): Whoops, fix inverted logic. 2010-11-19 Steve Falkenburg Reviewed by Adam Roben. Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files https://bugs.webkit.org/show_bug.cgi?id=49819 * win/WebKit2.vcproj: * win/WebKit2Generated.vcproj: * win/WebKit2WebProcess.vcproj: * win/WebKit2WebProcessCommon.vsprops: 2010-11-19 Brady Eidson Reviewed by Darin Adler. More of and https://bugs.webkit.org/show_bug.cgi?id=49836 Add WebKit2 API relevant to customization of context menus * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: (WKBundleFrameAllowsFollowingLink): * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::allowsFollowingLink): * WebProcess/WebPage/WebFrame.h: 2010-11-19 Brady Eidson Reviewed by Darin Adler. and https://bugs.webkit.org/show_bug.cgi?id=49836 Add WebKit2 API relevant to customization of context menus Most of this is just exposing already-existing concepts in API. * Shared/API/c/WKURLRequest.cpp: (WKURLRequestCreateWithWKURL): * Shared/API/c/WKURLRequest.h: * Shared/WebURLRequest.cpp: (WebKit::WebURLRequest::create): * Shared/WebURLRequest.h: * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: (WKBundleHitTestResultCopyAbsoluteImageURL): (WKBundleHitTestResultCopyAbsoluteMediaURL): (WKBundleHitTestResultGetImageRect): (WKBundleHitTestResultGetIsSelected): * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageHasLocalDataForURL): (WKBundlePageCanHandleRequest): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: (WebKit::InjectedBundleHitTestResult::absoluteImageURL): (WebKit::InjectedBundleHitTestResult::absoluteMediaURL): (WebKit::InjectedBundleHitTestResult::imageRect): (WebKit::InjectedBundleHitTestResult::isSelected): * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: * WebProcess/WebPage/WebContextMenu.cpp: (WebKit::WebContextMenu::show): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::hasLocalDataForURL): (WebKit::WebPage::canHandleRequest): * WebProcess/WebPage/qt/WebPageQt.cpp: (WebKit::WebPage::hasLocalDataForURL): Stubbed for now. (WebKit::WebPage::canHandleRequest): Ditto. * WebProcess/WebPage/win/WebPageWin.cpp: (WebKit::WebPage::hasLocalDataForURL): Ditto. (WebKit::WebPage::canHandleRequest): Ditto. 2010-11-19 Darin Adler Reviewed by Sam Weinig. Need a way to clear disk cache from WebContext https://bugs.webkit.org/show_bug.cgi?id=49820 * UIProcess/API/C/WKContext.cpp: (WKContextClearResourceCaches): Added. (WKContextClearApplicationCache): Added. * UIProcess/API/C/WKContext.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::clearResourceCaches): Added. (WebKit::WebContext::clearApplicationCache): Added. * UIProcess/WebContext.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::clearResourceCaches): Added. (WebKit::WebProcess::clearApplicationCache): Added. * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: Added messages. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformClearResourceCaches): Added. * WebProcess/qt/WebProcessQt.cpp: (WebKit::WebProcess::platformClearResourceCaches): Added. * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformClearResourceCaches): Added. 2010-11-19 Anders Carlsson Reviewed by Sam Weinig. Implement support for loading local files https://bugs.webkit.org/show_bug.cgi?id=49828 * UIProcess/WebPageProxy.cpp: (WebKit::initializeSandboxExtensionHandle): Given an URL, create a sandbox extension if it's a local file URL. (WebKit::WebPageProxy::loadURL): (WebKit::WebPageProxy::loadURLRequest): Pass along sandbox extension handles to the LoadURL and LoadURLRequest messages. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad): Call SandboxExtensionTracker::didStartProvisionalLoad. (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): Call SandboxExtensionTracker::didCommitProvisionalLoad. (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad): Call SandboxExtensionTracker::didFailProvisionalLoad. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::~WebPage): Invalidate the sandbox extension tracker. (WebKit::WebPage::close): Invalidate the sandbox extension tracker. (WebKit::WebPage::loadURL): (WebKit::WebPage::loadURLRequest): Pass the sandbox extension handle to the sandbox extension tracker. (WebKit::WebPage::SandboxExtensionTracker::~SandboxExtensionTracker): Invalidate the sandbox extension tracker. (WebKit::WebPage::SandboxExtensionTracker::invalidate): invalidate ell the sandbox extensions. (WebKit::WebPage::SandboxExtensionTracker::beginLoad): Create a sandbox extension and store it as the "pending provisional extension". (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): Consume the pending provisional extension and make it the provisional extension. (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): Invalidate the committed extension and make the provisional extension the committed extension. (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): Invalidate the provisional extension. * WebProcess/WebPage/WebPage.messages.in: Add SandboxExtension::Handle parameters to LoadURL and LoadURLRequest. 2010-11-19 Anders Carlsson Reviewed by Darin Adler. Make it possible to encode null SandboxExtension handles https://bugs.webkit.org/show_bug.cgi?id=49825 * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::Handle::encode): If there's no underlying sandbox extension, just encode an empty byte array. (WebKit::SandboxExtension::Handle::decode): If the decoded byte array is empty, don't try to create a sandbox extension. (WebKit::SandboxExtension::create): If the handle is null, return null. (WebKit::SandboxExtension::consume): Consuming shuld not null out the underlying sandbox extension object. 2010-11-19 Steve Falkenburg Reviewed by Darin Adler. Normalize Cairo/CFLite project/solution configuration names https://bugs.webkit.org/show_bug.cgi?id=49818 * win/WebKit2.vcproj: * win/WebKit2WebProcess.vcproj: 2010-11-19 Anders Carlsson Reviewed by Sam Weinig. Add SandboxExtension abstraction and use it for the injected bundle extension https://bugs.webkit.org/show_bug.cgi?id=49817 * Shared/SandboxExtension.h: Add SandboxExtension abstraction. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: Instead of encoding/decoding a token, encode/decode the sandbox extension handle. * Shared/mac/SandboxExtensionMac.mm: Added. Add Mac implementation of SandboxExtension. * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureWebProcess): Create a SandboxExtension::Handle object. * WebKit2.xcodeproj/project.pbxproj: Add new files. * WebProcess/InjectedBundle/InjectedBundle.h: (WebKit::InjectedBundle::setSandboxExtension): Set the sandbox extension. * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: (WebKit::InjectedBundle::load): Consume the sandbox extension. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Create a sandbox extension and set it on the injected bundle. 2010-11-18 Steve Falkenburg Reviewed by Adam Roben. Windows vcproj configuration names should be normalized across projects https://bugs.webkit.org/show_bug.cgi?id=49776 * win/WebKit2.submit.sln: * win/WebKit2Generated.vcproj: * win/WebKit2GeneratedCommon.vsprops: Added. 2010-11-18 Anders Carlsson Reviewed by Adam Roben. Crash in WebKit::PluginView::manualLoadDidReceiveResponse when navigating to a .wav file in WebKit2 on Mac https://bugs.webkit.org/show_bug.cgi?id=48559 Add null checks for m_plugin. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::manualLoadDidReceiveResponse): (WebKit::PluginView::manualLoadDidReceiveData): (WebKit::PluginView::manualLoadDidFinishLoading): (WebKit::PluginView::manualLoadDidFail): 2010-11-18 Mark Rowe Rubber-stamped by Adam Roben. Enable compaction support. * Configurations/WebKit2.xcconfig: 2010-11-18 Brian Weinstein Reviewed by Adam Roben. WebKit2: Safari shouldn't auto-activate plug-ins in background tabs. https://bugs.webkit.org/show_bug.cgi?id=49770 Add an API on Windows to call setIsInWindow, which calls through to WebPage::setIsInWindow. Remove the !PLATFORM(WIN) check in WebPage, so we don't automatically start plugins that are loaded in background tabs. * UIProcess/API/C/win/WKView.cpp: (WKViewSetIsInWindow): Call through to WebView::setIsInWindow. * UIProcess/API/C/win/WKView.h: * UIProcess/win/WebView.cpp: (WebKit::WebView::setIsInWindow): Call through to WebPage::setIsInWindow. * UIProcess/win/WebView.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Remove the !PLATFORM(WIN) check and update the comment. 2010-11-18 Darin Adler * WebProcess/WebPage/WebPage.cpp: Fix build by rolling out a change. 2010-11-18 Darin Adler Reviewed by Kevin Decker. REGRESSION (WebKit2): Plug-ins and