2012-05-31 Hajime Morrita REGRESSION(r117572): editing/spelling/spellcheck-async-remove-frame.html crashes on Mac https://bugs.webkit.org/show_bug.cgi?id=86859 Reviewed by Ryosuke Niwa. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::requestCheckingOfString): * WebProcess/WebCoreSupport/WebEditorClient.h: 2012-02-24 Shinya Kawanaka SpellCheckRequest needs to know the context where the spellcheck happened. https://bugs.webkit.org/show_bug.cgi?id=79320 Reviewed by Hajime Morita. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::requestCheckingOfString): * WebProcess/WebCoreSupport/WebEditorClient.h: 2012-05-18 MORITA Hajime Yet another unreviewed build fix on r117572, this time for wk2... * WebProcess/WebCoreSupport/WebEditorClient.h: 2012-03-26 Adam Barth FrameLoader::shouldAllowNavigation uses Frame for context rather than Document https://bugs.webkit.org/show_bug.cgi?id=81020 Reviewed by Eric Seidel. Update call site to new function name. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm): 2012-04-18 Adam Barth FrameLoader::shouldAllowNavigation uses Frame for context rather than Document https://bugs.webkit.org/show_bug.cgi?id=81020 Reviewed by Eric Seidel. Update call site to new function name. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm): 2012-03-19 Adam Barth Remove support for "magic" iframe https://bugs.webkit.org/show_bug.cgi?id=81590 Reviewed by Eric Seidel. Remove FrameLoaderClient methods that no longer exist. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 2012-03-23 Anders Carlsson REGRESSION(r107168?): Assertion failures under pageContainsAnyHorizontalScrollbars causing multiple "crashes" on the Lion Intel Debug WebKit2 testers https://bugs.webkit.org/show_bug.cgi?id=81162 Reviewed by Beth Dakin and Jessie Berlin. Downgrade the ASSERT to a simple if check since scrollableArea->isOnActivePage() can return false when layout happens during page transitions. * WebProcess/WebPage/WebPage.cpp: (WebKit::pageContainsAnyHorizontalScrollbars): 2012-03-07 Carlos Garcia Campos [GTK] Fix several documentation issues in WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=80281 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitFindController.cpp: * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp: (webkit_navigation_policy_decision_class_init): * UIProcess/API/gtk/WebKitPrintOperation.cpp: * UIProcess/API/gtk/WebKitWebView.h: 2012-03-05 Mario Sanchez Prada [GTK] Add GMainLoop and GMainContext to be handled by GRefPtr https://bugs.webkit.org/show_bug.cgi?id=79496 Reviewed by Martin Robinson. Updated places where raw pointers to GMainLoop and GMainContext were being used, replacing them with GRefPtr-based code. * Platform/WorkQueue.h: (WorkQueue): * Platform/gtk/WorkQueueGtk.cpp: (WorkQueue::platformInitialize): (WorkQueue::platformInvalidate): (WorkQueue::workQueueThreadBody): (WorkQueue::registerEventSourceHandler): (WorkQueue::dispatchOnSource): * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk): (WebKit::WebPopupMenuProxyGtk::showPopupMenu): (WebKit::WebPopupMenuProxyGtk::shutdownRunLoop): * UIProcess/gtk/WebPopupMenuProxyGtk.h: (WebPopupMenuProxyGtk): 2012-03-05 Joone Hur [GTK] zlib link error with --enable-webkit2 https://bugs.webkit.org/show_bug.cgi?id=79877 Reviewed by Martin Robinson. zlib should be linked properly. * GNUmakefile.am: Link $(ZLIB_LIBS) with libwebkit2gtk instead of linking it with WebKitWebProcess. 2012-03-04 Sergio Villar Senin [WK2] [GTK] Destructor not invoked in EditorClientFrameDestructionObserver https://bugs.webkit.org/show_bug.cgi?id=79466 Reviewed by Philippe Normand. Explicitly cast the observer before deleting it instead of just deleting a generic pointer. We must to that in order to get the destructor of the object properly called. * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::EditorClientFrameDestructionObserver::destroyOnClosureFinalization): 2012-03-04 Sergio Villar Senin [WK2][GTK] WebProcess SIGSEVs due to incorrect clipboard handling https://bugs.webkit.org/show_bug.cgi?id=79252 Do not execute clipboard callbacks after the Frame associated with it is destroyed. This change is already covered by the TestWebViewEditor unit tests (among others), they hang (because WebProcess dies) without this patch in Debug builds. * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (EditorClientFrameDestructionObserver): (WebKit::EditorClientFrameDestructionObserver::EditorClientFrameDestructionObserver): (WebKit::EditorClientFrameDestructionObserver::frameDestroyed): (WebKit::EditorClientFrameDestructionObserver::destroyOnClosureFinalization): (WebKit): (WebKit::WebEditorClient::setSelectionPrimaryClipboardIfNeeded): 2012-03-02 Carlos Garcia Campos [GTK] Invalid check in webkit_web_view_set_zoom_level() when zoom-text-only is enabled https://bugs.webkit.org/show_bug.cgi?id=80150 Reviewed by Philippe Normand. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_set_zoom_level): Use webkit_web_view_get_zoom_level() instead of WKPageGetPageZoomFactor() to get the current effective zoom level depending on zoom-text-only setting. 2012-02-29 Carlos Garcia Campos [GTK] Use text or page zoom factor in WebKitWebView depending on zoom-text-only https://bugs.webkit.org/show_bug.cgi?id=75252 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitWebView.cpp: (zoomTextOnlyChanged): Update text/page zoom factor when zoom-text-only setting changes. (webkitWebViewSetSettings): Helper function to set the settings object for the web view, initializing the settings for the page and connecting to notify::zoom-text-only signal. (webkitWebViewConstructed): Use webkitWebViewSetSettings(). (webkit_web_view_set_settings): Use webkitWebViewSetSettings() and disconnect from the notify::zoom-text-only signal of the previous settings object. (webkit_web_view_set_zoom_level): Set text/page zoom factor depending on WebKitSettings:zoom-text-only property. (webkit_web_view_get_zoom_level): Get text/page zoom factor depending on WebKitSettings:zoom-text-only property. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewZoomLevel): 2012-02-29 Carlos Garcia Campos [GTK] Add zoom-text-only setting to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=75249 Reviewed by Gustavo Noronha Silva. To set whether zoom level of web view should affect only the text or all page contents. It's disabled by default. * UIProcess/API/gtk/WebKitSettings.cpp: (webKitSettingsSetProperty): (webKitSettingsGetProperty): (webkit_settings_class_init): Add WebKitSettings:zoom-text-only property. (webkit_settings_set_zoom_text_only): Set WebKitSettings:zoom-text-only. (webkit_settings_get_zoom_text_only): Get WebKitSettings:zoom-text-only. * UIProcess/API/gtk/WebKitSettings.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: (testWebKitSettings): 2012-02-29 Sergio Villar Senin DidFindString should be emitted even if FindOptionsShowOverlay is not enabled https://bugs.webkit.org/show_bug.cgi?id=76522 Reviewed by Darin Adler. DidFindString message should be issued always even if neither FindOptionsShowOverlay or FindOptionsShowHighlight are provided. The difference is that if any of those flags are present the find operation will look for all the appearances of the text in the web view, otherwise it will just look and report the next occurrence. This patch removes the temporary workaround added in r109222 to the WebKitFindController unit tests. * UIProcess/API/gtk/tests/TestWebKitFindController.cpp: * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::findString): 2012-01-19 Sergio Villar Senin [GTK] [WK2] Add Find API https://bugs.webkit.org/show_bug.cgi?id=76070 Reviewed by Martin Robinson. This patch adds a new public find API for the Gtk+ WK2 port. It defines a new object called WebKitFindController owned by each WebKitWebView. Clients will use this new object to search strings in the WebKitWebView. Changes include also documentation and unit tests for the new public API. * GNUmakefile.am: * UIProcess/API/gtk/WebKitDefines.h: * UIProcess/API/gtk/WebKitFindController.cpp: Added. (didFindString): implementation of the WKPage Find interface. (didFailToFindString): Ditto. (didCountStringMatches): Ditto. (webkit_find_controller_init): (getWKPageFromWebKitWebView): (webkitFindControllerConstructed): (webkitFindControllerGetProperty): (webkitFindControllerSetProperty): (webkitFindControllerFinalize): (webkit_find_controller_class_init): (webkit_find_controller_get_search_text): (webkit_find_controller_get_options): (webkit_find_controller_get_max_match_count): (webkit_find_controller_get_web_view): (webKitFindControllerPerform): (webKitFindControllerSetSearchData): (webkit_find_controller_search): asynchronously looks for the search string in the WebKitWebView. (webkit_find_controller_search_finish): unhighlights text matches. (webkit_find_controller_search_next): (webkit_find_controller_search_previous): (webkit_find_controller_count_matches): asynchronously counts the number of matches of the search string in the WebKitWebView. * UIProcess/API/gtk/WebKitFindController.h: Added. * UIProcess/API/gtk/WebKitPrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_get_find_controller): returns the WebKitFindController instance owned by the WebKitWebView. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: * UIProcess/API/gtk/docs/webkit2gtk.types: * UIProcess/API/gtk/tests/GNUmakefile.am: * UIProcess/API/gtk/tests/TestWebKitFindController.cpp: Added. (testFindControllerTextFound): (testFindControllerTextNotFound): (testFindControllerMatchCount): (testFindControllerMaxMatchCount): (testFindControllerNext): (testFindControllerPrevious): (testFindControllerCountedMatches): (testFindControllerOptions): (testFindControllerInstance): (testFindControllerGetters): (testFindControllerHide): (beforeAll): (afterAll): * UIProcess/API/gtk/webkit2.h: 2012-02-22 Martin Robinson [GTK] Clean build is broken when using make -j https://bugs.webkit.org/show_bug.cgi?id=76388 * GNUmakefile.am: Add some WebKit2 sources to global sources lists so that we can refer to them in separate GNUmakefiles. 2012-02-20 Martin Robinson [UNIX] Plugin information fields are not interpreted as UTF-8 https://bugs.webkit.org/show_bug.cgi?id=78635 Reviewed by Gustavo Noronha Silva. Interpret plugin metadata as UTF8 aways. This matches the behavior of Chromium and the Totem plugin. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin): Use String::fromUTF8. 2012-02-20 Carlos Garcia Campos [GTK] Adding SOUP_TYPE_PROXY_RESOLVER_DEFAULT feature to soup session makes WebProcess to hang https://bugs.webkit.org/show_bug.cgi?id=79036 Reviewed by Martin Robinson. This looks like a bug in gobject. Initializing the WebProcess before creating the soup session seems to fix the problem. It's actually a workaround, but initializing the WebProcess as sson as possible it's a good idea in any case. * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): 2012-02-20 Martin Robinson Fix WebKit2GTK+ for 'make distcheck'. Instead of conditionally including WebKit2 GNUmakefiles, always include them and conditionally activate the final targets. * GNUmakefile.am: * UIProcess/API/gtk/tests/GNUmakefile.am: 2012-02-20 Martin Robinson [GTK][WK2] WebKit2 does not build if gtk-unix-printing-3.0 is not available https://bugs.webkit.org/show_bug.cgi?id=79011 Fix the build when gtk-unix-printing-3.0 is not present. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialog): (webkitPrintOperationRunDialogForFrame): * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::WebPrintOperationGtk::create): 2012-02-18 Dan Bernstein BackingStore::scroll() unnecessarily copies pixels around https://bugs.webkit.org/show_bug.cgi?id=78976 Reviewed by Anders Carlsson. Rather than move pixels in the backing store in response to scrolling, we can maintain a mapping, for the most recently scrolled rect, from backing store coordinates to view client coordinates. * UIProcess/BackingStore.h: * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::performWithScrolledRectTransform): Added. Given a block to be performed on a rect, divides the rect into parts such that for each part the mapping from backing store coordinates to client coordinates is a (uniform) translation, and performs the block on that part, passing it the translation that applies to the part. (WebKit::BackingStore::resetScrolledRect): Added. Copies everything in the scrolled rect back to where it should be under the identity map, and resets the scrolled rect and offset. (WebKit::BackingStore::paint): Changed to call through performWithScrolledRectTransform(). (WebKit::BackingStore::incorporateUpdate): Ditto. (WebKit::BackingStore::scroll): Now instead of copying pixels, just updates the scrolled rect and offset. 2012-02-17 No'am Rosenthal [Qt][WK2] Allow opaque tiles https://bugs.webkit.org/show_bug.cgi?id=78809 Apply the SupportsAlpha flag only when the buffers actually have alpha. Reviewed by Kenneth Rohde Christiansen. * Shared/ShareableBitmap.h: (ShareableBitmap): * Shared/qt/ShareableBitmapQt.cpp: * UIProcess/qt/LayerBackingStore.cpp: (WebKit::LayerBackingStoreTile::swapBuffers): 2012-02-17 Adam Roben Clang build fix after r108119 * WebProcess/WebProcess.cpp: (WebKit::randomCrashThread): Annotate this function with NO_RETURN_DUE_TO_CRASH. 2012-02-17 Kalev Lember Remove unused parameters from WTF threading API https://bugs.webkit.org/show_bug.cgi?id=78389 Reviewed by Adam Roben. waitForThreadCompletion() had an out param 'void **result' to get the 'void *' returned by ThreadFunction. However, the implementation in ThreadingWin.cpp ignored the out param, not filling it in. This had led to a situation where none of the client code made use of the param and just ignored it. To clean this up, the patch changes the signature of ThreadFunction to return void instead of void* and drops the the unused 'void **result' parameter from waitForThreadCompletion. Also, all client code is updated for the API change. As mentioned in https://bugs.webkit.org/show_bug.cgi?id=78389 , even though the change only affects internal API, Safari is using it directly and we'll need to keep the old versions around for ABI compatibility. For this, the patch adds compatibility wrappers with the old ABI. * Platform/WorkQueue.h: (WorkQueue): * Platform/gtk/WorkQueueGtk.cpp: (WorkQueue::startWorkQueueThread): * UIProcess/Launcher/mac/ThreadLauncherMac.mm: (WebKit::webThreadBody): * UIProcess/Launcher/qt/ThreadLauncherQt.cpp: (WebKit::webThreadBody): * UIProcess/Launcher/win/ThreadLauncherWin.cpp: (WebKit::webThreadBody): * WebProcess/WebProcess.cpp: (WebKit::randomCrashThread): * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-02-17 Mihnea Ovidenie CSS regions enabled by default https://bugs.webkit.org/show_bug.cgi?id=78525 Reviewed by David Hyatt. Add a runtime preference to enable/disable regions functionality at runtime(WebKitCSSRegionsEnabled). CSSRegions are still enabled by default. In DRT, use layoutTestController.overridePreference("WebKitCSSRegionsEnabled", "0") to disable the css regions functionality. * Shared/WebPreferencesStore.h: (WebKit): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetCSSRegionsEnabled): (WKPreferencesGetCSSRegionsEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2012-02-17 Enrica Casucci Refactor DragData class to use PlatformStrategies in the Mac implementation. https://bugs.webkit.org/show_bug.cgi?id=78768 Reviewed by Darin Adler. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added color() method. (WebKit::WebPlatformStrategies::color): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 2012-02-17 Martin Robinson Fix some warnings encountered during the GTK+ build https://bugs.webkit.org/show_bug.cgi?id=78911 Reviewed by Xan Lopez. * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): Initialize a new member of the loader client struct. 2012-02-17 Carlos Garcia Campos [GTK] Allow printing scaled pages in WebKit2 for printers that don't support it https://bugs.webkit.org/show_bug.cgi?id=78823 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialogUnix): Enable scale option in print dialog. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize manual scale to 1. (WebKit::WebPrintOperationGtk::rotatePageIfNeeded): Renamed and moved the needs rotate check here as an early return. (WebKit::WebPrintOperationGtk::prepareContextToDraw): Scale the page according to the manual scale factor. (WebKit::WebPrintOperationGtk::renderPage): Move rotatePage to prepareContextToDraw. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: 2012-02-17 Carlos Garcia Campos [GTK] Allow printing multiple copies in WebKit2 for printers that don't support it https://bugs.webkit.org/show_bug.cgi?id=78805 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialogUnix): Enable multiple copies and collate options in print dialog. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::PrintPagesData::PrintPagesData): Initialize number of collated and uncolated copies done and total. (WebKit::PrintPagesData::collatedCopiesLeft): Helper function that returns the number of collated copies left to do. (WebKit::PrintPagesData::uncollatedCopiesLeft): Helper function that returns the number of uncollated copies left to do. (WebKit::PrintPagesData::copiesLeft): Helper function that returns the number of collated or uncollated copies left to do. (WebKit::PrintPagesData::incrementPageSequence): Do not finish the print if there are uncollated copies left, and do not increment sheet number if there are collated copies left. (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize m_manualCopies to 1 and m_manualCollateCopies to false. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: 2012-02-17 Carlos Garcia Campos [GTK] Allow printing pages in reverse order in WebKit2 for printers that don't support it https://bugs.webkit.org/show_bug.cgi?id=78799 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialogUnix): Enable printing in reverse order option in print dialog. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::PrintPagesData::PrintPagesData): Initialize sheetNumber and lastPagePosition depending on whether printing is in reverse order or not. (WebKit::PrintPagesData::incrementPageSequence): Use a negative increment step when printing in reverse order. Fix page incrementing when printing only odd/even pages broken in previous commit due to merge conflicts. (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize reverse printing to false. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: 2012-02-17 Carlos Garcia Campos [GTK] Allow printing only odd/even pages in WebKit2 for printers that don't support it https://bugs.webkit.org/show_bug.cgi?id=78793 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialogUnix): Enable print odd/even pages option in print dialog. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::PrintPagesData::PrintPagesData): Add lastPagePosition and initialize it depending on the page set. (WebKit::PrintPagesData::incrementPageSequence): Use 2 step increment when printing only odd/even pages. (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize m_manualPageSet to GTK_PAGE_SET_ALL. 2012-02-17 Carlos Garcia Campos [GTK] Allow printing multiple pages per sheet in WebKit2 for printers that don't support it https://bugs.webkit.org/show_bug.cgi?id=78715 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialogUnix): Enable multiple pages per sheet options in print dialog. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::PrintPagesData::PrintPagesData): Initialize sheetNumber and numberOfSheets. Move pagePosition to WebPrintOperationGtk. (WebKit::PrintPagesData::incrementPageSequence): Increment current sheet and page position. (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): (WebKit::WebPrintOperationGtk::currentPageIsFirstPageOfSheet): Helper function to check whether current pages is the first one of the current sheet. (WebKit::WebPrintOperationGtk::currentPageIsLastPageOfSheet): Helper function to check whether current pages is the last one of the current sheet. (WebKit::WebPrintOperationGtk::getRowsAndColumnsOfPagesPerSheet): Returns the number of rows and columns of pages per sheet. (WebKit::WebPrintOperationGtk::getPositionOfPageInSheet): Returns the row and column number of the current page in the current sheet. (WebKit::WebPrintOperationGtk::prepareContextToDraw): Translate, scale and rotate accordingly to render every page in the right place of the sheet. (WebKit::WebPrintOperationGtk::renderPage): Call prepareContextToDraw() before drawing the page. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: (WebKit::WebPrintOperationGtk::setNumberOfPagesToPrint): (WebKit::WebPrintOperationGtk::pagePosition): (WebKit::WebPrintOperationGtk::setPagePosition): (WebKit::WebPrintOperationGtk::numberUp): (WebKit::WebPrintOperationGtk::numberUpLayout): 2012-02-17 Carlos Garcia Campos [GTK] Rename WebKitPrintOperation::done signal to ::finished in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=78893 Reviewed by Gustavo Noronha Silva. And it's not emitted anynmore when the print dialog has been cancelled. Since it's not possible to know whether the print dialog was cancelled or not, the enum WebKitPrintOperationResponse has been added, with Print and Cancel values, and it's used as return value of webkit_print_operation_run_dialog(). * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkit_print_operation_class_init): Rename done as finished. (webkitPrintOperationRunDialogUnix): Return a WebKitPrintOperationResponse instead of bool. (webkitPrintOperationRunDialogWin32): Ditto. (drawPagesForPrintingCompleted): Emit finished instead of done. (webkitPrintOperationRunDialogForFrame): Do not emit finished if the dialog was cancelled and return a WebKitPrintOperationResponse. (webkit_print_operation_run_dialog): Return WebKitPrintOperationResponse. * UIProcess/API/gtk/WebKitPrintOperation.h: Add WebKitPrintOperationResponse enum. * UIProcess/API/gtk/WebKitPrintOperationPrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewPrintFrame): Check whether the dialog has been cancelled or not and connect to finish when the print operation is in progress to release the print operation object when printing finishes. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add WebKitPrintOperationResponse symbol. * UIProcess/API/gtk/tests/TestPrinting.cpp: (testPrintOperationPrintFinished): Use finished instead of done. (testPrintOperationPrint): Ditto. 2012-02-17 Carlos Garcia Campos [GTK] Add webkit_print_operation_print() to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=76536 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationPrintPagesForFrame): Helper function to call WebPageProxy::drawPagesForPrinting using the given GtkPrintSettings and GtkPageSetup. (webkitPrintOperationRunDialogForFrame): Use webkitPrintOperationPrintPagesForFrame(). (webkit_print_operation_print): Print directly using current GtkPrintSettings and GtkPageSetup without showing the print dialog. * UIProcess/API/gtk/WebKitPrintOperation.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/GNUmakefile.am: * UIProcess/API/gtk/tests/TestPrinting.cpp: (testPrintOperationPrintLoadChanged): (testPrintOperationPrintDone): (testPrintOperationPrintPrinter): (testPrintOperationPrint): (beforeAll): (afterAll): 2012-02-17 No'am Rosenthal [Qt][WK2] Allow partial updates https://bugs.webkit.org/show_bug.cgi?id=78824 Instead of using UpdateInfo to fill the entire tile's texture, we use it as a patch that contains only the dirty rectangle of the current paint. This requires a lot less memory for small updates, for example when typing a text in an input field. This shows a significant reduction in overhead when testing on Mac with Instruments. Reviewed by Simon Hausmann. * UIProcess/qt/LayerBackingStore.cpp: (WebKit::LayerBackingStoreTile::swapBuffers): (WebKit::LayerBackingStoreTile::setBackBuffer): (WebKit): (WebKit::LayerBackingStore::updateTile): * UIProcess/qt/LayerBackingStore.h: (LayerBackingStoreTile): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::updateTileForLayer): * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp: (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer): 2012-02-16 Carlos Garcia Campos [GTK] Make sure print operation object is alive until printing finishes in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=78829 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (drawPagesForPrintingCompleted): Adopt the WebKitPrintOperation reference so that it's released when the callback finishes. (webkitPrintOperationRunDialogForFrame): Pass a reference of WebKitPrintOperation to the printing callback. 2012-02-15 Geoffrey Garen Made Weak single-owner, adding PassWeak https://bugs.webkit.org/show_bug.cgi?id=78740 Reviewed by Sam Weinig. * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::getOrCreateJSObject): Use raw pointer and PassWeak, as required by our new hash map API. 2012-02-16 Sergio Villar Senin [soup] Move important SoupSession feature initialization to WebCore https://bugs.webkit.org/show_bug.cgi?id=68602 Reviewed by Martin Robinson. Moved content sniffer and decoder initialization from the WebProcess to WebCore because network stuff will not work as expected without them. No new tests required as we're just moving stuff from the WebProcess to WebCore. * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): 2012-02-16 Philippe Normand Unreviewed, rolling out r107941. http://trac.webkit.org/changeset/107941 https://bugs.webkit.org/show_bug.cgi?id=68602 Broke 23 http tests on GTK * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): 2012-02-16 No'am Rosenthal [Texmap] Improve the way we deal with BGRA extension https://bugs.webkit.org/show_bug.cgi?id=78822 Get rid of swizzling in the web process. Instead, we moved swizzling back to TextureMapperGL, as we're moving towards a setup where textures are uploaded in the web process. Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/LayerBackingStore.cpp: (WebKit::LayerBackingStoreTile::swapBuffers): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::createImage): * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp: (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::adoptImageBackingStore): 2012-02-16 Carlos Garcia Campos Unreviewed. Fix WebKit2 GTK+ build after r107947. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialogForFrame): 2012-02-16 Alexander Færøy [Qt] Fix linking in debug builds on Mac OS X https://bugs.webkit.org/show_bug.cgi?id=78811 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/tests/bytearraytestdata.h: 2012-02-16 Carlos Garcia Campos [GTK] Page content is incorrectly translated whenh rendering pages for printing in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=78712 Reviewed by Martin Robinson. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::WebPrintOperationGtk::enumeratePrintersFunction): Simplify the code to select the printer. (WebKit::WebPrintOperationGtk::renderPage): Call cairo_save() before rendering the page and cairo_restore() when page has been rendered. 2012-02-16 Carlos Garcia Campos [GTK] Add WebKitPrintOperation to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=76448 Reviewed by Martin Robinson. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitDefines.h: * UIProcess/API/gtk/WebKitPrintOperation.cpp: Added. (webViewDestroyed): Delete the print operation when the view widget associated is destroyed. (webkitPrintOperationConstructed): Connect to destroy signal of associated web view. (webkitPrintOperationGetProperty): (webkitPrintOperationSetProperty): (webkit_print_operation_init): (webkit_print_operation_class_init): (webkitPrintOperationRunDialogUnix): Use GtkPrintUnixDialog to show the printing dialog in UNIX platforms. (webkitPrintOperationRunDialogWin32): Empty, not implemented yet. (drawPagesForPrintingCompleted): Callback called when printing operation has finished in the web process. (webkitPrintOperationRunDialogForFrame): Run the printing dialog and start printing the given frame. (webkit_print_operation_new): Create a new print operation for the given web view. (webkit_print_operation_get_print_settings): (webkit_print_operation_set_print_settings): (webkit_print_operation_get_page_setup): (webkit_print_operation_set_page_setup): (webkit_print_operation_run_dialog): Run the print dialog to print the web view main frame. * UIProcess/API/gtk/WebKitPrintOperation.h: Added. * UIProcess/API/gtk/WebKitPrintOperationPrivate.h: Added. * UIProcess/API/gtk/WebKitUIClient.cpp: (printFrame): Call webkitWebViewPrintFrame. (attachUIClientToView): Add implementation for printFrame callback. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_class_init): Add WebKitWebView::print-requested signal. (webkitWebViewPrintFrame): Emit print-requested and show the print dialog to print the frame when not signal is not handled by user. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitPrintOperation. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/GNUmakefile.am: * UIProcess/API/gtk/tests/TestPrinting.cpp: Added. (testPrintOperationPrintSettings): (webViewPrintRequestedCallback): (testWebViewPrintRequested): (beforeAll): (afterAll): * UIProcess/API/gtk/webkit2.h: Include WebKitPrintOperation.h. 2012-02-16 Simon Hausmann [Gtk][Efl][Qt] Move OpenGLShims out of cairo/ subdirectory https://bugs.webkit.org/show_bug.cgi?id=78800 Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/LayerTreeHostProxyQt.cpp: Adjust to changed OpenGLShims.h location - no more cairo prefix needed. 2012-02-16 No'am Rosenthal [Qt][WK2] Allow opaque tiles https://bugs.webkit.org/show_bug.cgi?id=78809 Set the supportsAlpha flag for TiledBackingStore when the layer has contentsOpaque enabled. Use the flag for ShareableBitmaps created by TiledBackingStore. For now this will not have impact on performance/memory, because we allocate the same type of buffers for opaque and transparent tiles. Reviewed by Kenneth Rohde Christiansen. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::setContentsOpaque): (WebCore::WebGraphicsLayer::setContentsScale): (WebCore::WebGraphicsLayer::createBackingStore): (WebCore): (WebCore::WebGraphicsLayer::updateContentBuffers): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayer): * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp: (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer): 2012-02-16 Sergio Villar Senin [soup] Move important SoupSession feature initialization to WebCore https://bugs.webkit.org/show_bug.cgi?id=68602 Reviewed by Martin Robinson. Moved content sniffer and decoder initialization from the WebProcess to WebCore because network stuff will not work as expected without them. No new tests required as we're just moving stuff from the WebProcess to WebCore. * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): 2012-02-16 Adenilson Cavalcanti [Qt][WK2] Split QWebPermissionRequest into QWebSecurityOrigin https://bugs.webkit.org/show_bug.cgi?id=73215 Reviewed by Kenneth Rohde Christiansen. Introducing a new class to expose security origin information (port/scheme/etc), useful for inspecting the origin of permission requests. * Target.pri: * UIProcess/API/qt/qtwebsecurityorigin.cpp: Added. (QtWebSecurityOrigin::QtWebSecurityOrigin): (QtWebSecurityOrigin::~QtWebSecurityOrigin): (QtWebSecurityOrigin::host): (QtWebSecurityOrigin::scheme): (QtWebSecurityOrigin::path): (QtWebSecurityOrigin::port): (QtWebSecurityOrigin::setHost): (QtWebSecurityOrigin::setScheme): (QtWebSecurityOrigin::setPath): (QtWebSecurityOrigin::setPort): * UIProcess/API/qt/qtwebsecurityorigin_p.h: Added. * UIProcess/API/qt/tests/qmltests/WebView/tst_origin.qml: Added. * UIProcess/API/qt/qwebpermissionrequest.cpp: (QWebPermissionRequestPrivate::QWebPermissionRequestPrivate): (QWebPermissionRequest::securityOrigin): * UIProcess/API/qt/qwebpermissionrequest_p.h: * UIProcess/API/qt/tests/qmltests/qmltests.pro: 2012-02-16 Patrick Gansterer [CMake] Add missing include directories. * CMakeLists.txt: 2012-02-16 Carlos Garcia Campos [GTK] Document that local paths in html loaded with loadHTML might cause the web process to terminate https://bugs.webkit.org/show_bug.cgi?id=78719 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebView.cpp: 2012-02-15 Anders Carlsson Add TiledCoreAnimationDrawingArea::forceRepaint https://bugs.webkit.org/show_bug.cgi?id=78749 Reviewed by Sam Weinig. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::forceRepaint): Force a repaint and synchronize the layer tree to the UI process. 2012-02-15 Enrica Casucci Refactor ClipboardMac class to use PlatformStrategies. https://bugs.webkit.org/show_bug.cgi?id=78554 Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/WebDragClient.h: Changed method signature to reference the pasteboard by name. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added new methods. (WebKit::WebPlatformStrategies::changeCount): (WebKit::WebPlatformStrategies::uniqueName): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Ditto. * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::declareAndWriteDragImage): Changed method signature to reference the pasteboard by name. 2012-02-15 Sadrul Habib Chowdhury Notify ChromeClient when touch-event handlers are installed/removed. https://bugs.webkit.org/show_bug.cgi?id=77440 Reviewed by Darin Fisher and Ryosuke Niwa. * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::numTouchEventHandlersChanged): * WebProcess/WebCoreSupport/WebChromeClient.h: 2012-02-15 Patrick Gansterer [CMake] Move RunLoop to WebCore/platform https://bugs.webkit.org/show_bug.cgi?id=78504 Reviewed by Adam Roben. * CMakeLists.txt: Remove RunLoop.cpp from list of souces. 2012-02-14 Simon Hausmann [Qt] Eliminate first set of QtWidgets dependencies from WebCore https://bugs.webkit.org/show_bug.cgi?id=78611 Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/QtWebPageEventHandler.cpp: Add missing QCursor include to fix compilation. 2012-02-15 Roland Steiner