2011-09-05 Balazs Kelemen [Qt][WK2] Add pixel test support https://bugs.webkit.org/show_bug.cgi?id=66283 Reviewed by Andreas Kling. * Shared/API/c/qt/WKImageQt.cpp: Added. (WKImageCreateQImage): C style (private) API to get the contents of the backing store as an image. * Shared/API/c/qt/WKImageQt.h: Added. * Shared/qt/ShareableBitmapQt.cpp: (WebKit::ShareableBitmap::createImage): Typo. Remove useless ifdef. * WebKit2API.pri: 2011-09-05 Andras Becsi [Qt][WK2] Fix the build Rubber-stamped by Csaba Osztrogonác. * DerivedSources.pro: Add missing PluginProcessConnection.messages.in after r94456. 2011-09-02 Sheriff Bot Unreviewed, rolling out r94473. http://trac.webkit.org/changeset/94473 https://bugs.webkit.org/show_bug.cgi?id=67547 Putting http://trac.webkit.org/changeset/94454 back in as http://trac.webkit.org/changeset/94472 fixed the problem (Requested by msaboff on #webkit). * UIProcess/API/C/WKContext.cpp: (WKContextGarbageCollectJavaScriptObjects): * UIProcess/API/C/WKContext.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::garbageCollectJavaScriptObjects): * UIProcess/WebContext.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::garbageCollectJavaScriptObjects): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: 2011-09-02 Sheriff Bot Unreviewed, rolling out r94454. http://trac.webkit.org/changeset/94454 https://bugs.webkit.org/show_bug.cgi?id=67546 "Broke Windows and SnowLeopard, also no reply on the bug." (Requested by jchaffraix on #webkit). * UIProcess/API/C/WKContext.cpp: * UIProcess/API/C/WKContext.h: * UIProcess/WebContext.cpp: * UIProcess/WebContext.h: * WebProcess/WebProcess.cpp: * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: 2011-09-02 Michael Saboff Fixed release build by removing #ifndef NDEBUG to allow definition of gcController(). Rubber-stamp by Sam Weinig. * WebProcess/WebProcess.cpp: 2011-09-02 Anders Carlsson NPN_SetException doesn't work with OOP plug-ins https://bugs.webkit.org/show_bug.cgi?id=67524 Reviewed by Sam Weinig. * DerivedSources.make: Add PluginProcessConnection.messages.in. * GNUmakefile.am: Add generated files. * Platform/CoreIPC/MessageID.h: Add MessageClassPluginProcessConnection. * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::initialize): Set the set exception function. * PluginProcess/WebProcessConnection.cpp: (WebKit::ConnectionStack::current): (WebKit::ConnectionStack::CurrentConnectionPusher::CurrentConnectionPusher): (WebKit::ConnectionStack::CurrentConnectionPusher::~CurrentConnectionPusher): Add a helper class for managing a stack of CoreIPC connections, along with a RAII object to push/pop connections onto it. (WebKit::connectionStack): Add getter. (WebKit::WebProcessConnection::setGlobalException): Get the current connection and send a PluginProcessConnection::SetException message to it. (WebKit::WebProcessConnection::didReceiveMessage): (WebKit::WebProcessConnection::didReceiveSyncMessage): Create connection pushers. * PluginProcess/WebProcessConnection.h: Add setGlobalException. * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: Add new files. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::setSetExceptionFunction): New function for setting the 'setException' function. (WebKit::NetscapePlugin::setException): Call the 'setException' function. * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::PluginProcessConnection::didReceiveSyncMessage): Call the message receiver function. (WebKit::PluginProcessConnection::setException): Call the NPRuntimeObjectMap. * WebProcess/Plugins/PluginProcessConnection.messages.in: Add new messages file. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): When not using the plug-in process, make sure to call NetscapePlugin::setSetExceptionFunction. 2011-09-02 Ada Chan Add WKContextGarbageCollectJavaScriptObjects() which does a garbage collection in the WebProcess https://bugs.webkit.org/show_bug.cgi?id=67526 Reviewed by Darin Adler. * UIProcess/API/C/WKContext.cpp: (WKContextGarbageCollectJavaScriptObjects): * UIProcess/API/C/WKContext.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::garbageCollectJavaScriptObjects): Send a message to WebProcess to garbage collect JS objects. * UIProcess/WebContext.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::garbageCollectJavaScriptObjects): Call GCController::garbageCollectNow(). * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: Add GarbageCollectJavaScriptObjects message. 2011-09-02 Anders Carlsson Remove plug-in paths from web process sandbox https://bugs.webkit.org/show_bug.cgi?id=67518 Reviewed by Adam Roben. Plug-ins are never accessed from the web process, so remove plug-in paths from the sandbox profile. * WebProcess/com.apple.WebProcess.sb: 2011-09-02 Anders Carlsson Assertion/crash when running netscape-plugin-property-access-exception.html test https://bugs.webkit.org/show_bug.cgi?id=67517 Reviewed by Adam Roben. Make sure to initialize the NPVariant in case the plug-in returns true from NP_GetProperty, but doesn't set the result NPVariant to anything. * Shared/Plugins/NPObjectMessageReceiver.cpp: (WebKit::NPObjectMessageReceiver::getProperty): 2011-09-02 Anders Carlsson The private browsing state isn't saved when it changes https://bugs.webkit.org/show_bug.cgi?id=67508 Reviewed by Sam Weinig. Store the new private browsing state so subsequent queries for it will return the right value. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::privateBrowsingStateChanged): 2011-09-02 Ravi Phaneendra Kasibhatla [WK2] Anchor elements doesn't get focus on TAB key press. https://bugs.webkit.org/show_bug.cgi?id=66949 Reviewed by Adam Roben. Setting the default property value of TabsToLinks to true only for GTK platform since Win & Mac platforms doesn't want it to be set to true by default. * Shared/WebPreferencesStore.h: Set the default value of key TabsToLinks to true for GTK platform only. 2011-09-02 Balazs Kelemen [Qt][WK2] Cannot gathering glyph page statistics https://bugs.webkit.org/show_bug.cgi?id=67475 Rubber stamped by Csaba Osztrogonác. Fix Qt WK2 build without having QRAWFONT. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::getWebCoreStatistics): 2011-09-02 Mark Rowe WebProcessProxy::secItemCopyMatching / WebProcessProxy::secItemAdd leak the results of the APIs they wrap. Reviewed by Dan Bernstein. * UIProcess/mac/WebProcessProxyMac.mm: (WebKit::WebProcessProxy::secItemCopyMatching): Adopt the result of SecItemCopyMatching in to a RetainPtr to ensure it gets released at the appropriate time. (WebKit::WebProcessProxy::secItemAdd): Ditto for SecItemAdd. 2011-09-01 Ada Chan Cut down the ifdefs in WebKit::getWebCoreMemoryCacheStatistics() now that MemoryCache::Statistics always has the xslStyleSheets field. Reviewed by Darin Adler. * WebProcess/WebProcess.cpp: (WebKit::getWebCoreMemoryCacheStatistics): 2011-09-01 Mark Hahnenberg Unzip initialization lists and constructors in JSCell hierarchy (4/7) https://bugs.webkit.org/show_bug.cgi?id=67174 Reviewed by Oliver Hunt. Completed the fourth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::JSNPObject): (WebKit::JSNPObject::finishCreation): * WebProcess/Plugins/Netscape/JSNPObject.h: 2011-09-01 Ada Chan Gather memory cache statistics in WebProcess::getWebCoreStatistics(). https://bugs.webkit.org/show_bug.cgi?id=67160 Reviewed by Darin Adler. Encode and decode webCoreCacheStatistics data member in StatisticsData. * Shared/StatisticsData.cpp: (WebKit::StatisticsData::encode): (WebKit::StatisticsData::decode): * Shared/StatisticsData.h: Convert the cache statistics data into an ImmutableArray and return it in WebContext::didGetWebCoreStatistics(). * UIProcess/WebContext.cpp: (WebKit::WebContext::didGetWebCoreStatistics): Store memory cache statistics into the StatisticsData object. * WebProcess/WebProcess.cpp: (WebKit::getWebCoreMemoryCacheStatistics): (WebKit::WebProcess::getWebCoreStatistics): 2011-09-01 Tim Horton REGRESSION: Rendering artifacts on a rotated, pattern filled shape https://bugs.webkit.org/show_bug.cgi?id=53055 Reviewed by Simon Fraser. Introduce wkCGPatternCreateWithImageAndTransform. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-09-01 Gopal Raghavan [Qt] TouchWebView crashes with segmentation fault https://bugs.webkit.org/show_bug.cgi?id=67308 Reviewed by Benjamin Poulain. If you instantiate TouchWebView element with height and width in a qml file and load a url it crashes. The functions setWidth() and setHeight() are called sequentially therefore it can happen that computeViewportAttributes was called with a size like (width, 0) breaking the assumption of the function that the size is valid. The patch makes sure we compute the viewport when both height and width are valid. * UIProcess/API/qt/qtouchwebview.cpp: (QTouchWebViewPrivate::updateViewportConstraints): * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml: Added. * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml: Added. * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml: Added. * UIProcess/API/qt/tests/qmltests/qmltests.pro: 2011-09-01 Ada Chan Gather JavaScript, FastMalloc, icon, font, and glyph page statistics in WebProcess::getWebCoreStatistics(). https://bugs.webkit.org/show_bug.cgi?id=67160 Reviewed by Darin Adler. Encode and decode the data members in StatisticsData. * Shared/StatisticsData.cpp: (WebKit::StatisticsData::encode): (WebKit::StatisticsData::decode): (WebKit::StatisticsData::StatisticsData): Add three data members to StatisticsData: - statisticsNumbers: Map containing statistics values that are numbers, mapped by their names, such as JavaScriptObjectsCount, CachedFontDataCount, etc. - javaScriptProtectedObjectTypeCounts - javaScriptObjectTypeCounts * Shared/StatisticsData.h: Create a WK::Dictionary containing statistics values mapped by their names and return that dictionary in WebContext::didGetWebCoreStatistics(). * UIProcess/WebContext.cpp: (WebKit::createDictionaryFromHashMap): (WebKit::WebContext::didGetWebCoreStatistics): Package JavaScript, FastMalloc, icon, font, and glyph page statistics into a StatisticsData object and send it to the UIProcess. * WebProcess/WebProcess.cpp: (WebKit::fromCountedSetToHashMap): (WebKit::WebProcess::getWebCoreStatistics): 2011-09-01 Xan Lopez [GTK] Add XRender lib dependencies explicitly Reviewed by Philippe Normand. This is needed when using the GNU/Gold linker, since we use XRender directly. * GNUmakefile.am: 2011-08-31 Anders Carlsson Jagged text shown in find-in-page highlight https://bugs.webkit.org/show_bug.cgi?id=67347 Reviewed by Dan Bernstein. When painting each text line in the find indicator, make sure to clip it against the text rect and not paint the entire rect over and over. * UIProcess/FindIndicator.cpp: (WebKit::FindIndicator::draw): 2011-08-31 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=67322 Re-name overrideBackingScaleFactor Reviewed by John Sullivan. API is now WKPageSetCustomBackingScaleFactor() and WKPageGetBackingScaleFactor() which returns the custom scale factor if one was set, and the intrinsic scale factor otherwise. * UIProcess/API/C/WKPage.cpp: (WKPageGetBackingScaleFactor): (WKPageSetCustomBackingScaleFactor): * UIProcess/API/C/WKPage.h: Re-named _deviceScaleFactor to _intrinsicDeviceScaleFactor since it only ever refers to the intrinsic value. * UIProcess/API/mac/WKView.mm: (-[WKView viewDidMoveToWindow]): (-[WKView _windowDidChangeResolution:]): (-[WKView _intrinsicDeviceScaleFactor]): WebPageProxy stores both the customDeviceScaleFactor and the intrinsicDeviceScaleFactor. deviceScaleFactor() returns the appropriate value that should be the one used. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::setIntrinsicDeviceScaleFactor): (WebKit::WebPageProxy::deviceScaleFactor): (WebKit::WebPageProxy::setCustomDeviceScaleFactor): (WebKit::WebPageProxy::creationParameters): * UIProcess/WebPageProxy.h: 2011-08-31 Anders Carlsson REGRESSION(r93902): Can't open external links on gmail https://bugs.webkit.org/show_bug.cgi?id=67234 Reviewed by Alexey Proskuryakov. * Shared/cf/ArgumentCodersCF.cpp: (CoreIPC::decode): If we encounter an empty URL string, create an empty url by using NSURL, just like we do in WebCore when converting an empty KURL to an NSURL. * WebKit2.xcodeproj/project.pbxproj: Compile ArgumentCodersCF.cpp as Objective-C++ for now. 2011-08-30 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=67150 Would like API to use a custom device scale factor for a particular WebView/WKView -and corresponding- Reviewed by Darin Adler. New API is setOverrideBackingScaleFactor() on WKPage * UIProcess/API/C/WKPage.cpp: (WKPageGetOverrideBackingScaleFactor): (WKPageSetOverrideBackingScaleFactor): * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::deviceScaleFactor): (WebKit::WebPageProxy::setOverrideBackingScaleFactor): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::overrideBackingScaleFactor): 2011-08-30 Aaron Colwell Add MediaSource API to HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=64731 Reviewed by Eric Carlson. * Configurations/FeatureDefines.xcconfig: 2011-08-30 Ada Chan Laying some groundwork to fetch performance statistics from WebProcess. https://bugs.webkit.org/show_bug.cgi?id=67160 Reviewed by Darin Adler. Add WKContextGetStatistics() which sends a message to WebProcess to fetch the performance statistics. * UIProcess/API/C/WKContext.cpp: (WKContextGetStatistics): * UIProcess/API/C/WKContext.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::~WebContext): (WebKit::WebContext::getWebCoreStatistics): (WebKit::WebContext::didGetWebCoreStatistics): * UIProcess/WebContext.h: * UIProcess/WebContext.messages.in: Add the DidGetWebCoreStatistics message that WebProcess can send when it has the performance statistics ready. Add WebProcess::getWebCoreStatistics(). Currently it just sends back an empty StatisticsData object. It will gather the performance statistics to store in the StatisticsData object in a future patch. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::getWebCoreStatistics): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: Add the skeleton for StatisticsData. * Scripts/webkit2/messages.py: * Shared/StatisticsData.cpp: Added. (WebKit::StatisticsData::encode): (WebKit::StatisticsData::decode): (WebKit::StatisticsData::StatisticsData): * Shared/StatisticsData.h: Added. Add StatisticsData.h/cpp to project. * CMakeLists.txt: * GNUmakefile.am: * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: 2011-08-29 Alexey Proskuryakov DumpRenderTree should begin each test with an empty cookie store https://bugs.webkit.org/show_bug.cgi?id=63545 Reviewed by Darin Adler. * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): Updated to use currentCFHTTPCookieStorage() instead of privateBrowsingCookieStorage(). * WebProcess/Cookies/mac/WebCookieManagerMac.mm: (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): There is no no need to access cookie storage through session manually - we already have code for that in WebCore. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSwitchNetworkLoaderToNewTestingSession): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::switchNetworkLoaderToNewTestingSession): * WebProcess/InjectedBundle/InjectedBundle.h: Exposed bundle SPI to use a private default session. It's separate from private browsing, because some tests enable the latter, and we don't want to mix them up. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::platformHasLocalDataForURL): (WebKit::cachedResponseForURL): Updated to use currentStorageSession() instead of privateBrowsingStorageSession(). * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformInitializeWebProcess): ResourceHandle::setDefaultStorageSession() no longer steals a reference, so retain it properly. 2011-08-30 Alexis Menard [Qt][WK2] Make mouse over work again for QDesktopWebView. https://bugs.webkit.org/show_bug.cgi?id=67200 Reviewed by Noam Rosenthal. The API has changed after QGraphicsView, SceneGraph sends QHoverEvents now. * UIProcess/qt/qdesktopwebpageproxy.cpp: (QDesktopWebPageProxy::handleEvent): (QDesktopWebPageProxy::handleHoverMoveEvent): * UIProcess/qt/qdesktopwebpageproxy.h: 2011-08-30 Kaustubh Atrawalkar The unused ScrollView* argument can and should be removed from scrollRectIntoView. https://bugs.webkit.org/show_bug.cgi?id=67117 Reviewed by Darin Adler. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::scrollRectIntoView): * WebProcess/WebCoreSupport/WebChromeClient.h: 2011-08-29 Ryosuke Niwa Another Windows build fix after r94047. * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-08-29 Ryosuke Niwa Export more symbols for r94038. * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-08-29 Ryosuke Niwa Windows build fix for r94038. * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-08-29 Gopal Raghavan [Qt] QTouchWebView url property test missing https://bugs.webkit.org/show_bug.cgi?id=67159 Reviewed by Noam Rosenthal. Added qml test case to check url property of QTouchWebView. Since url is a readonly property, we make sure that it's set after load() is called. * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml: 2011-08-29 Gopal Raghavan [Qt] QDesktopWebView url property test missing https://bugs.webkit.org/show_bug.cgi?id=67155 Reviewed by Noam Rosenthal. Added qml test case to check url property. Since url is a readonly property, we make sure that it's set after load() is called. * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml: 2011-08-29 Sheriff Bot Unreviewed, rolling out r93987, r93992, r93995, r93998, and r93999. http://trac.webkit.org/changeset/93987 http://trac.webkit.org/changeset/93992 http://trac.webkit.org/changeset/93995 http://trac.webkit.org/changeset/93998 http://trac.webkit.org/changeset/93999 https://bugs.webkit.org/show_bug.cgi?id=67147 Many failing tests (Requested by ap on #webkit). * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): * WebProcess/InjectedBundle/API/c/WKBundle.cpp: * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundle.h: * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformInitializeWebProcess): 2011-08-26 Martin Robinson Reviewed by Xan Lopez. [GTK] Build WebKit2 unconditionally https://bugs.webkit.org/show_bug.cgi?id=62749 Build WebKit2 by default. This will make the bots build it and catch build errors when they occur. * GNUmakefile.am: Enable WebKit2 by default, but remove references to the WebKit2 PC file, which should not be shipped until WebKit2 is actually shipped officially. 2011-08-29 Alexey Proskuryakov Windows build fix. * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): Updated for new function name and signature: currentCFHTTPCookieStorage(). 2011-08-26 Alexey Proskuryakov DumpRenderTree should begin each test with an empty cookie store https://bugs.webkit.org/show_bug.cgi?id=63545 Reviewed by Darin Adler. * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformInitializeWebProcess): ResourceHandle::setDefaultStorageSession() no longer steals a reference, so retain it properly. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleUsePrivateSessionForNetworkLoading): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::usePrivateSessionForNetworkLoading): * WebProcess/InjectedBundle/InjectedBundle.h: Exposed bundle SPI to use a private default session. It's separate from private browsing, because some tests enable the latter, and we don't want to mix them up. 2011-08-29 Chris Marrin Fixed a build problem caused by http://trac.webkit.org/changeset/93980 Unreviewed. * WebProcess/WebCoreSupport/WebChromeClient.cpp: 2011-08-23 Chris Marrin [mac] requestAnimationFrame support for mac port https://bugs.webkit.org/show_bug.cgi?id=59146 Reviewed by Simon Fraser. Implement requestAnimationFrame for WebKit2. Add a CFRunLoopObserver to WebPage, which runs just before the syncCompositingState RLO and calls into the ScriptedAnimationController if scheduleAnimation() has been called. * Configurations/FeatureDefines.xcconfig: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::scheduleAnimation): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::~WebPage): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::requestAnimationFrameRunLoopObserverCallback): (WebKit::WebPage::scheduleAnimation): (WebKit::WebPage::unscheduleAnimation): * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.cpp: * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: 2011-08-29 Pierre Rossi [Qt] NPAPI support doesn't honor the ENABLE_NETSCAPE_PLUGIN_API define in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=67123 We could simply use the defines already in place for this. Reviewed by Andreas Kling. * WebKit2.pro: 2011-08-29 Vamshikrishna Yellenki [GTK][WK2] Compilation error in WebKit2 GTK - Revision 93953 https://bugs.webkit.org/show_bug.cgi?id=67111 Reviewed by Martin Robinson. WebKit2 GTK build error. * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp: Include explicitly to remove WebCore::ResourceError inclusion error. 2011-08-28 Balazs Kelemen [Qt][WK2] Unreviewed build fix. * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::init): Initialize the WKPageUIClient with memset to avoid missing initializer warning. The missing initializer is the result of using a version 0 WKPageUIClient while it has newer version (1). We have nothing to do with the callbacks in the new version so I voted for memset. * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp: Include ResourceError.h. 2011-08-26 Sam Weinig Stop using custom NSErrors for WebKit2 WebErrors https://bugs.webkit.org/show_bug.cgi?id=67075 Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/WebErrors.h: * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: (WebKit::createNSError): (WebKit::cancelledError): (WebKit::fileDoesNotExistError): (WebKit::blockedError): (WebKit::cannotShowURLError): (WebKit::interruptedForPolicyChangeError): (WebKit::cannotShowMIMETypeError): (WebKit::pluginWillHandleLoadError): There is no reason to use custom registered NSErrors anymore, so don't. 2011-08-26 Anders Carlsson Fix build. * WebProcess/Plugins/Netscape/NetscapePlugin.h: 2011-08-26 Sam Weinig Fold _webkit_initWithDomain into _webkit_errorWithDomain in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=67063 Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: (+[NSError _webkit_errorWithDomain:code:URL:]): 2011-08-26 Anders Carlsson Implement NPN_ScheduleTimer/NPN_UnscheduleTimer https://bugs.webkit.org/show_bug.cgi?id=67062 Reviewed by Sam Weinig. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_ScheduleTimer): Call NetscapePlugin::scheduleTimer. (WebKit::NPN_UnscheduleTimer): Call NetscapePlugin::unscheduleTimer. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): Initialize m_nextTimerID. (WebKit::NetscapePlugin::Timer::start): Start the timer. (WebKit::NetscapePlugin::Timer::stop): Stop the timer. (WebKit::NetscapePlugin::Timer::timerFired): Call the right callback and unschedule the timer object if it's not a repeating timer. (WebKit::NetscapePlugin::scheduleTimer): Create a new timer and start it. (WebKit::NetscapePlugin::unscheduleTimer): Get the timer from the map and destroy it. (WebKit::NetscapePlugin::destroy): Destroy all timers. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add Timer class. 2011-08-26 Sam Weinig Fix typo in Connection.cpp https://bugs.webkit.org/show_bug.cgi?id=67060 Reviewed by Anders Carlsson. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::waitForSyncReply): We want timedOut, not timeout. There is not a current way to cause this to be an issue. This issue was caught by the Clang Static Analyzer. 2011-08-26 Alice Liu https://bugs.webkit.org/show_bug.cgi?id=66823 Add the request info to the WebPageProxy::CreateNewPage message Reviewed by Anders Carlsson. Update function declarations with additional ResourceRequest parameter: * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::createNewPage): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebUIClient.cpp: (WebKit::WebUIClient::createNewPage): * UIProcess/WebUIClient.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createWindow): Pass the ResourceRequest within the FrameLoadRequest. 2011-08-26 Alexis Menard [Qt][WK2]REGRESSION(r93784): It made many tests crash https://bugs.webkit.org/show_bug.cgi?id=66958 Reviewed by Anders Carlsson. Don't try to make sure the WebContext is deleted, for now the leak is intended and when multiple processes per context will be supported this leak should be fixed. This was the cause of DRT crashing on the bot, the context was deleted after the first test, letting other tests with nothing but a bad context. * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::~QtWebPageProxy): 2011-08-26 Anders Carlsson Fix handling of keyup events in the new Cocoa text input model https://bugs.webkit.org/show_bug.cgi?id=67045 Reviewed by Sam Weinig. Use a counter instead of a boolean for deciding when to ignore keyup events, because if multiple keys are pressed simultaneously then we need to ignore more than one keyup event in a row. Also if a keyboard event is an autorepeating event we won't get a keyup event so don't increment the counter in that case. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::platformHandleKeyboardEvent): 2011-08-26 Jessie Berlin Gut WKPageCreateSnapshotOfVisibleContent so that it can be removed later. https://bugs.webkit.org/show_bug.cgi?id=66979. Removing the function altogether would break the nightlies. This patch removes the code behind it so that it is clear that WKPageCreateSnapshotOfVisibleContent should not be used, and so that the code isn't just left rotting in the tree. Reviewed by Brian Weinstein. * UIProcess/API/C/WKPage.cpp: (WKPageCreateSnapshotOfVisibleContent): Return 0. * UIProcess/API/C/WKPagePrivate.h: Update the comment and add a link to the bug. * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2011-08-25 Anders Carlsson kNPEventStartIME doesn't work correctly for NPAPI https://bugs.webkit.org/show_bug.cgi?id=65264 Reviewed by Sam Weinig. In order to remain compatible with older plug-ins, the updated input model won't be turned on unless a plug-in explicitly asks whether we support it. The plug-in must do this before any keyboard events have been processed. * PluginProcess/mac/PluginControllerProxyMac.mm: (WebKit::PluginControllerProxy::setComplexTextInputState): Add the CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply flag to this message since we want the web process to handle it while it's waiting for a reply to the PluginControllerProxy::HandleMouseEvent synchronous message. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Implement the logic for when to turn off the legacy Cocoa text input model support. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): Initialize m_ignoreNextKeyUpEvent to false. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add m_ignoreNextKeyUpEvent member variable. (WebKit::NetscapePlugin::hasHandledAKeyDownEvent): Add a getter. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::platformHandleKeyboardEvent): Don't send keydown and keyup events when complex text input is enabled in the updated model. 2011-08-25 Anders Carlsson Correctly handle events in the updated Cocoa text input model https://bugs.webkit.org/show_bug.cgi?id=67005 Reviewed by Sam Weinig. * UIProcess/API/mac/WKTextInputWindowController.mm: (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]): When using the updated model, always return a string even for 'simple' characters. * UIProcess/API/mac/WKView.mm: (-[WKView _tryHandlePluginComplexTextInputKeyDown:]): Only let the input method have a crack at the event in the legacy model. 2011-08-25 Jeff Miller Move Windows-specific WebPageProxy code to WebPageProxyWin.cpp https://bugs.webkit.org/show_bug.cgi?id=67002 Reviewed by Brian Weinstein. * UIProcess/WebPageProxy.cpp: Moved Windows-only functions to WebPageProxyWin.cpp. * UIProcess/win/WebPageProxyWin.cpp: (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange): Moved from WebPageProxy.cpp. (WebKit::WebPageProxy::getSelectedText): Moved from WebPageProxy.cpp. (WebKit::WebPageProxy::gestureWillBegin): Moved from WebPageProxy.cpp. (WebKit::WebPageProxy::gestureDidScroll): Moved from WebPageProxy.cpp. (WebKit::WebPageProxy::gestureDidEnd): Moved from WebPageProxy.cpp. (WebKit::WebPageProxy::setGestureReachedScrollingLimit): Moved from WebPageProxy.cpp. (WebKit::WebPageProxy::startDragDrop): Moved from WebPageProxy.cpp. (WebKit::WebPageProxy::didChangeCompositionSelection): Moved from WebPageProxy.cpp. (WebKit::WebPageProxy::confirmComposition): Moved from WebPageProxy.cpp. (WebKit::WebPageProxy::setComposition): Moved from WebPageProxy.cpp. 2011-08-25 Anders Carlsson Handle key-down events in the updated Cocoa text input model https://bugs.webkit.org/show_bug.cgi?id=67001 Reviewed by Sam Weinig. * UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]): Call _disableComplexTextInputIfNecessary so that we'll inform the plug-in that complex text input has been disabled. (-[WKView _disableComplexTextInputIfNecessary]): If the plug-in is using the updated Cocoa text input model specification, disable text input if the text input window has been dismissed for whatever reason. (-[WKView _tryHandlePluginComplexTextInputKeyDown:]): Call _disableComplexTextInputIfNecessary so that we'll inform the plug-in that complex text input has been disabled. (-[WKView _tryPostProcessPluginComplexTextInputKeyDown:]): If the plug-in is using the updated Cocoa text input model specification, let the input methods have a go at the keyboard event. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::setComplexTextInputEnabled): Actually set m_isComplexTextInputEnabled to the right value. 2011-08-25 Anders Carlsson Factor code to send a key-down event to the plug-in out into a new function https://bugs.webkit.org/show_bug.cgi?id=66999 Reviewed by Darin Adler. * UIProcess/API/mac/WKView.mm: (-[WKView _handlePluginComplexTextInputKeyDown:]): (-[WKView _tryHandlePluginComplexTextInputKeyDown:]): 2011-08-25 Anders Carlsson WKView should keep track of the plug-in complex text input state https://bugs.webkit.org/show_bug.cgi?id=66990 Reviewed by Sam Weinig. * UIProcess/API/mac/WKView.mm: Add a _pluginComplexTextInputState ivar to WKViewData. (-[WKView _setPluginComplexTextInputState:]): Set the _pluginComplexTextInputState variable. If text input is being disabled, send back an empty string to the plug-in. (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]): Call -[WKView _setPluginComplexTextInputState:]. 2011-08-25 Anders Carlsson Move file internal methods to a class continuation in WKView https://bugs.webkit.org/show_bug.cgi?id=66983 Reviewed by Dan Bernstein. * UIProcess/API/mac/WKView.mm: (-[WKView _deviceScaleFactor]): (-[WKView _setDrawingAreaSize:]): 2011-08-25 Anders Carlsson More work on the updated Cocoa text input specification https://bugs.webkit.org/show_bug.cgi?id=66977 Reviewed by Sam Weinig. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): Initialize m_pluginWantsLegacyCocoaTextInput and m_hasHandledAKeyDownEvent. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add m_pluginWantsLegacyCocoaTextInput and m_hasHandledAKeyDownEvent. (WebKit::NetscapePlugin::setPluginWantsLegacyCocoaTextInput): Add setter. Not called yet. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::platformHandleKeyboardEvent): Set m_hasHandledAKeyDownEvent to true if we get a KeyDown event. (WebKit::NetscapePlugin::sendComplexTextInput): If the plug-in is using the updated Cocoa text input spec, we can disable text input here. (WebKit::NetscapePlugin::pluginFocusOrWindowFocusChanged): If the plug-in is using the updated Cocoa text input spec, text input is not enabled when the plug-in is focused. (WebKit::NetscapePlugin::setComplexTextInputEnabled): Set the right text input state based on whether the plug-in is using the updated spec or not. 2011-08-25 Anders Carlsson Return the correct value for NPNVsupportsCarbonBool https://bugs.webkit.org/show_bug.cgi?id=66964 Reviewed by Adam Roben. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Remove a FIXME and set the value to true. 2011-08-25 Alexis Menard [Qt][WK2] Remove QWKContext class and make sure the WebProcessProxy life is correctly managed. https://bugs.webkit.org/show_bug.cgi?id=66886 Reviewed by Benjamin Poulain. Remove QWKContext class from Qt APIs as it is too low level for the vision of the Qt5 API. QtWebPageProxy now holds directly a WebContext which can be a custom one or default created one. This patch also ensure that the WebProcessProxy is correctly destroyed at application exit by removing the circular references between the WebContext, WebProcessProxy, and WebPageProxy. * UIProcess/API/qt/qdesktopwebview.cpp: (QDesktopWebViewPrivate::QDesktopWebViewPrivate): * UIProcess/API/qt/qtouchwebview.cpp: (QTouchWebViewPrivate::QTouchWebViewPrivate): * UIProcess/qt/ClientImpl.cpp: (qt_wk_setStatusText): * UIProcess/qt/ClientImpl.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::defaultWKContext): (QtWebPageProxy::QtWebPageProxy): (QtWebPageProxy::~QtWebPageProxy): * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/qdesktopwebpageproxy.cpp: (QDesktopWebPageProxy::QDesktopWebPageProxy): * UIProcess/qt/qdesktopwebpageproxy.h: * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::QTouchWebPageProxy): * UIProcess/qt/qtouchwebpageproxy.h: * UIProcess/qt/qwkcontext.cpp: Removed. * UIProcess/qt/qwkcontext.h: Removed. * UIProcess/qt/qwkcontext_p.h: Removed. * WebKit2.pro: 2011-08-23 Jocelyn Turcotte [Qt][WK2] Drive tiling from the WebProcess and reuse TiledBackingStore. https://bugs.webkit.org/show_bug.cgi?id=66771 Reviewed by Tor Arne Vestbø. We need the tiling logic to be moved to the web process to allow invalidated tile rects to be rendered with the same layout. This also allows the web process to render tiles into buffers readable directly by the GPU (on supported platforms). We also take the opportunity to use the TiledBackingStore in WebCore to have only one tiling implementation. Before this patch: - TiledDrawingAreaProxy manages tiles from the UI process. - TiledDrawingArea received rendering requests for a rect and returns the result to the proxy through shared memory. After this patch: - TiledDrawingArea uses a TiledBackingStore to manage tiles from the web process. - TiledBackingStoreRemoteTile forwards tile creations, update and removals to the proxy. - TiledDrawingAreaProxy updates the scene graph directly from requests. It also implements tile buffer swapping correctly in SGTileNode, triggered by the DidRenderFrame message. Render throttling is implemented by waiting in TiledDrawingArea for the UI process to notify us when the last rendered frame is ready to make it to the screen. TiledDrawingAreaTileSets have been replaced by using two instances of TiledBackingStore instead. * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPage::updatePaintNode): * UIProcess/API/qt/qtouchwebview.cpp: (QTouchWebViewPrivate::updateViewportState): * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::createTile): (WebKit::DrawingAreaProxy::updateTile): (WebKit::DrawingAreaProxy::didRenderFrame): (WebKit::DrawingAreaProxy::removeTile): * UIProcess/DrawingAreaProxy.messages.in: * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::create): (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy): (WebKit::TiledDrawingAreaProxy::~TiledDrawingAreaProxy): (WebKit::TiledDrawingAreaProxy::setVisibleContentRect): (WebKit::TiledDrawingAreaProxy::setContentsScale): (WebKit::TiledDrawingAreaProxy::renderNextFrame): (WebKit::TiledDrawingAreaProxy::sizeDidChange): (WebKit::TiledDrawingAreaProxy::paint): * UIProcess/TiledDrawingAreaProxy.h: * UIProcess/TiledDrawingAreaTile.h: Removed. * UIProcess/qt/SGAgent.cpp: (WebKit::NodeUpdateCreateTile::NodeUpdateCreateTile): (WebKit::NodeUpdateRemoveTile::NodeUpdateRemoveTile): (WebKit::NodeUpdateSetBackBuffer::NodeUpdateSetBackBuffer): (WebKit::NodeUpdateSwapTileBuffers::NodeUpdateSwapTileBuffers): (WebKit::SGAgent::SGAgent): (WebKit::SGAgent::createTileNode): (WebKit::SGAgent::removeTileNode): (WebKit::SGAgent::setNodeBackBuffer): (WebKit::SGAgent::swapTileBuffers): (WebKit::SGAgent::updatePaintNode): (WebKit::SGAgent::getScaleNode): Make the parenting logic more strict to allow SGAgent to handle the scale nodes itself (remove NodeUpdateCreateScale and use the scale in CreateTile). Delete the scale node when the last of its child tiles has been removed. * UIProcess/qt/SGAgent.h: (WebKit::SGAgent::isSwapPending): * UIProcess/qt/SGTileNode.cpp: (WebKit::SGTileNode::SGTileNode): (WebKit::SGTileNode::setBackBuffer): (WebKit::SGTileNode::swapIfNeeded): Replace setTargetRect, setSourceRect and setTexture by a single setBackBuffer method. This allows all those values to be used only when swapIfNeeded is called later. * UIProcess/qt/SGTileNode.h: * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: (WebKit::TiledDrawingAreaProxy::createTile): (WebKit::TiledDrawingAreaProxy::updateTile): (WebKit::TiledDrawingAreaProxy::didRenderFrame): (WebKit::TiledDrawingAreaProxy::removeTile): * UIProcess/qt/TiledDrawingAreaTileQt.cpp: Removed. * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::renderNextFrame): * UIProcess/qt/qtouchwebpageproxy.h: * WebKit2.pro: * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setVisibleContentRect): (WebKit::DrawingArea::setContentsScale): (WebKit::DrawingArea::renderNextFrame): * WebProcess/WebPage/DrawingArea.messages.in: * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp: Added. (WebKit::TiledBackingStoreRemoteTile::TiledBackingStoreRemoteTile): (WebKit::TiledBackingStoreRemoteTile::~TiledBackingStoreRemoteTile): (WebKit::TiledBackingStoreRemoteTile::isDirty): (WebKit::TiledBackingStoreRemoteTile::invalidate): (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer): (WebKit::TiledBackingStoreRemoteTile::swapBackBufferToFront): (WebKit::TiledBackingStoreRemoteTile::isReadyToPaint): (WebKit::TiledBackingStoreRemoteTile::paint): (WebKit::TiledBackingStoreRemoteTileBackend::TiledBackingStoreRemoteTileBackend): (WebKit::TiledBackingStoreRemoteTileBackend::createTile): (WebKit::TiledBackingStoreRemoteTileBackend::paintCheckerPattern): * WebProcess/WebPage/TiledBackingStoreRemoteTile.h: Added. (WebKit::TiledBackingStoreRemoteTile::create): (WebKit::TiledBackingStoreRemoteTile::coordinate): (WebKit::TiledBackingStoreRemoteTile::rect): (WebKit::TiledBackingStoreRemoteTileClient::~TiledBackingStoreRemoteTileClient): (WebKit::TiledBackingStoreRemoteTileBackend::create): * WebProcess/WebPage/TiledDrawingArea.cpp: (WebKit::TiledDrawingArea::TiledDrawingArea): (WebKit::TiledDrawingArea::setNeedsDisplay): (WebKit::TiledDrawingArea::setSize): (WebKit::TiledDrawingArea::setVisibleContentRect): (WebKit::TiledDrawingArea::setContentsScale): (WebKit::TiledDrawingArea::renderNextFrame): (WebKit::TiledDrawingArea::suspendPainting): (WebKit::TiledDrawingArea::resumePainting): (WebKit::TiledDrawingArea::tiledBackingStorePaintBegin): (WebKit::TiledDrawingArea::tiledBackingStorePaint): (WebKit::TiledDrawingArea::tiledBackingStorePaintEnd): (WebKit::TiledDrawingArea::tiledBackingStoreIsUpdatingAllowed): (WebKit::TiledDrawingArea::tiledBackingStoreContentsRect): (WebKit::TiledDrawingArea::tiledBackingStoreVisibleRect): (WebKit::TiledDrawingArea::tiledBackingStoreBackgroundColor): (WebKit::TiledDrawingArea::createTile): (WebKit::TiledDrawingArea::updateTile): (WebKit::TiledDrawingArea::removeTile): * WebProcess/WebPage/TiledDrawingArea.h: * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp: Removed. 2011-08-24 Michael Saboff Improper comment in CoreIPC/ArgumentEncoder.cpp from 66464 https://bugs.webkit.org/show_bug.cgi?id=66912 Updated the comment in ArgumentEncoder::grow to reflect that system malloc currently checks to see if a MADV_FREE_REUSABLE will fail before calling it. Reviewed by Mark Rowe. * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::grow): 2011-08-24 Anders Carlsson Rename -[WKTextInputWindowController keyboardInputSourceChanged] to unmarkText to indicate what the method does https://bugs.webkit.org/show_bug.cgi?id=66883 Reviewed by Beth Dakin. * UIProcess/API/mac/WKTextInputWindowController.h: * UIProcess/API/mac/WKTextInputWindowController.mm: (-[WKTextInputPanel _unmarkText]): (-[WKTextInputWindowController unmarkText]): * UIProcess/API/mac/WKView.mm: (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]): 2011-08-24 Oliver Hunt JSNPObject and JSNPMethod create their structure in their constructors https://bugs.webkit.org/show_bug.cgi?id=66879 Reviewed by Anders Carlsson. It's not safe to create the Structure for an object inside its constructor so we hoist construction out into their ::create methods and move the methods into the cpp file. * WebProcess/Plugins/Netscape/JSNPMethod.cpp: (WebKit::JSNPMethod::JSNPMethod): (WebKit::JSNPMethod::create): * WebProcess/Plugins/Netscape/JSNPMethod.h: (WebKit::JSNPMethod::create): * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::JSNPObject): (WebKit::JSNPObject::create): * WebProcess/Plugins/Netscape/JSNPObject.h: (WebKit::JSNPObject::create): 2011-08-24 Anders Carlsson More plug-in complex text input scaffolding https://bugs.webkit.org/show_bug.cgi?id=66865 Reviewed by Sam Weinig. Make -[WKView _doneWithKeyEvent:eventWasHandled:] take an NSEvent * directly. Also add methods for handling plug-in text input key-down events. * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent): * UIProcess/API/mac/WKView.mm: (-[WKView _tryHandlePluginComplexTextInputKeyDown:]): (-[WKView keyDown:]): (-[WKView _tryPostProcessPluginComplexTextInputKeyDown:]): (-[WKView _doneWithKeyEvent:eventWasHandled:]): * UIProcess/API/mac/WKViewInternal.h: 2011-08-24 Amruth Raj [GTK] WebProcess crash on hitting assertion m_isWaitingForDidUpdate in DrawingAreaImpl https://bugs.webkit.org/show_bug.cgi?id=66640 Reviewed by Martin Robinson. The crash happens when a new timer is created in an existing timer callback. Since TimerBase has a single GSource* it gets overridden and the old timer can never get stopped. To handle this, keep a copy of the old timer and use it for destruction. * Platform/RunLoop.h: * Platform/gtk/RunLoopGtk.cpp: (RunLoop::TimerBase::timerFiredCallback): Store the timerSource so that even if it is modified by the timer callback, it can be restored for freeing it. (RunLoop::TimerBase::start): Remove destroyNotifyCallback. Destruction is now handled in timerFiredCallback itself. 2011-08-23 Anders Carlsson Prepare WKTextInputWindowController for the new text input model https://bugs.webkit.org/show_bug.cgi?id=66826 Reviewed by Sam Weinig. Add -[WKTextInputWindowController hasMarkedText] and make interpretKeyEvent take an additional usingLegacyCocoaTextInput flag. No functionality change. * UIProcess/API/mac/WKTextInputWindowController.h: * UIProcess/API/mac/WKTextInputWindowController.mm: (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]): (-[WKTextInputPanel _hasMarkedText]): (-[WKTextInputWindowController hasMarkedText]): (-[WKTextInputWindowController interpretKeyEvent:usingLegacyCocoaTextInput:string:]): * UIProcess/API/mac/WKView.mm: (-[WKView keyDown:]): 2011-08-23 Gopal Raghavan [Qt] Unnecessary folders in WebKit2. https://bugs.webkit.org/show_bug.cgi?id=66583 Reviewed by Benjamin Poulain. Remove empty autotest folders that were left over from QGraphicsWKView times. * UIProcess/API/qt/tests/qgraphicswkview: Removed. * UIProcess/API/qt/tests/qwkhistory: Removed. * UIProcess/API/qt/tests/qwkpage: Removed. 2011-08-23 Jocelyn Turcotte [Qt][WK2] Fix an awful memory leak introduced in r92376. https://bugs.webkit.org/show_bug.cgi?id=65528 Reviewed by Benjamin Poulain. The non-virtual destructor would create a leak of the tile update buffer because the NodeUpdateSetTexture's QImage member destructor wouldn't be called. * UIProcess/qt/SGAgent.h: (WebKit::NodeUpdate::~NodeUpdate): 2011-08-23 Steve Block Remove all mention of removed Android files from build scripts https://bugs.webkit.org/show_bug.cgi?id=66755 Reviewed by Tony Gentilcore. * Scripts/generate-forwarding-headers.pl: 2011-08-23 Benjamin Poulain [Qt][WK2] ViewportInteractionEngine: the position of the content is not corrected when scaling the page manually https://bugs.webkit.org/show_bug.cgi?id=66672 Reviewed by Kenneth Rohde Christiansen. Add the method animateContentIntoBoundariesIfNeeded() to move the content back into both scale and position boundaries. This method is now used as the entry point for animations in order to avoid bugs regarding scale or position. The existing animation methods were renamed accordingly for clarity and consistency with the updateContent methods. * UIProcess/qt/ViewportInteractionEngine.cpp: (WebKit::ViewportInteractionEngine::panGestureEnded): (WebKit::ViewportInteractionEngine::pinchGestureEnded): (WebKit::ViewportInteractionEngine::animateContentIntoBoundariesIfNeeded): (WebKit::ViewportInteractionEngine::animateContentPositionIntoBoundariesIfNeeded): (WebKit::ViewportInteractionEngine::animateContentScaleIntoBoundariesIfNeeded): * UIProcess/qt/ViewportInteractionEngine.h: 2011-08-22 Oliver Hunt Delay GC triggered NP object destruction to the next runloop cycle https://bugs.webkit.org/show_bug.cgi?id=66717 Reviewed by Anders Carlsson. Delay destruction of plugin objects caused by GC until the next runloop cycle so that they can execute JS in their finalizers. We do this using a zero delay timer coupled with a queue of objects to be finalised. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::releaseObject): * WebProcess/Plugins/Netscape/JSNPObject.h: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap): (WebKit::NPRuntimeObjectMap::invalidate): (WebKit::NPRuntimeObjectMap::invalidateQueuedObjects): (WebKit::NPRuntimeObjectMap::addToInvalidationQueue): (WebKit::NPRuntimeObjectMap::finalize): * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp: (WebKit::trySafeReleaseNPObject): * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h: 2011-08-22 Anders Carlsson Move code from PageClientImpl::doneWithKeyEvent to WKView https://bugs.webkit.org/show_bug.cgi?id=66722 Reviewed by Darin Adler. * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent): * UIProcess/API/mac/WKView.mm: (-[WKView _doneWithKeyEvent:WebKit::eventWasHandled:]): * UIProcess/API/mac/WKViewInternal.h: 2011-08-22 Anders Carlsson Update the text input context when the plug-in focus changes and not when the complex text input state changes https://bugs.webkit.org/show_bug.cgi?id=66716 Reviewed by Darin Adler. * UIProcess/API/mac/WKView.mm: (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]): (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]): 2011-08-22 Michael Saboff REGRESSION (r92231): Apple campus proposal PDF doesn't display in Safari https://bugs.webkit.org/show_bug.cgi?id=66464 Changed ArgumentEncoder to use system malloc instead of fastMalloc. FastMalloc uses madvise(MADV_FREE_REUSABLE) which is incompatible with mach message Out Of Line (OOL) messages that use MACH_MSG_VIRTUAL_COPY. The system malloc has no such limitation. Changed sendOutgoingMessage to use MACH_MSG_VIRTUAL_COPY again as it doesn't have size limitations that MACH_MSG_PHYSICAL_COPY. Reviewed by Anders Carlsson. * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::~ArgumentEncoder): (CoreIPC::ArgumentEncoder::grow): * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::Connection::sendOutgoingMessage): 2011-08-22 Anders Carlsson Use -[NSApplication updateWindows] to update the current input context https://bugs.webkit.org/show_bug.cgi?id=66715 Reviewed by Alexey Proskuryakov. * UIProcess/API/mac/WKView.mm: (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]): 2011-08-22 Anders Carlsson The UI process should keep track of whether a plug-in has focus or not https://bugs.webkit.org/show_bug.cgi?id=66712 Reviewed by Darin Adler. This is in preparation for implementing the updated Cocoa text input model. Pipe through whether a plug-in and its containing window has focus or not, from the plug-in process and all the way to the UI process. * PluginProcess/PluginControllerProxy.h: * PluginProcess/mac/PluginControllerProxyMac.mm: (WebKit::PluginControllerProxy::pluginFocusOrWindowFocusChanged): * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged): * UIProcess/API/mac/WKView.mm: (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]): * UIProcess/API/mac/WKViewInternal.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::pluginFocusOrWindowFocusChanged): * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::platformSetFocus): (WebKit::NetscapePlugin::windowFocusChanged): (WebKit::NetscapePlugin::pluginFocusOrWindowFocusChanged): * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: (WebKit::PluginProxy::pluginFocusOrWindowFocusChanged): * WebProcess/Plugins/PluginController.h: * WebProcess/Plugins/PluginProxy.h: * WebProcess/Plugins/PluginProxy.messages.in: * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginFocusOrWindowFocusChanged): * WebProcess/Plugins/PluginView.h: 2011-08-22 Anders Carlsson Update the current NSTextInputContext whenever the plug-in complex text input state changes https://bugs.webkit.org/show_bug.cgi?id=66709 Reviewed by Sam Weinig. Call [NSTextInputContext currentInputContext] which will force AppKit to update the current input context. Fixes a rare case when the out-of-line editing window wouldn't appear. * UIProcess/API/mac/WKView.mm: (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]): 2011-08-19 Anders Carlsson Another attempt at fixing the Windows build. * UIProcess/PageClient.h: 2011-08-19 Anders Carlsson Fix Windows build. * WebProcess/Plugins/PluginController.h: 2011-08-19 Anders Carlsson Make the complex text input state a tri-state enum instead of a boolean https://bugs.webkit.org/show_bug.cgi?id=62245 Reviewed by Sam Weinig. This is to prepare the infrastructure for supporting the updated Cocoa text input model for plug-ins. * PluginProcess/PluginControllerProxy.cpp: * PluginProcess/PluginControllerProxy.h: * PluginProcess/mac/PluginControllerProxyMac.mm: (WebKit::PluginControllerProxy::setComplexTextInputState): (WebKit::PluginControllerProxy::compositingRenderServerPort): * Shared/Plugins/mac: Added. * Shared/Plugins/mac/PluginComplexTextInputState.h: Added. (WebKit::isValidPluginComplexTextInputState): * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setPluginComplexTextInputState): * UIProcess/API/mac/WKView.mm: (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]): * UIProcess/API/mac/WKViewInternal.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::setPluginComplexTextInputState): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::platformSetFocus): (WebKit::NetscapePlugin::windowFocusChanged): (WebKit::NetscapePlugin::setComplexTextInputEnabled): * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: (WebKit::PluginProxy::setComplexTextInputState): * WebProcess/Plugins/PluginController.h: * WebProcess/Plugins/PluginProxy.cpp: * WebProcess/Plugins/PluginProxy.h: * WebProcess/Plugins/PluginProxy.messages.in: * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::~PluginView): (WebKit::PluginView::setComplexTextInputState): (WebKit::PluginView::compositingRenderServerPort): * WebProcess/Plugins/PluginView.h: 2011-08-19 Caio Marcelo de Oliveira Filho [Qt] [WK2] Provide API for intercept (and possible ignore) links clicked in QDesktopWebView https://bugs.webkit.org/show_bug.cgi?id=65920 Reviewed by Benjamin Poulain. This patch makes QDesktopWebView delegate the decision of whether a navigation should proceed to a slot in QML. The user of the DesktopWebView must implement a 'navigationPolicyForUrl()' if it wants to use the feature. Such feature is useful for implementing opening links in "new tab" by using a specific mouse button or mouse button plus keyboard modifiers. The patch introduces a internal Qt-level interface called PolicyInterface, that is used by QtWebPageProxy to delegate policy calls. A concrete implementation is provided for QDesktopWebView. * Shared/qt/WebCoreArgumentCodersQt.cpp: (CoreIPC::::encode): (CoreIPC::::decode): Implement the serialization of the Request URL, which is the only data we exposing from the Request. * WebKit2.pro: * UIProcess/qt/PolicyInterface.h: Added. * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): (QtWebPageProxy::init): * UIProcess/qt/QtWebPageProxy.h: Register a Policy Client in the WK2 C API only if there's a PolicyInterface available. * UIProcess/qt/ClientImpl.h: * UIProcess/qt/ClientImpl.cpp: (toPolicyInterface): (toQtMouseButton): (toQtKeyboardModifiers): (qt_wk_decidePolicyForNavigationAction): Implement the callback for the Page Policy Client. It will translate the arguments to Qt jargon and call PolicyInterface. * UIProcess/qt/qdesktopwebpageproxy.cpp: (QDesktopWebPageProxy::QDesktopWebPageProxy): * UIProcess/API/qt/qdesktopwebview.h: * UIProcess/API/qt/qdesktopwebview_p.h: * UIProcess/API/qt/qdesktopwebview.cpp: (toPolicyAction): (hasMetaMethod): (QDesktopWebViewPrivate::navigationPolicyForURL): The concrete implementation for QDesktopWebView. Its private object implements the PolicyInterface and try to call a possible function defined in QML (so return value and arguments all QVariants). If there's no such a function, returns the default UsePolicy, like if we haven't registered a PolicyClient in WK2 C API. * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml: Added. * UIProcess/API/qt/tests/qmltests/common/test2.html: Added. * UIProcess/API/qt/tests/qmltests/qmltests.pro: Add a test for DesktopWebView QML element making use of a button and a modifier to ignore a navigation. * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::QTouchWebPageProxy): For now, we don't have a PolicyInterface for QTouchWebView. 2011-08-18 Anders Carlsson WebProcess crashes during startup if libdispatch is initialized by WebProcessShim.dylib https://bugs.webkit.org/show_bug.cgi?id=66508 Reviewed by Mark Rowe. * mac/MainMac.cpp: (closeUnusedFileDescriptors): Check if a file descriptor is a kqueue and don't close it if that is the case. While this isn't a complete fix, (it won't work if other initializers end up creating non-kqueue file descriptors) it's good enough for Snow Leopard. For Lion, we should use the new posix_spawn API that lets you whitelist file descriptors from the parent process. 2011-08-19 Benjamin Poulain [Qt][WK2] Add a basic engine to control the content of the viewport https://bugs.webkit.org/show_bug.cgi?id=66383 Reviewed by Andreas Kling. Add ViewportInteractionEngine to handle the content of the viewport. The class make sure the QTouchWebPage stays in the viewport and in the boundaries. * UIProcess/API/qt/qdesktopwebview.cpp: (QDesktopWebViewPrivate::loadDidCommit): * UIProcess/API/qt/qdesktopwebview_p.h: * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPage::QTouchWebPage): Set the transform origin to the top left so we can asume the position 0, 0 is always the top left of the page. (QTouchWebPagePrivate::_q_commitScaleChange): Make commitScaleChange a slot in order to completely decouple the ViewportInteractionEngine and the WebKit classes. * UIProcess/API/qt/qtouchwebpage.h: * UIProcess/API/qt/qtouchwebpage_p.h: * UIProcess/API/qt/qtouchwebview.cpp: (QTouchWebViewPrivate::QTouchWebViewPrivate): (QTouchWebViewPrivate::loadDidCommit): (QTouchWebViewPrivate::_q_viewportRectUpdated): Make _q_viewportRectUpdated() a slot for reducing coupling. (QTouchWebViewPrivate::updateViewportConstraints): (QTouchWebViewPrivate::setViewportArguments): (QTouchWebView::geometryChanged): * UIProcess/API/qt/qtouchwebview.h: * UIProcess/API/qt/qtouchwebview_p.h: * UIProcess/qt/ClientImpl.cpp: (qt_wk_didCommitLoadForFrame): * UIProcess/qt/QtGestureRecognizer.cpp: (WebKit::QtGestureRecognizer::QtGestureRecognizer): * UIProcess/qt/QtGestureRecognizer.h: Change the gesture recognizer to talk directly to the ViewportInteractionEngine instead of interacting through TouchViewInterface. * UIProcess/qt/QtPanGestureRecognizer.cpp: (WebKit::QtPanGestureRecognizer::QtPanGestureRecognizer): (WebKit::QtPanGestureRecognizer::recognize): * UIProcess/qt/QtPanGestureRecognizer.h: * UIProcess/qt/QtPinchGestureRecognizer.cpp: (WebKit::QtPinchGestureRecognizer::QtPinchGestureRecognizer): (WebKit::QtPinchGestureRecognizer::recognize): * UIProcess/qt/QtPinchGestureRecognizer.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::loadDidCommit): Add the loadCommited callback in order to reset the viewport state when the page change. * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::TouchViewInterface): (WebKit::TouchViewInterface::contentSizeChanged): (WebKit::TouchViewInterface::loadDidCommit): * UIProcess/qt/TouchViewInterface.h: * UIProcess/qt/ViewInterface.h: * UIProcess/qt/ViewportInteractionEngine.cpp: Added. (WebKit::visibleRectInContentCoordinate): (WebKit::contentRectInViewportCoordinate): (WebKit::ViewportUpdateGuard::ViewportUpdateGuard): (WebKit::ViewportUpdateGuard::~ViewportUpdateGuard): (WebKit::ViewportInteractionEngine::ViewportInteractionEngine): (WebKit::ViewportInteractionEngine::reset): (WebKit::ViewportInteractionEngine::setConstraints): (WebKit::ViewportInteractionEngine::panGestureStarted): (WebKit::ViewportInteractionEngine::panGestureRequestScroll): (WebKit::ViewportInteractionEngine::panGestureCancelled): (WebKit::ViewportInteractionEngine::panGestureEnded): (WebKit::ViewportInteractionEngine::pinchGestureStarted): (WebKit::ViewportInteractionEngine::pinchGestureRequestUpdate): (WebKit::ViewportInteractionEngine::pinchGestureEnded): (WebKit::ViewportInteractionEngine::contentGeometryChanged): (WebKit::ViewportInteractionEngine::contentScaleChanged): (WebKit::ViewportInteractionEngine::updateContentIfNeeded): (WebKit::ViewportInteractionEngine::updateContentScaleIfNeeded): (WebKit::ViewportInteractionEngine::updateContentPositionIfNeeded): (WebKit::ViewportInteractionEngine::animateContentPositionToBoundaries): (WebKit::ViewportInteractionEngine::animateContentScaleToBoundaries): (WebKit::ViewportInteractionEngine::scaleContent): * UIProcess/qt/ViewportInteractionEngine.h: Added. (WebKit::ViewportInteractionEngine::Constraints::Constraints): (WebKit::operator==): * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::QTouchWebPageProxy): * UIProcess/qt/qtouchwebpageproxy.h: * WebKit2.pro: 2011-08-19 Lars Knudsen [Qt][WK2] Change the rect argument of QtWebPageProxy::paint() to const ref https://bugs.webkit.org/show_bug.cgi?id=66549 Reviewed by Benjamin Poulain. * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::paint): * UIProcess/qt/QtWebPageProxy.h: 2011-08-19 MORITA Hajime Spell-checking against execCommand() inserted HTML doesn't care word boundary. https://bugs.webkit.org/show_bug.cgi?id=65902 Reviewed by Ryosuke Niwa. Add exports for window.internals object. * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-08-18 Beth Dakin Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=66495 Lion-specific scroller SPIs can use forward declaration instead of WebKitSystemInterface * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-08-18 Darin Adler Made some code even more private to a particular file and class https://bugs.webkit.org/show_bug.cgi?id=66428 Reviewed by Anders Carlsson. * UIProcess/API/mac/WKView.mm: (-[WKView _setDrawingAreaSize:]): Made this file internal. * UIProcess/API/mac/WKViewInternal.h: Removed _setDrawingAreaSize. * UIProcess/DrawingAreaProxy.h: Made sizeDidChange private. 2011-08-18 Amruth Raj [GTK] [WK2] Activating sub menus cause the WebProcess to crash https://bugs.webkit.org/show_bug.cgi?id=66471 Reviewed by Anders Carlsson. * UIProcess/gtk/WebContextMenuProxyGtk.cpp: (WebKit::WebContextMenuProxyGtk::createGtkMenu): 2011-08-18 Adam Roben Update the device scale factor when the WKView's window changes Fixes WebKit doesn't react when a WebView is moved between windows with different backing scale factors Reviewed by Anders Carlsson. * UIProcess/API/mac/WKView.mm: (-[WKView viewDidMoveToWindow]): Call setDeviceScaleFactor because our new window (or no window at all) might have a different backing scale factor than the previous one. (-[WKView _deviceScaleFactor]): Moved to the new FileInternal category. 2011-08-18 Adam Roben Make WebPageProxy keep track of the current device scale factor The device scale factor is no longer considered part of WebPageProxy's "view state". It now has its own setter/getter. This made the code a little simpler and more similar to the page scale factor. Each port-specific WebKit2 view is now responsible for calling WebPageProxy::setDeviceScaleFactor whenever it thinks the device scale factor might have changed. Fixes WebKit2 requires every port-specific view to keep track of the current device scale factor Reviewed by Anders Carlsson. * UIProcess/API/efl/PageClientImpl.cpp: * UIProcess/API/efl/PageClientImpl.h: * UIProcess/API/gtk/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: * UIProcess/PageClient.h: * UIProcess/qt/QtWebPageProxy.h: * UIProcess/win/WebView.h: Removed deviceScaleFactor. * UIProcess/API/mac/WKView.mm: (-[WKView _deviceScaleFactor]): Added. Code came from PageClientImpl::deviceScaleFactor. (-[WKView _windowDidChangeResolution:]): Changed to call WebPageProxy::setDeviceScaleFactor. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): Initialize m_deviceScaleFactor. (WebKit::WebPageProxy::viewStateDidChange): Removed device-scale-factor-related code. (WebKit::WebPageProxy::setDeviceScaleFactor): Added. Records the new device scale factor and tells the DrawingAreaProxy about it if it's actually changed. (WebKit::WebPageProxy::creationParameters): Use m_deviceScaleFactor instead of calling out to the PageClient. * UIProcess/WebPageProxy.h: Added m_deviceScaleFactor and setDeviceScaleFactor, which replaces the DeviceScaleFactor ViewStateFlag. (WebKit::WebPageProxy::deviceScaleFactor): Inlined this now-simple getter. 2011-08-17 Adam Roben Make WebCore keep track of the current device scale factor Fixes WebCore requires every WebKit port to keep track of the device scale factor Reviewed by Darin Adler. * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebChromeClient.h: Removed deviceScaleFactor. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): (WebKit::DrawingAreaImpl::display): * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::updateFindIndicator): (WebKit::FindController::hideFindIndicator): * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: (WebKit::LayerTreeHostCA::deviceScaleFactor): Changed to get the device scale factor from WebCore. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::setDeviceScaleFactor): * WebProcess/WebPage/WebPage.h: Removed m_deviceScaleFactor. We always get the scale factor from WebCore now. 2011-08-17 Anders Carlsson Remove unused Core Animation related classes https://bugs.webkit.org/show_bug.cgi?id=66393 Reviewed by Darin Adler. * Shared/mac/CoreAnimationRenderer.h: Removed. * Shared/mac/CoreAnimationRenderer.mm: Removed. * Shared/mac/ShareableSurface.cpp: Removed. * Shared/mac/ShareableSurface.h: Removed. * WebKit2.xcodeproj/project.pbxproj: 2011-08-15 Dmitry Titov FrameLoaderClient::transferLoadingResourceFromPage does not have enough parameters https://bugs.webkit.org/show_bug.cgi?id=66165 Reviewed by Darin Fisher. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transferLoadingResourceFromPage): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 2011-08-15 Balazs Kelemen [Qt][WK2] Unreviewed build fix after r93058. * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::deviceScaleFactorDidChange): * UIProcess/TiledDrawingAreaProxy.h: 2011-08-15 Adam Roben Update pages' style and content scale when the window's backing scale factor changes Unfortunately, I couldn't think of a way to test this in an automated fashion. Fixes WebKit doesn't react to device scale factor changes Reviewed by Simon Fraser. * UIProcess/API/mac/WKView.mm: (-[WKView addWindowObserversForWindow:]): (-[WKView removeWindowObservers]): Listen for the notification that tells us the window's backing scale has changed. (-[WKView _windowDidChangeResolution:]): Tell the WebPageProxy about the change. * UIProcess/DrawingAreaProxy.h: * UIProcess/DrawingAreaProxyImpl.h: Added deviceScaleFactorDidChange. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::deviceScaleFactorDidChange): Request a new backing store since the current one is using an old device scale factor. (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): Send the device scale factor along to the web process so it can render accordingly. This is how we tell the web process about device scale factor changes. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewStateDidChange): Tell the DrawingAreaProxy when the device scale factor changes. (WebKit::WebPageProxy::deviceScaleFactor): Added this simple getter that calls through to the PageClient. DrawingAreaProxy uses this function. * UIProcess/WebPageProxy.h: Added new members. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::updateBackingStoreState): * WebProcess/WebPage/DrawingArea.messages.in: * WebProcess/WebPage/DrawingAreaImpl.h: Send the device scale factor in the UpdateBackingStoreState message. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::updateBackingStoreState): Tell the WebPage and LayerTreeHost about the new device scale factor. * WebProcess/WebPage/LayerTreeHost.h: * WebProcess/WebPage/ca/LayerTreeHostCA.h: Added deviceScaleFactorDidChange. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setDeviceScaleFactor): Store the new scale factor and tell the page about it so that, e.g., scale-factor-dependent media queries will be reevaluated. * WebProcess/WebPage/WebPage.h: Added setDeviceScaleFactor. * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: (WebKit::LayerTreeHostCA::deviceScaleFactorDidChange): Tell the layer for non-composited content about the new scale factor. 2011-08-15 Benjamin Poulain [Qt][WK2] Get rid of QTouchWebPagePrivate::getPageViewPrivate() https://bugs.webkit.org/show_bug.cgi?id=66222 Reviewed by Kenneth Rohde Christiansen. The function QTouchWebPagePrivate::getPageViewPrivate() exposed the private QTouchWebPage to any object in WebKit. Instead, use the friend keyword to list which objects can access the internal of QTouchWebPage. * UIProcess/API/qt/qtouchwebpage.h: * UIProcess/API/qt/qtouchwebpage_p.h: * UIProcess/API/qt/qtouchwebview.cpp: (QTouchWebViewPrivate::QTouchWebViewPrivate): (QTouchWebViewPrivate::viewportRectUpdated): 2011-08-15 Balazs Kelemen Unreviewed. Fix Qt-WK2 build after r93040. * UIProcess/qt/QtWebPageProxy.h: (QtWebPageProxy::deviceScaleFactor): 2011-08-10 Adam Roben Clear up scale factor terminology WebKit by and large deals with two scale factors: one intrinsic to the device on which the software is running, and one that is per-Page and can be controlled via API calls. This patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the code use those names. It should introduce no behavior changes. Fixes WebKit uses multiple conflicting names to refer to the device scale factor Reviewed by Simon Fraser. * Shared/UpdateInfo.cpp: * Shared/UpdateInfo.h: * Shared/WebPageCreationParameters.cpp: * Shared/WebPageCreationParameters.h: * UIProcess/API/C/WKPage.cpp: * UIProcess/API/efl/PageClientImpl.cpp: * UIProcess/API/efl/PageClientImpl.h: * UIProcess/API/gtk/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: * UIProcess/BackingStore.cpp: * UIProcess/BackingStore.h: * UIProcess/DrawingAreaProxyImpl.cpp: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebPopupMenuProxy.h: * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: * UIProcess/gtk/WebPopupMenuProxyGtk.h: * UIProcess/mac/BackingStoreMac.mm: * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.h: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/qt/WebPopupMenuProxyQt.h: * UIProcess/win/WebPopupMenuProxyWin.h: * UIProcess/win/WebView.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebPage/DrawingAreaImpl.cpp: * WebProcess/WebPage/FindController.cpp: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: * WebProcess/WebPage/ca/LayerTreeHostCA.h: 2011-08-13 Sam Weinig Remove unused variables from WKFullScreenWindowController.h https://bugs.webkit.org/show_bug.cgi?id=66193 Reviewed by Dan Bernstein. * UIProcess/mac/WKFullScreenWindowController.h: Remove _layerViewPlaceholder, _isWindowLoaded and _initialFrame which were not used. 2011-08-12 Dan Bernstein Add an option to automatically show tooltips (with the full text) over truncated text https://bugs.webkit.org/show_bug.cgi?id=66178 Reviewed by Simon Fraser. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetShowsToolTipOverTruncatedText): Added this setter. (WKPreferencesGetShowsToolTipOverTruncatedText): Added this getter. * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Handle the showsToolTipOverTruncatedText preference. 2011-08-12 Mark Rowe Be more forward-looking in the choice of compiler. Rubber-stamped by Jon Honeycutt. * Configurations/CompilerVersion.xcconfig: 2011-08-11 Viatcheslav Ostapenko VectorArgumentCoder doesn't encode/decode enough data for more than one byte vector elements https://bugs.webkit.org/show_bug.cgi?id=66109 Reviewed by Anders Carlsson. Multiply vector size by element size in encode/decode to get correct byte size of vector data. * Platform/CoreIPC/ArgumentCoders.h: 2011-08-11 Nico Weber Remove incorrect comment about m_wheelEventHandlerCount https://bugs.webkit.org/show_bug.cgi?id=66117 Reviewed by Simon Fraser. From what I can tell, this number is changed only in Frame::notifyChromeClientWheelEventHandlerCountChanged(), and there it just reads the number modified in Document::didAdd/RemoveWheelEventHandler(). So this is just the number of event handlers (and not related to horizontal scrollbars), and the variable name expresses that already. * UIProcess/WebPageProxy.h: 2011-08-11 Kenneth Rohde Christiansen [Qt/WK2] Add initial support for viewport meta tag https://bugs.webkit.org/show_bug.cgi?id=65975 Reviewed by Benjamin Poulain. Redirect the viewport arguments through to the view. * UIProcess/API/qt/qdesktopwebview.cpp: (QDesktopWebViewPrivate::didReceiveViewportArguments): * UIProcess/API/qt/qdesktopwebview_p.h: * UIProcess/API/qt/qtouchwebview.cpp: (QTouchWebView::geometryChanged): * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::setViewportArguments): * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::updateViewportState): (WebKit::TouchViewInterface::didReceiveViewportArguments): * UIProcess/qt/TouchViewInterface.h: (WebKit::TouchViewInterface::ViewportState::ViewportState): * UIProcess/qt/ViewInterface.h: * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::QTouchWebPageProxy): * UIProcess/qt/qtouchwebpageproxy.h: 2011-08-10 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=66004 Removing the CSS Regions and CSS Exclusions ifdefs. Reviewed by Adam Roben. * Configurations/FeatureDefines.xcconfig: 2011-08-10 Alexey Proskuryakov Accidentally commented out an assertion in BackingStore::incorporateUpdate https://bugs.webkit.org/show_bug.cgi?id=65989 Reviewed by Anders Carlsson. I couldn't get this assertion to fire in quick testing, let's bring it back. * UIProcess/BackingStore.cpp: (WebKit::BackingStore::incorporateUpdate): 2011-08-10 Lars Knudsen Add device specific settings to support viewport computing https://bugs.webkit.org/show_bug.cgi?id=65984 Reviewed by Kenneth Rohde Christiansen. Expose new viewport related WebCore settings to WebKit2. * Shared/WebPreferencesStore.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2011-08-09 John Sullivan WKPageCopyPendingAPIRequestURL returns stale result if policy decision set to Ignore https://bugs.webkit.org/show_bug.cgi?id=65950 Reviewed by Anders Carlsson. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedPolicyDecision): Call clearPendingAPIRequestURL() if the policy decision is PolicyIgnore. 2011-08-09 Anders Carlsson Add a WebKit prefix to the user default. Reviewed by Dan Bernstein. * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): 2011-08-09 Anders Carlsson Add a user default to disable the plug-in process message timeout https://bugs.webkit.org/show_bug.cgi?id=65945 Reviewed by Adam Roben. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: Add a disablePluginProcessMessageTimeout member variable. * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): Initialize the disablePluginProcessMessageTimeout member variable from the "DisablePluginProcessMessageTimeout" user default. * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::defaultSyncMessageTimeout): Return NoTimeout if WebProcess::disablePluginProcessMessageTimeout returns true. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::initializeWebProcess): Initialize m_disablePluginProcessMessageTimeout. * WebProcess/WebProcess.h: (WebKit::WebProcess::disablePluginProcessMessageTimeout): Add getter. 2011-08-09 Mark Hahnenberg Add ParentClass typedef in all JSC classes https://bugs.webkit.org/show_bug.cgi?id=65731 Reviewed by Oliver Hunt. Just added the Base typedefs in all the classes that are a subclass of JSCell to point at their parent classes. This is a change to support future changes to the way constructors and destructors are implemented in JS objects, among other things. * WebProcess/Plugins/Netscape/JSNPMethod.h: * WebProcess/Plugins/Netscape/JSNPObject.h: 2011-08-08 Adrienne Walker Add testing for --force-compositing-mode to windows.internal https://bugs.webkit.org/show_bug.cgi?id=65777 Reviewed by Adam Barth. Add exports for Document::settings(). * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-08-09 Kenneth Rohde Christiansen [Qt] Redirect didFindZoomableArea thru to the view https://bugs.webkit.org/show_bug.cgi?id=65913 Reviewed by Andreas Kling. * UIProcess/API/qt/qdesktopwebview.cpp: (QDesktopWebViewPrivate::didFindZoomableArea): * UIProcess/API/qt/qdesktopwebview_p.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::didFindZoomableArea): * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::didFindZoomableArea): * UIProcess/qt/TouchViewInterface.h: * UIProcess/qt/ViewInterface.h: * UIProcess/qt/qdesktopwebpageproxy.cpp: (QDesktopWebPageProxy::timerEvent): * UIProcess/qt/qdesktopwebpageproxy.h: * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::setContentsScale): * UIProcess/qt/qtouchwebpageproxy.h: 2011-08-09 Kenneth Rohde Christiansen [Qt] Vastly improve the algorithm for finding a zoomable area when doing double-tap https://bugs.webkit.org/show_bug.cgi?id=65907 Reviewed by Andreas Kling. This is upstreaming of the algorithm we are currently using on the N9 browser and this also fixes a bug with not considering the frame positions when finding a zoomable area. * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didFindZoomableArea): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/qt/qdesktopwebpageproxy.cpp: (QDesktopWebPageProxy::didFindZoomableArea): * UIProcess/qt/qdesktopwebpageproxy.h: * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::didFindZoomableArea): * UIProcess/qt/qtouchwebpageproxy.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::findZoomableAreaForPoint): 2011-08-08 Chris Marrin Logic to compute visible display rect in GraphicsLayerCA::syncCompositingState https://bugs.webkit.org/show_bug.cgi?id=65708 Supply initial display rects for the full-screen case Reviewed by Simon Fraser. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): 2011-08-08 Dan Bernstein REGRESSION (r87755): WKView doesn't update when I drag files into a background Safari window https://bugs.webkit.org/show_bug.cgi?id=65860 Reviewed by Simon Fraser. When layer flush scheduling is re-enabled, schedule a layer flush, just in case one was requested while scheduling was disabled. It doesn’t seem worthwhile to track whether that in fact happened, so do so unconditionally. * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: (WebKit::LayerTreeHostCAMac::setLayerFlushSchedulingEnabled): * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp: (WebKit::LayerTreeHostCAWin::setLayerFlushSchedulingEnabled): 2011-08-05 Pavel Feldman Web Inspector: implement dock/undock in WebKit2 without getting into WebCore. https://bugs.webkit.org/show_bug.cgi?id=65763 InspectorFrontendClient.h can't have synchronous canAttachWindow() returning value since in the multiprocess environment, you can't immediately get back to it from the host. r92384 introduced an unhealthy WebKit -> WebCore -> WebKit canAttach query where embedder was asking itself a question. This loop was fixed. Reviewed by Yury Semikhatsky. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::attach): (WebKit::WebInspectorProxy::createInspectorPage): (WebKit::WebInspectorProxy::didLoadInspectorPage): (WebKit::WebInspectorProxy::shouldOpenAttached): * UIProcess/WebInspectorProxy.h: * UIProcess/WebInspectorProxy.messages.in: * UIProcess/efl/WebInspectorEfl.cpp: (WebKit::WebInspectorProxy::platformInspectedWindowHeight): * UIProcess/gtk/WebInspectorGtk.cpp: (WebKit::WebInspectorProxy::platformInspectedWindowHeight): * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformOpen): (WebKit::WebInspectorProxy::platformInspectedWindowHeight): * UIProcess/qt/WebInspectorProxyQt.cpp: (WebKit::WebInspectorProxy::platformOpen): (WebKit::WebInspectorProxy::platformInspectedWindowHeight): * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::platformOpen): (WebKit::WebInspectorProxy::platformInspectedWindowHeight): * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::didLoadInspectorPage): * WebProcess/WebPage/WebInspector.h: * WebProcess/WebPage/WebInspector.messages.in: 2011-08-07 Joseph Pecoraro [QT] Possible Leaks WKRetainPtr<> should Adopt allocated Copy https://bugs.webkit.org/show_bug.cgi?id=65790 Reviewed by Sam Weinig. Fix a leak by adopting an allocation instead of retaining it. * UIProcess/qt/qwkhistory.cpp: (QWKHistoryItem::title): (QWKHistoryItem::url): 2011-08-06 Mark Rowe Fix a memory leak found via code inspection. Rubber-stamped by Dan Bernstein. * WebProcess/Downloads/mac/DownloadMac.mm: (WebKit::setOriginalURLForDownload): Adopt the newly-allocated NSURL instance so that it does not leak. 2011-08-06 Aron Rosenberg Reviewed by Benjamin Poulain. [Qt] Fix build with Intel compiler on Windows https://bugs.webkit.org/show_bug.cgi?id=65088 Intel compiler needs .lib suffixes instead of .a * WebKit2.pri: 2011-08-05 Darin Adler Reviewed by Anders Carlsson. [WebKit2] Fix code paths that can leave frame view paint behavior in the wrong state https://bugs.webkit.org/show_bug.cgi?id=63779 * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::handleEvent): Unrelated cleanup. Removed unneeded local variable. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::snapshotInViewCoordinates): Rearranged code so that the call to setPaintBehavior is after the early exit. Also got rid of unneeded save/restore since the function uses a graphics context that it then throws away. (WebKit::WebPage::scaledSnapshotInDocumentCoordinates): Ditto. 2011-08-04 Mark Rowe Future-proof Xcode configuration settings. * Configurations/Base.xcconfig: * Configurations/CompilerVersion.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKit2.xcconfig: 2011-08-01 Brian Weinstein WebKit2: Web Inspector always starts in undocked mode https://bugs.webkit.org/show_bug.cgi?id=65493 Reviewed by Adam Roben. When opening the inspector, the web process tells the UI process that the inspector page has loaded, but now will pass another bit of data, whether the inspector can start attached, so the UI process doesn't need to ask the web process to do another calculation on whether or not it can be attached. If the user prefers the inspector to start docked (this defaults to true), and there is room for the window, we send a message to the web process to try and attach the inspector. This makes sure that the inspector knows it is docked (in the web process). * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::attach): Update the user's docked/undocked preference if the inspector is visible when it was attached. (WebKit::WebInspectorProxy::detach): Ditto (but when it was detached). (WebKit::WebInspectorProxy::didLoadInspectorPage): If we can start docked, and the user prefers to start docked, then request the inspector be attached to the window. * UIProcess/WebInspectorProxy.h: * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformOpen): Only show the window if we are going to start undocked. * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::platformOpen): Ditto. * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::didLoadInspectorPage): Pass whether or not we can attach the window. (WebKit::WebInspector::requestAttachWindow): Call through to the InspectorController to attach the inspector. (WebKit::WebInspector::canAttachWindow): Ask the InspectorController if we can attach the inspector. * WebProcess/WebPage/WebInspector.h: * Shared/WebPreferencesStore.h: Add a new preference for whether or not the inspector should start attached. * UIProcess/WebInspectorProxy.messages.in: When the inspector page is loaded, tell the UI Process whether we can attach the inspector without needing another message. * WebProcess/WebPage/WebInspector.messages.in: Add a new message for RequestAttachWindow 2011-08-02 Jocelyn Turcotte [Qt][WK2] Create scene graph nodes for tiles in QTouchWebView instead of using imperative painting. https://bugs.webkit.org/show_bug.cgi?id=65528 Reviewed by Benjamin Poulain. Converts QTouchWebPage from QSGPaintedItem to a straight QSGItem. - A SGTileNode is created and added to the scene graph for each tile, positioning them relatively to the page. It's basically a QSGSimpleTextureNode with support for specifying a source rect plus for owning the QSGTexture for proper destruction on shutdown by the rendering thread. - Scale nodes are used as parent of tile nodes to revert the scaling set on the QTouchWebPage and allow us to keep using integer coordinates. - The SGAgent class is introduced to carry scene graph update request up to the updatePaintNode call of the item, which may be on the scene graph rendering thread. * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPage::QTouchWebPage): (QTouchWebPage::updatePaintNode): Delegate scene graph updates to the SGAgent which received update requests from the tiled drawing area. (QTouchWebPage::event): (QTouchWebPage::geometryChanged): (QTouchWebPagePrivate::QTouchWebPagePrivate): * UIProcess/API/qt/qtouchwebpage.h: * UIProcess/API/qt/qtouchwebpage_p.h: * UIProcess/TiledDrawingAreaProxy.cpp: Manage the scale node in the TileSet, it will be the parent node of Tile nodes. (WebKit::TiledDrawingAreaTileSet::sgNodeID): (WebKit::TiledDrawingAreaTileSet::TiledDrawingAreaTileSet): (WebKit::TiledDrawingAreaTileSet::~TiledDrawingAreaTileSet): (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy): (WebKit::TiledDrawingAreaProxy::setContentsScale): (WebKit::TiledDrawingAreaProxy::createTiles): (WebKit::TiledDrawingAreaProxy::removeAllTiles): * UIProcess/TiledDrawingAreaTile.h: (WebKit::TiledDrawingAreaTile::create): * UIProcess/qt/SGAgent.cpp: Added. * UIProcess/qt/SGAgent.h: Added. * UIProcess/qt/SGTileNode.cpp: Added. * UIProcess/qt/SGTileNode.h: Added. * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: Disable the paint call and update the scene graph on incorporateUpdate through the SGAgent. (WebKit::TiledDrawingAreaProxy::updateWebView): * UIProcess/qt/TiledDrawingAreaTileQt.cpp: (WebKit::TiledDrawingAreaTile::TiledDrawingAreaTile): (WebKit::TiledDrawingAreaTile::~TiledDrawingAreaTile): (WebKit::TiledDrawingAreaTile::isReadyToPaint): (WebKit::TiledDrawingAreaTile::swapBackBufferToFront): (WebKit::TiledDrawingAreaTile::paint): (WebKit::TiledDrawingAreaTile::incorporateUpdate): (WebKit::TiledDrawingAreaTile::disableUpdates): (WebKit::TiledDrawingAreaTile::setParentNodeID): * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::sceneGraphAgent): (WebKit::TouchViewInterface::setViewNeedsDisplay): * UIProcess/qt/TouchViewInterface.h: * WebKit2.pro: 2011-08-04 Alexis Menard [Qt] Make navigation actions properly usable in QML. https://bugs.webkit.org/show_bug.cgi?id=65624 Add a new class that is exposed in QML to control the navigation like reload/stop/back/forward. Enums are not very QML friendly, it not possible to use enums that are not declared in the same class than the object exposed in QML, therefore it makes hard the sharing between the desktop and the touch views. In addition namespaced enums are even harder to support in QML. QWebNavigationController is not really meant to be used in C++ but it is exported for convenience reason (tests and MiniBrowser) so its API is not meant to be public but exposed in QML through properties and convenience slots. The QML code to use the navigation action in QML will look like "desktopView.navigation.reload();" or "if (desktopView.navigation.reloadAction.enabled) ...". Reviewed by Benjamin Poulain. * UIProcess/API/qt/WKView.h: To get the forward header generated * UIProcess/API/qt/qdesktopwebview.cpp: (QDesktopWebViewPrivate::QDesktopWebViewPrivate): (QDesktopWebView::navigationController): * UIProcess/API/qt/qdesktopwebview.h: * UIProcess/API/qt/qdesktopwebview_p.h: * UIProcess/API/qt/qmlplugin/plugin.cpp: (WebKit2QmlPlugin::registerTypes): * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPage::navigationController): (QTouchWebPagePrivate::QTouchWebPagePrivate): * UIProcess/API/qt/qtouchwebpage.h: * UIProcess/API/qt/qtouchwebpage_p.h: * UIProcess/API/qt/qwebnavigationcontroller.cpp: Added. (QWebNavigationControllerPrivate::QWebNavigationControllerPrivate): (QWebNavigationController::QWebNavigationController): (QWebNavigationController::~QWebNavigationController): (QWebNavigationController::backAction): (QWebNavigationController::forwardAction): (QWebNavigationController::stopAction): (QWebNavigationController::reloadAction): (QWebNavigationController::navigationAction): (QWebNavigationController::back): (QWebNavigationController::forward): (QWebNavigationController::stop): (QWebNavigationController::reload): * UIProcess/API/qt/qwebnavigationcontroller.h: Added. * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp: (WebViewAbstraction::triggerNavigationAction): * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp: (tst_QDesktopWebView::navigationActionsStatusAtStartup): (LoadStartedCatcher::onLoadStarted): (tst_QDesktopWebView::stopActionEnabledAfterLoadStarted): * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp: (tst_QTouchWebView::navigationActionsStatusAtStartup): * WebKit2API.pri: 2011-08-03 Jeff Miller Use of AVFoundation should default to off on Windows https://bugs.webkit.org/show_bug.cgi?id=65660 Reviewed by Darin Adler. * Shared/WebPreferencesStore.h: Change default value for AVFoundationEnabled to false on Windows, it's still true on other platforms. 2011-08-03 Mark Rowe Bring some order to FeatureDefines.xcconfig to make it easier to follow. Reviewed by Sam Weinig. * Configurations/FeatureDefines.xcconfig: 2011-08-03 Mark Rowe Clean up FeatureDefines.xcconfig to remove some unnecessary conditional settings Reviewed by Dave Kilzer. * Configurations/FeatureDefines.xcconfig: 2011-08-03 Caio Marcelo de Oliveira Filho [Qt] [WK2] Improve position of context menu for QDesktopWebView https://bugs.webkit.org/show_bug.cgi?id=65635 Reviewed by Andreas Kling. Do not assume that the QDesktopWebView takes the entire canvas when positioning the context menu. * UIProcess/API/qt/qdesktopwebview.cpp: (QDesktopWebViewPrivate::showContextMenu): 2011-08-03 Anders Carlsson Fix API tests. Initialize threading before trying to allocate the WebContext. * UIProcess/WebContext.cpp: (WebKit::WebContext::sharedProcessContext): (WebKit::WebContext::create): 2011-08-03 Pavel Feldman Web Inspector: [Timeline] Hover on paint events and see rect outline around that area. https://bugs.webkit.org/show_bug.cgi?id=65510 Reviewed by Yury Semikhatsky. * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::drawRect): 2011-08-02 Caio Marcelo de Oliveira Filho [Qt] [WK2] Expose web view classes to QML https://bugs.webkit.org/show_bug.cgi?id=65339 Reviewed by Benjamin Poulain. This patch also uses QuickTest from QtDeclarative to provide the basic autotest infrastructure for the exposed elements. * UIProcess/API/qt/qmlplugin/plugin.cpp: Added. (WebKit2QmlPlugin::registerTypes): * UIProcess/API/qt/qmlplugin/qmldir: Added. * UIProcess/API/qt/qmlplugin/qmlplugin.pro: Added. * UIProcess/API/qt/qtouchwebpage.h: Expose load() to QML environment. * UIProcess/API/qt/qtouchwebview.h: Since QTouchWebPage* doesn't change once set in the constructor, we mark the page property as CONSTANT. This avoid QML warnings for not having a NOTIFY signal for the property change. * UIProcess/API/qt/tests/tests.pro: * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml: Added. * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml: Added. * UIProcess/API/qt/tests/qmltests/common/test1.html: Added. * UIProcess/API/qt/tests/qmltests/qmltests.pro: Added. * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp: Added. 2011-08-03 Carlos Garcia Campos [GTK] Install web and plugin processes in libexecdir instead of bindir https://bugs.webkit.org/show_bug.cgi?id=65600 Reviewed by Martin Robinson. Launch processes from libexecdir or WEBKIT_EXEC_PATH environment variable when it's set. This variable will be used by MiniBrowser and unit tests to find processes without having to install them. * GNUmakefile.am: * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::ProcessLauncher::launchProcess): 2011-08-03 Pavel Feldman Web Inspector: remove Node parameter from the InspectorClient::highlight https://bugs.webkit.org/show_bug.cgi?id=65549 Reviewed by Yury Semikhatsky. * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::highlight): * WebProcess/WebCoreSupport/WebInspectorClient.h: 2011-08-03 Carlos Garcia Campos [GTK] Reorganize pkg-config files https://bugs.webkit.org/show_bug.cgi?id=65548 Reviewed by Martin Robinson. * GNUmakefile.am: Rename pc file as webkit2gtk.pc.in. WebKit2 depends on gtk3 unconditionally so we don't need to use WEBKITGTK_PC_NAME. * webkit2gtk.pc.in: Renamed from Source/WebKit2/gtk/webkit2.pc.in. 2011-08-01 Michael Saboff Virtual copying of FastMalloc allocated memory causes madvise MADV_FREE_REUSABLE errors https://bugs.webkit.org/show_bug.cgi?id=65502 Reviewed by Anders Carlsson. Changed OOL message to use MACH_MSG_PHYSICAL_COPY flag instead of virtual flag so that the original memory region isn't referenced by the message and ultimately the receiving process. The additional reference caused madvise(MADV_FREE_REUSABLE) to fail when it encountered such pages. * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::Connection::sendOutgoingMessage): 2011-07-29 Jocelyn Turcotte [Qt] Add QtWebProcess in PATH at runtime for WebKit2 API auto tests. https://bugs.webkit.org/show_bug.cgi?id=65378 Reviewed by Benjamin Poulain. This prevent the runner of the tests from having to add it to PATH himself. * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp: (tst_CommonViewTests::tst_CommonViewTests): * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp: (tst_QDesktopWebView::tst_QDesktopWebView): * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp: (tst_QTouchWebView::tst_QTouchWebView): * UIProcess/API/qt/tests/tests.pri: * UIProcess/API/qt/tests/util.cpp: Copied from Source/WebKit2/UIProcess/API/qt/tests/util.h. Move definitions to a cpp file to prevent unused static symbol warnings. (addQtWebProcessToPath): (waitForSignal): * UIProcess/API/qt/tests/util.h: 2011-07-12 Jocelyn Turcotte TiledDrawingArea: Handle update requests in the order they were received. https://bugs.webkit.org/show_bug.cgi?id=64365 Reviewed by Andreas Kling. TiledDrawingAreaProxy::createTiles() uses the distance of tiles to the center of the viewport to decide which tile should be rendered first. This logic is useless if the requests are not handled in the same order as they were received. Now use a list instead of a map to hold pending tile update requests. * WebProcess/WebPage/TiledDrawingArea.cpp: (WebKit::TiledDrawingArea::tileUpdateTimerFired): (WebKit::TiledDrawingArea::cancelTileUpdate): (WebKit::TiledDrawingArea::requestTileUpdate): * WebProcess/WebPage/TiledDrawingArea.h: 2011-08-02 Amruth Raj Custom cursors cause the WebProcess to crash https://bugs.webkit.org/show_bug.cgi?id=64802 Reviewed by Martin Robinson. * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): In case of a NULL cursor image, encode a bool indicating that. (CoreIPC::::decode): Decode the image only if required. 2011-08-01 Scott Graham REGRESSION (r39725?): Resources removed from document can not be freed until the document is deleted https://bugs.webkit.org/show_bug.cgi?id=61006 Reviewed by Antti Koivisto. Update exports for test harness. * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-08-01 Hayato Ito Add support for getting an element in shadow root by its id into a window.internals object. https://bugs.webkit.org/show_bug.cgi?id=64587 Reviewed by Hajime Morita. * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-08-01 Sheriff Bot Unreviewed, rolling out r92108. http://trac.webkit.org/changeset/92108 https://bugs.webkit.org/show_bug.cgi?id=65459 breaks SL compile (Requested by tonyg-cr on #webkit). * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): 2011-08-01 Amruth Raj Custom cursors cause the WebProcess to crash https://bugs.webkit.org/show_bug.cgi?id=64802 Reviewed by Darin Adler. * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): In case of a NULL cursor image, encode a bool indicating that. (CoreIPC::::decode): Decode the image only if required. 2011-07-31 Daniel Bates Try again to fix the WinCairo Debug build after r92059 ( https://bugs.webkit.org/show_bug.cgi?id=65419). * win/WebKit2CFLite.def: Export symbols needed by Internals. 2011-07-30 Dan Bernstein Try to fix the Windows build after r92059. * win/WebKit2.def: Export symbols needed by Internals. 2011-07-30 Patrick Gansterer Remove inclusion of MainThread.h from Threading.h https://bugs.webkit.org/show_bug.cgi?id=65081 Reviewed by Darin Adler. Add missing include statements for MainThread. * PluginProcess/gtk/PluginProcessMainGtk.cpp: * PluginProcess/mac/PluginProcessMainMac.mm: * PluginProcess/qt/PluginProcessMainQt.cpp: * UIProcess/API/mac/WKPrintingView.mm: * UIProcess/Launcher/mac/ThreadLauncherMac.mm: * UIProcess/Launcher/qt/ThreadLauncherQt.cpp: * UIProcess/Launcher/win/ThreadLauncherWin.cpp: * UIProcess/WebContext.cpp: * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp: * WebProcess/efl/WebProcessMainEfl.cpp: * WebProcess/gtk/WebProcessMainGtk.cpp: * WebProcess/mac/KeychainItemShimMethods.mm: * WebProcess/mac/WebProcessMainMac.mm: * WebProcess/qt/WebProcessMainQt.cpp: * WebProcess/win/WebProcessMainWin.cpp: 2011-07-30 Balazs Kelemen [Qt][WK2] Fix the build afer r92014 https://bugs.webkit.org/show_bug.cgi?id=65410 Reviewed by Noam Rosenthal. * Shared/ShareableBitmap.h: * UIProcess/qt/qdesktopwebpageproxy.cpp: (QDesktopWebPageProxy::paintContent): 2011-07-29 Sam Weinig Move Region code from WebKit2 to WebCore https://bugs.webkit.org/show_bug.cgi?id=65392 Reviewed by David Hyatt. * CMakeLists.txt: * GNUmakefile.am: * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: Update project files. * Platform/Region.cpp: Removed. * Platform/Region.h: Removed. Remove Region files. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseDraw): * UIProcess/API/mac/WKView.mm: * UIProcess/DrawingAreaProxyImpl.cpp: * UIProcess/DrawingAreaProxyImpl.h: * UIProcess/qt/qdesktopwebpageproxy.cpp: * UIProcess/win/WebView.cpp: * WebProcess/WebPage/DrawingAreaImpl.h: Update for new namespace and include type. 2011-07-29 Anders Carlsson Pass the HTTP referrer header for URLs loaded by plug-ins https://bugs.webkit.org/show_bug.cgi?id=65379 Reviewed by Sam Weinig. Set the HTTP referrer if necessary. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::loadURL): 2011-07-29 Jocelyn Turcotte Fix the QTouchWebView in debug segfault on shutdown introduced in 91979. https://bugs.webkit.org/show_bug.cgi?id=64728 Reviewed by Benjamin Poulain. unregisterTile is called in the tile's destructor, triggered in the TileSet's destruction, which happens in the middle of the proxy's destruction (after the m_tilesByID HashMap destruction). Detach the tiles in the proxy's destructor to make sure they can cleanup using a valid proxy. * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::~TiledDrawingAreaProxy): 2011-07-29 Jocelyn Turcotte Fix the QTouchWebView in debug broke in 91979. https://bugs.webkit.org/show_bug.cgi?id=64728 Reviewed by Benjamin Poulain. registerTile is called in the Tile's constructor, before adoptRef. Change the pointer parameter to use the raw type instead. * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::registerTile): * UIProcess/TiledDrawingAreaProxy.h: 2011-07-29 Alexis Menard [Qt] Make QDesktopWebView/QTouchWebView loadProgress property more usable in QML. https://bugs.webkit.org/show_bug.cgi?id=65315 Reviewed by Benjamin Poulain. In order to use the loadProgress value in QML we need to make it a Q_PROPERTY, therefore we need a getter to get it. * UIProcess/API/qt/qdesktopwebview.cpp: (QDesktopWebViewPrivate::didChangeLoadProgress): (QDesktopWebView::url): (QDesktopWebView::loadProgress): * UIProcess/API/qt/qdesktopwebview.h: * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPage::loadProgress): * UIProcess/API/qt/qtouchwebpage.h: * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp: (tst_CommonViewTests::stop): (tst_CommonViewTests::loadProgress): * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp: (WebViewAbstraction::WebViewAbstraction): (WebViewAbstraction::loadProgress): (WebViewAbstraction::desktopViewLoadFailed): (WebViewAbstraction::touchViewLoadProgressChanged): (WebViewAbstraction::desktopViewLoadProgressChanged): * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): (QtWebPageProxy::didChangeLoadProgress): * UIProcess/qt/QtWebPageProxy.h: (QtWebPageProxy::loadProgress): * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::didChangeLoadProgress): 2011-07-27 Jocelyn Turcotte TiledDrawingArea: Use tile sets to paint old content while rendering for a new scale. https://bugs.webkit.org/show_bug.cgi?id=64728 Reviewed by Benjamin Poulain. We currently delete all the tiles when setContentsScale is called. This shows a blank background to the user while the web process render tiles for the new scale. This patch extracts the ownership of individual tiles from TiledDrawingAreaProxy to TiledDrawingAreaTileSet to allow the proxy to paint tiles with different scales. We can then paint the tiles we already have on top of the tiles we are rendering for the new scale until enough content is available. * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaTileSet::tiles): (WebKit::TiledDrawingAreaTileSet::contentsScale): (WebKit::TiledDrawingAreaTileSet::TiledDrawingAreaTileSet): (WebKit::TiledDrawingAreaTileSet::mapToContents): (WebKit::TiledDrawingAreaTileSet::mapFromContents): (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy): (WebKit::TiledDrawingAreaProxy::registerTile): (WebKit::TiledDrawingAreaProxy::unregisterTile): Added those two methods to allow the tiles to clean themselves on destruction. (WebKit::TiledDrawingAreaProxy::requestTileUpdate): (WebKit::TiledDrawingAreaProxy::cancelTileUpdate): (WebKit::TiledDrawingAreaProxy::invalidate): (WebKit::TiledDrawingAreaProxy::updateTileBuffers): (WebKit::TiledDrawingAreaProxy::tileBufferUpdateComplete): (WebKit::TiledDrawingAreaProxy::paint): (WebKit::TiledDrawingAreaProxy::coverageRatio): (WebKit::TiledDrawingAreaProxy::setContentsScale): (WebKit::TiledDrawingAreaProxy::createTiles): (WebKit::TiledDrawingAreaProxy::resizeEdgeTiles): (WebKit::TiledDrawingAreaProxy::dropTilesOutsideRect): (WebKit::TiledDrawingAreaProxy::disableTileSetUpdates): (WebKit::TiledDrawingAreaProxy::removeAllTiles): (WebKit::TiledDrawingAreaProxy::contentsRect): (WebKit::TiledDrawingAreaProxy::visibleRect): (WebKit::TiledDrawingAreaProxy::hasPendingUpdates): * UIProcess/TiledDrawingAreaProxy.h: * UIProcess/TiledDrawingAreaTile.h: * UIProcess/qt/TiledDrawingAreaTileQt.cpp: (WebKit::TiledDrawingAreaTile::TiledDrawingAreaTile): (WebKit::TiledDrawingAreaTile::~TiledDrawingAreaTile): (WebKit::TiledDrawingAreaTile::incorporateUpdate): (WebKit::TiledDrawingAreaTile::disableUpdates): (WebKit::TiledDrawingAreaTile::updateBackBuffer): 2011-07-28 Tim Horton REGRESSION (5.1): CJK input broken after clicking on Flash content https://bugs.webkit.org/show_bug.cgi?id=65349 Reviewed by Darin Adler. After giving Flash focus on a page and then navigating away from that page using the back button, we were not getting notified to switch back to inline (non-complex) input. Now, notify the page that it can leave complex text mode when the plugin is destroyed. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::~PluginView): 2011-07-28 Anders Carlsson Crash when trying to encode FontInfo with a null font attribute descriptor https://bugs.webkit.org/show_bug.cgi?id=65350 Reviewed by Darin Adler. * Shared/FontInfo.cpp: (WebKit::FontInfo::encode): Encode a boolean specifying whether there's a fontAttributeDictionary member variable. (WebKit::FontInfo::decode): Don't try to decode the fontAttributeDictionary member variable if none has been encoded. 2011-07-26 Chris Fleizach REGRESSION (Safari 5.1): JavaScript dialogs not usable with VoiceOver https://bugs.webkit.org/show_bug.cgi?id=65214 Reviewed by Anders Carlsson. Allow the ability to spin the run loop while WebProcess is waiting for a synchronous reply. This allows it to continue to serve accessibility requests while waiting and basically restores the behavior WK1 was presenting. This patch only enables this mode when accessibility is on. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessage): (CoreIPC::Connection::waitForSyncReply): * Platform/CoreIPC/Connection.h: (CoreIPC::Connection::sendSync): * Platform/RunLoop.h: * Platform/mac/RunLoopMac.mm: (RunLoop::runForDuration): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::runJavaScriptAlert): (WebKit::WebChromeClient::runJavaScriptConfirm): (WebKit::WebChromeClient::runJavaScriptPrompt): 2011-07-28 Ravi Phaneendra Kasibhatla Pass the key_press_event or key_release_event to parent widget when it is not handled by Web Process. (https://bugs.webkit.org/show_bug.cgi?id=64790) Reviewed by Martin Robinson. * Shared/NativeWebKeyboardEvent.h: (WebKit::NativeWebKeyboardEvent::nativeEvent): Return a GdkEvent* instead of const GdkEvent* (non-const). * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::doneWithKeyEvent): Implemented for GTK port. Sets flag if the keyboard event needs to be passed to the parent widget. Invoke gtk_main_do_event() if event needs to be passed to parent. * UIProcess/API/gtk/PageClientImpl.h: Deleted obsolete functions didNotHandleKeyEvent & didNotHandleWheelEvent. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkit_web_view_base_init): Initialize shouldForwardNextKeyEvent flag. (webkitWebViewBaseKeyPressEvent): Pass event to parent widget depending on status from doneWithKeyEvent. (webkitWebViewBaseKeyReleaseEvent): Pass event to parent widget depending on status from doneWithKeyEvent. (webkitWebViewBaseForwardNextKeyEvent): API to set flag shouldForwardNextKeyEvent. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Added API to set shouldForwardNextKeyEvent flag. 2011-07-28 Dan Bernstein Displaying Japanese dictionary contents in vertical orientation takes a couple of seconds Reviewed by Darin Adler. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Initialize wkGetVerticalGlyphsForCharacters. 2011-07-28 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=65306 WebKitInitializeStorageIfNecessary() can take awhile performing i/o, isn't necessary for every WebView Reviewed by Maciej Stachowiak. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Pass a null client pointer in the new form of initializeTracker() 2011-07-27 Mark Hahnenberg Remove operator new from JSCell https://bugs.webkit.org/show_bug.cgi?id=64999 Reviewed by Oliver Hunt. Removed the implementation of operator new in JSCell, so any further uses will not successfully link. Also removed any remaining uses of operator new. * WebProcess/Plugins/Netscape/JSNPMethod.h: (WebKit::JSNPMethod::create): * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::methodGetter): * WebProcess/Plugins/Netscape/JSNPObject.h: (WebKit::JSNPObject::create): * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::getOrCreateJSObject): 2011-07-27 Benjamin Poulain [WK2][Qt] Move from QGraphicsView to Qt Scene Graph https://bugs.webkit.org/show_bug.cgi?id=62969 Reviewed by Andreas Kling. Co-authored with Simon Hausmann This patch change the base of WebKit2 from QGraphicsWidget to scenegraph based items. QTouchWebView becomes a QSGItem with the only role of clipping child items. QTouchWebPage becomes a QSGPaintedItem in order to render the content of the flattened page. This is a temporary work around to get something running without deep changes on the drawing area proxy. QDesktopWebView become a QSGPaintedItem and behave as before regarding rendering. The drawing area proxy is used to render the full item. The event delivery had to be adapted because the scenegraph does not follow regular delivery of QEvents. Instead, each event type is delivered directly to a specific virtual function. In this patch, the events are forwarded to the classic QObject::event(). For the features that cannot be implemented on scenegraph (tooltip, menus, etc), a temporary workaround was added: the parent canvas is used as the widget for providing the feature. This assumes the web views alone in the canvas and take its full size. This will have to be fixed in the scenegraph for us to implement those features. * UIProcess/API/qt/qdesktopwebview.cpp: (QDesktopWebViewPrivate::drawingAreaSize): (QDesktopWebViewPrivate::isActive): (QDesktopWebViewPrivate::startDrag): (QDesktopWebViewPrivate::didChangeToolTip): (QDesktopWebViewPrivate::didChangeCursor): (QDesktopWebViewPrivate::showContextMenu): (QDesktopWebView::QDesktopWebView): (QDesktopWebView::init): (paintCrashedPage): (QDesktopWebView::keyPressEvent): (QDesktopWebView::keyReleaseEvent): (QDesktopWebView::inputMethodEvent): (QDesktopWebView::focusInEvent): (QDesktopWebView::focusOutEvent): (QDesktopWebView::mousePressEvent): (QDesktopWebView::mouseMoveEvent): (QDesktopWebView::mouseReleaseEvent): (QDesktopWebView::mouseDoubleClickEvent): (QDesktopWebView::wheelEvent): (QDesktopWebView::touchEvent): (QDesktopWebView::hoverEnterEvent): (QDesktopWebView::hoverMoveEvent): (QDesktopWebView::hoverLeaveEvent): (QDesktopWebView::dragMoveEvent): (QDesktopWebView::dragEnterEvent): (QDesktopWebView::dragExitEvent): (QDesktopWebView::dragDropEvent): (QDesktopWebView::geometryChanged): (QDesktopWebView::paint): (QDesktopWebView::event): * UIProcess/API/qt/qdesktopwebview.h: * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPage::QTouchWebPage): (QTouchWebPage::paint): (QTouchWebPage::event): (QTouchWebPage::keyPressEvent): (QTouchWebPage::keyReleaseEvent): (QTouchWebPage::inputMethodEvent): (QTouchWebPage::focusInEvent): (QTouchWebPage::focusOutEvent): (QTouchWebPage::touchEvent): (QTouchWebPage::geometryChanged): * UIProcess/API/qt/qtouchwebpage.h: * UIProcess/API/qt/qtouchwebview.cpp: (QTouchWebViewPrivate::scroll): (QTouchWebView::QTouchWebView): (QTouchWebView::geometryChanged): * UIProcess/API/qt/qtouchwebview.h: * UIProcess/API/qt/tests/tests.pri: * UIProcess/API/qt/tests/testwindow.h: (TestWindow::TestWindow): (TestWindow::resizeEvent): * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::panGestureRequestScroll): (WebKit::TouchViewInterface::pinchGestureRequestUpdate): (WebKit::TouchViewInterface::drawingAreaSize): (WebKit::TouchViewInterface::contentSizeChanged): (WebKit::TouchViewInterface::isActive): * UIProcess/qt/ViewInterface.cpp: Removed. * UIProcess/qt/ViewInterface.h: * WebKit2.pro: 2011-07-27 Benjamin Poulain [Qt][WK2] Clean WKPageLoaderClient https://bugs.webkit.org/show_bug.cgi?id=65246 Reviewed by Andreas Kling. Remove the empty functions from Qt's WKPageLoaderClient. * UIProcess/qt/ClientImpl.cpp: (qt_wk_didSameDocumentNavigationForFrame): Move the function to have all the implementations in the same order as the definitions. * UIProcess/qt/ClientImpl.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::init): 2011-07-27 Caio Marcelo de Oliveira Filho Fix Qt (and possibly Gtk) WebKit2 build after addition of -webkit-pictograph https://bugs.webkit.org/show_bug.cgi?id=65253 Reviewed by Andreas Kling. The -webkit-pictograph generic family was added by bug 65197. * Shared/WebPreferencesStore.h: 2011-07-27 Benjamin Poulain [Qt][WK2] Simplify the PageUIClient https://bugs.webkit.org/show_bug.cgi?id=65198 Reviewed by Andreas Kling. The only function of WKPageLoaderClient with a complete implementation is qt_wk_setStatusText(). The other functions were what is left from before the refactoring of QWKPage. This patch removes the unused functions to simplify the client. Since the dependency on QtWebPageProxy is removed from that client, it now calls the ViewInterface directly. * UIProcess/qt/ClientImpl.cpp: (toViewInterface): (qt_wk_setStatusText): * UIProcess/qt/ClientImpl.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): (QtWebPageProxy::init): * UIProcess/qt/QtWebPageProxy.h: 2011-07-26 Sadrul Habib Chowdhury Add support for download='filename' attribute in anchors. https://bugs.webkit.org/show_bug.cgi?id=64580 Reviewed by Adam Barth. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::startDownload): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 2011-07-26 Tim Horton Apply r40940 to WebKit2 to work around a Silverlight crash. https://bugs.webkit.org/show_bug.cgi?id=65205 Reviewed by Anders Carlsson. * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): * Shared/Plugins/PluginQuirks.h: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::userAgent): 2011-07-26 Dan Bernstein Add a generic pictograph font family https://bugs.webkit.org/show_bug.cgi?id=65197 Reviewed by Anders Carlsson. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPictographFontFamily): Added. (WKPreferencesCopyPictographFontFamily): Added. * UIProcess/API/C/WKPreferences.h: 2011-07-26 Andras Becsi [Qt] [WK2] Disable the build with Qt versions older than 5.0 https://bugs.webkit.org/show_bug.cgi?id=65189 Reviewed by Csaba Osztrogonác. * Platform/qt/ModuleQt.cpp: (WebKit::Module::platformFunctionPointer): Fix the build for Qt5. 2011-07-26 Benjamin Poulain [Qt][WK2] Make the WebContextMenuProxyQt handle the full interactions between the views and the WebPageProxy https://bugs.webkit.org/show_bug.cgi?id=64739 Reviewed by Andreas Kling. Change the WebContextMenuProxyQt to be the intermediary between the WebPageProxy and our views regarding the context menu. The actions of the context menu are no longer the responsibility of QtWebPageProxy but are instead created and handled directly by the WebContextMenuProxyQt. * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::createContextMenuProxy): (QtWebPageProxy::triggerAction): (QtWebPageProxy::action): * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/WebContextMenuProxyQt.cpp: (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt): (WebKit::WebContextMenuProxyQt::create): (WebKit::WebContextMenuProxyQt::actionTriggered): (WebKit::WebContextMenuProxyQt::showContextMenu): (WebKit::WebContextMenuProxyQt::hideContextMenu): (WebKit::WebContextMenuProxyQt::createContextMenu): * UIProcess/qt/WebContextMenuProxyQt.h: 2011-07-26 Carlos Garcia Campos [GTK] Remove header webkitwebviewcommon.h https://bugs.webkit.org/show_bug.cgi?id=65177 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebView.h: Add function prototypes instead of including webkitwebviewcommon.h. 2011-07-22 Jessie Berlin [WebKit2] Changing the cookie accept policy in Private Browsing doesn’t work. https://bugs.webkit.org/show_bug.cgi?id=64997 Reviewed by Ada Chan. * WebProcess/Cookies/mac/WebCookieManagerMac.mm: (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Set the policy on the Cookie Storage used by the Private Browsing Storage Session as well. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-07-21 Yael Aharon [Qt][WK2] Code cleanup for drag-and-drop https://bugs.webkit.org/show_bug.cgi?id=64916 Reviewed by Andreas Kling. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::startDrag): Allow receiving a NULL bitmap from the web process. * UIProcess/qt/qdesktopwebpageproxy.cpp: (QDesktopWebPageProxy::handleEvent): Fix typo introduced in http://trac.webkit.org/changeset/90458. All DnD related events should be GraphicsScene events. * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp: (WebKit::convertQPixmapToShareableBitmap): Remove hack that creates a 1x1 bitmap. It is no longer needed after http://trac.webkit.org/changeset/91016. (WebKit::WebDragClient::startDrag): Allow sending a NULL bitmap to the UI process. 2011-07-20 Tim Horton Scrollbar color heuristic needs to be hooked up in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=64220 Reviewed by Darin Adler. Store the scroller style on ScrollableArea, and recompute it whenever the document or body element background color changes or the base background color of the scrollview changes. Also, make sure to repaint the scrollbars whenever the style changes. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::getDocumentBackgroundColor): 2011-07-20 James Robinson Revert worker and WebKit2 runloops to use currentTime() for scheduling instead of the monotonic clock https://bugs.webkit.org/show_bug.cgi?id=64841 Reviewed by Mark Rowe. http://trac.webkit.org/changeset/91206 converted most of WebKit's deferred work scheduling to using the monotonic clock instead of WTF::currentTime(). This broke many plugin tests on WebKit2 for reasons that are unclear. This reverts everything except for WebCore::ThreadTimers back to the previous behavior. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::waitForMessage): (CoreIPC::Connection::waitForSyncReply): * Platform/RunLoop.h: 2011-07-19 Ryosuke Niwa Build fix after r91307. * Platform/Logging.h: 2011-07-19 Lukasz Slachciak [GTK] [WK2] Implement missing initializeLogChannel function. https://bugs.webkit.org/show_bug.cgi?id=63381 Reviewed by Martin Robinson. Implemented logging for GTK platform in WebKit2 - function initializeLogChannel is called for all ports, so added missing implementation. Aslo helper function added for getting channels from names. * GNUmakefile.am: Added reference to new file LoggingGtk.cpp. * Platform/Logging.cpp: Logging implementation for GTK port enabled. (WebKit::getChannelFromName): Helper to connect name with WTFLogChannel. * Platform/Logging.h: New helper method added. * Platform/gtk/LoggingGtk.cpp: Added. GTK logging implementation. (WebKit::initializeLogChannel): Channel is initialized if its name is found in WEBKIT_DEBUG. 2011-07-19 Brian Weinstein Add back a change that was accidentally removed in r91266. Make sure to retain the WKPasteboardFilePromiseOwner before calling draggedImage because draggedImage releases its responder. Also make the comment more explicit, to keep this mistake from being made in the future. Rubber-stamped by Darin Adler. * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::dragEnded): 2011-07-18 Brian Weinstein Speculative fix for: Crash under WebPage::platformDragEnded when dragging on Mac https://bugs.webkit.org/show_bug.cgi?id=64766 Reviewed by Enrica Casucci. I was unable to reproduce this bug, but Darin Adler and I discussed the probable issue. When starting the drag, we create a WKPasteboardFilePromiseOwner, and a WKPasteboardOwner. When the drag is concluded, we call a method on the WKPasteboardFilePromiseOwner which uses the WKPasteboardOwner. However, we are not guaranteeing that the WKPasteboardOwner will be around when the WKPasteboardFilePromiseOwner method is called. The fix is to retain both the WKPasteboardFilePromiseOwner and the WKPasteboardOwner that we need, making sure that we are keeping both objects alive. This patch also uses r91222 to replace WebPage::platformDragEnded, so WebPage doesn't need to know about the drag source. * WebProcess/WebCoreSupport/WebDragClient.cpp: (WebKit::WebDragClient::dragEnded): Add a non-Mac stub method, since the Mac is the only platform that does something here. * WebProcess/WebCoreSupport/WebDragClient.h: * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::declareAndWriteDragImage): Use member variables instead of local variables. (WebKit::WebDragClient::dragEnded): Move code from WebPageMac::platformDragEnded to here, and clear both member variables. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::dragEnded): Don't call platformDragEnded anymore. WebCore::DragController::dragEnded calls WebDragClient::dragEnded, which does the same thing. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WebPageMac.mm: Remove platformDragEnded. 2011-07-18 Alexis Menard [Qt][WK2] Make QDesktopWebView::navigationAction method usable in QML. https://bugs.webkit.org/show_bug.cgi?id=64690 Make the API usable with QML by declaring what's needed with the macros. Reviewed by Benjamin Poulain. * UIProcess/API/qt/qdesktopwebview.h: 2011-07-18 MORITA Hajime [ShadowContentElement] forwarded node should be able to access its hosting content element. https://bugs.webkit.org/show_bug.cgi?id=64251 Reviewed by Dimitri Glazkov. Exported additional symbols for window.internals object. * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-07-18 Dean Jackson https://bugs.webkit.org/show_bug.cgi?id=64742 Expose WebPreferences for media playback requiring user gestures and inline playback Reviewed by Simon Fraser. Two new WebPreferences: MediaPlaybackRequiresUserGesture and MediaPlaybackAllowsInline. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetMediaPlaybackRequiresUserGesture): (WKPreferencesGetMediaPlaybackRequiresUserGesture): (WKPreferencesSetMediaPlaybackAllowsInline): (WKPreferencesGetMediaPlaybackAllowsInline): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2011-07-18 James Robinson Timer scheduling should be based off the monotonic clock https://bugs.webkit.org/show_bug.cgi?id=64544 Reviewed by Darin Adler. Converts the WebKit2 RunLoop and CoreIPC timeouts to use monotonicallyIncreasingTime(). * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::waitForMessage): (CoreIPC::Connection::waitForSyncReply): * Platform/RunLoop.h: 2011-07-18 Anders Carlsson Make using lowercase parameter names for AppleConnect be a plug-in quirk https://bugs.webkit.org/show_bug.cgi?id=64638 Reviewed by Sam Weinig. * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): Set the WantsLowercaseParameterNames quirk for the AppleConnect plug-in. * Shared/Plugins/PluginQuirks.h: Add WantsLowercaseParameterNames quirk. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::initialize): If the plug-in has the WantsLowercaseParameterNames quirk, convert the parameter names to lowercase. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createPlugin): Remove the code that would convert the parameters here. Also remove the FIXME; plug-in quirks aren't really the same thing as site-specific quirks. 2011-07-15 Jocelyn Turcotte [Qt] Consider QTouchWebPage's transform when scrolling the viewport. https://bugs.webkit.org/show_bug.cgi?id=64541 Reviewed by Benjamin Poulain. Currently the scroll deltas are given to moveBy in page coordinates which doesn't match when the page view is scalled. This patch gives the scroll delta to the viewport in it's own coordinates. * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::panGestureRequestScroll): 2011-07-15 Jocelyn Turcotte [Qt] Push the new viewport rect to the drawing area after committing the scale. https://bugs.webkit.org/show_bug.cgi?id=64597 Reviewed by Benjamin Poulain. * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::pinchGestureEnded): 2011-07-15 Jocelyn Turcotte [Qt] Remove the scale commit timer from QTouchWebPage. https://bugs.webkit.org/show_bug.cgi?id=64600 Reviewed by Benjamin Poulain. Since we don't currently need unprepared page view scale changes, this timer isn't useful. * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPage::QTouchWebPage): (QTouchWebPagePrivate::QTouchWebPagePrivate): (QTouchWebPagePrivate::commitScaleChange): * UIProcess/API/qt/qtouchwebpage.h: * UIProcess/API/qt/qtouchwebpage_p.h: * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::pinchGestureStarted): 2011-07-15 Jocelyn Turcotte TiledDrawingArea: map the visibleArea rect from page to tiles coordinates. https://bugs.webkit.org/show_bug.cgi?id=64538 Reviewed by Benjamin Poulain. TiledDrawingAreaProxy expects its coordinates to be scaled according to contentsScale. This patch keep the pushed visibleArea as page coordinates and convert it each time to scaled coordinates in case the contents scale was changed afterward. This is a regression introduced in r90750. Also: - Rename visibleArea to visibleContentRect - Remove an unnecessary mapToContents in QTouchWebPageProxy::setVisibleContentRect * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPagePrivate::setViewportRect): * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::invalidate): (WebKit::TiledDrawingAreaProxy::setVisibleContentRect): (WebKit::TiledDrawingAreaProxy::createTiles): (WebKit::TiledDrawingAreaProxy::visibleRect): * UIProcess/TiledDrawingAreaProxy.h: * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::setVisibleContentRect): * UIProcess/qt/qtouchwebpageproxy.h: 2011-07-17 Amruth Raj [GTK] Fix selection of elements in a multi select list and remove an unnecessary include in WorkQueue https://bugs.webkit.org/show_bug.cgi?id=64666 Reviewed by Martin Robinson. * Platform/gtk/WorkQueueGtk.cpp: Remove an include which is no longer required * Shared/gtk/WebEventFactory.cpp: (WebKit::modifiersForEvent): Fix an incorrect ASSERT statement (WebKit::WebEventFactory::createWebMouseEvent): Call the function to determine the modifier keys 2011-07-17 Lukasz Slachciak Reviewed by Martin Robinson. [GTK] [WK2] Fix for getting editor client commands. https://bugs.webkit.org/show_bug.cgi?id=63081 Editor client commands intepretation was incorrect. It was based on the NativeWebKeyboardEvent only. In fact EventHandler is generating interpreted events - keypress and keydown. These event types are now passed from UIProcess to WebProcess so KeyBindingTranslator can correctly find editor commands. Also build break for Debug build was fixed. * UIProcess/API/gtk/PageClientImpl.cpp: KeyboardEvent type is used for KeyBindingTranslator. (WebKit::PageClientImpl::getEditorCommandsForKeyEvent): getEditorCommandsForKeyEvent now has additional parameter describing KeyboardEvent type. * UIProcess/API/gtk/PageClientImpl.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/gtk/WebPageProxyGtk.cpp: (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): KeyboardEvent type passed to PageClient. * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::WebEditorClient::getEditorCommandsForKeyEvent): Sync message send with KeyboardEvent type. 2011-07-16 Daniel Bates Fix Win Cairo Debug build after . Add stub implementation of scale factor overloaded ShareableBitmap::paint() for Cairo WebKit2 port after its usage in changeset . Also add stub implementation for GTK. We'll need to actually implement this. See and for Cairo and GTK, respectively. * Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::paint): Added scale-factor variant. * Shared/gtk/ShareableBitmapGtk.cpp: (WebKit::ShareableBitmap::paint): Added scale-factor variant. 2011-07-16 Daniel Bates Fix Qt Linux Release build after changeset (https://bugs.webkit.org/show_bug.cgi?id=64611). Stub out scale factor-variant implementation of ShareableBitmap::paint(). We'll need to implement this. See for more details. * Shared/qt/ShareableBitmapQt.cpp: (WebKit::ShareableBitmap::paint): Added scale-factor variant. 2011-07-16 Simon Fraser Add code to attempt to align compositing layers to pixel boundaries when page scale changes https://bugs.webkit.org/show_bug.cgi?id=64658 Reviewed by Dan Bernstein. Removed implementation of pageScaleFactor() now that GraphicsLayerClient has a default implementation. * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: * WebProcess/WebPage/ca/LayerTreeHostCA.h: 2011-07-16 Daniel Bates Attempt to fix the Qt Linux Release build after changeset (https://bugs.webkit.org/show_bug.cgi?id=64615). * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::setCursorHiddenUntilMouseMoves): Added stub method. * UIProcess/qt/QtWebPageProxy.h: 2011-07-15 Pratik Solanki Part of https://bugs.webkit.org/show_bug.cgi?id=63674 Get webkit to compile with USE(CFNETWORK) enabled on Mac Reviewed by David Kilzer. New WebKitSystemInterface functions for CFNetwork-based loader. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-07-15 Tim Horton Overlay scrollbars in overflow areas no longer pulse when revealed https://bugs.webkit.org/show_bug.cgi?id=64606 Reviewed by Simon Fraser. Ensure that the state of the scrollbar implementation is kept in sync with WebCore's internal representation. Previously, we synchronized them at paint time, causing pulsing to be skipped due to the scrollbars being disabled. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-07-15 Simon Fraser Have GraphicsLayer pull their contentsScale, rather than pushing it onto them https://bugs.webkit.org/show_bug.cgi?id=64643 Reviewed by Darin Adler. Impement new GraphicsLayerClient methods related to contents scale, and don't push the scale. * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: (WebKit::LayerTreeHostCA::initialize): (WebKit::LayerTreeHostCA::backingScaleFactor): (WebKit::LayerTreeHostCA::pageScaleFactor): (WebKit::LayerTreeHostCA::createPageOverlayLayer): * WebProcess/WebPage/ca/LayerTreeHostCA.h: (WebKit::LayerTreeHostCA::didCommitChangesForLayer): 2011-07-15 Ada Chan Implement "Jump to Selection" in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=64569 Reviewed by Anders Carlsson. * UIProcess/API/mac/WKView.mm: (-[WKView centerSelectionInVisibleArea:]): Call WebPageProxy::centerSelectionInVisibleArea(). (-[WKView validateUserInterfaceItem:]): Enable the centerSelectionInVisibleArea: selector if there's a selection range or if there's an insertion point in an editable area. * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::showFindIndicatorInSelection): Call updateFindIndicator() to show the find indicator. * WebProcess/WebPage/FindController.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::centerSelectionInVisibleArea): Use the selection in the focused or main frame. After scrolling the selection into view, flash the find indicator. 2011-07-15 Dan Bernstein Windows build fix. * UIProcess/win/WebView.cpp: 2011-07-15 Dan Bernstein Windows build fix. * UIProcess/win/WebView.h: 2011-07-15 Dan Bernstein REGRESSION: Mouse cursor doesn’t hide when full screen video HUD hides https://bugs.webkit.org/show_bug.cgi?id=64615 Reviewed by Anders Carlsson. * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::setCursorHiddenUntilMouseMoves): Added this stub. * UIProcess/API/efl/PageClientImpl.h: * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::setCursorHiddenUntilMouseMoves): Ditto. * UIProcess/API/gtk/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setCursorHiddenUntilMouseMoves): Added. Calls +[NSCursor setHiddenUntilMouseMoves:]. * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setCursorHiddenUntilMouseMoves): Added. Calls through to the PageClient. * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: Added SetCursorHiddenUntilMouseMoves message. * UIProcess/win/WebView.cpp: (WebKit::WebView::setCursorHiddenUntilMouseMoves): Added this stub. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::setCursorHiddenUntilMouseMoves): Added. Sends SetCursorHiddenUntilMouseMoves message to the page proxy. * WebProcess/WebCoreSupport/WebChromeClient.h: 2011-07-14 Gavin Barraclough https://bugs.webkit.org/show_bug.cgi?id=64250 Global strict mode function leaking global object as "this". Reviewed by Oliver Hunt. * WebProcess/Plugins/Netscape/NPJSObject.cpp: (WebKit::NPJSObject::invoke): - Change call to pass DOM Window shell, instead of the global varaible object. 2011-07-15 Anders Carlsson Find indicator should take scale factor into account https://bugs.webkit.org/show_bug.cgi?id=64611 Reviewed by Sam Weinig. * UIProcess/FindIndicator.cpp: (WebKit::FindIndicator::create): (WebKit::FindIndicator::FindIndicator): Keep track of the scale factor of the find indicator bitmap. (WebKit::FindIndicator::draw): Pass the scale factor to ShareableBitmap::draw. * UIProcess/FindIndicator.h: Add scale factor member variable. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setFindIndicator): This now takes the content image scale factor. * UIProcess/WebPageProxy.messages.in: Add the scale factor. * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::updateFindIndicator): Size the backing store correctly, and apply the scale factor to the graphics context. (WebKit::FindController::hideFindIndicator): Pass the scale factor along. 2011-07-15 Martin Robinson Build fixes for WebKit2. Ensure that all generated sources are on nodist primaries, that they are on forward declared variables so that BUILT_SOURCES is calculated properly and that zlib is included during linking (for WOFF support). * GNUmakefile.am: 2011-07-15 Kenneth Rohde Christiansen Upstream QtWebKit/N9 changes related to visibleContentRect https://bugs.webkit.org/show_bug.cgi?id=64589 Reviewed by Simon Hausmann. Rename setActualVisibleContentRect to setFixedVisibleContentRect as that makes it more obvious that it is an override. It is also consistent with the setFixedLayout which is often used in conjunction with it. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setFixedVisibleContentRect): * UIProcess/WebPageProxy.h: * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::setVisibleArea): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Only set fixedVisibleContentRect for the mainframe. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setFixedVisibleContentRect): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2011-07-15 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Install a custom X error handler in plugin process https://bugs.webkit.org/show_bug.cgi?id=63248 Some plugins, specially flash, can cause X errors that when handled by the default X error handler (or the GDK one) abort the process. Since we don't want to crash due to buggy plugins, we install a custom error handler to show a warning when a X error happens without aborting. * PluginProcess/gtk/PluginProcessMainGtk.cpp: (WebKit::webkitgtkXError): (WebKit::PluginProcessMainGtk): 2011-07-14 Carlos Garcia Campos Reviewed by Anders Carlsson. [UNIX] Allow sending null handles in messages https://bugs.webkit.org/show_bug.cgi?id=60621 Only valid file descriptors are now sent using sendmsg() control messages, and instead of sending a list of attachment sizes we now send a list of AttachmentInfo structs. AttachmentInfo contains information about the attachments including the size for MappedMemory attachmens and whether the attachment is null or not. * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::AttachmentInfo::AttachmentInfo): New class containing information about the attachments sent. (CoreIPC::AttachmentInfo::setType): Set the attachment type. (CoreIPC::AttachmentInfo::getType): Return the attachment type. (CoreIPC::AttachmentInfo::setSize): Set the size for MappedMemory attachments. (CoreIPC::AttachmentInfo::getSize): Get the size for MappedMemory attachments. (CoreIPC::AttachmentInfo::setNull): Set attachment as null, it contains an invalid file descriptor, so the receiver shouldn't expect a file desriptor for this attachment. (CoreIPC::AttachmentInfo::isNull): Return whether attachment is null, it contains an invalid file descriptor. (CoreIPC::Connection::processMessage): (CoreIPC::Connection::sendOutgoingMessage): 2011-07-14 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Implement Plugin Process https://bugs.webkit.org/show_bug.cgi?id=60546 * GNUmakefile.am: Add new files to compilation. * PluginProcess/gtk/PluginProcessMainGtk.cpp: Added. (WebKit::PluginProcessMainGtk): * PluginProcess/gtk/PluginProcessMainGtk.h: Added. * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::ProcessLauncher::launchProcess): * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::moduleMixesGtkSymbols): * gtk/PluginMainGtk.cpp: Added. (main): 2011-07-14 Balazs Kelemen and Carlos Garcia Campos Reviewed by Anders Carlsson. Implement plugin process for UNIX platform https://bugs.webkit.org/show_bug.cgi?id=60629 * Platform/CoreIPC/Attachment.h: * Platform/CoreIPC/unix/AttachmentUnix.cpp: (CoreIPC::Attachment::Attachment): Add the ability to pass a socket via Attachment. * Platform/unix/SharedMemoryUnix.cpp: (WebKit::SharedMemory::Handle::encode): Remove assertions that check that the Handle is not null. In PluginProxy::geometryDidChange we pass a null Handle if we do not need to allocate a new backing store. (WebKit::SharedMemory::Handle::releaseToAttachment): Ditto. * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::createWebProcessConnection): Use Attachment. Set up the connection with socketpair. * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch): (WebKit::PluginProcessProxy::didCreateWebProcessConnection): * UIProcess/Plugins/PluginProcessProxy.h: * UIProcess/Plugins/PluginProcessProxy.messages.in: * UIProcess/WebProcessProxy.messages.in: * WebProcess/Plugins/PluginProcessConnectionManager.cpp: (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): Use Attachment to pass the connection. 2011-07-14 Ada Chan Implement support to center selection on a page for WebKit2. https://bugs.webkit.org/show_bug.cgi?id=64481 Reviewed by Anders Carlsson. * UIProcess/API/C/WKPage.cpp: (WKPageCenterSelectionInVisibleArea): Added. Call WebPageProxy::centerSelectionInVisibleArea(). * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::centerSelectionInVisibleArea): Send message to the WebProcess to center selection. * UIProcess/WebPageProxy.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::centerSelectionInVisibleArea): Get the FrameSelection from the main frame and call revealSelection() to center it. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Add the CenterSelectionInVisibleArea message. 2011-07-14 MORITA Hajime Unreviewed, rolling out r90976, r90981, and r90985. http://trac.webkit.org/changeset/90976 http://trac.webkit.org/changeset/90981 http://trac.webkit.org/changeset/90985 https://bugs.webkit.org/show_bug.cgi?id=64251 build break * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-07-13 MORITA Hajime Unreviewed attempt at a build fix. * win/WebKit2CFLite.def: 2011-07-13 MORITA Hajime [ShadowContentElement] forwarded node should be able to access its hosting content element. https://bugs.webkit.org/show_bug.cgi?id=64251 Reviewed by Dimitri Glazkov. Exported additional symbols for window.internals object. * win/WebKit2.def: 2011-07-13 David Levin Possible race condition in ThreadIdentifierData::initializeKeyOnce and shouldCallRealDebugger. https://bugs.webkit.org/show_bug.cgi?id=64465 Reviewed by Dmitry Titov. There isn't a good way to test this as it is very highly unlikely to occur. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::shouldCallRealDebugger): :Since scoped static initialization isn't thread-safe, change the initialization to be global. 2011-07-13 Andreas Kling [Qt][WK2] Remove invalid signal/slot connection in QTouchWebView. https://bugs.webkit.org/show_bug.cgi?id=64450 Reviewed by Benjamin Poulain. The focusNextPrevChild() signal was removed, so we shouldn't try to connect to it. * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPagePrivate::setPage): 2011-07-13 Andreas Kling [Qt][WK2] Undelayed WorkItems are leaked after execution. https://bugs.webkit.org/show_bug.cgi?id=64447 Reviewed by Benjamin Poulain. * Platform/qt/WorkQueueQt.cpp: (WorkQueue::WorkItemQt::executeAndDelete): (WorkQueue::WorkItemQt::timerEvent): (WorkQueue::scheduleWork): 2011-07-12 Jocelyn Turcotte [Qt] Also stop the scale commit timer when commitScaleChange is called explicitly. https://bugs.webkit.org/show_bug.cgi?id=64357 Reviewed by Benjamin Poulain. * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPage::timerEvent): (QTouchWebPagePrivate::commitScaleChange): 2011-07-12 Joseph Pecoraro ApplicationCache update should not immediately fail when reaching per-origin quota https://bugs.webkit.org/show_bug.cgi?id=64177 Reviewed by Alexey Proskuryakov. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): * WebProcess/WebCoreSupport/WebChromeClient.h: 2011-06-22 Jer Noble Full-screen: Don't change the collectionBehavior of the WebView's NSWindow if not necessary https://bugs.webkit.org/show_bug.cgi?id=63217 Reviewed by Darin Adler. Check to see if the NSWindow hosting the WebView is not on the active space before changing the window's collectionBehavior. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController beganExitFullScreenAnimation]): 2011-07-12 Andreas Kling [Qt][WK2] Navigation actions in incorrect state when loadStarted() is emitted. https://bugs.webkit.org/show_bug.cgi?id=64383 Reviewed by Kenneth Rohde Christiansen. Update the navigation actions before emitting loadStarted(). * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp: (LoadStartedCatcher::LoadStartedCatcher): (LoadStartedCatcher::onLoadStarted): (tst_QDesktopWebView::stopActionEnabledAfterLoadStarted): * UIProcess/qt/ClientImpl.cpp: (qt_wk_didStartProvisionalLoadForFrame): 2011-07-12 Benjamin Poulain [Qt][WK2] Add a basic Pinch gesture recognizer for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=64373 Reviewed by Andreas Kling. This patch adds QtPinchGestureRecognizer to recognize pinch gesture out of the events not handled by the WebProcess. TouchViewInterface::pinchGestureRequestScale() has a basic default implementation so the feature can be tested manually. * UIProcess/qt/QtGestureRecognizer.cpp: QtGestureRecognizer is the private base class for both gesture recognizer in order to be able to share some code. (WebKit::QtGestureRecognizer::QtGestureRecognizer): (WebKit::QtGestureRecognizer::reset): * UIProcess/qt/QtGestureRecognizer.h: * UIProcess/qt/QtPanGestureRecognizer.cpp: (WebKit::QtPanGestureRecognizer::QtPanGestureRecognizer): (WebKit::QtPanGestureRecognizer::reset): * UIProcess/qt/QtPanGestureRecognizer.h: * UIProcess/qt/QtPinchGestureRecognizer.cpp: Added. (WebKit::findTouchPointIndex): (WebKit::computeTouchCenter): (WebKit::QtPinchGestureRecognizer::QtPinchGestureRecognizer): (WebKit::QtPinchGestureRecognizer::recognize): (WebKit::QtPinchGestureRecognizer::reset): (WebKit::QtPinchGestureRecognizer::initializeGesture): * UIProcess/qt/QtPinchGestureRecognizer.h: Copied from Source/WebKit2/UIProcess/qt/QtPanGestureRecognizer.h. (WebKit::QtPinchGestureRecognizer::TouchPointInformation::TouchPointInformation): (WebKit::QtPinchGestureRecognizer::TouchPointInformation::isValid): * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::TouchViewInterface): (WebKit::TouchViewInterface::pinchGestureStarted): (WebKit::TouchViewInterface::pinchGestureRequestScale): The scale factor reported by the recognizer to the TouchViewInterface is the total scale since the start of the gesture in order to avoid numerical instabilities. (WebKit::TouchViewInterface::pinchGestureEnded): * UIProcess/qt/TouchViewInterface.h: * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::QTouchWebPageProxy): (QTouchWebPageProxy::processDidCrash): (QTouchWebPageProxy::doneWithTouchEvent): * UIProcess/qt/qtouchwebpageproxy.h: * WebKit2.pro: 2011-07-12 Andreas Kling [Qt][WK2] Navigation actions should react to web process availability. https://bugs.webkit.org/show_bug.cgi?id=64375 Reviewed by Benjamin Poulain. When the web process is unavailable, the reload and stop actions should behave slightly differently. Stop should always be disabled, and reload should be enabled if there's a reloadable item in the back/forward list. * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp: (tst_QDesktopWebView::navigationActionEnabledStatusAtStartup): * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp: (tst_QTouchWebView::navigationActionEnabledStatusAtStartup): * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::updateAction): (QtWebPageProxy::didRelaunchProcess): (QtWebPageProxy::processDidCrash): 2011-07-12 Andreas Kling [Qt][WK2] QDesktopWebView crashes if resized without web process. https://bugs.webkit.org/show_bug.cgi?id=64371 Reviewed by Benjamin Poulain. * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::paint): Remove an invalid assertion. The drawing area may be null if the web process has crashed. (QtWebPageProxy::setDrawingAreaSize): Fail silently if there is no drawing area. 2011-07-12 Andreas Kling [Qt][WK2] Add informative loadFailed() signal to web views. https://bugs.webkit.org/show_bug.cgi?id=64362 Reviewed by Benjamin Poulain. The web views will now emit loadFailed(QWebError) when a load failure occurs. The QWebError object currently contains: - Type of failure (whether it's an engine, network or protocol error.) - The failing URL. - Any error code associated with the failure. * UIProcess/API/qt/qdesktopwebview.cpp: (QDesktopWebViewPrivate::loadDidFail): * UIProcess/API/qt/qdesktopwebview.h: * UIProcess/API/qt/qdesktopwebview_p.h: * UIProcess/API/qt/qtouchwebpage.h: * UIProcess/API/qt/qweberror.cpp: Added. (QWebError::QWebError): (QWebErrorPrivate::createQWebError): (QWebErrorPrivate::QWebErrorPrivate): (QWebErrorPrivate::~QWebErrorPrivate): (QWebError::type): (QWebError::errorCode): (QWebError::url): * UIProcess/API/qt/qweberror.h: Added. * UIProcess/API/qt/qweberror_p.h: Added. * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp: (tst_CommonViewTests::loadNonexistentFileUrl): * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp: (WebViewAbstraction::WebViewAbstraction): (WebViewAbstraction::touchViewLoadFailed): (WebViewAbstraction::desktopViewLoadFailed): * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h: * UIProcess/qt/ClientImpl.cpp: (dispatchLoadSucceeded): (dispatchLoadFailed): (qt_wk_didFailProvisionalLoadWithErrorForFrame): (qt_wk_didFinishLoadForFrame): (qt_wk_didFailLoadWithErrorForFrame): * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::loadDidFail): * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::loadDidFail): * UIProcess/qt/TouchViewInterface.h: * UIProcess/qt/ViewInterface.h: * WebKit2API.pri: 2011-07-12 Jocelyn Turcotte [Qt] Forward the touch view scale changes to the tiled drawing area. https://bugs.webkit.org/show_bug.cgi?id=64357 Reviewed by Kenneth Rohde Christiansen. The drawing area needs to know the new scale to render tiles accordingly. * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPagePrivate::commitScaleChange): * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::setContentsScale): * UIProcess/qt/qtouchwebpageproxy.h: (QTouchWebPageProxy::drawingArea): 2011-07-12 Adam Roben Export some symbols needed by TestWebKitAPI Part of Concatenating string literals and WTF::Strings using operator+ is suboptimal Reviewed by Darin Adler. * win/WebKit2.def: 2011-07-11 Hironori Bono Reviewed by Adam Roben. Implement layoutTestController.setTextDirection for WebKit2 and Windows. https://bugs.webkit.org/show_bug.cgi?id=61931 This change implements layoutTextController.setTextDirection for WebKit2 and Windows so we can run a layout test added by r87770 on them. Each implementation adds a wrapper function for Editor::setBaseWritingDirection() so LayoutTestController can call it. * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: Added WKBundleFrameSetTextDirection to allow LayoutTestController to change the text direction. (WKBundleFrameSetTextDirection): * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: ditto. * WebProcess/WebPage/WebFrame.cpp: Added setTextDirection to allow WKBundleFrame to change the text direction. (WebKit::WebFrame::setTextDirection): * WebProcess/WebPage/WebFrame.h: ditto. 2011-07-11 Benjamin Poulain [Qt][WK2] Get rid of focusNextPrevChild() https://bugs.webkit.org/show_bug.cgi?id=64289 Reviewed by Andreas Kling. Qt 5 does not use focusNextPrevChild() but uses setFocusNavigation(), and the focus is not based on QWidget. We can get rid of the method since the new implementation will be totally different. * UIProcess/API/qt/qtouchwebpage.cpp: * UIProcess/API/qt/qtouchwebpage.h: * UIProcess/qt/ClientImpl.cpp: (qt_wk_takeFocus): * UIProcess/qt/QtWebPageProxy.h: 2011-07-11 Anders Carlsson Implement getFormValue for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=64294 Reviewed by Kevin Decker. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::getFormValue): Call Plugin::getFormValue. * PluginProcess/PluginControllerProxy.messages.in: Add new GetFormValue message. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::getFormValue): Get the form value and convert it to a String. * WebProcess/Plugins/Plugin.h: Add getFormValue pure virtual member function. * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::getFormValue): Send a GetFormValue message to the plug-in process. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::getFormValue): Call Plugin::getFormValue. 2011-07-11 Ada Chan The original request should be accessible from WebNavigationData. https://bugs.webkit.org/show_bug.cgi?id=64227 Reviewed by Anders Carlsson. * Shared/WebNavigationDataStore.h: (WebKit::WebNavigationDataStore::encode): Handle the encoding of the original request. (WebKit::WebNavigationDataStore::decode): Handle the decoding of the original request. * UIProcess/API/C/WKNavigationData.cpp: (WKNavigationDataCopyOriginalRequest): * UIProcess/API/C/WKNavigationData.h: * UIProcess/WebNavigationData.h: (WebKit::WebNavigationData::originalRequest): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::updateGlobalHistory): Store the original request in the WebNavigationDataStore. 2011-07-11 Benjamin Poulain [Qt][WK2] Forward the viewport visible area from the view instead of inferring it from the TiledDrawingAreaProxy https://bugs.webkit.org/show_bug.cgi?id=64275 Reviewed by Simon Hausmann. This patch refactors the way the viewport visible area is handled. Previously, the TiledDrawingAreaProxy would ask for the visible rect when painting or updating. This is reversed with this patch, and the viewport informs the page of any change in the view area. With this change, the TiledDrawingAreaProxy does not need to know about QTouchWebPage, and can use the TouchViewInterface directly. * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPagePrivate::setViewportRect): * UIProcess/API/qt/qtouchwebpage.h: * UIProcess/API/qt/qtouchwebpage_p.h: * UIProcess/API/qt/qtouchwebview.cpp: (QTouchWebViewPrivate::scroll): (QTouchWebViewPrivate::viewportRectUpdated): (QTouchWebView::resizeEvent): * UIProcess/API/qt/qtouchwebview.h: * UIProcess/API/qt/qtouchwebview_p.h: * UIProcess/PageClient.h: * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::invalidate): (WebKit::TiledDrawingAreaProxy::paint): (WebKit::TiledDrawingAreaProxy::setVisibleArea): (WebKit::TiledDrawingAreaProxy::createTiles): * UIProcess/TiledDrawingAreaProxy.h: * UIProcess/WebPageProxy.h: * UIProcess/qt/QtWebPageProxy.cpp: * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: (WebKit::TiledDrawingAreaProxy::updateWebView): * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::contentSizeChanged): * UIProcess/qt/TouchViewInterface.h: * UIProcess/qt/WebPageProxyQt.cpp: * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::createDrawingAreaProxy): (QTouchWebPageProxy::setVisibleArea): * UIProcess/qt/qtouchwebpageproxy.h: 2011-07-11 Andreas Kling [Qt][WK2] Move zoomable-area-for-point functionality to QTouchWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=64273 Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/QtWebPageProxy.cpp: * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/qdesktopwebpageproxy.cpp: (QDesktopWebPageProxy::didFindZoomableArea): * UIProcess/qt/qdesktopwebpageproxy.h: * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::findZoomableAreaForPoint): (QTouchWebPageProxy::didFindZoomableArea): * UIProcess/qt/qtouchwebpageproxy.h: 2011-07-10 Anders Carlsson WebKit2 is leaking NSCursors created by leakNamedCursor https://bugs.webkit.org/show_bug.cgi?id=64241 Reviewed by Oliver Hunt. * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::decode): When decoding a cursor of a known type, make sure to eagerly create the platform cursor for the cursor singleton. This way we avoid re-creating new NSCursor objects over and over for standard cursors. 2011-07-10 Benjamin Poulain [Qt][WK2] Move setResizesToContentsUsingLayoutSize() to the touch specific page proxy https://bugs.webkit.org/show_bug.cgi?id=64238 Reviewed by Andreas Kling. The method is specific to the touch view, so it should be in QTouchWebPageProxy instead of QtWebPageProxy. * UIProcess/qt/QtWebPageProxy.cpp: * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::setResizesToContentsUsingLayoutSize): * UIProcess/qt/qtouchwebpageproxy.h: 2011-07-09 Noel Gordon Reviewed by Adam Roben. [WebKit2] Forward focus events to windowless plugins on the windows port. https://bugs.webkit.org/show_bug.cgi?id=63251 No new tests. Covered by existing tests: plugins/mouse-events.html and plugins/keyboard-events.html. * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: (WebKit::NetscapePlugin::platformSetFocus): 2011-07-08 Andreas Kling [Qt][WK2] Views should expose QActions for basic navigation. https://bugs.webkit.org/show_bug.cgi?id=64174 Add navigationAction() methods to the views to provide default QActions for Back, Forward, Stop and Reload. Reviewed by Benjamin Poulain. * UIProcess/API/qt/WKView.h: * UIProcess/API/qt/qdesktopwebview.cpp: (QDesktopWebView::navigationAction): * UIProcess/API/qt/qdesktopwebview.h: * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPage::navigationAction): * UIProcess/API/qt/qtouchwebpage.h: * UIProcess/API/qt/qwebkittypes.h: Added. * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp: (tst_CommonViewTests::backAndForward): (tst_CommonViewTests::reload): (tst_CommonViewTests::stop): * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp: (WebViewAbstraction::triggerNavigationAction): * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h: * UIProcess/API/qt/tests/html/basic_page2.html: Added. * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::navigationAction): * UIProcess/qt/QtWebPageProxy.h: * WebKit2API.pri: 2011-07-08 Benjamin Poulain [Qt][WK2] Get rid of the check for TILED_BACKING_STORE in Qt https://bugs.webkit.org/show_bug.cgi?id=64175 Reviewed by Kenneth Rohde Christiansen. Qt no longer supports building WebKit2 without TILED_BACKING_STORE. * UIProcess/API/qt/qtouchwebpage.cpp: (QTouchWebPagePrivate::onScaleChanged): * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::setResizesToContentsUsingLayoutSize): * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: * UIProcess/qt/TiledDrawingAreaTileQt.cpp: * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp: 2011-07-08 Benjamin Poulain [WK2] Do not forward touch events to the web process when it does not need them https://bugs.webkit.org/show_bug.cgi?id=64164 Reviewed by Kenneth Rohde Christiansen. The call to ChromeClient::needTouchEvent() is now forwarded to the WebPageProxy to change the way events are delivered. When the WebPage does not need touch events, and there is no queued touch events, the incoming events just bounce back through PageClient::doneWithTouchEvent(). In the case when new events come to WebPageProxy and there are still touch events incoming from the WebProcess, the new events are deferred with the corresponding pending touch events. Deferring the new events iafter the corresponding forwarded event ensure the delivery is always done in order when PageClient::doneWithTouchEvent() is called. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::handleTouchEvent): (WebKit::WebPageProxy::needTouchEvents): (WebKit::WebPageProxy::didReceiveEvent): (WebKit::WebPageProxy::processDidCrash): * UIProcess/WebPageProxy.h: (WebKit::QueuedTouchEvents:::forwardedEvent): * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::needTouchEvents): 2011-07-08 Benjamin Poulain [Qt][WK2] Add basic support for panning gestures to the QTouchWebView https://bugs.webkit.org/show_bug.cgi?id=64105 Reviewed by Kenneth Rohde Christiansen. This patch adds basic support for the panning gesture on the UI process side. The events coming back from the WebProcess are processed through the QtPanGestureRecognizer to recognize the pan gesture. When the gesture is recognized, the actions are performed on the view through the TouchViewInterface. Currently, the viewport just move the page around without limit. This will be improved when a physics engine is integrated. * UIProcess/API/qt/qtouchwebview.cpp: (QTouchWebViewPrivate::scroll): * UIProcess/API/qt/qtouchwebview.h: * UIProcess/API/qt/qtouchwebview_p.h: * UIProcess/qt/QtPanGestureRecognizer.cpp: Added. (WebKit::QtPanGestureRecognizer::QtPanGestureRecognizer): (WebKit::QtPanGestureRecognizer::recognize): (WebKit::QtPanGestureRecognizer::reset): * UIProcess/qt/QtPanGestureRecognizer.h: Added. * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::panGestureStarted): (WebKit::TouchViewInterface::panGestureRequestScroll): (WebKit::TouchViewInterface::panGestureEnded): (WebKit::TouchViewInterface::panGestureCancelled): * UIProcess/qt/TouchViewInterface.h: * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::QTouchWebPageProxy): (QTouchWebPageProxy::processDidCrash): (QTouchWebPageProxy::doneWithTouchEvent): * UIProcess/qt/qtouchwebpageproxy.h: * WebKit2.pro: 2011-07-07 Andreas Kling [Qt][WK2] Remove Symbian code. https://bugs.webkit.org/show_bug.cgi?id=64101 Reviewed by Benjamin Poulain. * DerivedSources.pro: * Platform/CoreIPC/Attachment.h: * Platform/CoreIPC/Connection.h: * Platform/SharedMemory.h: * Platform/qt/SharedMemorySymbian.cpp: Removed. * UIProcess/API/qt/tests/tests.pri: * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: * WebKit2.pri: * WebKit2.pro: * WebProcess.pro: * config.h: 2011-07-07 Andreas Kling [Qt][WK2] Don't support ridiculous matrix of QT_NO_FEATURE combinations. https://bugs.webkit.org/show_bug.cgi?id=64099 Reviewed by Benjamin Poulain. * Shared/qt/WebEventFactoryQt.cpp: (WebKit::WebEventFactory::createWebWheelEvent): * UIProcess/API/qt/qdesktopwebview_p.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): (QtWebPageProxy::setCursor): (QtWebPageProxy::registerEditCommand): (QtWebPageProxy::clearAllEditCommands): (QtWebPageProxy::canUndoRedo): (QtWebPageProxy::executeUndoRedo): (QtWebPageProxy::updateAction): (QtWebPageProxy::webActionTriggered): (QtWebPageProxy::triggerAction): (QtWebPageProxy::action): * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::didChangeCursor): * UIProcess/qt/TouchViewInterface.h: * UIProcess/qt/ViewInterface.h: * UIProcess/qt/WebUndoCommandQt.cpp: (WebUndoCommandQt::WebUndoCommandQt): * UIProcess/qt/WebUndoCommandQt.h: * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp: (WebKit::WebDragClient::startDrag): 2011-07-07 Andreas Kling [Qt][WK2] Views should know about WebProcess crash/relaunch. https://bugs.webkit.org/show_bug.cgi?id=64093 Reviewed by Benjamin Poulain. Add processDidCrash() and didRelaunchProcess() to ViewInterface. QDesktopWebView now displays a simple sad smiley ":(" when the web process crashes. * UIProcess/API/qt/qdesktopwebview.cpp: (QDesktopWebViewPrivate::QDesktopWebViewPrivate): (paintCrashedPage): (QDesktopWebView::paint): (QDesktopWebViewPrivate::processDidCrash): (QDesktopWebViewPrivate::didRelaunchProcess): * UIProcess/API/qt/qdesktopwebview_p.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): (QtWebPageProxy::didRelaunchProcess): (QtWebPageProxy::processDidCrash): * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/TouchViewInterface.cpp: (WebKit::TouchViewInterface::showContextMenu): (WebKit::TouchViewInterface::hideContextMenu): (WebKit::TouchViewInterface::processDidCrash): (WebKit::TouchViewInterface::didRelaunchProcess): * UIProcess/qt/TouchViewInterface.h: * UIProcess/qt/ViewInterface.h: 2011-07-07 Benjamin Poulain [Qt] [WK2] Improve the handling of touch events to use them as main input https://bugs.webkit.org/show_bug.cgi?id=63991 Reviewed by Kenneth Rohde Christiansen. Promote touch event for use as primary input. The touch events now use the responsiveness timer like the other input events. The touch events also have a callback to the UI signaling if the event was used or not: PageClient::doneWithTouchEvent(). This is similar to what is done with key events (PageClient::doneWithKeyEvent()). * Shared/NativeWebTouchEvent.h: Copied from Source/WebKit2/Shared/qt/WebEventFactoryQt.h. (WebKit::NativeWebTouchEvent::nativeEvent): * Shared/qt/NativeWebTouchEventQt.cpp: Copied from Source/WebKit2/Shared/qt/WebEventFactoryQt.h. (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): * Shared/qt/WebEventFactoryQt.cpp: (WebKit::webEventTypeForEvent): (WebKit::WebEventFactory::createWebTouchEvent): * Shared/qt/WebEventFactoryQt.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleTouchEvent): (WebKit::WebPageProxy::didReceiveEvent): * UIProcess/WebPageProxy.h: * UIProcess/qt/qdesktopwebpageproxy.cpp: (QDesktopWebPageProxy::doneWithTouchEvent): * UIProcess/qt/qdesktopwebpageproxy.h: * UIProcess/qt/qtouchwebpageproxy.cpp: (QTouchWebPageProxy::doneWithTouchEvent): (QTouchWebPageProxy::touchEvent): * UIProcess/qt/qtouchwebpageproxy.h: * WebKit2.pro: 2011-07-06 Andreas Kling [Qt][WK2] Split Qt API into two different web views (touch and desktop) https://bugs.webkit.org/show_bug.cgi?id=63950 Co-authored with Benjamin Poulain . Reviewed by Kenneth Rohde Christiansen. Replace the QGraphicsWKView/QWKPage mess with QDesktopWebView and QTouchWebView. QDesktopWebView is a traditional web view, similar to QGraphicsWebView. It will will have the expected "desktop" behavior for things like subframes and fixed-position elements. QTouchWebView is intended for use on touch devices, and will manage the viewport, gestures, tiled rendering, and other things that the user should never have to worry about. It will use "resize to contents" and frame flattening by default. API-wise, the biggest difference between the two is that QTouchWebView is really a viewport that contains a QTouchWebPage. These are decoupled for flexibility in UI design. This decoupling is not necessary for the desktop use-case, and so QDesktopWebView is the only class we need. Much of the Qt/WebKit2 API has been removed (snapshots, history, preferences..) but will be re-added incrementally in a way that fits the new API vision. * UIProcess/API/qt/WKView.h: * UIProcess/API/qt/qdesktopwebview.cpp: Added. (QDesktopWebViewPrivate::QDesktopWebViewPrivate): (QDesktopWebViewPrivate::setViewNeedsDisplay): (QDesktopWebViewPrivate::drawingAreaSize): (QDesktopWebViewPrivate::contentSizeChanged): (QDesktopWebViewPrivate::isActive): (QDesktopWebViewPrivate::hasFocus): (QDesktopWebViewPrivate::isVisible): (QDesktopWebViewPrivate::startDrag): (QDesktopWebViewPrivate::didChangeUrl): (QDesktopWebViewPrivate::didChangeTitle): (QDesktopWebViewPrivate::didChangeToolTip): (QDesktopWebViewPrivate::didChangeStatusText): (QDesktopWebViewPrivate::didChangeCursor): (QDesktopWebViewPrivate::loadDidBegin): (QDesktopWebViewPrivate::loadDidSucceed): (QDesktopWebViewPrivate::didChangeLoadProgress): (QDesktopWebViewPrivate::showContextMenu): (QDesktopWebViewPrivate::hideContextMenu): (QDesktopWebView::QDesktopWebView): (QDesktopWebView::init): (QDesktopWebView::~QDesktopWebView): (QDesktopWebView::load): (QDesktopWebView::url): (QDesktopWebView::title): (QDesktopWebView::resizeEvent): (QDesktopWebView::paint): (QDesktopWebView::event): (QDesktopWebView::pageRef): * UIProcess/API/qt/qdesktopwebview.h: Added. * UIProcess/API/qt/qdesktopwebview_p.h: Added. * UIProcess/API/qt/qgraphicswkview.cpp: Removed. * UIProcess/API/qt/qgraphicswkview.h: Removed. * UIProcess/API/qt/qtouchwebpage.cpp: Added. (QTouchWebPage::QTouchWebPage): (QTouchWebPage::~QTouchWebPage): (QTouchWebPage::paint): (QTouchWebPage::load): (QTouchWebPage::url): (QTouchWebPage::title): (QTouchWebPage::focusNextPrevChildCallback): (QTouchWebPage::focusNextPrevChild): (QTouchWebPage::event): (QTouchWebPage::timerEvent): (QTouchWebPage::resizeEvent): (QTouchWebPagePrivate::QTouchWebPagePrivate): (QTouchWebPage::visibleRect): (QTouchWebPagePrivate::prepareScaleChange): (QTouchWebPagePrivate::commitScaleChange): (QTouchWebPagePrivate::onScaleChanged): (QTouchWebPagePrivate::setPage): * UIProcess/API/qt/qtouchwebpage.h: Added. * UIProcess/API/qt/qtouchwebpage_p.h: Added. (QTouchWebPagePrivate::getPageViewPrivate): * UIProcess/API/qt/qtouchwebview.cpp: Added. (QTouchWebViewPrivate::QTouchWebViewPrivate): (QTouchWebView::QTouchWebView): (QTouchWebView::~QTouchWebView): (QTouchWebView::page): * UIProcess/API/qt/qtouchwebview.h: Added. * UIProcess/API/qt/qtouchwebview_p.h: Added. * UIProcess/API/qt/qwkpage.cpp: Removed. * UIProcess/API/qt/qwkpage.h: Removed. * UIProcess/API/qt/tests/commonviewtests/commonviewtests.pro: Added. * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp: Added. (tst_CommonViewTests::init): (tst_CommonViewTests::cleanup): (tst_CommonViewTests::baseUrl): (tst_CommonViewTests::loadEmptyUrl): (tst_CommonViewTests::loadEmptyPageViewVisible): (tst_CommonViewTests::loadEmptyPageViewHidden): (tst_CommonViewTests::show): * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp: Added. (WebViewAbstraction::WebViewAbstraction): (WebViewAbstraction::show): (WebViewAbstraction::hide): (WebViewAbstraction::load): (WebViewAbstraction::url): (WebViewAbstraction::touchViewLoadStarted): (WebViewAbstraction::desktopViewLoadStarted): (WebViewAbstraction::touchViewLoadSucceeded): (WebViewAbstraction::desktopViewLoadSucceeded): (WebViewAbstraction::touchWebView): (WebViewAbstraction::desktopWebView): * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h: Copied from Source/WebKit2/UIProcess/API/qt/tests/qwkpage/tst_qwkpage.cpp. * UIProcess/API/qt/tests/html/a.htm: Removed. * UIProcess/API/qt/tests/html/b.htm: Removed. * UIProcess/API/qt/tests/html/c.htm: Removed. * UIProcess/API/qt/tests/html/d.htm: Removed. * UIProcess/API/qt/tests/qdesktopwebview/qdesktopwebview.pro: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qgraphicswkview/qgraphicswkview.pro. * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qwkpage/tst_qwkpage.cpp. (tst_QDesktopWebView::init): (tst_QDesktopWebView::cleanup): (tst_QDesktopWebView::webView): * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp: Removed. * UIProcess/API/qt/tests/qtouchwebview/qtouchwebview.pro: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qwkhistory/qwkhistory.pro. * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp: Added. (tst_QTouchWebView::tst_QTouchWebView): (tst_QTouchWebView::init): (tst_QTouchWebView::cleanup): (tst_QTouchWebView::webView): (tst_QTouchWebView::accessPage): * UIProcess/API/qt/tests/qwkhistory/tst_qwkhistory.cpp: Removed. * UIProcess/API/qt/tests/qwkpage/qwkpage.pro: Removed. * UIProcess/API/qt/tests/tests.pro: * UIProcess/API/qt/tests/testwindow.h: Added. (TestWindow::TestWindow): (TestWindow::resizeEvent): * UIProcess/TiledDrawingAreaProxy.cpp: * UIProcess/TiledDrawingAreaProxy.h: * UIProcess/WebFullScreenManagerProxy.h: * UIProcess/qt/ClientImpl.cpp: Renamed from Source/WebKit2/UIProcess/API/qt/ClientImpl.cpp. (toQWKContext): (toQtWebPageProxy): (loadFinished): (qt_wk_didStartProvisionalLoadForFrame): (qt_wk_didReceiveServerRedirectForProvisionalLoadForFrame): (qt_wk_didFailProvisionalLoadWithErrorForFrame): (qt_wk_didCommitLoadForFrame): (qt_wk_didFinishDocumentLoadForFrame): (qt_wk_didFinishLoadForFrame): (qt_wk_didFailLoadWithErrorForFrame): (qt_wk_didReceiveTitleForFrame): (qt_wk_didFirstLayoutForFrame): (qt_wk_didRemoveFrameFromHierarchy): (qt_wk_didFirstVisuallyNonEmptyLayoutForFrame): (qt_wk_didStartProgress): (qt_wk_didChangeProgress): (qt_wk_didFinishProgress): (qt_wk_didBecomeUnresponsive): (qt_wk_didBecomeResponsive): (qt_wk_createNewPage): (qt_wk_showPage): (qt_wk_close): (qt_wk_takeFocus): (qt_wk_runJavaScriptAlert): (qt_wk_setStatusText): (qt_wk_didSameDocumentNavigationForFrame): (qt_wk_didChangeIconForPageURL): (qt_wk_didRemoveAllIcons): * UIProcess/qt/ClientImpl.h: Renamed from Source/WebKit2/UIProcess/API/qt/ClientImpl.h. * UIProcess/qt/QtWebPageProxy.cpp: Added. (defaultWKContext): (contextMenuActionForWebAction): (dragOperationToDropActions): (dropActionToDragOperation): (QtWebPageProxy::QtWebPageProxy): (QtWebPageProxy::init): (QtWebPageProxy::~QtWebPageProxy): (QtWebPageProxy::handleEvent): (QtWebPageProxy::handleKeyPressEvent): (QtWebPageProxy::handleKeyReleaseEvent): (QtWebPageProxy::handleFocusInEvent): (QtWebPageProxy::handleFocusOutEvent): (QtWebPageProxy::setCursor): (QtWebPageProxy::setViewNeedsDisplay): (QtWebPageProxy::displayView): (QtWebPageProxy::scrollView): (QtWebPageProxy::viewSize): (QtWebPageProxy::isViewWindowActive): (QtWebPageProxy::isViewFocused): (QtWebPageProxy::isViewVisible): (QtWebPageProxy::isViewInWindow): (QtWebPageProxy::enterAcceleratedCompositingMode): (QtWebPageProxy::exitAcceleratedCompositingMode): (QtWebPageProxy::pageDidRequestScroll): (QtWebPageProxy::didChangeContentsSize): (QtWebPageProxy::toolTipChanged): (QtWebPageProxy::registerEditCommand): (QtWebPageProxy::clearAllEditCommands): (QtWebPageProxy::canUndoRedo): (QtWebPageProxy::executeUndoRedo): (QtWebPageProxy::convertToDeviceSpace): (QtWebPageProxy::screenToWindow): (QtWebPageProxy::windowToScreen): (QtWebPageProxy::convertToUserSpace): (QtWebPageProxy::selectionChanged): (QtWebPageProxy::doneWithKeyEvent): (QtWebPageProxy::createPopupMenuProxy): (QtWebPageProxy::createContextMenuProxy): (QtWebPageProxy::setFindIndicator): (QtWebPageProxy::didCommitLoadForMainFrame): (QtWebPageProxy::didFinishLoadingDataForCustomRepresentation): (QtWebPageProxy::flashBackingStoreUpdates): (QtWebPageProxy::pageRef): (QtWebPageProxy::didChangeUrl): (QtWebPageProxy::didChangeTitle): (QtWebPageProxy::didChangeStatusText): (QtWebPageProxy::showContextMenu): (QtWebPageProxy::hideContextMenu): (QtWebPageProxy::loadDidBegin): (QtWebPageProxy::loadDidSucceed): (QtWebPageProxy::didChangeLoadProgress): (QtWebPageProxy::paint): (QtWebPageProxy::updateAction): (QtWebPageProxy::updateNavigationActions): (QtWebPageProxy::webActionTriggered): (QtWebPageProxy::didRelaunchProcess): (QtWebPageProxy::processDidCrash): (QtWebPageProxy::setActualVisibleContentsRect): (QtWebPageProxy::preferences): (QtWebPageProxy::setCreateNewPageFunction): (QtWebPageProxy::setCustomUserAgent): (QtWebPageProxy::customUserAgent): (QtWebPageProxy::load): (QtWebPageProxy::url): (QtWebPageProxy::title): (QtWebPageProxy::setDrawingAreaSize): (QtWebPageProxy::textZoomFactor): (QtWebPageProxy::setTextZoomFactor): (QtWebPageProxy::pageZoomFactor): (QtWebPageProxy::setPageZoomFactor): (QtWebPageProxy::setPageAndTextZoomFactors): (QtWebPageProxy::history): (QtWebPageProxy::setResizesToContentsUsingLayoutSize): (QtWebPageProxy::triggerAction): (QtWebPageProxy::action): (QtWebPageProxy::findZoomableAreaForPoint): (QtWebPageProxy::didFindZoomableArea): (QtWebPageProxy::startDrag): (QtWebPageProxy::viewportVisibleRect): (QtWebPageProxy::isConnectedToEngine): (QtWebPageProxy::setPageIsVisible): * UIProcess/qt/QtWebPageProxy.h: Renamed from Source/WebKit2/UIProcess/API/qt/qwkpage_p.h. (QtWebPageProxy::pageClosed): (QtWebPageProxy::customRepresentationZoomFactor): (QtWebPageProxy::setCustomRepresentationZoomFactor): (QtWebPageProxy::didChangeScrollbarsForMainFrame): (QtWebPageProxy::findStringInCustomRepresentation): (QtWebPageProxy::countStringMatchesInCustomRepresentation): (QtWebPageProxy::userSpaceScaleFactor): (QtWebPageProxy::createNewPageFunction): * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: (WebKit::TiledDrawingAreaProxy::page): * UIProcess/qt/TouchViewInterface.cpp: Added. (WebKit::TouchViewInterface::TouchViewInterface): (WebKit::TouchViewInterface::setViewNeedsDisplay): (WebKit::TouchViewInterface::drawingAreaSize): (WebKit::TouchViewInterface::contentSizeChanged): (WebKit::TouchViewInterface::isActive): (WebKit::TouchViewInterface::hasFocus): (WebKit::TouchViewInterface::isVisible): (WebKit::TouchViewInterface::startDrag): (WebKit::TouchViewInterface::didChangeUrl): (WebKit::TouchViewInterface::didChangeTitle): (WebKit::TouchViewInterface::didChangeToolTip): (WebKit::TouchViewInterface::didChangeStatusText): (WebKit::TouchViewInterface::didChangeCursor): (WebKit::TouchViewInterface::loadDidBegin): (WebKit::TouchViewInterface::loadDidSucceed): (WebKit::TouchViewInterface::didChangeLoadProgress): (WebKit::TouchViewInterface::showContextMenu): (WebKit::TouchViewInterface::hideContextMenu): * UIProcess/qt/TouchViewInterface.h: Added. (WebKit::TouchViewInterface::pageView): * UIProcess/qt/ViewInterface.cpp: Added. (WebKit::ViewInterface::ownerWidget): * UIProcess/qt/ViewInterface.h: Added. * UIProcess/qt/WebContextMenuProxyQt.cpp: (WebKit::webActionForContextMenuAction): (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt): (WebKit::WebContextMenuProxyQt::create): (WebKit::WebContextMenuProxyQt::showContextMenu): (WebKit::WebContextMenuProxyQt::hideContextMenu): (WebKit::WebContextMenuProxyQt::createContextMenu): * UIProcess/qt/WebContextMenuProxyQt.h: * UIProcess/qt/qdesktopwebpageproxy.cpp: Added. (dragOperationToDropAction): (QDesktopWebPageProxy::QDesktopWebPageProxy): (QDesktopWebPageProxy::createDrawingAreaProxy): (QDesktopWebPageProxy::paintContent): (QDesktopWebPageProxy::setViewportArguments): (QDesktopWebPageProxy::handleEvent): (QDesktopWebPageProxy::handleMouseMoveEvent): (QDesktopWebPageProxy::handleMousePressEvent): (QDesktopWebPageProxy::handleMouseReleaseEvent): (QDesktopWebPageProxy::handleMouseDoubleClickEvent): (QDesktopWebPageProxy::handleWheelEvent): (QDesktopWebPageProxy::handleHoverMoveEvent): (QDesktopWebPageProxy::handleDragEnterEvent): (QDesktopWebPageProxy::handleDragLeaveEvent): (QDesktopWebPageProxy::handleDragMoveEvent): (QDesktopWebPageProxy::handleDropEvent): (QDesktopWebPageProxy::timerEvent): * UIProcess/qt/qdesktopwebpageproxy.h: Added. * UIProcess/qt/qtouchwebpageproxy.cpp: Added. (QTouchWebPageProxy::QTouchWebPageProxy): (QTouchWebPageProxy::createDrawingAreaProxy): (QTouchWebPageProxy::paintContent): (QTouchWebPageProxy::setViewportArguments): (QTouchWebPageProxy::handleEvent): (QTouchWebPageProxy::touchEvent): * UIProcess/qt/qtouchwebpageproxy.h: Added. (QTouchWebPageProxy::touchViewInterface): (QTouchWebPageProxy::pageView): * UIProcess/qt/qwkcontext.cpp: Renamed from Source/WebKit2/UIProcess/API/qt/qwkcontext.cpp. (initializePlatformStrategiesIfNeeded): (QWKContextPrivate::QWKContextPrivate): (QWKContextPrivate::~QWKContextPrivate): (QWKContext::QWKContext): (QWKContext::~QWKContext): (QWKContext::setIconDatabasePath): (QWKContext::iconForPageURL): * UIProcess/qt/qwkcontext.h: Renamed from Source/WebKit2/UIProcess/API/qt/qwkcontext.h. * UIProcess/qt/qwkcontext_p.h: Renamed from Source/WebKit2/UIProcess/API/qt/qwkcontext_p.h. * UIProcess/qt/qwkhistory.cpp: Renamed from Source/WebKit2/UIProcess/API/qt/qwkhistory.cpp. (QWKHistoryItemPrivate::QWKHistoryItemPrivate): (QWKHistoryItemPrivate::~QWKHistoryItemPrivate): (QWKHistoryItem::QWKHistoryItem): (QWKHistoryItem::QWKHistoryItem::operator=): (QWKHistoryItem::~QWKHistoryItem): (QWKHistoryItem::title): (QWKHistoryItem::url): (QWKHistoryPrivate::QWKHistoryPrivate): (QWKHistoryPrivate::createHistory): (QWKHistoryPrivate::~QWKHistoryPrivate): (QWKHistory::QWKHistory): (QWKHistory::~QWKHistory): (QWKHistory::backListCount): (QWKHistory::forwardListCount): (QWKHistory::count): (QWKHistory::currentItem): (QWKHistory::backItem): (QWKHistory::forwardItem): (QWKHistory::itemAt): (QWKHistory::goToItemAt): (QWKHistory::backItems): (QWKHistory::forwardItems): * UIProcess/qt/qwkhistory.h: Renamed from Source/WebKit2/UIProcess/API/qt/qwkhistory.h. * UIProcess/qt/qwkhistory_p.h: Renamed from Source/WebKit2/UIProcess/API/qt/qwkhistory_p.h. * UIProcess/qt/qwkpreferences.cpp: Renamed from Source/WebKit2/UIProcess/API/qt/qwkpreferences.cpp. (QWKPreferencesPrivate::createPreferences): (QWKPreferencesPrivate::createSharedPreferences): (QWKPreferences::sharedPreferences): (QWKPreferences::QWKPreferences): (QWKPreferences::~QWKPreferences): (QWKPreferences::setFontFamily): (QWKPreferences::fontFamily): (QWKPreferences::testAttribute): (QWKPreferences::setAttribute): (QWKPreferences::setFontSize): (QWKPreferences::fontSize): * UIProcess/qt/qwkpreferences.h: Renamed from Source/WebKit2/UIProcess/API/qt/qwkpreferences.h. * UIProcess/qt/qwkpreferences_p.h: Renamed from Source/WebKit2/UIProcess/API/qt/qwkpreferences_p.h. * WebKit2.pro: * WebKit2API.pri: * WebProcess/WebPage/TiledDrawingArea.cpp: * WebProcess/WebPage/TiledDrawingArea.h: 2011-07-05 Jeff Miller Add WKPageCopyStandardUserAgentWithApplicationName https://bugs.webkit.org/show_bug.cgi?id=63953 Reviewed by Adam Roben. * UIProcess/API/C/WKPage.cpp: (WKPageCopyStandardUserAgentWithApplicationName): Added. * UIProcess/API/C/WKPagePrivate.h: Added WKPageCopyStandardUserAgentWithApplicationName(). * UIProcess/WebPageProxy.h: Make standardUserAgent() public. 2011-07-05 Vsevolod Vlasov Web Inspector: Show content for plugin requests in network panel. https://bugs.webkit.org/show_bug.cgi?id=30080 Added win symbols for new window.internals methods. Reviewed by Pavel Feldman. * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-07-04 Sheriff Bot Unreviewed, rolling out r90373. http://trac.webkit.org/changeset/90373 https://bugs.webkit.org/show_bug.cgi?id=63917 Breaks Qt Linux Release minimal (Requested by vsevik on #webkit). * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-07-04 Vsevolod Vlasov Web Inspector: Show content for plugin requests in network panel. https://bugs.webkit.org/show_bug.cgi?id=30080 Reviewed by Pavel Feldman. * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-07-04 Anders Carlsson NP_RemoveProperty is not called back by Safari when delete npObject.prop is encountered in JavaScript https://bugs.webkit.org/show_bug.cgi?id=63915 Reviewed by Sam Weinig. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::deleteProperty): Call NP_RemoveProperty on the NPObject. * WebProcess/Plugins/Netscape/JSNPObject.h: Add deleteProperty. 2011-06-23 Robert Hogan Reviewed by Simon Hausmann. [Qt] Windowless Plugins : cursor blinks even after transferring focus to plugin https://bugs.webkit.org/show_bug.cgi?id=30355 PluginView needs to use page->focusController()->setFocusedNode() when focusing a plugin in order to clear the FrameSelection in the currently focused node. In its platform-specific code Chromium already does this (WebPluginContainerImpl.cpp). * WebProcess/Plugins/PluginView.cpp: (WebCore::PluginView::focusPluginElement): Using FocusController::setFocusedNode() makes the call to FocusController:setFocusedFrame() redundant, since the former calls it. 2011-07-02 Anders Carlsson Have another go at fixing the Windows build. * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: (WebKit::NetscapePlugin::containingWindow): (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): 2011-07-02 Anders Carlsson Null out the plug-in controller after destroying the plug-in. https://bugs.webkit.org/show_bug.cgi?id=63869 Reviewed by Maciej Stachowiak. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::destroy): Call destroyPlugin. * WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::destroyPlugin): Call destroy and null out the plug-in controller. * WebProcess/Plugins/Plugin.h: Add destroyPlugin, make destroy private. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::~PluginView): Call destroyPlugin. 2011-07-02 Anders Carlsson Fix Windows build for real. * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: (WebKit::NetscapePlugin::containingWindow): (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate): (WebKit::NetscapePlugin::platformPaint): (WebKit::NetscapePlugin::platformHandleMouseEvent): 2011-07-02 Anders Carlsson Implement NPN_PluginThreadAsyncCall https://bugs.webkit.org/show_bug.cgi?id=63868 Reviewed by Dan Bernstein. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_PluginThreadAsyncCall): Call NetscapePlugin::pluginThreadAsyncCall. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::pluginThreadAsyncCall): Schedule a work item to call the function on the main run loop. (WebKit::NetscapePlugin::handlePluginThreadAsyncCall): If the plug-in is still running, run the function. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add new member function. * WebProcess/Plugins/Plugin.h: Make plug-in inherit from ThreadSafeRefCounted since plug-ins can potentially ref the plug-in from other threads. 2011-07-02 Anders Carlsson Fix Windows build. * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: (WebKit::NetscapePlugin::containingWindow): (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate): (WebKit::NetscapePlugin::platformPaint): (WebKit::NetscapePlugin::platformHandleMouseEvent): (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): 2011-07-02 Anders Carlsson Move the plug-in controller member variable up to the shared Plugin base class https://bugs.webkit.org/show_bug.cgi?id=63867 Reviewed by Sam Weinig. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): Remove m_pluginController. (WebKit::NetscapePlugin::invalidate): (WebKit::NetscapePlugin::userAgent): (WebKit::NetscapePlugin::loadURL): (WebKit::NetscapePlugin::setStatusbarText): (WebKit::NetscapePlugin::evaluate): (WebKit::NetscapePlugin::isPrivateBrowsingEnabled): (WebKit::NetscapePlugin::windowScriptNPObject): (WebKit::NetscapePlugin::pluginElementNPObject): (WebKit::NetscapePlugin::tryToShortCircuitInvoke): (WebKit::NetscapePlugin::cancelStreamLoad): (WebKit::NetscapePlugin::isAcceleratedCompositingEnabled): (WebKit::NetscapePlugin::proxiesForURL): (WebKit::NetscapePlugin::cookiesForURL): (WebKit::NetscapePlugin::setCookiesForURL): (WebKit::NetscapePlugin::getAuthenticationInfo): Use controller() instead of m_pluginController. (WebKit::NetscapePlugin::initialize): This doesn't take a PluginController parameter anymore. (WebKit::NetscapePlugin::destroy): No need to null out the plug-in controller. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Remove m_pluginController member variable. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::compositingRenderServerPort): (WebKit::NetscapePlugin::platformSetFocus): (WebKit::NetscapePlugin::windowFocusChanged): Use controller() instead of m_pluginController. * WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::Plugin): Initialize m_pluginController. (WebKit::Plugin::initialize): New function that initializes the plug-in controller and then calls the real virtual initialize member function. * WebProcess/Plugins/Plugin.h: Add m_pluginController member variable and a new initialize virtual member function that doesn't take a PluginController parameter. Make the "old" initialize member function set up the plug-in controller. (WebKit::Plugin::controller): This is now a simple getter. * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::PluginProxy): Remove m_pluginController. (WebKit::PluginProxy::pluginProcessCrashed): Use controller(), remove a bogus null check. (WebKit::PluginProxy::initialize): This doesn't take a PluginController parameter now. (WebKit::PluginProxy::destroy): No need to null out the plug-in controller member variable. (WebKit::PluginProxy::loadURL): (WebKit::PluginProxy::proxiesForURL): (WebKit::PluginProxy::cookiesForURL): (WebKit::PluginProxy::setCookiesForURL): (WebKit::PluginProxy::getAuthenticationInfo): (WebKit::PluginProxy::windowNPObjectID): (WebKit::PluginProxy::getPluginElementNPObject): (WebKit::PluginProxy::evaluate): (WebKit::PluginProxy::cancelStreamLoad): (WebKit::PluginProxy::cancelManualStreamLoad): (WebKit::PluginProxy::setStatusbarText): (WebKit::PluginProxy::setComplexTextInputEnabled): (WebKit::PluginProxy::update): Use controller() instead of m_pluginController. * WebProcess/Plugins/PluginProxy.h: Remove m_pluginController. 2011-07-01 Darin Adler Consider backing scale factor when setting up graphics layers https://bugs.webkit.org/show_bug.cgi?id=63848 Reviewed by Simon Fraser. * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: (WebKit::LayerTreeHostCA::initialize): Set contents scale on the non-composited content layer based on the backing scale factor. (WebKit::LayerTreeHostCA::createPageOverlayLayer): Set contents scale on the page overlay layer based on the backing scale factor. 2011-06-30 Brian Weinstein Reviewed by Darin Adler. WebKit2: DidFinishLoadForFrame is never called on iframes when loads are cancelled by willSendRequest https://bugs.webkit.org/show_bug.cgi?id=63753 When deciding a policy for a null request, call the callback that was passed to WebKit2 and say that we used the loader. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): 2011-07-01 Balazs Kelemen Reviewed by Andreas Kling. [X11][WK2] plugins/mouse-evets-fixedpos.html is failing because of broken event propagation https://bugs.webkit.org/show_bug.cgi?id=63239 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Revert the return value of NPP_HandleEvent because the plugin function returns with 0 if it handled the event. (WebKit::NetscapePlugin::platformHandleMouseEvent): (WebKit::NetscapePlugin::platformHandleWheelEvent): (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): (WebKit::NetscapePlugin::platformHandleKeyboardEvent): 2011-07-01 Mark Rowe Unreviewed due to fixing of a broken world. REGRESSION (r90163): WebKit2 bot is failing 100% of the tests. r90163 bumped the version of the WKBundlePageLoaderClient passed in by WebKitTestRunner from 0 to 1. This made it run in to the ad-hoc client version checking implemented directly in WKBundlePageSetPageLoaderClient, resulting in no client being set. After r90162 the ad-hoc checking is not necessary as the APIClient template takes care of the relevant version checks. * Shared/APIClient.h: (WebKit::APIClient::initialize): Fix a bug I noticed along the way: don't attempt to copy anything if the client version is newer than what we support. This matches the behavior of the ad-hoc version checking. * UIProcess/API/C/WKContext.cpp: (WKContextSetInjectedBundleClient): Drop the ad-hoc version checking. (WKContextSetHistoryClient): Ditto. (WKContextSetDownloadClient): Ditto. * UIProcess/API/C/WKCookieManager.cpp: (WKCookieManagerSetClient): Ditto. * UIProcess/API/C/WKGeolocationManager.cpp: (WKGeolocationManagerSetProvider): Ditto. * UIProcess/API/C/WKIconDatabase.cpp: (WKIconDatabaseSetIconDatabaseClient): Ditto. * UIProcess/API/C/WKPage.cpp: (WKPageSetPageContextMenuClient): Ditto. (WKPageSetPageFindClient): Ditto. (WKPageSetPageFormClient): Ditto. (WKPageSetPageLoaderClient): Ditto. (WKPageSetPagePolicyClient): Ditto. (WKPageSetPageResourceLoadClient): Ditto. (WKPageSetPageUIClient): Ditto. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetClient): Ditto. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetContextMenuClient): Ditto. (WKBundlePageSetEditorClient): Ditto. (WKBundlePageSetFormClient): Ditto. (WKBundlePageSetPageLoaderClient): Ditto. (WKBundlePageSetResourceLoadClient): Ditto. (WKBundlePageSetPolicyClient): Ditto. (WKBundlePageSetUIClient): Ditto. (WKBundlePageSetFullScreenClient): Ditto. 2011-06-30 Darin Adler Reviewed by Anders Carlsson. [WebKit2] Consider scale factor when allocating backing store https://bugs.webkit.org/show_bug.cgi?id=63766 This is the first step in considering scale factor. It considers scale factor for the primary backing store, not graphics layers, and for CG only. * Platform/cg/CGUtilities.cpp: (WebKit::paintImage): Added a scale factor argument. (WebKit::paintBitmapContext): Pass 1 for scale factor. * Platform/cg/CGUtilities.h: Updated for above. * Shared/ShareableBitmap.h: Added an overload of paint that can handle a scale factor. * Shared/UpdateInfo.cpp: (WebKit::UpdateInfo::encode): Encode scale factor. (WebKit::UpdateInfo::decode): Decode scale factor. * Shared/UpdateInfo.h: Added scale factor. * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::paint): Added the overload that can handle a scale factor. * UIProcess/BackingStore.cpp: (WebKit::BackingStore::create): Take a scale factor. (WebKit::BackingStore::BackingStore): Store the scale factor. (WebKit::BackingStore::incorporateUpdate): Consider the scale factor when asserting the size is correct. * UIProcess/BackingStore.h: Add a scale factor. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): Check the scale factor too when deciding whether to reuse a backing store. (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Pass in the scale factor when creating a backing store. * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::incorporateUpdate): Take the scale factor into account when painting. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Put the scale factor into the UpdateInfo. (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Ditto. (WebKit::DrawingAreaImpl::display): Take the scale factor into account when allocating the bitmap and creating a graphics context for it. 2011-06-30 Mark Rowe Fix the Windows build. * UIProcess/API/C/win/WKTextChecker.h: * UIProcess/API/C/win/WKView.h: * UIProcess/win/WebTextCheckerClient.h: * UIProcess/win/WebUndoClient.h: 2011-06-30 Mark Rowe Reviewed by Anders Carlsson. Teach APIClient to correctly handle multiple versions of a client interface. If a client struct is not the current version then we can't copy it via assignment since that will read past the end of the smaller, older struct. To deal with this APIClient needs to be aware of the sizes of the older client version structs so that it can copy only the appropriate amount of the struct. * Shared/APIClient.h: (WebKit::APIClient::initialize): Assign through to our client if the new in client is the latest version. If an older client version was passed then we zero out our client and memcpy the appropriate number of bytes in to it. This ensures that any new members in the client are initialized to 0. * Shared/APIClientTraits.cpp: * Shared/APIClientTraits.h: Client interfaces are the size of their struct unless otherwise stated. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Bump the version and add comments indicating which components belong to which versions. 2011-06-30 Mark Rowe Reviewed by Anders Carlsson. Make the APIClient template aware of the latest client interface version number. This will be used in an upcoming patch. * Shared/APIClient.h: * UIProcess/WebContextInjectedBundleClient.h: * UIProcess/WebCookieManagerProxyClient.h: * UIProcess/WebDatabaseManagerProxyClient.h: * UIProcess/WebDownloadClient.h: * UIProcess/WebFindClient.h: * UIProcess/WebFormClient.h: * UIProcess/WebGeolocationProvider.h: * UIProcess/WebHistoryClient.h: * UIProcess/WebIconDatabaseClient.h: * UIProcess/WebLoaderClient.h: * UIProcess/WebPageContextMenuClient.h: * UIProcess/WebPolicyClient.h: * UIProcess/WebResourceLoadClient.h: * UIProcess/WebUIClient.h: * WebProcess/InjectedBundle/InjectedBundleClient.h: * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h: * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h: * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h: * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: 2011-06-30 Mark Rowe Reviewed by Anders Carlsson. WebKit2 client interfaces should have constant declaring latest version. * UIProcess/API/C/WKContext.h: * UIProcess/API/C/WKCookieManager.h: * UIProcess/API/C/WKDatabaseManager.h: * UIProcess/API/C/WKGeolocationManager.h: * UIProcess/API/C/WKIconDatabase.h: * UIProcess/API/C/WKPage.h: * WebProcess/InjectedBundle/API/c/WKBundle.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: 2011-06-30 Anders Carlsson Build fix. * UIProcess/win/WebPopupMenuProxyWin.h: (WebKit::WebPopupMenuProxyWin::enclosingScrollableArea): 2011-06-30 Martin Robinson Reviewed by Anders Carlsson. [GTK] Crash observed with nspluginwrapper and flash https://bugs.webkit.org/show_bug.cgi?id=62249 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_InvalidateRect): Guard against null instances here. 2011-06-30 Mark Rowe Reviewed by Anders Carlsson. Reinstate WKSecurityOriginGetHost and WKSecurityOriginGetProtocol as wrappers around the correctly-named functions. They're needed for ABI compatibility. * Shared/API/c/WKSecurityOrigin.cpp: (WKSecurityOriginGetHost): (WKSecurityOriginGetProtocol): 2011-06-29 Darin Adler Reviewed by Dan Bernstein. [Mac] Use system cursors instead of custom bitmaps where possible https://bugs.webkit.org/show_bug.cgi?id=63679 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Added WKCursor. 2011-06-29 Darin Adler Reviewed by Anders Carlsson. [WebKit2] Crash loading page that adds/removes frame in DOMContentLoaded/loaded https://bugs.webkit.org/show_bug.cgi?id=63483 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createFrame): Added a check for null when creating a frame. Also added a check that was in the WebKit1 code, but not here. Strangely, the comment from the second check was still here, but not the code. 2011-06-28 Chang Shu Reviewed by Andreas Kling. [Qt][WK2] Random crashes in fast/frames/ tests https://bugs.webkit.org/show_bug.cgi?id=63459 Investigation on the crashes has revealed that sometimes, a frame could have been destroyed before it is removed from the hierachy in Qt WebKit2 UI process. The root cause lies in the fact that the order of the two contiguous asynchronous messages may not be respected on the receiving side. And it is Qt's implementation, which uses QTimer::startTimer(0), that causes the reverse order. This patch replaces the timer approach with QMetaObject::invokeMethod approach and no crash happens afterwards. * Platform/qt/WorkQueueQt.cpp: (WorkQueue::scheduleWork): 2011-06-28 Balazs Kelemen Reviewed by Kenneth Rohde Christiansen. [X11][WK2] X error with plugin tests https://bugs.webkit.org/show_bug.cgi?id=63520 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Never create a pixmap with (0,0) dimensions. (WebKit::NetscapePlugin::platformGeometryDidChange): (WebKit::NetscapePlugin::platformPaint): 2011-06-28 Balazs Kelemen Reviewed by Kenneth Rohde Christiansen. [X11][WK2] plugins/plugin-javascript-access fails https://bugs.webkit.org/show_bug.cgi?id=63464 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::getPluginInfo): Determine the name of the plugin. 2011-06-27 Yuta Kitamura Reviewed by Alexey Proskuryakov. [WebKit2] Add hixie76WebSocketProtocolEnabled flag to WebPreferences https://bugs.webkit.org/show_bug.cgi?id=63447 Make a new flag added in WebCore::Settings (useHixie76WebSocketProtocol) switchable from WebPage and WebPreferences. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetHixie76WebSocketProtocolEnabled): (WKPreferencesGetHixie76WebSocketProtocolEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2011-06-27 Jeff Miller Reviewed by Oliver Hunt. Web process always pauses on launch https://bugs.webkit.org/show_bug.cgi?id=63487 In the absence of the WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH environment variable, only pause the web process on launch if the shift, control, and alt keys are all held down. This regressed in r89685, which always caused the web process to pause if the shift and alt keys were not held down. * WebProcess/WebKitMain.cpp: (pauseProcessIfNeeded): Add some parentheses. 2011-06-27 Huang Dongsung Reviewed by Kenneth Rohde Christiansen. TiledBackingStore endlessly creates and destroys tiles due to an off-by-one error. https://bugs.webkit.org/show_bug.cgi?id=62422 REGRESSION(r77286): Remove bottomRight(). REGRESSION(r77312): Change the logic to get the bottom right point. REGRESSION(r77928): Cause off-by-one error in TiledBackingStore. REGRESSION(r78783): Cause off-by-one error in TiledDrawingAreaProxy. REGRESSION(r78785): Cause off-by-one error in TiledDrawingAreaProxy. If the viewport width equals the contents width, especially in the mobile device, TiledBackingStore endlessly creates and deletes the rightmost column and bottom row of tiles. In the detail, dropTilesOutsideRect() in TiledBackingStore::createTiles() deletes tiles and setTile(coordinate, Tile::create(this, coordinate)) creates tiles infinitely. Modified TiledDrawingAreaProxy also. * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::innerBottomRight): (WebKit::TiledDrawingAreaProxy::invalidate): (WebKit::TiledDrawingAreaProxy::paint): (WebKit::TiledDrawingAreaProxy::createTiles): 2011-06-26 Mark Rowe Reviewed by Dan Bernstein. Use a separate file name for Lion's WebKitSystemInterface. * Configurations/DebugRelease.xcconfig: 2011-06-26 Mark Rowe Rubber-stamped by Maciej Stachowiak. Work around an issue with sandbox.h. * WebProcess/mac/WebProcessMac.mm: 2011-06-26 Anders Carlsson Reviewed by Dan Bernstein. Don't use a Mutex for protecting access to the connection queue clients https://bugs.webkit.org/show_bug.cgi?id=63403 Make sure to only access the queue client vector from the connection work queue. This gets rid of a lock and ensures that adding/removing clients from callbacks works correctly. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::addQueueClient): (CoreIPC::Connection::removeQueueClient): (CoreIPC::Connection::addQueueClientOnWorkQueue): (CoreIPC::Connection::removeQueueClientOnWorkQueue): (CoreIPC::Connection::processIncomingMessage): * Platform/CoreIPC/Connection.h: 2011-06-25 Brent Fulgham Unreviewed build correction after r89426. * Shared/API/c/cairo/WKImageCairo.h: Declare cairo type as struct (in keeping with other declarations). * win/WebKit2.vcproj: Add new WKImageCairo.cpp file to WinCairo build. 2011-06-25 Brent Fulgham Unreviewed build correction after r89503. See http://trac.webkit.org/changeset/89503. The modifications to the WebKit2.def need to be mirrored in WebKit2CFLite.def. * win/WebKit2CFLite.def: Add new exported symbol for isPreloaded. 2011-06-24 Brent Fulgham Unreviewed build correction after r89426. See http://trac.webkit.org/changeset/89426. The new WebKit2 header file (WKImageCairo.h) is needed. * win/WebKit2Generated.make: Make sure to copy the WKImageCairo.h header file to the WebKit2 API directory after building. 2011-06-24 Anders Carlsson Reviewed by John Sullivan. Drag-and-drop tab in same window makes web process falsely report unresponsiveness https://bugs.webkit.org/show_bug.cgi?id=63369 If the view becomes invisible, stop the responsiveness timer, because we might not get any messages that will cause it to stop (such as painting notifications since we don't paint when we're not visible). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewStateDidChange): 2011-06-24 Anders Carlsson Reviewed by Kevin Decker. Not possible for plug-ins to override the internal PDF viewer https://bugs.webkit.org/show_bug.cgi?id=63356 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Pass the entire resource response to shouldUseCustomRepresentationForResponse. * WebProcess/WebProcess.cpp: (WebKit::canPluginHandleResponse): Ask for the plug-in path for a plug-in that can handle the given resource response. If we fail to send the message, or if the path comes back empty, we assume that there's no plug-in that can handle it. (WebKit::WebProcess::shouldUseCustomRepresentationForResponse): If the response MIME type is in the m_mimeTypesWithCustomRepresentations map, check if there's a plug-in that can handle the given response. If that is the case, it should have precedence over the custom representation. * WebProcess/WebProcess.h: Rename shouldUseCustomRepresentationForMIMEType to shouldUseCustomRepresentationForResponse. 2011-06-24 Adam Roben Mac build fix after r89685 * WebProcess/WebKitMain.cpp: Make a Windows-only #include really be Windows-only. 2011-06-24 Adam Roben Make the web process pause dialog look better on Vista/7 and robust against executable renames Fixes Web process pause dialog looks bad on Vista/7 Reviewed by Brian Weinstein. * WebProcess/WebKitMain.cpp: (pauseProcessIfNeeded): Moved code to show the pause dialog here from WebKitMain. We now fetch the executable name using ::GetModuleFileNameW instead of hard-coding it. The string we pass to ::MessageBoxW no longer has embedded newlines, which improves its appearance on Vista/7 (which were doing their own wrapping in addition to our newlines). Appearance is different but fine on XP. Note that the message text now contains the "[_debug].exe" suffix when referring to the process; that is different from before but seems fine. (WebKitMain): Call the new function. 2011-06-24 Dominic Cooney Reviewed by Dimitri Glazkov. Convert shadow DOM-related tests to use window.internals https://bugs.webkit.org/show_bug.cgi?id=61671 Remove shadow DOM-related methods from WebKit2 API. These are not required any more. * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: * win/WebKit2.def: Re-exports for symbols used by WebCoreTestSupport. * win/WebKit2CFLite.def: Same for Cairo. 2011-06-24 Carlos Garcia Campos Reviewed by Martin Robinson. [X11] Do not call NPP_SetWindow with a null window handle on destroy https://bugs.webkit.org/show_bug.cgi?id=62981 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::destroy): 2011-06-23 Jamie Cooley Reviewed by Andreas Kling. [Qt][WK2] Qt port needs load-from-history implementation https://bugs.webkit.org/show_bug.cgi?id=57784 Created "random access" BackForwardHistory public API method, QWKHistory::goToItemAt(int) * UIProcess/API/qt/qwkhistory.cpp: (QWKHistoryItem::QWKHistoryItem::itemRef): Added access method to fetch WKBackForwardListRef (QWKHistoryPrivate::QWKHistoryPrivate): (QWKHistoryPrivate::createHistory): Updated createHistory method and QWKHistoryPrivate constructor to take a pointer to the owning QWKPage in addition to the WebBackForwardList. This will be saved so that the new API can ask the page to load a HistoryItem. (QWKHistory::goToItemAt): New Public API. Like QWKHistory::itemAt, callee gives an integer. <0 means jump back to that item, 0 means the current item, >0 means jump forwards. If an out-of-range index is given, the function silently fails. This will invoke WKPageGoToBackForwardListItem. * UIProcess/API/qt/qwkhistory.h: * UIProcess/API/qt/qwkhistory_p.h: * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::QWKPagePrivate): Update instantiation of QWKHistory to include QWKPage. * UIProcess/API/qt/tests/qwkhistory/tst_qwkhistory.cpp: (tst_QWKHistory::historyForwardBackTest_data): (tst_QWKHistory::historyForwardBackTest): Add test content for the new API 2011-06-23 Yael Aharon Reviewed by Andreas Kling. [Qt] [WK2] Add drag and drop support https://bugs.webkit.org/show_bug.cgi?id=62838 Added missing pieces to add support for DnD in QtWebKit. * Shared/qt/ArgumentCodersQt.cpp: Added. (CoreIPC::::encode): (CoreIPC::::decode): * Shared/qt/ArgumentCodersQt.h: Added. Encode DragData so that we can transfer the QMimeData between the WebProcess and the UI Process. I encode the DragData and not QMimeData directly because we don't have an associated QMimeData for each message. * UIProcess/API/qt/qgraphicswkview.cpp: (QGraphicsWKView::init): (QGraphicsWKView::dragEnterEvent): (QGraphicsWKView::dragLeaveEvent): (QGraphicsWKView::dragMoveEvent): (QGraphicsWKView::dropEvent): * UIProcess/API/qt/qgraphicswkview.h: * UIProcess/API/qt/qwkpage.cpp: (dropActionToDragOperation): (dragOperationToDropAction): (dragOperationToDropActions): (QWKPagePrivate::dragEnterEvent): (QWKPagePrivate::dragLeaveEvent): (QWKPagePrivate::dragMoveEvent): (QWKPagePrivate::dropEvent): (QWKPagePrivate::startDrag): Send drag-and-drop related events to WebKit. * UIProcess/API/qt/qwkpage_p.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::performDragControllerAction): (WebKit::WebPageProxy::startDrag): * UIProcess/WebPageProxy.h: Start the HTML5 drag operation from the UI process, because QDrag needs a handle to the QWidget under the mouse. * UIProcess/WebPageProxy.messages.in: Add message type that takes DragData as a parameter. * WebKit2.pro: * WebProcess/WebCoreSupport/WebDragClient.cpp: * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp: Added. (WebKit::convertImageToBitmap): (WebKit::WebDragClient::startDrag): Send a message to the UI process to start the HTML5 drag operation. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Add message type that takes DragData as a parameter. 2011-06-23 Carlos Garcia Campos Reviewed by Martin Robinson. [UNIX] Fix compile warnings in NetscapePluginX11.cpp https://bugs.webkit.org/show_bug.cgi?id=63249 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::setXButtonEventFields): (WebKit::NetscapePlugin::platformHandleMouseEvent): 2011-06-22 Carlos Garcia Campos Reviewed by Martin Robinson. [UNIX] Increment/decrement module load conter in NetscapePluginModule::getPluginInfo() https://bugs.webkit.org/show_bug.cgi?id=63150 Since the method is static, we are using NetscapePluginModule::getOrCreate() to get the module. If it's created, the load counter is 0, so that when module is deleted, shutdown() hasn't been called and the destructor crashes in the assert that checks the module has been removed from the initialized module list. We should increment the load counter, and decrement it before getPluginInfo() returns, so that decrementLoadCount() will call shutdown() if counter is 0 and the module will be deleted from the list. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::getPluginInfo): 2011-06-22 Carlos Garcia Campos Reviewed by Martin Robinson. [UNIX] Check for npp directly when getting X display in NetscapeBrowserFuncs https://bugs.webkit.org/show_bug.cgi?id=63149 NetscapePlugin::fromNPP() shouldn't be called with a null npp, it contains an assert that make it crash when building with debug enabled. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): 2011-06-22 Nate Chapin Reviewed by Adam Barth. Add win symbols for new window.internals functionality. https://bugs.webkit.org/show_bug.cgi?id=62066 * win/WebKit2.def: 2011-06-22 Balazs Kelemen Reviewed by Andreas Kling. [Qt][WK2] Set up plugin tests https://bugs.webkit.org/show_bug.cgi?id=63066 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createPlugin): Force windowless mode for the test plugin because we don't support windowed plugins yet. 2011-06-22 Geoffrey Garen Reviewed by Oliver Hunt. Removed unnecessary #include . * PluginProcess/mac/PluginProcessMainMac.mm: * Shared/WebMemorySampler.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebProcessProxy.cpp: * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: * WebProcess/mac/WebProcessMac.mm: Added #include back to places where it was needed. 2011-06-22 Balazs Kelemen Unreviewed build fix after r89461. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformSetFocus): Forgot to name the parameter, fix it. 2011-06-22 Balazs Kelemen Reviewed by Darin Adler. [X11][WK2] Implement NetscapePlugin::platformSetFocus https://bugs.webkit.org/show_bug.cgi?id=63154 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformSetFocus): Implement focus setting based on the WebKit1 path. 2011-06-22 Eunmi Lee Reviewed by Martin Robinson. Change GtkWidgetBackingStore.h to WidgetBackingStore.h in order to use in the EFL port. https://bugs.webkit.org/show_bug.cgi?id=62848 Change GtkWidgetBackingStore to WidgetBackingStore in the BackingStore.h and gtk/BackingStoreGtk.cpp. * UIProcess/BackingStore.h: * UIProcess/gtk/BackingStoreGtk.cpp: (WebKit::BackingStore::incorporateUpdate): 2011-06-22 Adam Roben Don't use an alpha channel when drawing the web page on Windows We never use the alpha channel in the end anyway (because we never render into a layered window, which is the only kind of window that supports alpha). And using an alpha channel is tricky to get right since GDI doesn't support alpha (and often writes 0x0 into the alpha channel). Fixes REGRESSION (r88978): Text inside form controls looks really awful on Windows XP Reviewed by Anders Carlsson. * WebProcess/WebPage/win/DrawingAreaImplWin.cpp: (WebKit::DrawingAreaImpl::createGraphicsContext): Specify false for the hasAlpha parameter to the GraphicsContext constructor. 2011-06-22 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Remove Connection::setShouldCloseConnectionOnProcessTermination() https://bugs.webkit.org/show_bug.cgi?id=61627 Don't use Connection::setShouldCloseConnectionOnProcessTermination() for the GTK port, when the process finishes the connection is closed and the other process is already notified. We still need to monitor the child process so that it doesn't become a zombie when it dntabi * Platform/CoreIPC/Connection.h: * Platform/CoreIPC/unix/ConnectionUnix.cpp: * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::childFinishedFunction): (WebKit::ProcessLauncher::launchProcess): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didFinishLaunching): 2011-06-20 Dimitri Glazkov Reviewed by Kent Tamura. FileChooser should be only created when we need to choose files. https://bugs.webkit.org/show_bug.cgi?id=63039 * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::runOpenPanel): Changed to use settings. 2011-06-22 Martin Robinson Reviewed by Adam Roben. [GTK] Implement pixel dump support for WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=58242 * GNUmakefile.am: Added new Cairo specific image handling files to the build. * Shared/API/c/cairo/WKImageCairo.cpp: Copied from Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp. (WKImageCreateCairoSurface): Added (WKImageCreateFromCairoSurface): Added * Shared/API/c/cairo/WKImageCairo.h: Copied from Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp. 2011-06-21 MORITA Hajime Unreviewed, rolling out r89401 and r89403. http://trac.webkit.org/changeset/89401 http://trac.webkit.org/changeset/89403 https://bugs.webkit.org/show_bug.cgi?id=62970 Breaks mac build and mistakenly enables the spellcheck API * Configurations/FeatureDefines.xcconfig: 2011-06-20 MORITA Hajime Reviewed by Kent Tamura. Spellcheck API should be build-able. https://bugs.webkit.org/show_bug.cgi?id=62970 No new tests, changing only build related files * Configurations/FeatureDefines.xcconfig: 2011-06-21 Jer Noble Reviewed by Simon Fraser. REGRESSION: Fullscreen videos are broken (affects embedded vimeo, vimeo.com, and apple.com) https://bugs.webkit.org/show_bug.cgi?id=63098 Force a repaint after completing entering full-screen mode only after the notification is sent for the QTMovie to tear down its layer. Then, the QTMovie will build up its layer again during the repaint. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): 2011-06-21 Yael Aharon Reviewed by Kenneth Rohde Christiansen. [Qt] Add an internal API for accessing the QGraphicsView. https://bugs.webkit.org/show_bug.cgi?id=63095 * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::ownerWidget): * UIProcess/API/qt/qwkpage_p.h: 2011-06-21 Lukasz Slachciak Reviewed by Sam Weinig. [GTK] [WK2] WebKit2 build break fixes. https://bugs.webkit.org/show_bug.cgi?id=62950 When building WebKit2 for GTK there are few build breaks connected with missing include files. * Platform/unix/SharedMemoryUnix.cpp: * Shared/gtk/WebCoreArgumentCodersGtk.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: 2011-06-20 Martin Robinson Reviewed by Eric Seidel. [GTK] [WebKit2] Disable GDK double buffering https://bugs.webkit.org/show_bug.cgi?id=62770 Explicitly disable GDK double-buffering when instantiating a WebKit2 view widget. This prevents one extra pixmap copy. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkit_web_view_base_init): 2011-06-20 Carlos Garcia Campos Reviewed by Martin Robinson. [UNIX] Don't use WebCore::PluginPackage to get plugin information https://bugs.webkit.org/show_bug.cgi?id=62899 The problem is that both PluginPackage in WebCore and NetscapePluginModule in webkit2 install their own netscape browser functions and that can cause conflicts in some situations. * Shared/Plugins/Netscape/NetscapePluginModule.h: Add helper function to set plugin mime type descriptions. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::setMIMEDescription): Helper function to set plugin mime type descriptions. (WebKit::NetscapePluginModule::getPluginInfo): Use NetscapePluginModule instead of PluginPackage. * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: Remove unneeded header include. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Do not try to get the XDisplay if the plugin doesn't have a view. It fixes a crash with flash plugin and matches WebCore. 2011-06-20 Carlos Garcia Campos Reviewed by Xan Lopez. [GTK] Split libWebCore into two libWebCore and libWebCoreGtk https://bugs.webkit.org/show_bug.cgi?id=60539 * GNUmakefile.am: Link to libWebCoreGtk.la too. 2011-06-19 MORITA Hajime Unreviewed wincairo build fix. * win/WebKit2CFLite.def: 2011-06-19 MORITA Hajime Reviewed by Dimitri Glazkov. The internals object should have createShadowContentElement() https://bugs.webkit.org/show_bug.cgi?id=62432 * win/WebKit2.def: Added some more symbols necessary for window.internals to function to the global symbol list. 2011-06-18 Dimitri Glazkov Reviewed by Darin Adler. Separate concerns of loading file icons and choosing files. https://bugs.webkit.org/show_bug.cgi?id=62931 * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::loadIconForFiles): Renamed. * WebProcess/WebCoreSupport/WebChromeClient.h: 2011-06-18 Eunmi Lee Reviewed by Sam Weinig. [EFL][WK2] add WebKit2 EFL port's NativeWebMouseEvent, NativeWebWheelEvent and NativeWebKeyboardEvent https://bugs.webkit.org/show_bug.cgi?id=61993 Add native mouse and keyboard event classes to convert EFL's events to NativeWebEvent. * Shared/NativeWebKeyboardEvent.h: (WebKit::NativeWebKeyboardEvent::nativeEvent): * Shared/NativeWebMouseEvent.h: (WebKit::NativeWebMouseEvent::nativeEvent): * Shared/NativeWebWheelEvent.h: (WebKit::NativeWebWheelEvent::nativeEvent): * Shared/efl/NativeWebKeyboardEventEfl.cpp: Added. (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): * Shared/efl/NativeWebMouseEventEfl.cpp: Added. (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * Shared/efl/NativeWebWheelEventEfl.cpp: Added. (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): * Shared/efl/WebEventFactory.cpp: Added. (WebKit::modifiersForEvent): (WebKit::buttonForEvent): (WebKit::clickCountForEvent): (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/efl/WebEventFactory.h: Added. 2011-06-18 Eunmi Lee Reviewed by Sam Weinig. [EFL][WK2] Add missing functions of EFL port's PageClientImpl https://bugs.webkit.org/show_bug.cgi?id=62711 Three functions are added in the PageClient.h, so add them to the EFL's PageClientImpl. * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::screenToWindow): (WebKit::PageClientImpl::enterAcceleratedCompositingMode): (WebKit::PageClientImpl::exitAcceleratedCompositingMode): * UIProcess/API/efl/PageClientImpl.h: 2011-06-17 Brent Fulgham [WinCairo] Unreviewed build fix after r89060 and r89161. * Shared/win/WebCoreArgumentCodersWin.cpp: WinCairo build fixes (1) Include proper header files for WinCairo build (2) Exclude unused namespace declaration 2011-06-17 Anders Carlsson Reviewed by Sam Weinig. Remove unused ArgumentEncoder and ArgumentDecoder functions https://bugs.webkit.org/show_bug.cgi?id=62909 * Platform/CoreIPC/ArgumentDecoder.cpp: * Platform/CoreIPC/ArgumentDecoder.h: * Platform/CoreIPC/ArgumentEncoder.cpp: * Platform/CoreIPC/ArgumentEncoder.h: * Shared/win/PlatformCertificateInfo.cpp: (WebKit::PlatformCertificateInfo::encode): (WebKit::PlatformCertificateInfo::decode): Replace calls to encodeBytes/decodeBytes with encodeVariableLengthByteArray/decodeVariableLengthByteArray. 2011-06-17 Anders Carlsson Yet another Qt build fix attempt. * UIProcess/API/qt/ClientImpl.cpp: * UIProcess/API/qt/qgraphicswkview.cpp: * UIProcess/API/qt/qwkpage.cpp: * UIProcess/API/qt/qwkpage_p.h: 2011-06-17 Anders Carlsson Another attempt at fixing the Qt build. * UIProcess/API/qt/ClientImpl.cpp: * UIProcess/API/qt/qgraphicswkview.cpp: * UIProcess/API/qt/qwkcontext.cpp: 2011-06-17 Anders Carlsson Fix Qt build. * WebProcess/ResourceCache/WebResourceCacheManager.cpp: 2011-06-17 Anders Carlsson Windows build fix. * UIProcess/win/WebView.cpp: 2011-06-17 Anders Carlsson Reviewed by Sam Weinig. Move the remaining WebCore argument coders to the .cpp file https://bugs.webkit.org/show_bug.cgi?id=62874 Also add includes that other files need that used to be provided by WebCoreArgumentCoders.h, and get rid of the LAZY_NATIVE_CURSOR #if check because all WebKit2 platforms now support it. * Shared/ContextMenuState.h: * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/WebCoreArgumentCoders.h: * Shared/gtk/WebCoreArgumentCodersGtk.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/qt/WebCoreArgumentCodersQt.cpp: * UIProcess/API/mac/PDFViewController.mm: * UIProcess/PageClient.h: * UIProcess/WebIconDatabase.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/mac/WKFullScreenWindowController.mm: 2011-06-17 Chang Shu Reviewed by Anders Carlsson. [Qt] [WK2] Debug info leaks to stdout from plugins in Qt WebKit2 layout tests https://bugs.webkit.org/show_bug.cgi?id=61940 Tempararily supress stdout during getPluginInfo during which debug info was leaked out. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::StdoutRedirect::StdoutRedirect): (WebKit::StdoutRedirect::~StdoutRedirect): (WebKit::NetscapePluginModule::getPluginInfo): 2011-06-17 Anders Carlsson Reviewed by Andreas Kling. Remove WebCore:: qualifier from names in WebPageProxy. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::dragEntered): (WebKit::WebPageProxy::dragUpdated): (WebKit::WebPageProxy::dragExited): (WebKit::WebPageProxy::performDrag): (WebKit::WebPageProxy::performDragControllerAction): (WebKit::WebPageProxy::dragEnded): (WebKit::WebPageProxy::setResizesToContentsUsingLayoutSize): (WebKit::WebPageProxy::unableToImplementPolicy): (WebKit::WebPageProxy::didChangeContentsSize): (WebKit::WebPageProxy::didFindZoomableArea): (WebKit::WebPageProxy::findZoomableAreaForPoint): (WebKit::WebPageProxy::setComposition): (WebKit::WebPageProxy::checkTextOfParagraph): (WebKit::WebPageProxy::checkGrammarOfString): (WebKit::WebPageProxy::setCursor): (WebKit::WebPageProxy::computedPagesCallback): (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame): (WebKit::WebPageProxy::didReceiveAuthenticationChallenge): (WebKit::WebPageProxy::showCorrectionPanel): (WebKit::WebPageProxy::dismissCorrectionPanel): (WebKit::WebPageProxy::dismissCorrectionPanelSoon): (WebKit::WebPageProxy::recordAutocorrectionResponse): 2011-06-17 Anders Carlsson Reviewed by Darin Adler. Fix message generator to include headers for all types https://bugs.webkit.org/show_bug.cgi?id=62870 Previously, if we found an argument coder header for a type, we'd assume that that header includes the necessary headers for the type. * Scripts/webkit2/messages.py: * Scripts/webkit2/messages_unittest.py: 2011-06-17 Chang Shu Reviewed by Andreas Kling. [Qt] [WK2] Support undo/redo in MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=62809 * UIProcess/API/qt/qwkpage.cpp: (QWKPage::action): * UIProcess/API/qt/qwkpage.h: 2011-06-17 Carlos Garcia Campos Unreviewed. Fix WebKit2 GTK build after r89060. * Shared/gtk/WebCoreArgumentCodersGtk.cpp: (CoreIPC::::encode): 2011-06-16 Anders Carlsson Reviewed by Sam Weinig. Get rid of CoreIPC::In and CoreIPC::Out from some argument coders https://bugs.webkit.org/show_bug.cgi?id=62832 * Shared/OriginAndDatabases.cpp: (WebKit::OriginAndDatabases::encode): (WebKit::OriginAndDatabases::decode): * Shared/SecurityOriginData.cpp: (WebKit::SecurityOriginData::encode): (WebKit::SecurityOriginData::decode): * Shared/WebKeyboardEvent.cpp: (WebKit::WebKeyboardEvent::encode): (WebKit::WebKeyboardEvent::decode): * Shared/WebOpenPanelParameters.cpp: (WebKit::WebOpenPanelParameters::Data::encode): (WebKit::WebOpenPanelParameters::Data::decode): * Shared/WebPreferencesStore.cpp: (WebKit::WebPreferencesStore::encode): (WebKit::WebPreferencesStore::decode): 2011-06-16 Anders Carlsson Reviewed by Sam Weinig. Cleanup ResourceRequest, ResourceResponse and ResourceError argument coders https://bugs.webkit.org/show_bug.cgi?id=62803 Get rid of the free encode/decode functions and move the template specializations to their respective implementation files instead. * Shared/WebCoreArgumentCoders.h: * Shared/gtk/WebCoreArgumentCodersGtk.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/qt/WebCoreArgumentCodersQt.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/win/WebCoreArgumentCodersWin.cpp: (CoreIPC::::encode): (CoreIPC::::decode): 2011-06-16 Chang Shu Reviewed by Sam Weinig. [Qt] [WK2] Qt WebKit2 needs undo/redo support https://bugs.webkit.org/show_bug.cgi?id=62637 Implement undo/redo support for document.execCommand(). * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::QWKPagePrivate): (QWKPagePrivate::~QWKPagePrivate): (QWKPagePrivate::registerEditCommand): (QWKPagePrivate::clearAllEditCommands): (QWKPagePrivate::canUndoRedo): (QWKPagePrivate::executeUndoRedo): * UIProcess/API/qt/qwkpage_p.h: * UIProcess/qt/WebUndoCommandQt.cpp: Added. (WebUndoCommandQt::WebUndoCommandQt): (WebUndoCommandQt::~WebUndoCommandQt): (WebUndoCommandQt::redo): (WebUndoCommandQt::undo): * UIProcess/qt/WebUndoCommandQt.h: Added. (WebUndoCommandQt::inUndoRedo): * WebKit2.pro: 2011-06-16 Anders Carlsson Fix build. * Shared/WebCoreArgumentCoders.cpp: * Shared/WebCoreArgumentCoders.h: 2011-06-15 Anders Carlsson Reviewed by Sam Weinig. Move more argument coders to WebCoreArgumentCoders and clean up the animation coders https://bugs.webkit.org/show_bug.cgi?id=62760 * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): (CoreIPC::encodeOperation): (CoreIPC::decodeOperation): (CoreIPC::encodeBoolAndValue): (CoreIPC::encodeBoolAndEnumValue): (CoreIPC::decodeBoolAndValue): (CoreIPC::decodeBoolAndEnumValue): * Shared/WebCoreArgumentCoders.h: * Shared/mac/ArgumentCodersMac.h: * Shared/mac/ArgumentCodersMac.mm: * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::encode): (CoreIPC::::decode): 2011-06-16 Sangyong Park Reviewed by Martin Robinson. [GTK] Implement ResourceRequest and ResourceResponse encoder/decoder https://bugs.webkit.org/show_bug.cgi?id=55934 * Shared/gtk/WebCoreArgumentCodersGtk.cpp: (CoreIPC::encodeResourceRequest): (CoreIPC::decodeResourceRequest): (CoreIPC::encodeResourceResponse): (CoreIPC::decodeResourceResponse): 2011-06-16 Carlos Garcia Campos Reviewed by Xan Lopez. [GTK] Remove support for GTK+2 in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=62794 * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseRealize): (webkitWebViewBaseDraw): (webkitWebViewBaseQueryTooltip): (webkit_web_view_base_class_init): (webkitWebViewBaseSetTooltipText): * UIProcess/gtk/WebContextMenuProxyGtk.cpp: (WebKit::WebContextMenuProxyGtk::menuPositionFunction): * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::moduleMixesGtkSymbols): 2011-06-15 Adam Barth Reviewed by Eric Seidel. Remove ScriptController::setAllowPopupsFromPlugin https://bugs.webkit.org/show_bug.cgi?id=62706 * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::performJavaScriptURLRequest): (WebKit::PluginView::evaluate): 2011-06-15 Ryuan Choi Rubber stamped by Eric Seidel. [CMAKE][WK2] Add an option to build webkit2. https://bugs.webkit.org/show_bug.cgi?id=62260 Add script to build WebKit2 using CMake. * CMakeLists.txt: Added. 2011-06-15 John Sullivan Reviewed by Sam Weinig. WKSecurityOriginGetProtocol and WKSecurityOriginGetHost are named wrong because they return copied strings * Shared/API/c/WKSecurityOrigin.cpp: (WKSecurityOriginCopyProtocol): Renamed to use "Copy" instead of "Get" because it returns a copy. (WKSecurityOriginCopyHost): Ditto. * Shared/API/c/WKSecurityOrigin.h: Updated declarations. 2011-06-14 Jon Honeycutt REGRESSION(78201): Windowless Flash plug-ins are transparent on some sites https://bugs.webkit.org/show_bug.cgi?id=62690 Reviewed by Ada Chan. The bug arises when mixing CoreGraphics and GDI. When we create a Windows bitmap for a windowless plug-in to draw into, we first fill it with "clear", or all 0s. If the plug-in uses GDI to draw, the GDI calls will ignore the alpha channel, and if we then use CG to blend this bitmap onto the GraphicsContext for the rest of the page, CG will treat the 0-filled alpha channel as being transparent. To fix this, on Windows, use a GDI-backed GraphicsContext to paint the page in the WebProcess, and use GDI to blit from the UpdateInfo to the backing store in the UI process. * Platform/SharedMemory.h: (WebKit::SharedMemory::handle): Return the handle for the memory. * Shared/ShareableBitmap.h: Declared windowsContext() to return a HDC with the bitmap selected into it. Added members to store the HDC and the HBITMAP. * Shared/win/ShareableBitmapWin.cpp: Added. (WebKit::ShareableBitmap::windowsContext): Get the screen DC, and create a compatible DC from it. Create a DIB section backed by the shared memory, select it into the context, and return it. * UIProcess/win/BackingStoreWin.cpp: (WebKit::BackingStore::incorporateUpdate): Use GDI to blit from the update info's bitmap into the backing store bitmap. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::createGraphicsContext): Return a GraphicsContext from the ShareableBitmap. (WebKit::DrawingAreaImpl::display): Call createGraphicsContext(), and pass the ShareableBitmap. * WebProcess/WebPage/DrawingAreaImpl.h: Declare createGraphicsContext(), which on Windows will create a GDI-backed GraphicsContext. * WebProcess/WebPage/win/DrawingAreaImplWin.cpp: Added. (WebKit::DrawingAreaImpl::createGraphicsContext): Get a Windows context for the bitmap, and create and return a new GraphicsContext using the DC. * win/WebKit2.vcproj: Added new files. 2011-06-15 Anders Carlsson Reviewed by Sam Weinig. Move more argument coders to WebCoreArgumentCoders.cpp https://bugs.webkit.org/show_bug.cgi?id=62755 * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::decode): (CoreIPC::::encode): (CoreIPC::encodeImage): (CoreIPC::decodeImage): * Shared/WebCoreArgumentCoders.h: 2011-06-15 Anders Carlsson Reviewed by Darin Adler. Add ShareableBitmap::createImage and get rid of WebCoreArgumentCodersCG.cpp https://bugs.webkit.org/show_bug.cgi?id=62742 * Shared/ShareableBitmap.h: Move createImage out of the #if PLATFORM(QT) section. * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::decodeImage): Call ShareableBitmap::createImage. * Shared/WebCoreArgumentCoders.h: remove createImage function declaration. * Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::createImage): Add implementation. * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::createGraphicsContext): (WebKit::ShareableBitmap::createImage): Move createImage implementation from WebCoreArgumentCodersCG.cpp here. * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: Update projects. 2011-06-15 Anders Carlsson Reviewed by Alexey Proskuryakov. Move some argument coders to WebCoreArgumentCoders.cpp https://bugs.webkit.org/show_bug.cgi?id=62739 * GNUmakefile.am: * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/WebCoreArgumentCoders.h: * WebKit2.pro: 2011-06-15 Anders Carlsson Reviewed by Sam Weinig. Fix possible null dereference in webSecKeychainItemCreateFromContentOnMainThread https://bugs.webkit.org/show_bug.cgi?id=62736 * WebProcess/mac/KeychainItemShimMethods.mm: (WebKit::webSecKeychainItemCreateFromContentOnMainThread): SecKeychainItemCreateFromContent can potentially return a null keychain item, so add a null check before trying to retain it. 2011-06-15 Anders Carlsson Reviewed by Dan Bernstein. Ignore responsiveness timer callbacks on closed pages https://bugs.webkit.org/show_bug.cgi?id=62735 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): Use nullptr instead of clear. (WebKit::WebPageProxy::processDidBecomeUnresponsive): Return early if the page isn't valid. (WebKit::WebPageProxy::processDidBecomeResponsive): Ditto. (WebKit::WebPageProxy::updateBackingStoreDiscardableState): Assert that the page is valid. 2011-06-15 Sheriff Bot Unreviewed, rolling out r88907. http://trac.webkit.org/changeset/88907 https://bugs.webkit.org/show_bug.cgi?id=62732 See comment #15 by Nikolas Zimmermann on bug 62527 regarding the deprecation of makeString() (Requested by acidx on #webkit). * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::standardUserAgent): 2011-06-15 Csaba Osztrogonác [Qt][WK2] Unreviewed rolling out r88799, because it made web process crash. * Scripts/webkit2/messages.py: * Shared/LayerTreeContext.h: * Shared/qt/LayerTreeContextQt.cpp: (WebKit::LayerTreeContext::LayerTreeContext): (WebKit::LayerTreeContext::~LayerTreeContext): (WebKit::LayerTreeContext::encode): (WebKit::LayerTreeContext::decode): (WebKit::LayerTreeContext::isEmpty): (WebKit::operator==): * UIProcess/DrawingAreaProxy.h: * UIProcess/DrawingAreaProxy.messages.in: * WebKit2.pro: * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::collectCompositingInfoForThisLayer): * WebProcess/WebPage/LayerTreeHost.cpp: (WebKit::LayerTreeHost::create): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: * WebProcess/WebPage/qt/LayerTreeHostQt.h: Removed. 2011-06-14 Eunmi Lee Reviewed by Sam Weinig. [EFL][WK2] Change string operation to makeString() https://bugs.webkit.org/show_bug.cgi?id=62527 Use makeString() because it is better than creating individual strings and concatenating them. * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::standardUserAgent): 2011-06-14 Sam Weinig Reviewed by Simon Fraser. Follow up for Callers should be robust against WebImage::create() returning an image with a null snapshot https://bugs.webkit.org/show_bug.cgi?id=62666 * Shared/API/c/cg/WKImageCG.cpp: (WKImageCreateCGImage): (WKImageCreateFromCGImage): Don't null check the arguments (as per our API design) or the direct result of WebImage::create. * Shared/UserMessageCoders.h: (WebKit::UserMessageEncoder::baseEncode): Remove redundant check and make not being able to create a handle the same as not being backed by shareable memory. 2011-06-14 John Sullivan Reviewed by Ada Chan. windowsKeyCodeForKeyEvent should be robust against NSFlagsChanged events * Shared/mac/WebEventFactory.mm: (WebKit::windowsKeyCodeForKeyEvent): Explicitly check for NSFlagsChanged before calling -charactersIgnoringModifiers, since charactersIgnoringModifiers throws an exception for NSFlagsChanged events. 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Use new byte array encoding/decoding functions for WTF argument coders https://bugs.webkit.org/show_bug.cgi?id=62682 * Platform/CoreIPC/ArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): Use the new functions for the string argument coders. * Platform/CoreIPC/ArgumentCoders.h: (CoreIPC::SimpleArgumentCoder::encode): (CoreIPC::SimpleArgumentCoder::decode): Use the new functions to avoid encoding/decoding the size when it's known at decode time. * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::roundUpToAlignment): Assert that the alignment is a power of 2. (CoreIPC::decodeFixedLengthData): Alignment comes before the size. * UIProcess/cf/WebBackForwardListCF.cpp: (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Add a FIXME about now using the internal CoreIPC encoding format here. * UIProcess/cf/WebPageProxyCF.cpp: Bump the current session state data version number. 2011-06-14 No'am Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] Implement accelerated compositing on WK2 Qt port https://bugs.webkit.org/show_bug.cgi?id=56935 Expose viewportVisibleRect(), so that we can detect which parts of a texture actually need to be uploaded. Together with Viatcheslav Ostapenko. * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::viewportVisibleRect): * UIProcess/API/qt/qwkpage_p.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.h: * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::viewportVisibleRect): 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Start using the new encode/decode functions https://bugs.webkit.org/show_bug.cgi?id=62676 * Platform/CoreIPC/DataReference.cpp: (CoreIPC::DataReference::encode): Use encodeVariableLengthByteArray. * Shared/UserMessageCoders.h: (WebKit::UserMessageEncoder::baseEncode): Use encodeVariableLengthByteArray and the new dataReference accessors. (WebKit::UserMessageDecoder::baseDecode): Use decodeVariableLengthByteArray. * Shared/WebData.h: (WebKit::WebData::dataReference): Return a reference to the data. * Shared/WebSerializedScriptValue.h: (WebKit::WebSerializedScriptValue::dataReference): Ditto. * Shared/cf/ArgumentCodersCF.cpp: (CoreIPC::encode): Use encodeVariableLengthByteArray. * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::Handle::encode): Use encodeVariableLengthByteArray. * WebProcess/WebPage/DecoderAdapter.cpp: (WebKit::DecoderAdapter::decodeBytes): Use decodeVariableLengthByteArray. * WebProcess/WebPage/EncoderAdapter.cpp: (WebKit::EncoderAdapter::dataReference): Rename data() to dataReference() to indicate that it returns a reference to the data. (WebKit::EncoderAdapter::encodeBytes): Use encodeVariableLengthByteArray. 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Add encodeVariableLengthByteArray and decodeVariableLengthByteArray https://bugs.webkit.org/show_bug.cgi?id=62674 Rename the ArgumentDecoder::decodeBytes overload that takes a DataReference to decodeVariableLengthByteArray, to match the added encodeVariableLengthByteArray. * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::ArgumentDecoder::decodeVariableLengthByteArray): * Platform/CoreIPC/ArgumentDecoder.h: * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::encodeFixedLengthData): (CoreIPC::ArgumentEncoder::encodeVariableLengthByteArray): * Platform/CoreIPC/ArgumentEncoder.h: * Platform/CoreIPC/DataReference.cpp: (CoreIPC::DataReference::decode): * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::Handle::decode): 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Add functions for converting between DataReferences and vectors https://bugs.webkit.org/show_bug.cgi?id=62671 * Platform/CoreIPC/DataReference.h: (CoreIPC::DataReference::DataReference): New implicit constructor that takes a vector. (CoreIPC::DataReference::vector): New function that returns a new vector. * Shared/WebBackForwardListItem.cpp: (WebKit::WebBackForwardListItem::encode): Use implicit constructor. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::runJavaScriptInMainFrame): Ditto. 2011-06-14 John Sullivan Reviewed by Dan Bernstein. Callers should be robust against WebImage::create() returning an image with a null snapshot * Shared/API/c/cg/WKImageCG.cpp: (WKImageCreateCGImage): Return 0 if no bitmap was created. (WKImageCreateFromCGImage): Ditto. * Shared/UserMessageCoders.h: (WebKit::UserMessageEncoder::baseEncode): Check for null before dereferencing image->bitmap() in two places. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::snapshotInViewCoordinates): Return 0 if no bitmap was created. (WebKit::WebPage::scaledSnapshotInDocumentCoordinates): Ditto. (WebKit::WebPage::createSnapshotOfVisibleContent): Bail out if no bitmap was created. 2011-06-14 Anders Carlsson Reviewed by Darin Adler. Add functions for encoding/decoding data with a known size and alignment https://bugs.webkit.org/show_bug.cgi?id=62663 * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::ArgumentDecoder::decodeFixedLengthData): * Platform/CoreIPC/ArgumentDecoder.h: * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::encodeFixedLengthData): (CoreIPC::ArgumentEncoder::encodeVariableLengthData): * Platform/CoreIPC/ArgumentEncoder.h: 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Move string ArgumentCoder template specializations out into a .cpp file https://bugs.webkit.org/show_bug.cgi?id=62660 * GNUmakefile.am: * Platform/CoreIPC/ArgumentCoders.cpp: Added. (CoreIPC::::encode): (CoreIPC::::decode): * Platform/CoreIPC/ArgumentCoders.h: * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Remove PluginInfoStore::Plugin typedef https://bugs.webkit.org/show_bug.cgi?id=62657 * UIProcess/Plugins/PluginInfoStore.h: * UIProcess/Plugins/win/PluginInfoStoreWin.cpp: (WebKit::PluginInfoStore::getPluginInfo): (WebKit::PluginInfoStore::shouldUsePlugin): 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Create the PluginModuleInfo class and reverse the typedef so that PluginInfoStore::Plugin is now a typedef https://bugs.webkit.org/show_bug.cgi?id=62654 * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::PluginInfoStore::loadPluginsIfNecessary): (WebKit::PluginInfoStore::loadPlugin): (WebKit::PluginInfoStore::findPluginForMIMEType): (WebKit::PluginInfoStore::findPluginForExtension): (WebKit::PluginInfoStore::findPlugin): (WebKit::PluginInfoStore::infoForPluginWithPath): * UIProcess/Plugins/PluginInfoStore.h: * UIProcess/Plugins/PluginProcessManager.cpp: (WebKit::PluginProcessManager::getPluginProcessConnection): * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::PluginProcessProxy): * UIProcess/Plugins/WebPluginSiteDataManager.cpp: (WebKit::WebPluginSiteDataManager::getSitesWithData): (WebKit::WebPluginSiteDataManager::clearSiteData): * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::PluginInfoStore::getPluginInfo): (WebKit::PluginInfoStore::shouldUsePlugin): * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: (WebKit::PluginInfoStore::getPluginInfo): (WebKit::PluginInfoStore::shouldUsePlugin): * UIProcess/Plugins/win/PluginInfoStoreWin.cpp: (WebKit::isOldWindowsMediaPlayerPlugin): (WebKit::isNewWindowsMediaPlayerPlugin): (WebKit::PluginInfoStore::shouldUsePlugin): 2011-06-14 Stephanie Lewis Rubber stamped by Oliver Hunt. Update order files. * mac/WebKit2.order: 2011-06-14 Anders Carlsson Reviewed by Dan Bernstein. Start replacing PluginInfoStore::Plugin with PluginModuleInfo https://bugs.webkit.org/show_bug.cgi?id=62651 * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::PluginInfoStore::plugins): (WebKit::PluginInfoStore::findPluginForMIMEType): (WebKit::PluginInfoStore::findPluginForExtension): (WebKit::PluginInfoStore::infoForPluginWithPath): * UIProcess/Plugins/PluginInfoStore.h: * UIProcess/Plugins/PluginProcessManager.cpp: (WebKit::PluginProcessManager::getPluginProcessConnection): (WebKit::PluginProcessManager::getSitesWithData): (WebKit::PluginProcessManager::clearSiteData): (WebKit::PluginProcessManager::getOrCreatePluginProcess): * UIProcess/Plugins/PluginProcessManager.h: * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::create): * UIProcess/Plugins/PluginProcessProxy.h: (WebKit::PluginProcessProxy::pluginInfo): * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap): (WebKit::PluginProcessProxy::createPropertyListFile): 2011-06-14 Anders Carlsson Reviewed by Darin Adler. Add PluginModuleInfo header and prepare for renaming of PluginInfoStore::Plugin to PluginModuleInfo https://bugs.webkit.org/show_bug.cgi?id=62647 Make PluginModuleInfo a typedef of PluginInfoStore::Plugin for now; eventually it should be its own class, and PluginInfoStore::Plugin should go away. * GNUmakefile.am: * Shared/Plugins/Netscape/NetscapePluginModule.h: * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::getPluginArchitecture): (WebKit::getMIMETypesFromPluginBundle): (WebKit::getPluginInfoFromPropertyLists): (WebKit::getPluginInfoFromCarbonResources): (WebKit::NetscapePluginModule::getPluginInfo): (WebKit::NetscapePluginModule::determineQuirks): * Shared/Plugins/PluginModuleInfo.cpp: Added. * Shared/Plugins/PluginModuleInfo.h: Added. * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: 2011-06-14 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Move the code to show the context menu from WebKitWebViewBase to WebContextMenuProxyGtk https://bugs.webkit.org/show_bug.cgi?id=62627 * UIProcess/API/gtk/WebKitWebViewBase.cpp: * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/gtk/WebContextMenuProxyGtk.cpp: (WebKit::WebContextMenuProxyGtk::showContextMenu): (WebKit::WebContextMenuProxyGtk::hideContextMenu): (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): (WebKit::WebContextMenuProxyGtk::menuPositionFunction): * UIProcess/gtk/WebContextMenuProxyGtk.h: 2011-06-14 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Rename convertWidgetRectToScreenRect() to convertWidgetPointToScreenPoint() https://bugs.webkit.org/show_bug.cgi?id=62626 * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::screenToWindow): Implement this method using convertWidgetPointToScreenPoint(). (WebKit::PageClientImpl::windowToScreen): Update to use convertWidgetPointToScreenPoint(). * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: (WebKit::WebPopupMenuProxyGtk::showPopupMenu): Use convertWidgetPointToScreenPoint(). 2011-06-14 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Support authentication dialogs in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=62366 Add a new soup feature to show an authentication dialog when it gets a 401 HTTP response. * GNUmakefile.am: Add new files to compilation. * WebProcess/gtk/WebAuthDialog.cpp: Added. (web_auth_dialog_class_init): (web_auth_dialog_init): (sessionAuthenticate): (attach): (detach): (webAuthDialogSessionFeatureInit): * WebProcess/gtk/WebAuthDialog.h: Added. * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): 2011-06-14 No'am Rosenthal and Viatcheslav Ostapenko Reviewed by Kenneth Rohde Christiansen. [Qt] Implement accelerated compositing on WK2 Qt port https://bugs.webkit.org/show_bug.cgi?id=56935 Implementing LayerTreeHost and LayerTreeContext and LayerTreeHost for Qt. Add the necessary plumbing to make the LayerTreeHost work with Qt, based on the original Mac implementation (the code is nearly identical). This includes creating the right layers for the overlay and for the non-composited content, and passing the root layer to the UI process. Also, since LayerTreeHostQt is compiled, we have to add some of the rest of the existing patches, namely the new messages: syncCompositingLayers and updateCompositingLayerContent, and create a stub implementation for them in DrawingAreaProxy. Note that this is not activated yet, until we enable accelerated compositing in the settings and create the right GraphicsLayer. * Scripts/webkit2/messages.py: * Shared/LayerTreeContext.h: * Shared/qt/LayerTreeContextQt.cpp: (WebKit::LayerTreeContext::LayerTreeContext): (WebKit::LayerTreeContext::~LayerTreeContext): (WebKit::LayerTreeContext::encode): (WebKit::LayerTreeContext::decode): (WebKit::LayerTreeContext::isEmpty): (WebKit::operator==): * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::syncCompositingLayers): (WebKit::DrawingAreaProxy::updateCompositingLayerContent): * UIProcess/DrawingAreaProxy.messages.in: * WebKit2.pro: * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::collectCompositingInfoForThisLayer): * WebProcess/WebPage/LayerTreeHost.cpp: (WebKit::LayerTreeHost::create): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::create): (WebKit::LayerTreeHostQt::~LayerTreeHostQt): (WebKit::LayerTreeHostQt::LayerTreeHostQt): (WebKit::LayerTreeHostQt::setLayerFlushSchedulingEnabled): (WebKit::LayerTreeHostQt::scheduleLayerFlush): (WebKit::LayerTreeHostQt::cancelPendingLayerFlush): (WebKit::LayerTreeHostQt::setShouldNotifyAfterNextScheduledLayerFlush): (WebKit::LayerTreeHostQt::setRootCompositingLayer): (WebKit::LayerTreeHostQt::invalidate): (WebKit::LayerTreeHostQt::setNonCompositedContentsNeedDisplay): (WebKit::LayerTreeHostQt::scrollNonCompositedContents): (WebKit::LayerTreeHostQt::forceRepaint): (WebKit::LayerTreeHostQt::sizeDidChange): (WebKit::LayerTreeHostQt::didInstallPageOverlay): (WebKit::LayerTreeHostQt::didUninstallPageOverlay): (WebKit::LayerTreeHostQt::setPageOverlayNeedsDisplay): (WebKit::LayerTreeHostQt::flushPendingLayerChanges): (WebKit::LayerTreeHostQt::performScheduledLayerFlush): (WebKit::LayerTreeHostQt::layerFlushTimerFired): (WebKit::LayerTreeHostQt::createPageOverlayLayer): (WebKit::LayerTreeHostQt::destroyPageOverlayLayer): (WebKit::LayerTreeHostQt::notifyAnimationStarted): (WebKit::LayerTreeHostQt::notifySyncRequired): (WebKit::LayerTreeHostQt::paintContents): (WebKit::LayerTreeHostQt::showDebugBorders): (WebKit::LayerTreeHostQt::showRepaintCounter): (WebKit::LayerTreeHost::supportsAcceleratedCompositing): * WebProcess/WebPage/qt/LayerTreeHostQt.h: Added. (WebKit::LayerTreeHostQt::layerTreeContext): (WebKit::LayerTreeHostQt::pauseRendering): (WebKit::LayerTreeHostQt::resumeRendering): 2011-06-14 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] Implement accelerated compositing on WK2 Qt port https://bugs.webkit.org/show_bug.cgi?id=56935 Add a createImage() function to ShareableBitmap, for now ifdef'ed to Qt only. This allows us to support directly composited images across the WebKit2 processes. Together with Viatcheslav Ostapenko. * Shared/ShareableBitmap.h: * Shared/qt/ShareableBitmapQt.cpp: (WebKit::ShareableBitmap::createQImage): (WebKit::ShareableBitmap::createImage): 2011-06-13 Anders Carlsson Reviewed by Sam Weinig. Crash when trying to use Netflix Watch Instantly with Silverlight 3 https://bugs.webkit.org/show_bug.cgi?id=62611 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::getPluginInfo): Get the plug-in version string instead of the version number. (WebKit::PluginVersion::isValid): (WebKit::PluginVersion::PluginVersion): (WebKit::PluginVersion::parse): (WebKit::PluginVersion::isLessThan): Add a new PluginVersion class that represents a plug-in version. The idea is that this class be made cross platform. (WebKit::NetscapePluginModule::determineQuirks): Add the ReturnsNonRetainedScriptableNPObject quirk for versions of Silverlight less than 4. * Shared/Plugins/PluginQuirks.h: Add the ReturnsNonRetainedScriptableNPObject quirk. * UIProcess/Plugins/PluginInfoStore.h: Use a version string. Eventually this should hold the PluginVersion class we added. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::pluginScriptableNPObject): If the plug-in has the ReturnsNonRetainedScriptableNPObject quirk, do an extra retain. 2011-06-13 Ryuan Choi Reviewed by Kenneth Rohde Christiansen. [EFL][WK2] Add dummy files at below of WebProcess. https://bugs.webkit.org/show_bug.cgi?id=62445 Add Efl related directory and files in WebKit2/WebProcess/. * WebProcess/Cookies/efl/WebCookieManagerEfl.cpp: Added. (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp: Added. (WebKit::InjectedBundle::load): (WebKit::InjectedBundle::activateMacFontAscentHack): * WebProcess/WebPage/efl/WebInspectorEfl.cpp: Added. (WebKit::WebInspector::localizedStringsURL): * WebProcess/WebPage/efl/WebPageEfl.cpp: Added. (WebKit::WebPage::platformInitialize): (WebKit::WebPage::platformPreferencesDidChange): (WebKit::scroll): (WebKit::WebPage::performDefaultBehaviorForKeyEvent): (WebKit::WebPage::platformHasLocalDataForURL): (WebKit::WebPage::cachedResponseMIMETypeForURL): (WebKit::WebPage::platformCanHandleRequest): (WebKit::WebPage::cachedSuggestedFilenameForURL): (WebKit::WebPage::cachedResponseDataForURL): * WebProcess/efl/WebProcessEfl.cpp: Added. (WebKit::WebProcess::platformSetCacheModel): (WebKit::WebProcess::platformClearResourceCaches): (WebKit::WebProcess::platformInitializeWebProcess): (WebKit::WebProcess::platformTerminate): * WebProcess/efl/WebProcessMainEfl.cpp: Added. (WebKit::WebProcessMainEfl): * WebProcess/efl/WebProcessMainEfl.h: Added. * efl/MainEfl.cpp: Added. (main): 2011-06-13 Eunmi Lee Reviewed by Eric Seidel. [EFL][WK2] Add initial WebInspectorEfl.cpp for webkit2 efl port https://bugs.webkit.org/show_bug.cgi?id=62524 * UIProcess/efl/WebInspectorEfl.cpp: Added. (WebKit::WebInspectorProxy::platformCreateInspectorPage): (WebKit::WebInspectorProxy::platformOpen): (WebKit::WebInspectorProxy::platformDidClose): (WebKit::WebInspectorProxy::platformBringToFront): (WebKit::WebInspectorProxy::platformInspectedURLChanged): (WebKit::WebInspectorProxy::inspectorPageURL): (WebKit::WebInspectorProxy::platformAttach): (WebKit::WebInspectorProxy::platformDetach): (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): 2011-06-13 Eunmi Lee Reviewed by Eric Seidel. [EFL][WK2] Add initial TextCheckerEfl.cpp for webkit2 efl port https://bugs.webkit.org/show_bug.cgi?id=62438 * UIProcess/efl/TextCheckerEfl.cpp: Added. (WebKit::TextChecker::state): (WebKit::TextChecker::isContinuousSpellCheckingAllowed): (WebKit::TextChecker::setContinuousSpellCheckingEnabled): (WebKit::TextChecker::setGrammarCheckingEnabled): (WebKit::TextChecker::uniqueSpellDocumentTag): (WebKit::TextChecker::closeSpellDocumentWithTag): (WebKit::TextChecker::checkSpellingOfString): (WebKit::TextChecker::checkGrammarOfString): (WebKit::TextChecker::spellingUIIsShowing): (WebKit::TextChecker::toggleSpellingUIIsShowing): (WebKit::TextChecker::updateSpellingUIWithMisspelledWord): (WebKit::TextChecker::updateSpellingUIWithGrammarString): (WebKit::TextChecker::getGuessesForWord): (WebKit::TextChecker::learnWord): (WebKit::TextChecker::ignoreWord): 2011-06-13 Sangyong Park Reviewed by Eric Seidel. implement to handle wheel event of plugin on x11 https://bugs.webkit.org/show_bug.cgi?id=62522 Implement platformHandleWheelEvent() in NetscapePluginX11.cpp for to handle wheel event on plugins * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::setCommonMouseEventFields): add template argument to support WebWheelEvent (WebKit::setXButtonEventFieldsByWebWheelEvent): initialize XButtonEvent by WebWheelEvent (WebKit::NetscapePlugin::platformHandleWheelEvent): handle wheel event on plugin 2011-06-13 Eunmi Lee Reviewed by Eric Seidel. [EFL][WK2] Add initial WebContextEfl.cpp for webkit2 efl port https://bugs.webkit.org/show_bug.cgi?id=62523 * UIProcess/efl/WebContextEfl.cpp: Added. (WebKit::WebContext::applicationCacheDirectory): (WebKit::WebContext::platformInitializeWebProcess): (WebKit::WebContext::platformInvalidateContext): (WebKit::WebContext::platformDefaultDatabaseDirectory): (WebKit::WebContext::platformDefaultIconDatabasePath): (WebKit::WebContext::platformDefaultLocalStorageDirectory): 2011-06-13 Noam Rosenthal Unreviewed fix - removed parts of r88659 that were committed by mistake. The patch accidentally included parts that weren't supposed to be there, namely the whole code was duplicated. This patch rectifies that and brings it to the original reviewed code. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: * WebProcess/WebCoreSupport/WebGraphicsLayer.h: 2011-06-13 Anders Carlsson Reviewed by Dan Bernstein. BankID plug-in isn't instantiated correctly https://bugs.webkit.org/show_bug.cgi?id=62588 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): The BankID plug-in uses the QuickDraw drawing model but doesn't draw anything so we can use the half-baked QuickDraw support. * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::defaultSyncMessageTimeout): Don't use a sync message timeout for the BankID plug-in since it sends synchronous Apple Events and we don't want the plug-in to die while it's waiting for a reply. 2011-06-13 Chris Fleizach Reviewed by Darin Adler. kAXTextMarkerForPositionParametrizedAttribute does not work correctly in WK2 https://bugs.webkit.org/show_bug.cgi?id=62547 Implement the missing screenToWindow method for WK2. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::screenToWindow): * UIProcess/API/gtk/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::screenToWindow): * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::screenToWindow): * UIProcess/API/qt/qwkpage_p.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::screenToWindow): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/win/WebView.cpp: (WebKit::WebView::screenToWindow): * UIProcess/win/WebView.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::screenToWindow): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::screenToWindow): * WebProcess/WebPage/WebPage.h: 2011-06-13 Sam Weinig Reviewed by Darin Adler. REGRESSION (81679-81939): In Safari, Dictionary look up (tap or Ctrl-Cmd-D) doesn't work if you have clicked on a word and not moved the mouse * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::shouldUseSelection): Return early if the selection we are using is not a range. 2011-06-13 Tony Chang Reviewed by Dimitri Glazkov. rename ENABLE_NEW_FLEXBOX to ENABLE_CSS3_FLEXBOX https://bugs.webkit.org/show_bug.cgi?id=62578 * Configurations/FeatureDefines.xcconfig: 2011-06-13 No'am Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] Implement accelerated compositing on WK2 Qt port https://bugs.webkit.org/show_bug.cgi?id=56935 Added WebGraphicsLayer, a subclass of WebCore::GraphicsLayer that serializes the state of the layer tree to the UI process WebLayerTreeInfo. For now this patch doesn't serialize the animation information, a feature that will be upstreamed later on. Together with Viatcheslav Ostapenko. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: Added. * WebProcess/WebCoreSupport/WebGraphicsLayer.h: Added. 2011-06-13 No'am Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] Implement accelerated compositing on WK2 Qt port https://bugs.webkit.org/show_bug.cgi?id=56935 Added WebLayerTreeInfo: a set of structures that can serialize a tree of GraphicsLayers across to the UI process. Together with Viatcheslav Ostapenko. * Scripts/webkit2/messages.py: * Shared/WebLayerTreeInfo.cpp: Added. * Shared/WebLayerTreeInfo.h: Added. 2011-06-11 Jer Noble Reviewed by Anders Carlsson. Avoid flashing when exiting full-screen mode. https://bugs.webkit.org/show_bug.cgi?id=62338 Instead of making a round-trip between processes by calling forceRepaint and waiting for a callback, instead make a WebProcess-side call to forceRepaintWithoutCallback before sending the ExitAcceleratedCompositingMode message to the WebFullScreenControllerProxy. This also means we can get rid of the dragImage creation and display. Because this redraw will happen during the current run-loop instead of a future one, make sure the background color has been set before the redraw in didEnterFullScreen(). Wait to hide the full-screen window until after we have received the ExitAcceleratedCompositingMode message. By this time, repaint will have already completed. * UIProcess/mac/WKFullScreenWindowController.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Disable screen updates, to be re-enabled during exitAcceleratedCompositingMode. (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Don't hide the full-screen window here; wait for exitAcceleratedCompositing instead. (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Collapse the redrawCompleted method into this one. (-[WKFullScreenWindowController close]): Remove the reference to exitCompositedModeRepaintCompleted. * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::didEnterFullScreen): Set the full screen background color first. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Repaint before sending the ExitAcceleratedCompositingMode message. 2011-06-13 Tony Chang Reviewed by Adam Barth. rename ENABLE_FLEXBOX to ENABLE_NEW_FLEXBOX https://bugs.webkit.org/show_bug.cgi?id=62545 * Configurations/FeatureDefines.xcconfig: 2011-06-13 Anders Carlsson Reviewed by Dan Bernstein. Don't access freed memory in the UI process when a plug-in process crashes https://bugs.webkit.org/show_bug.cgi?id=62548 Call pluginProcessCrashedOrFailedToLaunch after sending messages to all processes about the plug-in crash, otherwise we'll try to dereference m_pluginInfo.path after the PluginProcessProxy object has been deleted. * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::didClose): 2011-06-13 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Fix a crash when drawing area has been deleted https://bugs.webkit.org/show_bug.cgi?id=62541 Check whether WebPageProxy::drawingArea() returns a valid pointer before using it, it might be null, for example, when the web process crashes. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (callDrawingAreaPaintMethod): (webkitWebViewBaseSizeAllocate): 2011-06-13 Eunmi Lee Reviewed by Kenneth Rohde Christiansen. [EFL][WK2] Minor fix: fix coding style and remove unnecessary codes for WebKit2 efl port's PageClientImpl https://bugs.webkit.org/show_bug.cgi?id=62429 * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::scrollView): (WebKit::PageClientImpl::setCursor): (WebKit::PageClientImpl::windowToScreen): (WebKit::PageClientImpl::doneWithKeyEvent): (WebKit::PageClientImpl::setFindIndicator): (WebKit::PageClientImpl::didCommitLoadForMainFrame): (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation): (WebKit::PageClientImpl::findStringInCustomRepresentation): (WebKit::PageClientImpl::countStringMatchesInCustomRepresentation): * UIProcess/API/efl/PageClientImpl.h: 2011-06-13 Eunmi Lee Reviewed by Kenneth Rohde Christiansen. [EFL][WK2] Add initial WebPreferencesEfl.cpp for webkit2 efl port https://bugs.webkit.org/show_bug.cgi?id=62525 * UIProcess/efl/WebPreferencesEfl.cpp: Added. (WebKit::WebPreferences::platformInitializeStore): (WebKit::WebPreferences::platformUpdateStringValueForKey): (WebKit::WebPreferences::platformUpdateBoolValueForKey): (WebKit::WebPreferences::platformUpdateUInt32ValueForKey): (WebKit::WebPreferences::platformUpdateDoubleValueForKey): 2011-06-13 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Add context menu support for Webkit2 https://bugs.webkit.org/show_bug.cgi?id=54827 * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createContextMenuProxy): Create a context menu proxy. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (globalPointForClientPoint): Function copied from webkit1 to convert a point in widget coordinates to global coordinates. (popupMenuPositionFunction): (webkitWebViewBaseShowContextMenu): Show the given context menu at the given position. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/gtk/WebContextMenuProxyGtk.cpp: Added. (WebKit::contextMenuItemActivatedCallback): (WebKit::WebContextMenuProxyGtk::createGtkMenu): (WebKit::WebContextMenuProxyGtk::showContextMenu): (WebKit::WebContextMenuProxyGtk::hideContextMenu): (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): * UIProcess/gtk/WebContextMenuProxyGtk.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h. (WebKit::WebContextMenuProxyGtk::create): 2011-06-13 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Export an API similar to WebKit1 https://bugs.webkit.org/show_bug.cgi?id=57820 Add first implementation of WebKitWebView, a class with the same API than webkit1, that wraps the C API to provide a high level WebKit2 API for GTK port. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitWebView.cpp: Added. (webkit_web_view_init): (webkit_web_view_class_init): (webkit_web_view_new): (webkit_web_view_load_uri): (webkit_web_view_go_back): (webkit_web_view_go_forward): * UIProcess/API/gtk/WebKitWebView.h: Added. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseCreate): (webkitWebViewBaseCreateWebPage): * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/API/gtk/webkit/webkit.h: Added. 2011-06-12 Adam Barth Reviewed by Alexey Proskuryakov. Rename FrameLoaderClient::interruptForPolicyChangeError to use the past tense https://bugs.webkit.org/show_bug.cgi?id=62516 * WebProcess/WebCoreSupport/WebErrors.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::interruptedForPolicyChangeError): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: (WebKit::interruptedForPolicyChangeError): * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp: (WebKit::interruptedForPolicyChangeError): * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: (WebKit::interruptedForPolicyChangeError): * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp: (WebKit::interruptedForPolicyChangeError): * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp: (WebKit::interruptedForPolicyChangeError): 2011-06-12 Adam Barth Reviewed by Eric Seidel. Remove FrameLoader::isProcessingUserGesture https://bugs.webkit.org/show_bug.cgi?id=62519 Instead of asking the gesture indicator directly, ask the ScriptController, like everyone else. The gesture indicator is just one of the piece of information we use to determine whether we're processing a user gesture. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::isProcessingUserGesture): 2011-06-12 Adam Barth Reviewed by Alexey Proskuryakov. Remove trival "forward-to-client" member functions from FrameLoader https://bugs.webkit.org/show_bug.cgi?id=62510 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: (WebKit::WebFrameNetworkingContext::blockedError): 2011-06-11 Stephanie Lewis Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=62480 part of Add API to launch the WebProcess. Launching it earlier can save time when loading the first page. * UIProcess/API/C/WKContext.cpp: (WKContextWarmInitialProcess): * UIProcess/API/C/WKContextPrivate.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::warmInitialProcess): * UIProcess/WebContext.h: 2011-06-09 Jer Noble Reviewed by Darin Adler. AVPlayerLayer is adding a "fade" animation during Safari full-screen https://bugs.webkit.org/show_bug.cgi?id=62433 CoreAnimation will add default animations when certain properties are changed, unless those changes are wrapped in a CATransaction which has had its disableActions property set to true. Wrap each of these three property changes in a CATransaction and disable its actions, so that the default "fade" animation is not created in response. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController enterFullScreen:]): Wrap with CATransaction. (-[WKFullScreenWindowController _swapView:with:]): Ditto: * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Ditto. 2011-06-10 Anders Carlsson Reviewed by Sam Weinig. REGRESSION (WebKit2): window.showModalDialog() broken https://bugs.webkit.org/show_bug.cgi?id=62496 If dispatching a message ends up creating a nested run loop, some incoming messages can end up not being delivered until we exit from the run loop. Fix this by using a Deque instead of a Vector for incoming messages, and get one message at a time and then dispatch it. That prevents us from having any lingering messages lying around in stack allocated space. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::waitForMessage): (CoreIPC::Connection::dispatchMessages): * Platform/CoreIPC/Connection.h: 2011-06-10 Sam Weinig Reviewed by Anders Carlsson. Unresponsive cursor is shown when displaying a modal dialog Part of https://bugs.webkit.org/show_bug.cgi?id=62494 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::runModal): * UIProcess/WebPageProxy.h: Stop the responsiveness timer when calling out to show a modal dialog. 2011-06-10 Tony Chang Reviewed by Ojan Vafai. add a compile guard ENABLE(FLEXBOX) https://bugs.webkit.org/show_bug.cgi?id=62049 * Configurations/FeatureDefines.xcconfig: 2011-06-10 Ryuan Choi Reviewed by Kenneth Rohde Christiansen. [EFL][WK2] Add dummy files in WebProcess/WebCoreSupport/efl https://bugs.webkit.org/show_bug.cgi?id=62346 Add WebProcess/WebCoreSupport/efl directory and files. * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp: Added. (WebKit::WebContextMenuClient::lookUpInDictionary): (WebKit::WebContextMenuClient::isSpeaking): (WebKit::WebContextMenuClient::speak): (WebKit::WebContextMenuClient::stopSpeaking): * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: Added. (WebKit::WebEditorClient::handleKeyboardEvent): (WebKit::WebEditorClient::handleInputMethodKeydown): * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: Added. (WebKit::cancelledError): (WebKit::blockedError): (WebKit::cannotShowURLError): (WebKit::interruptForPolicyChangeError): (WebKit::cannotShowMIMETypeError): (WebKit::fileDoesNotExistError): (WebKit::pluginWillHandleLoadError): * WebProcess/WebCoreSupport/efl/WebFrameNetworkingContext.h: Added. (WebFrameNetworkingContext::create): (WebFrameNetworkingContext::WebFrameNetworkingContext): * WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp: Added. (WebKit::WebPopupMenu::setUpPlatformData): 2011-06-09 Andreas Kling Reviewed by Darin Adler. WebKit2: Remove unused function CoreIPC::Connection::deprecatedWaitFor(). https://bugs.webkit.org/show_bug.cgi?id=62386 * Platform/CoreIPC/Connection.h: 2011-06-09 Andreas Kling Reviewed by Anders Carlsson. [Qt][WK2] Remove usage of deprecated CoreIPC functions. https://bugs.webkit.org/show_bug.cgi?id=62290 Use the new DrawingArea{,Proxy}.messages.in approach to CoreIPC in TiledDrawingArea. The TiledDrawingArea{,Proxy}-specific messages were moved up into DrawingArea{,Proxy} and guarded by ENABLE(TILED_BACKING_STORE). * Shared/CoreIPCSupport/DrawingAreaMessageKinds.h: Removed. * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h: Removed. * GNUmakefile.am: * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: Prune deleted files from build system. * Platform/CoreIPC/MessageID.h: Remove legacy DrawingArea message ID's. * UIProcess/API/qt/qgraphicswkview.cpp: (QGraphicsWKViewPrivate::commitScale): No longer waits for all tile updates to complete, this will be addressed by the soon-to-be-upstreamed TileSet mechanism. * UIProcess/DrawingAreaProxy.messages.in: * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::didSetSize): (WebKit::DrawingAreaProxy::invalidate): (WebKit::DrawingAreaProxy::snapshotTaken): (WebKit::DrawingAreaProxy::tileUpdated): (WebKit::DrawingAreaProxy::allTileUpdatesProcessed): Added IPC calls used by TiledDrawingAreaProxy to DrawingAreaProxy. * WebProcess/WebPage/DrawingArea.messages.in: * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setSize): (WebKit::DrawingArea::cancelTileUpdate): (WebKit::DrawingArea::requestTileUpdate): (WebKit::DrawingArea::takeSnapshot): Added IPC calls used by TiledDrawingArea to DrawingArea. * UIProcess/DrawingAreaProxyImpl.h: * UIProcess/DrawingAreaProxyImpl.cpp: Remove the now-unneeded didReceiveMessage() and didReceiveSyncMessage(). * WebProcess/WebPage/DrawingAreaImpl.cpp: * WebProcess/WebPage/DrawingAreaImpl.h: Remove the now-unneeded didReceiveMessage(). * UIProcess/TiledDrawingAreaProxy.h: * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::sizeDidChange): (WebKit::TiledDrawingAreaProxy::tileUpdated): (WebKit::TiledDrawingAreaProxy::allTileUpdatesProcessed): Split didReceiveMessage() into functions. (WebKit::TiledDrawingAreaProxy::removeTile): (WebKit::TiledDrawingAreaProxy::requestTileUpdate): (WebKit::TiledDrawingAreaProxy::setPageIsVisible): (WebKit::TiledDrawingAreaProxy::takeSnapshot): Use new-style IPC. * WebProcess/WebPage/TiledDrawingArea.cpp: (WebKit::TiledDrawingArea::setSize): (WebKit::TiledDrawingArea::cancelTileUpdate): (WebKit::TiledDrawingArea::requestTileUpdate): (WebKit::TiledDrawingArea::takeSnapshot): Split didReceiveMessage() into functions. (WebKit::TiledDrawingArea::display): (WebKit::TiledDrawingArea::updateTile): (WebKit::TiledDrawingArea::tileUpdateTimerFired): Use new-style IPC. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveMessage): Remove handling of CoreIPC::MessageClassDrawingAreaProxyLegacy. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didReceiveMessage): Remove handling of CoreIPC::MessageClassDrawingAreaLegacy. * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: Remove unneeded includes. * WebProcess/WebPage/TiledDrawingArea.h: Remove didReceiveMessage() and make CoreIPC message handlers explicitly virtual. 2011-06-09 Andreas Kling Reviewed by Anders Carlsson. WebKit2: Generate correct header conditionals in message receivers. https://bugs.webkit.org/show_bug.cgi?id=62379 Given a *.messages.in file like this: Foo(AwesomeObject o) #if ENABLE(ESOTERIC_FEATURE) Bar(AwesomeObject o) #endif messages.py would include AwesomeObject.h only #if ENABLE(ESOTERIC_FEATURE). This breaks the build on platforms without that defined. Furthermore, if two messages guarded by different conditionals both pull in the same header, only the last conditional will be applied, for example: #if ENABLE(ESOTERIC_FEATURE) Foo(AwesomeObject o) #endif #if ENABLE(MYSTERIOUS_FEATURE) Bar(AwesomeObject o) #endif Would include AwesomeObject.h #if ENABLE(MYSTERIOUS_FEATURE) when it really should check #if ENABLE(ESOTERIC_FEATURE) || ENABLE(MYSTERIOUS_FEATURE). Change the generator to consider all conditionals for a given header file. Also consider conditionals for reply parameters. * Scripts/webkit2/messages.py: * Scripts/webkit2/messages_unittest.py: 2011-06-09 Eunmi Lee Reviewed by Kenneth Rohde Christiansen. [EFL][WK2] Add PageClientImpl and WebPageProxyEfl for efl port https://bugs.webkit.org/show_bug.cgi?id=62363 * UIProcess/API/efl/PageClientImpl.cpp: Added. (WebKit::PageClientImpl::PageClientImpl): (WebKit::PageClientImpl::~PageClientImpl): (WebKit::PageClientImpl::createDrawingAreaProxy): (WebKit::PageClientImpl::setViewNeedsDisplay): (WebKit::PageClientImpl::displayView): (WebKit::PageClientImpl::scrollView): (WebKit::PageClientImpl::viewSize): (WebKit::PageClientImpl::isViewWindowActive): (WebKit::PageClientImpl::isViewFocused): (WebKit::PageClientImpl::isViewVisible): (WebKit::PageClientImpl::isViewInWindow): (WebKit::PageClientImpl::processDidCrash): (WebKit::PageClientImpl::didRelaunchProcess): (WebKit::PageClientImpl::pageClosed): (WebKit::PageClientImpl::toolTipChanged): (WebKit::PageClientImpl::setCursor): (WebKit::PageClientImpl::setViewportArguments): (WebKit::PageClientImpl::registerEditCommand): (WebKit::PageClientImpl::clearAllEditCommands): (WebKit::PageClientImpl::canUndoRedo): (WebKit::PageClientImpl::executeUndoRedo): (WebKit::PageClientImpl::convertToDeviceSpace): (WebKit::PageClientImpl::convertToUserSpace): (WebKit::PageClientImpl::windowToScreen): (WebKit::PageClientImpl::doneWithKeyEvent): (WebKit::PageClientImpl::createPopupMenuProxy): (WebKit::PageClientImpl::createContextMenuProxy): (WebKit::PageClientImpl::setFindIndicator): (WebKit::PageClientImpl::didChangeScrollbarsForMainFrame): (WebKit::PageClientImpl::didCommitLoadForMainFrame): (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation): (WebKit::PageClientImpl::customRepresentationZoomFactor): (WebKit::PageClientImpl::setCustomRepresentationZoomFactor): (WebKit::PageClientImpl::flashBackingStoreUpdates): (WebKit::PageClientImpl::findStringInCustomRepresentation): (WebKit::PageClientImpl::countStringMatchesInCustomRepresentation): (WebKit::PageClientImpl::userSpaceScaleFactor): * UIProcess/API/efl/PageClientImpl.h: Added. (WebKit::PageClientImpl::create): (WebKit::PageClientImpl::viewObject): (WebKit::PageClientImpl::page): * UIProcess/WebPageProxy.h: * UIProcess/efl/WebPageProxyEfl.cpp: Added. (WebKit::WebPageProxy::viewObject): (WebKit::WebPageProxy::standardUserAgent): (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): (WebKit::WebPageProxy::saveRecentSearches): (WebKit::WebPageProxy::loadRecentSearches): 2011-06-08 John Sullivan Reviewed by Darin Adler. [WKView _setDragImage:at:linkDrag:] can crash if WKView is dealloc'ed during drag * UIProcess/API/mac/WKView.mm: (-[WKView _resendKeyDownEvent:]): Renamed self-protecting RetainPtr from "protect" to "protector" so it's a noun. (-[WKView _setDragImage:at:linkDrag:]): Added a self-protecting RetainPtr. 2011-06-08 No'am Rosenthal Reviewed by Kenneth Rohde Christiansen. WebKit2: Enable serializing of data types needed for cross-process accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=61694 Add an ArgumentCoder for FloatPoint3D. Together with Viatcheslav Ostapenko. * Scripts/webkit2/messages.py: * Shared/WebCoreArgumentCoders.h: 2011-06-08 No'am Rosenthal Reviewed by Kenneth Rohde Christiansen. WebKit2: Enable serializing of data types needed for cross-process accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=61694 Add ArgumentCoders for TransformOperation, including all the subclasses, and TransformOperations. * Scripts/webkit2/messages.py: * Shared/WebCoreArgumentCoders.h: 2011-06-08 Yael Aharon Reviewed by Andreas Kling. [Qt] Build fix for building QtWebKit inside of Qt. https://bugs.webkit.org/show_bug.cgi?id=62280 Remove CONFIG=staticlib, because it causes the configure script to add -lwebkit2 into QtWebKit.prl. * WebKit2.pri: 2011-06-07 Tim Horton Reviewed by Alexey Proskuryakov. Use correct CFURLStorageSessionRef definition on Snow Leopard https://bugs.webkit.org/show_bug.cgi?id=62223 * PluginProcess/mac/PluginProcessShim.mm: 2011-06-07 John Sullivan Reviewed by Darin Adler. WKResponderChainSink mechanism isn't robust against some types of responder chain manipulation * UIProcess/API/mac/WKView.mm: (-[WKResponderChainSink detach]): This method formerly blindly assumed that since -initWithResponderChain: put self at the end of the responder chain, after _lastResponderInChain, then self is still at the end of the responder chain and still immediately after _lastResponderInChain. Made this function robust against some kinds of responder chain manipulations, though it can't be robust against some other kinds (e.g., manipulations that removed self from this chain and put it into some other chain). 2011-06-07 Sam Weinig Reviewed by Anders Carlsson. Remove repeated IPC traffic from SetRenderTreeSize message https://bugs.webkit.org/show_bug.cgi?id=62244 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add didLayoutForFrame callback. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageGetRenderTreeSize): * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Add render tree size getter in WebProcess. * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::didLayoutForFrame): * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: Added. * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebChromeClient.h: Removed setRenderTreeSize. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidLayout): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Call the new didLayoutForFrame client function. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::renderTreeSize): * WebProcess/WebPage/WebPage.h: Add iterative implementation to compute the total size of the render tree for a page. 2011-06-07 Zalan Bujtas Reviewed by Andreas Kling. TiledDrawingArea: Delay serving tile requests when the drawing area is suspended. Do not paint tiles when painting is disabled (suspended) on the web process side. Buffer up the tile requests and paint them, when the drawing area gets resumed. On the UI process side, do not block on tile updates, when the tiled area is not visible (painting is disabled on the web process side). * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete): * WebProcess/WebPage/TiledDrawingArea.cpp: (WebKit::TiledDrawingArea::suspendPainting): (WebKit::TiledDrawingArea::resumePainting): (WebKit::TiledDrawingArea::scheduleTileUpdate): (WebKit::TiledDrawingArea::tileUpdateTimerFired): (WebKit::TiledDrawingArea::didReceiveMessage): * WebProcess/WebPage/TiledDrawingArea.h: 2011-06-07 Sheriff Bot Unreviewed, rolling out r88259 and r88263. http://trac.webkit.org/changeset/88259 http://trac.webkit.org/changeset/88263 https://bugs.webkit.org/show_bug.cgi?id=62228 broke builds (Requested by rniwa on #webkit). * PluginProcess/mac/PluginProcessShim.mm: 2011-06-07 Tim Horton Reviewed by Alexey Proskuryakov. Use correct CFURLStorageSessionRef definition on Snow Leopard https://bugs.webkit.org/show_bug.cgi?id=62223 * PluginProcess/mac/PluginProcessShim.mm: 2011-06-07 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Move moduleMixesGtkSymbols() from PluginPackage to PluginView https://bugs.webkit.org/show_bug.cgi?id=62200 In WebKit2 PluginPackage is used by the UI process to load plugins in order to get information about them, but it doesn't use any GTK symbol. So the UI process should be able to load plugins even when building with GTK3, but we should not allow the plugin view to use the plugin if it mixes GTK2 and GTK3 symbols. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::moduleMixesGtkSymbols): (WebKit::NetscapePlugin::platformPostInitialize): Check whether the module is mixing GTK+ 2 and GTK+ 3 symbols. 2011-06-06 Sheriff Bot Unreviewed, rolling out r88222. http://trac.webkit.org/changeset/88222 https://bugs.webkit.org/show_bug.cgi?id=62192 Broke compile on Mac (Requested by abarth on #webkit). * Scripts/webkit2/messages.py: * Shared/WebCoreArgumentCoders.h: 2011-06-06 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. WebKit2: Enable serializing of data types needed for cross-process accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=61694 Add ArgumentCoders for TransformOperation, including all the subclasses, and TransformOperations. * Scripts/webkit2/messages.py: * Shared/WebCoreArgumentCoders.h: 2011-06-06 John Sullivan Reviewed by Dan Bernstein. WebKit2 find-on-page callback doesn’t handle kWKMoreThanMaximumMatchCount on PDF pages * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::findString): Return kWKMoreThanMaximumMatchCount when appropriate, a la FindController::countStringMatches(). Also, skip counting all the matches if maxMatchCount is 0, to avoid (perhaps slowly) computing a number that would be ignored. 2011-06-06 Carlos Garcia Campos Reviewed by Anders Carlsson. Do not use NPRuntimeObjectMap in NetscapePlugin::setException when plug-in is running out of process https://bugs.webkit.org/show_bug.cgi?id=62124 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::setException): 2011-06-06 Dominic Cooney Unreviewed WinCairo build fix after r88159. * win/WebKit2CFLite.def: Export symbols for WebCoreTestSupport. 2011-06-04 Dominic Cooney Reviewed by Dimitri Glazkov. Re-export JSC and WebCore symbols required by WebCoreTestSupport. https://bugs.webkit.org/show_bug.cgi?id=61076 * win/WebKit2.def: 2011-06-06 Alexandru Chiculita Reviewed by Kent Tamura. Add ENABLE_CSS_EXCLUSIONS support for build-webkit script https://bugs.webkit.org/show_bug.cgi?id=61628 * Configurations/FeatureDefines.xcconfig: 2011-06-06 Mihnea Ovidenie Reviewed by Kent Tamura. Add ENABLE(CSS_REGIONS) guard for CSS Regions support https://bugs.webkit.org/show_bug.cgi?id=61631 * Configurations/FeatureDefines.xcconfig: 2011-06-06 Carlos Garcia Campos Reviewed by Anders Carlsson. [UNIX] SOCK_DGRAM sockets are not notified when the other end closes the connection https://bugs.webkit.org/show_bug.cgi?id=61538 Use SOCK_STREAM instead of SOCK_DGRAM sockets. Rework the message receiver code to support stream sockets, since it requires to handle message boundaries. The same code works for DGRAM sockets, so this change shouldn't break other ports using DGRAM. * Platform/CoreIPC/Connection.h: * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::Connection::platformInitialize): (CoreIPC::Connection::processMessage): Process messages from data already received. (CoreIPC::readBytesFromSocket): Read from socket using recvmsg(). (CoreIPC::Connection::readyReadHandler): * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::ProcessLauncher::launchProcess): Use SOCK_DGRAM in socketpair(). == Rolled over to ChangeLog-2011-06-04 ==