blob: 4ca039ba03fd2fd2e29e8b0af5fd4869971f3cdf [file] [log] [blame]
2012-05-21 Gavin Barraclough <barraclough@apple.com>
Disable private names by default in WebCore
https://bugs.webkit.org/show_bug.cgi?id=87088
Reviewed by Geoff Garen.
r117859 introduced a preliminary implementation of ES6-like private name objects to JSC.
These are probably not yet ready to be web-facing, so disabling by default in WebCore.
Opting-in for JSC & DumpRenderTree so that we can still run the fast/js/names.html test.
* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetJavaScriptExperimentsEnabled):
(WKPreferencesGetJavaScriptExperimentsEnabled):
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
- Added JavaScriptExperimentsEnabled to WebPreferences.
2012-05-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Clean up internal viewport animation API
https://bugs.webkit.org/show_bug.cgi?id=87130
Reviewed by Simon Hausmann.
const'ify classes which should be const.
There is now only one method which can animate, animateItemRectVisible
which is used for also animating the contents back into valid bounds.
The valid bounds are computed using a separate method. It is now more
clear when an animation is used or not and asserts are added for
ensuring no concurrent animations as well as proper update deferring.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::didChangeViewportProperties):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::cssScaleFromItem):
(WebKit::QtViewportInteractionEngine::itemScaleFromCSS):
(WebKit::QtViewportInteractionEngine::itemCoordFromCSS):
(WebKit::QtViewportInteractionEngine::itemRectFromCSS):
(WebKit::QtViewportInteractionEngine::innerBoundedCSSScale):
(WebKit::QtViewportInteractionEngine::outerBoundedCSSScale):
(WebKit::QtViewportInteractionEngine::setItemRectVisible):
(WebKit::QtViewportInteractionEngine::animateItemRectVisible):
(WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
(WebKit::QtViewportInteractionEngine::nearestValidBounds):
(WebKit::QtViewportInteractionEngine::currentCSSScale):
(WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):
(WebKit::QtViewportInteractionEngine::itemSizeChanged):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
2012-05-21 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Mini clean ups in the interaction engine
https://bugs.webkit.org/show_bug.cgi?id=87013
Reviewed by Simon Hausmann.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::animateItemRectVisible):
Assert that we are suspended.
(WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
Never zoom to any area if suspended which indicates other
animation or user interaction.
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
If immediate is set, ignore suspension.
(WebKit::QtViewportInteractionEngine::itemSizeChanged):
Improve the comment.
2012-05-22 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Tap-to-zoom overshoot animation
https://bugs.webkit.org/show_bug.cgi?id=87108
Reviewed by Kenneth Rohde Christiansen.
Defines a simple animation curve that combines a large
ease-out (overshoot) with a small ease-in (correction).
Uses that curve for zooming animation.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::physicalOvershoot):
(WebKit::QtViewportInteractionEngine::animateItemRectVisible):
2012-05-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Make the resizing code more straight forward
https://bugs.webkit.org/show_bug.cgi?id=87015
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::transformToItem):
(QQuickWebPagePrivate::updateSize):
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewFlickablePrivate):
2012-05-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Add UI tests for fit-to-view
https://bugs.webkit.org/show_bug.cgi?id=86857
Reviewed by Simon Hausmann.
Make sure to always emit contentsScaleCommitted when the
contents size changes, so that it can be used for testing.
Also add a method to do single taps.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::didChangeContentsSize):
* UIProcess/API/qt/qwebkittest.cpp:
(touchPoint):
(QWebKitTest::touchTap):
(QWebKitTest::touchDoubleTap):
* UIProcess/API/qt/qwebkittest_p.h:
* UIProcess/API/qt/tests/qmltests/WebView/tst_fitToView.qml: Added.
2012-05-21 Brady Eidson <beidson@apple.com>
<rdar://problem/11460336> and https://bugs.webkit.org/show_bug.cgi?id=87061
WKPageGetScaleFactor can return 0.0 after a session is restored
Reviewed by Beth Dakin.
API test WKPageGetScaleFactorNotZero added.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::restoreViewState): Tell the UI Process the scale factor
is 1.0 if it has never been manually set.
2012-05-21 Anders Carlsson <andersca@apple.com>
Flash player buttons do not work when page is zoomed in
https://bugs.webkit.org/show_bug.cgi?id=87056
<rdar://problem/11491501>
Reviewed by Oliver Hunt.
Use the page scale factor when computing the plug-in to root view transform, otherwise we'll compute an
incorrect transform for plug-ins inside subframes. Also, make sure that viewGeometryDidChange is called for all plug-ins
when scaling the page since otherwise it won't be called unless the scroll position changes.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pageScaleFactorDidChange):
(WebKit):
(WebKit::PluginView::viewGeometryDidChange):
* WebProcess/Plugins/PluginView.h:
(PluginView):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scalePage):
2012-05-15 Gavin Barraclough <barraclough@apple.com>
Add support for private names
https://bugs.webkit.org/show_bug.cgi?id=86509
Reviewed by Oliver Hunt.
The spec isn't final, but we can start adding support to allow property maps
to contain keys that aren't identifiers.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::npIdentifierFromIdentifier):
(WebKit::JSNPObject::methodGetter):
- Removed PropertyName::impl(), call publicName() to get the string associated with a name.
2012-05-21 Hugo Parente Lima <hugo.lima@openbossa.org>
[Qt][WK2] fast/forms/submit-to-blank-multiple-times.html fails
https://bugs.webkit.org/show_bug.cgi?id=68309
Reviewed by Alexis Menard.
Force focus when the element receives a double click event.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::mouseDoubleClickEvent):
2012-05-21 Marcelo Lira <marcelo.lira@openbossa.org>
[Qt][WK2] REGRESSION, fix a failing API test in qmltests
https://bugs.webkit.org/show_bug.cgi?id=82700
Reviewed by Alexis Menard.
The value of a CSS font-family property is expected to have single
quotes when white space is present in its name, and no quotes otherwise.
Font family names returned by WebView.experimental.preferences never add quotes.
Since what matter to the test is only the identity of the font, an auxiliar
method to remove single quotes was added.
* UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
2012-05-21 Allan Sandfeld Jensen <allan.jensen@nokia.com>
GCC 4.7 and C++11
https://bugs.webkit.org/show_bug.cgi?id=86465
Reviewed by Darin Adler.
Avoid triggering C++11 string literals.
* UIProcess/API/qt/tests/inspectorserver/tst_inspectorserver.cpp:
2012-05-21 Allan Sandfeld Jensen <allan.jensen@nokia.com>
Disambiguate WTF::bind and std::bind from C++11
https://bugs.webkit.org/show_bug.cgi?id=86465
Reviewed by Darin Adler.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::SyncMessageState::processIncomingMessage):
(CoreIPC::Connection::addQueueClient):
(CoreIPC::Connection::removeQueueClient):
(CoreIPC::Connection::invalidate):
(CoreIPC::Connection::sendMessage):
(CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
(CoreIPC::Connection::connectionDidClose):
(CoreIPC::Connection::enqueueIncomingMessage):
* Platform/CoreIPC/unix/ConnectionUnix.cpp:
(CoreIPC::Connection::open):
(CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::pluginThreadAsyncCall):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):
2012-05-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add GCancellable parameter to all methods using gio async pattern
https://bugs.webkit.org/show_bug.cgi?id=86843
Reviewed by Gustavo Noronha Silva.
Add a private macro WEBKIT_DEFINE_ASYNC_DATA_STRUCT() to make it
easier to define temporary structs used in async operations.
* UIProcess/API/gtk/WebKitCookieManager.cpp:
(GetAcceptPolicyAsyncData):
(webkitCookieManagerGetAcceptPolicyCallback):
(webkit_cookie_manager_get_accept_policy):
(webkit_cookie_manager_get_accept_policy_finish):
(GetDomainsWithCookiesAsyncData):
(webkitCookieManagerGetDomainsWithCookiesCallback):
(webkit_cookie_manager_get_domains_with_cookies):
(webkit_cookie_manager_get_domains_with_cookies_finish):
* UIProcess/API/gtk/WebKitCookieManager.h:
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_get_plugins):
* UIProcess/API/gtk/WebKitWebResource.cpp:
(ResourceGetDataAsyncData):
(resourceDataCallback):
(webkit_web_resource_get_data):
(webkit_web_resource_get_data_finish):
* UIProcess/API/gtk/WebKitWebResource.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(ValidateEditingCommandAsyncData):
(didValidateCommand):
(webkit_web_view_can_execute_editing_command):
(webkit_web_view_can_execute_editing_command_finish):
(RunJavaScriptAsyncData::~RunJavaScriptAsyncData):
(RunJavaScriptAsyncData):
(webkitWebViewRunJavaScriptCallback):
(webkit_web_view_run_javascript):
(webkit_web_view_run_javascript_finish):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/tests/TestCookieManager.cpp:
* UIProcess/API/gtk/tests/TestResources.cpp:
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
* UIProcess/API/gtk/tests/TestWebViewEditor.cpp:
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::runJavaScriptAndWaitUntilFinished):
2012-05-19 Andy Estes <aestes@apple.com>
Use USE_APPKIT and USE_SECURITY_FRAMEWORK in a few more places
https://bugs.webkit.org/show_bug.cgi?id=86951
Reviewed by Dan Bernstein.
* UIProcess/WebProcessProxy.messages.in: Change #if PLATFORM(MAC) to
the more specific #if USE(SECURITY_FRAMEWORK).
* UIProcess/mac/WebPageProxyMac.mm: Wrap some uses of AppKit classes
with #if USE(APPKIT).
* UIProcess/mac/WebPopupMenuProxyMac.h: Ditto.
* UIProcess/mac/WebPopupMenuProxyMac.mm: Ditto.
2012-05-18 Anders Carlsson <andersca@apple.com>
REGRESSION (r108181): corruption after scrolling
https://bugs.webkit.org/show_bug.cgi?id=86934
<rdar://problem/11487337>
Reviewed by Dan Bernstein.
Use the flipped Y coordinate when resetting the scrolled rect.
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::resetScrolledRect):
2012-05-19 Andy Estes <aestes@apple.com>
Fix build errors found when disabling ENABLE_DRAG_SUPPORT
https://bugs.webkit.org/show_bug.cgi?id=86947
Reviewed by Jon Honeycutt.
Fix more build errors.
* UIProcess/API/mac/WKView.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:
2012-05-19 Andy Estes <aestes@apple.com>
Fix build errors found when disabling ENABLE_DRAG_SUPPORT
https://bugs.webkit.org/show_bug.cgi?id=86947
Reviewed by Jon Honeycutt.
* UIProcess/API/mac/WKView.mm:
(createSandboxExtensionsForFileUpload):
(-[WKView performDragOperation:]):
* WebProcess/WebCoreSupport/WebDragClient.cpp:
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::shouldDelayWindowOrderingEvent):
(WebKit::WebPage::acceptsFirstMouse):
2012-05-19 Andy Estes <aestes@apple.com>
Plug-in process should only be enabled if Netscape plug-in API is enabled
https://bugs.webkit.org/show_bug.cgi?id=86945
Reviewed by Dan Bernstein.
* config.h: Only define ENABLE_PLUGIN_PROCESS if ENABLE_NETSCAPE_PLUGIN_API is true.
2012-04-27 Filip Pizlo <fpizlo@apple.com>
DFG should have control flow graph simplification
https://bugs.webkit.org/show_bug.cgi?id=84553
Reviewed by Oliver Hunt.
Merged r115512 from dfgopt.
JSValue::toBoolean(ExecState*) -> JSValue::toBoolean()
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
2012-05-18 Anders Carlsson <andersca@apple.com>
Missing plugin msg becomes "insecure plugin version" after Real Player page refresh
https://bugs.webkit.org/show_bug.cgi?id=86903
<rdar://problem/11477163>
Reviewed by Andreas Kling.
Set blocked to false before returning early when the plug-in doesn't exist.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::getPluginPath):
2012-05-18 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
[GTK] [WK2] Memory leaks in WebKitBackForwardList
https://bugs.webkit.org/show_bug.cgi?id=86872
Reviewed by Martin Robinson.
Fix memory leaks by adopting WKArray of WebBackForwardListItems
allocations using AdoptWK.
* UIProcess/API/gtk/WebKitBackForwardList.cpp:
(webkit_back_forward_list_get_back_list):
(webkit_back_forward_list_get_back_list_with_limit):
(webkit_back_forward_list_get_forward_list):
(webkit_back_forward_list_get_forward_list_with_limit):
2012-05-18 Anders Carlsson <andersca@apple.com>
PDF page does not show up when opened in the background
https://bugs.webkit.org/show_bug.cgi?id=86890
<rdar://problem/11259951>
Reviewed by Andreas Kling.
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateAcceleratedCompositingMode:WebKit::]):
Just set the new render layer if we're already in accelerated compositing mode.
2012-05-18 Tony Chang <tony@chromium.org>
remove the CSS_GRID_LAYOUT compiler define, but default grid layout to off
https://bugs.webkit.org/show_bug.cgi?id=86767
Reviewed by Ojan Vafai.
* Configurations/FeatureDefines.xcconfig:
* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCSSGridLayoutEnabled):
(WKPreferencesGetCSSGridLayoutEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2012-05-18 Shezan Baig <shezbaig.wk@gmail.com>
Expose FrameSelection::absoluteCaretBounds via window.internals
https://bugs.webkit.org/show_bug.cgi?id=86390
Reviewed by Ryosuke Niwa.
Exports necessary symbols.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-05-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Allow to attach/detach the inspector in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=86823
Reviewed by Gustavo Noronha Silva.
Also rename WebInspectorGtk.cpp as WebInspectorProxyGtk.cpp since
it implements the platform specific methods of WebInspectorProxy.
* GNUmakefile.list.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseContainerAdd): Allow to add a WebView containing
the inspector as an internal child.
(webkitWebViewBaseContainerRemove): Check whether the widget
removed is the inspector web view.
(webkitWebViewBaseContainerForall): When includeInternals is True,
add also the inspector web view if it's present.
(resizeWebKitWebViewBaseFromAllocation): Allocate space for the
inspector web view if it's present.
(webkitWebViewBaseSetInspectorViewHeight): Private function used
by the inspector proxy to set the height of the inspector web
view.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/WebInspectorProxy.h:
(WebInspectorProxy): Remove unneeded method windowDestroyed.
* UIProcess/gtk/WebInspectorProxyGtk.cpp: Renamed from Source/WebKit2/UIProcess/gtk/WebInspectorGtk.cpp.
(WebKit::inspectorFilesBasePath):
(WebKit::inspectorWindowClosed): Renamed as inspectorWindowClosed
instead of inspectorWindowDestroyed, since this is called when the
window manager requests to close the window, and not when the
widget is destroyed. Also remove the call to windowDestroyed that
has been removed.
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::createInspectorWindow): Helper
function to create the inspector window and add the inspector
view. Also set the inspector window as transient for the
inspected view toplevel window. And use a weak pointer to make
sure inspector window pointer is NULL when it's destroyed, not
only when the window is closed.
(WebKit::WebInspectorProxy::platformOpen): Call platformAttach if
the inspector is opened attached, or createInspectorWindow
otherwise.
(WebKit::WebInspectorProxy::platformDidClose): Always set the view
inspector pointer to NULL.
(WebKit::WebInspectorProxy::platformBringToFront): Implement it by
showing the toplevel window where the inspector view is contained.
(WebKit::WebInspectorProxy::platformIsFront): Implement it by
checking whether the toplevel window where the inspector view is
contained is active or not.
(WebKit::WebInspectorProxy::platformInspectedURLChanged): Return
early if there's no inspector window.
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
(WebKit::WebInspectorProxy::platformInspectedWindowHeight): Return
the height of the inpected view.
(WebKit::WebInspectorProxy::platformAttach): Remove the view from
the current window if there's one, and insert the inspector view
into the inspected view.
(WebKit::WebInspectorProxy::platformDetach): Remove the inspector
view from the inspected view and create a new window for it if
it's visible.
(WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Call
webkitWebViewBaseSetInspectorViewHeight().
2012-05-18 Carlos Garcia Campos <cgarcia@igalia.com>
Return TRUE for events handled to avoid their propagation.
Reviewed by Gustavo Noronha Silva.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseButtonPressEvent):
(webkitWebViewBaseButtonReleaseEvent):
(webkitWebViewBaseScrollEvent):
(webkitWebViewBaseMotionNotifyEvent):
2012-05-18 Hugo Parente Lima <hugo.lima@openbossa.org>
[Qt][WK2] fast/events/page-visibility-iframe-move-test.html fails
https://bugs.webkit.org/show_bug.cgi?id=86731
Reviewed by Simon Hausmann.
Set the page visibility on a single page instead of on all pages
from the page group.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetPageVisibilityState):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPageVisibilityState):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):
2012-05-18 MORITA Hajime <morrita@google.com>
Yet another unreviewed build fix on r117572, this time for wk2...
* WebProcess/WebCoreSupport/WebEditorClient.h:
2012-05-17 Philippe Normand <pnormand@igalia.com>
Unreviewed, WebKit2 GTK/Qt build fix attempt after r117516.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
2012-05-17 Anders Carlsson <andersca@apple.com>
Plug-ins blacklist mechanism can tell clients about plug-in with null identifier
https://bugs.webkit.org/show_bug.cgi?id=86788
<rdar://problem/11479503>
Reviewed by John Sullivan.
Pass along the URL string of the blocked plug-in so we can find the plug-in even if there was no
MIME type specified in the <embed> or <object> tag.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
2012-05-17 Oliver Hunt <oliver@apple.com>
Endeavour to make the windows test bot actually able to run tests.
https://bugs.webkit.org/show_bug.cgi?id=86772
Reviewed by Sam Weinig.
Remove the ClassInfo exports from the .def files as we're now using
WEBKIT_EXPORT declarations to get expected behaviour on windows.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-05-17 Timothy Hatcher <timothy@apple.com>
Make the docked Web Inspector use autoresizing masks so the view doesn't jitter when
resizing the window.
https://webkit.org/b/86765
Reviewed by John Sullivan.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter close]): Added. Zero out _inspectorProxy.
(-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]): Perform the work on a delay to
prevent interfering with Cocoa's resizing.
(WebKit::WebInspectorProxy::createInspectorWindow): Added setAutoresizingMask: call.
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Removed setAutoresizingMask: call.
createInspectorWindow and platformAttach do this now.
(WebKit::WebInspectorProxy::platformDidClose): Call close on WKWebInspectorProxyObjCAdapter.
(WebKit::WebInspectorProxy::platformAttach): Added setAutoresizingMask: call.
2012-05-16 Andreas Kling <kling@webkit.org>
Make PluginInfoStore properly thread-safe.
<http://webkit.org/b/86648>
<rdar://problem/11451178>
Reviewed by Darin Adler.
Deep copy the internal storage of PluginInfoStore after constructing it, as we can
be doing this from a secondary thread.
* Shared/Plugins/PluginModuleInfo.h:
(WebKit::PluginModuleInfo::isolatedCopy):
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::deepIsolatedCopyPluginInfoVector):
(WebKit::PluginInfoStore::loadPluginsIfNecessary):
(WebKit::PluginInfoStore::plugins):
2012-05-17 Hironori Bono <hbono@chromium.org>
[Refactoring] Move platform-specific code in Editor::respondToChangedSelection to the WebKit layer
https://bugs.webkit.org/show_bug.cgi?id=86591
Reviewed by Ryosuke Niwa.
This change adds a TextCheckerClient::shouldEraseMarkersAfterChangeSelection
function to remove platform-specific code from Editor::respondToChangedSelection
function.
No new tests, no change in behavior.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
(WebKit):
* WebProcess/WebCoreSupport/WebEditorClient.h:
2012-05-17 Dan Bernstein <mitz@apple.com>
REGRESSION (r117428): WebKit API/SPI was removed
https://bugs.webkit.org/show_bug.cgi?id=86748
Reverted r117428.
* win/WebKit2.def:
2012-05-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Convert setDomainRelaxationForbiddenForURLScheme to use InternalSettings interface
https://bugs.webkit.org/show_bug.cgi?id=86704
Reviewed by Eric Seidel.
* win/WebKit2.def: Add setDomainRelaxationForbiddenForURLScheme symbol filter.
2012-05-16 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed build change after exported symbol
updates (r114790) and expansion of CG routines in WebPage
PDF output (r114476).
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawRectToPDF): Exclude CG use on WinCairo.
(WebKit::WebPage::drawPagesToPDF): Exclude CG use on WinCairo.
* win/WebKit2CFLite.def: Don't claim to export symbols we don't
provide (e.g., full screen API calls).
2012-05-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add API to get plugins to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=86356
Reviewed by Martin Robinson.
* GNUmakefile.list.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitMimeInfo.cpp: Added.
(_WebKitMimeInfo): Boxed type to represent MIME type information.
(webkitMimeInfoCreate): Ceate a new WebKitMimeInfo.
(webkit_mime_info_ref):
(webkit_mime_info_unref):
(webkit_mime_info_get_mime_type): Return the mime type.
(webkit_mime_info_get_description): Return the mime type
description.
(webkit_mime_info_get_extensions): Return the list of extensions
associated to the mime type.
* UIProcess/API/gtk/WebKitMimeInfo.h: Added.
* UIProcess/API/gtk/WebKitMimeInfoPrivate.h: Added.
* UIProcess/API/gtk/WebKitPlugin.cpp: Added.
(webkitPluginFinalize):
(webkit_plugin_init):
(webkit_plugin_class_init):
(webkitPluginCreate): Create a new WebKitPlugin for the given
PluginModuleInfo.
(webkit_plugin_get_name): Return the plugin name.
(webkit_plugin_get_description): Return the plugin description.
(webkit_plugin_get_path): Return the path where the plugin is
installed.
(webkit_plugin_get_mime_info_list): Return the list of mime types
handled by the plugin.
* UIProcess/API/gtk/WebKitPlugin.h: Added.
* UIProcess/API/gtk/WebKitPluginPrivate.h: Added.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_set_additional_plugins_directory): Set an
additional directory to be scanned for plugins.
(GetPluginsAsyncData): Helper struct used to asynchronously get
the list of plugins.
(getPluginsAsyncDataCreate): Create a GetPluginsAsyncData struct.
(getPluginsAsyncDataDestroy): Destroy a GetPluginsAsyncData
struct.
(webkitWebContextGetPluginThread): Thread body to get the list of
plugins installed.
(webkit_web_context_get_plugins): Asynchronously get the list of
plugins installed.
(webkit_web_context_get_plugins_finish): Finish async operation
started by webkit_web_context_get_plugins() returning a list of
WebKitPlugin.
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
WebKitPlugin.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add new types.
* UIProcess/API/gtk/tests/GNUmakefile.am:
* UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
(testWebContextGetPlugins):
(beforeAll):
* UIProcess/API/gtk/webkit2.h:
2012-05-16 Brady Eidson <beidson@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=86638
Bump the version number on the WKBundlePageLoaderClient
Reviewed by Dan Bernstein.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h: s/1/2/
* Shared/APIClientTraits.cpp: Update client traits for the BundlePageLoaderClient
* Shared/APIClientTraits.h: Update client traits for the BundlePageLoaderClient
* ChangeLog: Change a confusing ChangeLog entry to reflect the actual client that was changed.
2012-05-16 Dinu Jacob <dinu.jacob@nokia.com>
Add didFinishProgress BundlePageLoaderClient callback
https://bugs.webkit.org/show_bug.cgi?id=86541
Reviewed by Kenneth Rohde Christiansen.
Added didFinishProgress BundleUIClient callback needed by
WebKitTestRunner. This callback is invoked in postProgressFinishedNotification.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didFinishProgress):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
(InjectedBundlePageLoaderClient):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
2012-05-16 Keishi Hattori <keishi@webkit.org>
[chromium] Add WebKit API to access inner text value of input element
https://bugs.webkit.org/show_bug.cgi?id=85353
Reviewed by Kent Tamura.
* win/WebKit2.def: Added HTMLInputElement::setEditingValue
* win/WebKit2CFLite.def: Added HTMLInputElement::setEditingValue
2012-05-16 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Move WebFrameNetworkingContext to WebKit namespace.
https://bugs.webkit.org/show_bug.cgi?id=86590
Reviewed by Simon Hausmann.
* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
(WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
(WebKit::WebFrameNetworkingContext::create):
* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
(WebKit):
(WebFrameNetworkingContext):
(WebKit::WebFrameNetworkingContext::originatingObject):
(WebKit::WebFrameNetworkingContext::~WebFrameNetworkingContext):
(WebKit::WebFrameNetworkingContext::networkAccessManager):
(WebKit::WebFrameNetworkingContext::mimeSniffingEnabled):
(WebKit::WebFrameNetworkingContext::thirdPartyCookiePolicyPermission):
2012-05-16 Andras Becsi <andras.becsi@nokia.com>
[WTR] Visited link tracking is not disabled properly
https://bugs.webkit.org/show_bug.cgi?id=76699
Reviewed by Jocelyn Turcotte.
If PLATFORM_STRATEGIES is enabled visited link tracking is done through
VisitedLinkProvider and not through PageGroup.
InjectedBundle sets the shouldTrackVisitedLinks flag on the PageGroup,
thus the shared VisitedLinkTable does get populated with visited links
regardless of the flag.
The WebProcess should only track visited links if tracking is specifically
enabled for a test through WTR's LayoutTestController.
This patch fixes several flacky and failing layout tests on Qt-WK2.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setShouldTrackVisitedLinks): Let the WebProcess
know about visited link tracking.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::setShouldTrackVisitedLinks):
(WebKit::WebProcess::addVisitedLink):
* WebProcess/WebProcess.h:
(WebProcess):
2012-05-15 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Fix Qt5/Mac build after r117212 by adding missing NETSCAPE_PLUGIN_API guards
https://bugs.webkit.org/show_bug.cgi?id=86577
Reviewed by Andy Estes.
* Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp:
* UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
(WebKit::PluginInfoStore::getPluginInfo):
* WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
2012-05-15 Andy Estes <aestes@apple.com>
WebKit2 would fail to build on Windows if Netscape plug-ins were disabled.
* UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
(WebKit::PluginInfoStore::getPluginInfo): Return false if ENABLE_NETSCAPE_PLUGIN_API is false.
2012-05-15 Andy Estes <aestes@apple.com>
Guard Netscape plug-in code with ENABLE(NETSCAPE_PLUGIN_API)
https://bugs.webkit.org/show_bug.cgi?id=86496
Reviewed by Sam Weinig.
Ensure that WebKit2 can compile with ENABLE_NETSCAPE_PLUGIN_API disabled.
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
* Shared/Plugins/Netscape/NetscapePluginModule.h:
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
* Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::getPluginInfo):
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
* WebProcess/Plugins/Netscape/JSNPMethod.h:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.h:
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
* WebProcess/Plugins/Netscape/NPJSObject.h:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
* WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
* WebProcess/Plugins/Netscape/NPRuntimeUtilities.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
* WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h:
* WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
* WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp:
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
* WebProcess/Plugins/PluginController.h:
(PluginController):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::Stream::didFinishLoading):
(WebKit::PluginView::PluginView):
(WebKit::PluginView::~PluginView):
(WebKit::PluginView::scriptObject):
(WebKit):
* WebProcess/Plugins/PluginView.h:
(PluginView):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getSitesWithPluginData):
(WebKit::WebProcess::clearPluginSiteData):
2012-05-15 Michael Brüning <michael.bruning@nokia.com>
[Qt][WK2] http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml crashes
https://bugs.webkit.org/show_bug.cgi?id=80209
Reviewed by Kenneth Rohde Christiansen.
This patch adds a method isOpen to WebIconDatabase to
be able to check whether the database has already been opened.
This helps preventing problems when reusing a WebContext
to create another view, as e.g. WebKitTestRunner does it in the
Qt port.
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::setDatabasePath):
(WebKit::WebIconDatabase::isOpen): Added.
(WebKit):
* UIProcess/WebIconDatabase.h:
(WebIconDatabase):
* UIProcess/qt/QtWebIconDatabaseClient.cpp:
(WebKit::QtWebIconDatabaseClient::QtWebIconDatabaseClient):
2012-05-15 Anders Carlsson <andersca@apple.com>
Use unaccelerated scrolling deltas when rubber-banding
https://bugs.webkit.org/show_bug.cgi?id=86503
<rdar://problem/11378742>
Reviewed by Sam Weinig.
* Shared/WebEvent.h:
(WebWheelEvent):
(WebKit::WebWheelEvent::scrollCount):
(WebKit::WebWheelEvent::unacceleratedScrollingDelta):
Add scroll count and unaccelerated scrolling delta.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
Initialize scroll count and unaccelerated scrolling deltas.
* Shared/WebWheelEvent.cpp:
(WebKit::WebWheelEvent::WebWheelEvent):
Initialize scroll count and unaccelerated scrolling deltas.
(WebKit::WebWheelEvent::encode):
(WebKit::WebWheelEvent::decode):
Encode and decode scroll count and unaccelerated scrolling deltas.
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebWheelEvent):
Initialize the scroll count and unaccelerated scrolling deltas from the underlying NSEvent.
* UIProcess/WebPageProxy.cpp:
(WebKit::coalesce):
Coalesce unaccelerated scrolling deltas as well.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Init new WKSI functions.
2012-05-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r117095.
http://trac.webkit.org/changeset/117095
https://bugs.webkit.org/show_bug.cgi?id=86511
broke Qt Mac build (Requested by estes on #webkit).
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
* Shared/Plugins/Netscape/NetscapePluginModule.h:
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
* Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::getPluginInfo):
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
* WebProcess/Plugins/Netscape/JSNPMethod.h:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.h:
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
* WebProcess/Plugins/Netscape/NPJSObject.h:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
* WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
* WebProcess/Plugins/Netscape/NPRuntimeUtilities.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
* WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h:
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
* WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp:
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2012-05-15 Alexey Proskuryakov <ap@apple.com>
[WK2] Crash when dropping a reference to a non-existing file
https://bugs.webkit.org/show_bug.cgi?id=86505
<rdar://problem/11402084>
Reviewed by Darin Adler.
* WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): Check that
extension handle actually has a non-null extension. Extensions for non-existent files can not
exist, so they are passed as null ones.
2012-05-15 Andy Estes <aestes@apple.com>
Add WTF_USE_SECURITY_FRAMEWORK and use it in place of the less specific PLATFORM(MAC)
https://bugs.webkit.org/show_bug.cgi?id=86508
Reviewed by Sam Weinig.
* Shared/cf/ArgumentCodersCF.cpp:
(CoreIPC::typeFromCFTypeRef):
(CoreIPC::encode):
(CoreIPC::decode):
(CoreIPC):
* Shared/cf/ArgumentCodersCF.h:
(CoreIPC):
* Shared/mac/KeychainAttribute.cpp:
* Shared/mac/KeychainAttribute.h:
* Shared/mac/SecKeychainItemRequestData.cpp:
* Shared/mac/SecKeychainItemRequestData.h:
* Shared/mac/SecKeychainItemResponseData.cpp:
* Shared/mac/SecKeychainItemResponseData.h:
* UIProcess/WebProcessProxy.h:
(WebKit):
(WebProcessProxy):
* WebProcess/mac/WebProcessMac.mm:
2012-05-15 Andreas Kling <kling@webkit.org>
Deep copy PluginModuleInfo before passing across thread boundary.
<http://webkit.org/b/86491>
<rdar://problem/11451178>
Reviewed by Anders Carlsson.
Since the vector of PluginModuleInfo objects returned by PluginInfoStore::plugins()
can end up being passed to another thread, we should clone it to make sure it's
safe to do so.
No new tests, speculative use-after-free fix.
* Shared/Plugins/PluginModuleInfo.h:
(PluginModuleInfo):
(WebKit::PluginModuleInfo::isolatedCopy):
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::plugins):
2012-05-15 Andy Estes <aestes@apple.com>
Guard Netscape plug-in code with ENABLE(NETSCAPE_PLUGIN_API)
https://bugs.webkit.org/show_bug.cgi?id=86496
Reviewed by Dan Bernstein.
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
* Shared/Plugins/Netscape/NetscapePluginModule.h:
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
* Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::individualPluginPaths):
(WebKit::PluginInfoStore::getPluginInfo):
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
* WebProcess/Plugins/Netscape/JSNPMethod.h:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.h:
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
* WebProcess/Plugins/Netscape/NPJSObject.h:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
* WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
* WebProcess/Plugins/Netscape/NPRuntimeUtilities.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
* WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h:
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
* WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp:
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2012-05-14 Andy Estes <aestes@apple.com>
Guard some AppKit-specific code in WebKit2 with USE(APPKIT)
https://bugs.webkit.org/show_bug.cgi?id=86444
Reviewed by Sam Weinig.
* Shared/NativeWebKeyboardEvent.h:
(NativeWebKeyboardEvent):
(WebKit::NativeWebKeyboardEvent::nativeEvent):
* Shared/NativeWebMouseEvent.h:
(NativeWebMouseEvent):
(WebKit::NativeWebMouseEvent::nativeEvent):
* Shared/NativeWebWheelEvent.h:
(NativeWebWheelEvent):
(WebKit::NativeWebWheelEvent::nativeEvent):
* Shared/mac/ArgumentCodersMac.h:
(CoreIPC):
* Shared/mac/ArgumentCodersMac.mm:
(CoreIPC::typeFromObject):
(CoreIPC::encode):
(CoreIPC::decode):
* Shared/mac/WebEventFactory.mm:
* WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
(WebKit::WebPopupMenu::setUpPlatformData):
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain):
2012-05-15 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][WK2] fast/loader/create-frame-in-DOMContentLoaded.html crashes
https://bugs.webkit.org/show_bug.cgi?id=83578
Retrieve and save page ID only for a valid page in WebFrameNetworkingContext.
The page will be null if the frame was detached from the page.
Reviewed by Simon Hausmann.
* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
(WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):
2012-05-15 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt][WK2] Fix scrolling in touch mode
https://bugs.webkit.org/show_bug.cgi?id=75006
Reviewed by Kenneth Rohde Christiansen.
Only handle mouse-wheel events in WebCore to avoid double scrolling, and
scale pixels scrolled by wheel events according to viewport transformation.
* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::WebEventFactory::createWebWheelEvent):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleWheelEvent):
2012-05-15 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Add infra for testing double-tap to zoom functionality etc
https://bugs.webkit.org/show_bug.cgi?id=86474
Reviewed by Simon Hausmann.
Rename the WebViewportInfo class to QWebKitTest in preparation
of becoming a separate module. Adapt the use API.
Modify the API to work better for testing and make sure the
signals are emitted the right places. Also add a method for
simulating a double tap.
Work around issue with animations not running when the item
doesn't have focus.
Create an example test for double-tap to zoom, showing how we can
now create UI tests using QML.
* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::setContentsSize):
(QQuickWebPage::setContentsScale):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::didChangeViewportProperties):
(QQuickWebViewFlickablePrivate::_q_contentViewportChanged):
(QQuickWebViewFlickablePrivate::didChangeContentsSize):
(QQuickWebViewExperimental::QQuickWebViewExperimental):
(QQuickWebViewExperimental::test):
(QQuickWebView::mouseDoubleClickEvent):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/qwebkittest.cpp: Renamed from Source/WebKit2/UIProcess/API/qt/qwebviewportinfo.cpp.
(QWebKitTest::QWebKitTest):
(QWebKitTest::~QWebKitTest):
(QWebKitTest::touchDoubleTap):
(QWebKitTest::contentsSize):
(QWebKitTest::contentsScale):
(QWebKitTest::devicePixelRatio):
(QWebKitTest::initialScale):
(QWebKitTest::minimumScale):
(QWebKitTest::maximumScale):
(QWebKitTest::isScalable):
(QWebKitTest::layoutSize):
* UIProcess/API/qt/qwebkittest_p.h: Renamed from Source/WebKit2/UIProcess/API/qt/qwebviewportinfo_p.h.
* UIProcess/API/qt/tests/qmltests/WebView/tst_doubleTapToZoom.qml: Added.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::animateItemRectVisible):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
2012-05-15 Michael Brüning <michael.bruning@nokia.com>
[Qt][WK2] http/tests/navigation/https-in-page-cache.html fails with timeout
https://bugs.webkit.org/show_bug.cgi?id=83576
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::handleCertificateVerificationRequest):
(QQuickWebView::allowAnyHTTPSCertificateForLocalHost): Added.
(QQuickWebView::setAllowAnyHTTPSCertificateForLocalHost): Added.
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate): Added bool m_allowAnyHTTPSCertificateForLocalHost.
2012-05-14 Shinya Kawanaka <shinyak@chromium.org>
document.execCommand('Indent') in the direct child of ShadowRoot causes a crash.
https://bugs.webkit.org/show_bug.cgi?id=86341
Reviewed by Ryosuke Niwa.
Exports necessary symbols.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-05-14 Luke Macpherson <macpherson@chromium.org>
Introduce ENABLE_CSS_VARIABLES compile flag.
https://bugs.webkit.org/show_bug.cgi?id=86338
Reviewed by Dimitri Glazkov.
Add a configuration option for CSS Variables support, disabling it by default.
* Configurations/FeatureDefines.xcconfig:
2012-05-14 Michael Saboff <msaboff@apple.com>
Enh: Add the Ability to Disable / Enable JavaScript GC Timer
https://bugs.webkit.org/show_bug.cgi?id=86382
Reviewed by Darin Adler.
Plumbing to set / clear JS GC activity timer enable flag.
* UIProcess/API/C/WKContext.cpp:
(WKContextSetJavaScriptGarbageCollectorTimerEnabled):
* UIProcess/API/C/WKContext.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::setJavaScriptGarbageCollectorTimerEnabled):
* UIProcess/WebContext.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setJavaScriptGarbageCollectorTimerEnabled):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2012-05-14 Anders Carlsson <andersca@apple.com>
The "plug-in was blocked" callback needs to include enough info to uniquely identify the plug-in + version
https://bugs.webkit.org/show_bug.cgi?id=86395
<rdar://problem/11447652>
Reviewed by John Sullivan.
Add the plug-in identifier and version string to the didFail client callback.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didFailToInitializePlugin):
Pass a null plug-in identifier and version here since we don't have the plug-in information here.
(WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
* UIProcess/WebLoaderClient.h:
(WebLoaderClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
2012-05-14 Andreas Kling <kling@webkit.org>
REGRESSION(r116796): Assertion failure in API tests
<http://webkit.org/b/86378>
<rdar://problem/10777218>
Reviewed by Anders Carlsson.
Invalidate the plugin work queue in ~WebContext to avoid hitting
the !m_isValid assertion in ~WorkQueue later on.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::~WebContext):
2012-05-14 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r116969.
http://trac.webkit.org/changeset/116969
https://bugs.webkit.org/show_bug.cgi?id=86386
i accidentally the icondatabase (Requested by kling on
#webkit).
* UIProcess/WebContext.cpp:
(WebKit::WebContext::~WebContext):
2012-05-14 Andreas Kling <kling@webkit.org>
REGRESSION(r116796): Assertion failure in API tests
<http://webkit.org/b/86378>
<rdar://problem/10777218>
Reviewed by Anders Carlsson.
Invalidate the plugin work queue in ~WebContext to avoid hitting
the !m_isValid assertion in ~WorkQueue later on.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::~WebContext):
2012-05-14 Csaba Osztrogonác <ossy@webkit.org>
[Qt][WK2] Unreviewed trivial buildfix after r116958.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
2012-05-14 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Simplify OTHER_FILES for QML tests project files
Reviewed by Jocelyn Turcotte.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
* UIProcess/API/qt/tests/qmltests/WebView.pro:
2012-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.am: Explicitly link WebProcess to
libjavascriptcoregtk to make sure it uses the non installed
library.
* GNUmakefile.list.am: Add missing header file.
2012-05-14 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
[GTK] [WK2] Memory leaks in WebKitWebSettings
https://bugs.webkit.org/show_bug.cgi?id=86365
Reviewed by Martin Robinson.
Fix memory leaks in WebKitWebSettings by adopting allocations
using adoptWK.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_init):
(webkit_settings_set_serif_font_family):
2012-05-14 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Doesn't build with ENABLE_INSPECTOR=0
https://bugs.webkit.org/show_bug.cgi?id=85056
Reviewed by Tor Arne Vestbø.
* Target.pri:
* UIProcess/qt/QtWebContext.cpp:
(WebKit::initInspectorServer):
2012-05-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Make sure dialogs have their parent and attached properties set before Component.onCompleted
https://bugs.webkit.org/show_bug.cgi?id=86222
The WebView QML api for dialogs is based on delegates for each dialog, which
are implemented as components. Since there's no explicit API to show the dialog,
the natural place to allow the dialog to choose how to display itself is in
Component.onCompleted.
The issue was that we were using QQmlComponent::create() when instantiating the
component, at which point the component did not have a parent or it's attached
WebView property set. That meant that we had to do some ugly workaround in our
test, using a 1ms timer, to get a callback once the parent was there.
We now use the QQmlComponent::beginCreate() -> QQmlComponent::completeCreate()
pair, which allows us to set the relevant properties before triggering the
Component.onCompleted callback. We were already doing this for the context
menus (except for setting the parent, which we did afterwards).
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
* UIProcess/qt/QtDialogRunner.cpp:
* UIProcess/qt/QtDialogRunner.h:
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
2012-05-11 Gavin Barraclough <barraclough@apple.com>
Introduce PropertyName class
https://bugs.webkit.org/show_bug.cgi?id=86241
Reviewed by Geoff Garen.
Replace 'const Identifier&' arguments to functions accessing object properties with a new 'PropertyName' type.
This change paves the way to allow for properties keyed by values that are not Identifiers.
This change is largely a mechanical find & replace.
It also changes JSFunction's constructor to take a UString& instead of an Identifier&
(since in some cases we can no longer guarantee that we'lll have an Identifier), and
unifies Identifier's methods to obtain array indices onto PropertyName.
The new PropertyName class retains the ability to support .impl() and .ustring(), but
in a future patch we may need to rework this, since not all PropertyNames should be
equal based on their string representation.
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::JSNPMethod::finishCreation):
* WebProcess/Plugins/Netscape/JSNPMethod.h:
(WebKit::JSNPMethod::create):
(JSNPMethod):
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::npIdentifierFromIdentifier):
(WebKit::JSNPObject::getOwnPropertySlot):
(WebKit::JSNPObject::getOwnPropertyDescriptor):
(WebKit::JSNPObject::put):
(WebKit::JSNPObject::deleteProperty):
(WebKit::JSNPObject::propertyGetter):
(WebKit::JSNPObject::methodGetter):
* WebProcess/Plugins/Netscape/JSNPObject.h:
(JSNPObject):
2012-05-11 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
[GTK] [WK2] Memory leak in PluginProcessProxy::scanPlugin
https://bugs.webkit.org/show_bug.cgi?id=86240
Reviewed by Martin Robinson.
Free the output received from the g_spawn_sync().
* UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp:
(WebKit::PluginProcessProxy::scanPlugin):
2012-05-11 Andreas Kling <kling@webkit.org>
WK2/Plugins: Move enumeration of plugins to a secondary UIProcess thread.
<http://webkit.org/b/86143>
<rdar://problem/10777218>
Reviewed by Anders Carlsson.
To avoid spins beneath PluginInfoStore::getPluginInfo(), do this work on a secondary
thread in the UIProcess.
* Shared/APIObject.h:
Made APIObject a ThreadSafeRefCounted. In the context of this patch, this is to
be able to dispatch bound Functions on WebContext.
* WebProcess/mac/KeychainItemShimMethods.mm:
(WebKit::responseMap):
* WebProcess/mac/SecItemShimMethods.mm:
(WebKit::responseMap):
* WebKit2.xcodeproj/project.pbxproj:
* Shared/BlockingResponseMap.h:
(BlockingResponseMap):
(BlockingResponseMap::waitForResponse):
(BlockingResponseMap::didReceiveResponse):
Renamed from Source/WebKit2/WebProcess/mac/KeychainShimResponseMap.h.
Generalize this somewhat since it's useful in more than just the keychain scenario.
This can/should be generalized further, but that's a topic for another patch.
* UIProcess/Plugins/PluginInfoStore.h:
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::plugins):
(WebKit::PluginInfoStore::findPluginForMIMEType):
(WebKit::PluginInfoStore::findPluginForExtension):
(WebKit::PluginInfoStore::findPlugin):
(WebKit::PluginInfoStore::infoForPluginWithPath):
Slap a mutex on the PluginInfoStore since it can now be called from both the
main thread (via WKFrameCanShowMIMEType) and the GetPlugin work queue.
* UIProcess/WebContext.messages.in:
* UIProcess/WebContext.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::processDidFinishLaunching):
(WebKit::WebContext::sendDidGetPlugins):
(WebKit::WebContext::handleGetPlugins):
(WebKit::WebContext::getPlugins):
(WebKit::WebContext::didReceiveMessageOnConnectionWorkQueue):
Make GetPlugins a DispatchOnConnectionQueue message and execute it on a new
plug-in work queue. This effectively makes the GetPlugin call asynchronous.
On Mac, the built-in PDF reader is still registered on the main thread as that
ends up calling into localizedString().
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didGetPlugins):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
Add a DidGetPlugins message to WebProcess. This is passed directly to the handler
in WebPlatformStrategies.cpp.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::responseMap):
(WebKit::handleDidGetPlugins):
(WebKit::generateRequestID):
(WebKit::WebPlatformStrategies::populatePluginCache):
Use a BlockingResponseMap to block the WebProcess main thread until the UIProcess
responds with DidGetPlugins.
2012-05-11 Gustavo Noronha Silva <gns@gnome.org>
REGRESSION(r116205): [GTK]: build no longer supports thin archives
https://bugs.webkit.org/show_bug.cgi?id=86207
* GNUmakefile.am: link libWebCoreModules to the webkit2gtk shared
library; tell the linker to ignore internal unresolved symbols for
PluginProcess and avoid linking libWebCoreModules.
2012-05-11 Hajime Morrita <morrita@chromium.org>
Unreviewed build fix attempt.
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):
2012-05-11 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Allow sending URI request data in chunks
https://bugs.webkit.org/show_bug.cgi?id=85880
Reviewed by Martin Robinson.
The API to handle custom URI schemes will receive an input stream
to read from. Current code requires to buffer the whole stream
before sending it to the WebProcess. This patch allows to send the
data in chunks while it's read from the stream.
* GNUmakefile.list.am: Add new files to compilation
* UIProcess/API/C/soup/WKSoupRequestManager.cpp:
(WKSoupRequestManagerRegisterURIScheme): Use toWTFString() to
convert from WKString to WTFString.
(WKSoupRequestManagerDidHandleURIRequest): Use didHandleURIRequest
as it has been renamed.
(WKSoupRequestManagerDidReceiveURIRequestData): New method to send
more data for the uri request to the web process.
* UIProcess/API/C/soup/WKSoupRequestManager.h:
* UIProcess/soup/WebSoupRequestManagerProxy.cpp:
(WebKit::WebSoupRequestManagerProxy::didHandleURIRequest):
HandleURIRequest has been renamed to DidHandleURIRequest.
(WebKit::WebSoupRequestManagerProxy::didReceiveURIRequestData):
Send DidReceiveURIRequestData message to the web process.
(WebKit::WebSoupRequestManagerProxy::didReceiveURIRequest): Use
didHandleURIRequest as it has been renamed.
* UIProcess/soup/WebSoupRequestManagerProxy.h:
(WebSoupRequestManagerProxy):
* WebProcess/soup/WebKitSoupRequestInputStream.cpp: Added.
(AsyncReadData::AsyncReadData): Helper struct to store information
about pending async read operations.
(_WebKitSoupRequestInputStreamPrivate):
(webkitSoupRequestInputStreamReadAsyncResultComplete): Read the
data from the memory input stream and complete the async read
operation.
(webkitSoupRequestInputStreamReadAsync): Read the data from the
memory input stream and complete the async read operation if
there's data to read, or save the async result to be completed
when more data is added to the stream.
(webkitSoupRequestInputStreamReadFinish): Finish an async read
started with webkitSoupRequestInputStreamReadAsync.
(webkitSoupRequestInputStreamFinalize):
(webkit_soup_request_input_stream_init):
(webkit_soup_request_input_stream_class_init):
(webkitSoupRequestInputStreamNew): Create a new input stream with
a fixed size or 0 if content length is not known.
(webkitSoupRequestInputStreamAddData): Add more data to the
stream and complete any pending async read.
(webkitSoupRequestInputStreamFinished): Whether all data expected
by the stream has been received.
* WebProcess/soup/WebKitSoupRequestInputStream.h: Added.
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit::WebSoupRequestManager::didHandleURIRequest): Create a
WebKitSoupRequestInputStream if we haven't received all the
request data in the HandleURIRequest message. Otherwise just
create a memory input stream with all the data.
(WebKit::WebSoupRequestManager::didReceiveURIRequestData): Add the data
received to the WebKitSoupRequestInputStream associated to the
given request identifier.
* WebProcess/soup/WebSoupRequestManager.h:
* WebProcess/soup/WebSoupRequestManager.messages.in: Add
contentLength parameter to DidHandleURIRequest message and add
DidReceiveURIRequestData message.
2012-05-10 MORITA Hajime <morrita@google.com>
ElementShadow should minimize the usage of "ShadowRoot" name
https://bugs.webkit.org/show_bug.cgi?id=85970
Reviewed by Dimitri Glazkov.
Removed symbols which no longer exists
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-05-10 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move resumeAnimations to use Internals interface
https://bugs.webkit.org/show_bug.cgi?id=86063
Reviewed by Alexey Proskuryakov.
* win/WebKit2.def: Add a symbol filter for resumeAnimations.
2012-05-10 Anders Carlsson <andersca@apple.com>
PDF files won't scroll in Safari when using Adobe plug-in
https://bugs.webkit.org/show_bug.cgi?id=86167
<rdar://problem/11389719>
Reviewed by Sam Weinig.
Add a way to whitelist plug-ins that we know will process wheel events correctly. Add the new
Adobe Reader plug-in to this whitelist. Only send wheel events to plug-ins that are in the whitelist.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::wantsWheelEvents):
(WebKit):
* PluginProcess/PluginControllerProxy.h:
(PluginControllerProxy):
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::createPlugin):
* PluginProcess/WebProcessConnection.h:
(WebProcessConnection):
* PluginProcess/WebProcessConnection.messages.in:
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::determineQuirks):
* Shared/Plugins/PluginQuirks.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::wantsWheelEvents):
(WebKit):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
(NetscapePlugin):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
(BuiltInPDFView):
* WebProcess/Plugins/PDF/BuiltInPDFView.mm:
(WebKit::BuiltInPDFView::wantsWheelEvents):
(WebKit):
* WebProcess/Plugins/Plugin.h:
(Plugin):
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::PluginProxy):
(WebKit::PluginProxy::initialize):
(WebKit::PluginProxy::wantsWheelEvents):
(WebKit):
* WebProcess/Plugins/PluginProxy.h:
(PluginProxy):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::initializePlugin):
(WebKit::PluginView::wantsWheelEvents):
(WebKit):
(WebKit::PluginView::handleEvent):
* WebProcess/Plugins/PluginView.h:
(PluginView):
2012-05-10 Anders Carlsson <andersca@apple.com>
WebKit2: Add a way to blacklist specific plug-ins/plug-in versions
https://bugs.webkit.org/show_bug.cgi?id=86164
<rdar://problem/9551196>
Reviewed by Sam Weinig.
* Shared/API/c/WKError.h:
Add kWKErrorCodeInsecurePlugInVersion error code.
* Shared/APIClientTraits.cpp:
Update now that didFailToInitializePlugin is deprecated.
* UIProcess/API/C/WKPage.h:
Deprecate didFailToInitializePlugin and replace it with the more generic pluginDidFail.
Also, deprecate missingPluginButtonClicked and replace it with unavailablePluginButtonClicked.
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::shouldBlockPlugin):
Non-Mac version, always return false.
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::shouldBlockPlugin):
Call WKShouldBlockPlugin.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::getPluginPath):
Check if the plug-in should be blocked.
* UIProcess/WebContext.messages.in:
GetPluginPath now takes an additional out parameter, a boolean that determines whether the plug-in
should be blocked from loading or not.
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didFailToInitializePlugin):
Call m_client.pluginDidFail.
(WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
Ditto.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::unavailablePluginButtonClicked):
Call the loader client.
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
Ditto.
* UIProcess/WebPageProxy.messages.in:
Rename MissingPluginButtonClicked to UnavailablePluginButtonClicked and add a new DidBlockInsecurePluginVersion message.
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::unavailablePluginButtonClicked):
Call missingPluginButtonClicked and unavailablePluginButtonClicked.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton):
(WebKit::WebChromeClient::unavailablePluginButtonClicked):
Handle RenderEmbeddedObject::InsecurePluginVersion.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createPlugin):
WebPage::createPlugin now takes the plug-in element.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
If the plug-in is blocked, set the appropriate unavailability reason.
* WebProcess/WebProcess.cpp:
(WebKit::canPluginHandleResponse):
Update now that GetPluginPath returns a blocked parameter as well.
2012-05-10 Anders Carlsson <andersca@apple.com>
Rename the missing plug-in indicator to the unavailable plug-in indicator
https://bugs.webkit.org/show_bug.cgi?id=86136
Reviewed by Sam Weinig.
Update for WebCore changes.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginProcessCrashed):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton):
(WebKit::WebChromeClient::unavailablePluginButtonClicked):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient):
2012-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Test /webkit2/WebKitWebView/resources times out
https://bugs.webkit.org/show_bug.cgi?id=86088
Reviewed by Martin Robinson.
* UIProcess/API/gtk/tests/TestResources.cpp:
(testWebViewResources): Use webkit_web_view_reload_bypass_cache()
instead of webkit_web_view_reload() to make sure resources are not
read from the cache.
2012-05-10 Simon Pena <spena@igalia.com>
[GTK] WK2 misses WebKitSettings for media playback requiring user gestures and inline playback
https://bugs.webkit.org/show_bug.cgi?id=85999
Reviewed by Martin Robinson.
Expose WebKitSettings for media playback requiring user gesture and
media playback allows inline to GTK side.
This adds two properties (mediaPlaybackRequiresUserGesture and
mediaPlaybackAllowsInline), with their setters and getters, to
WebKitSettings. It also updates the WebKitSettings tests so these
two properties are checked, and includes the new methods in the
documentation.
* UIProcess/API/gtk/WebKitSettings.cpp: added the new properties and
their accessors
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_set_media_playback_requires_user_gesture):
(webkit_settings_get_media_playback_requires_user_gesture):
(webkit_settings_set_media_playback_allows_inline):
(webkit_settings_get_media_playback_allows_inline):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: included the new
methods in the documentation
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp: tested the newly
added methods
(testWebKitSettings):
2012-05-10 Simon Pena <spena@igalia.com>
[GTK] Missing field initializers for WKPageLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=86005
Reviewed by Martin Robinson.
Initialize willGoToBackForwardListItem and
interactionOccurredWhileProcessUnresponsive fields of
WKPageLoaderClient.
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(attachLoaderClientToView):
2012-05-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Double tap to zoom is considered a user interaction
https://bugs.webkit.org/show_bug.cgi?id=86094
Reviewed by Simon Hausmann.
This makes it so that the content size change doesn't change scale
after a double tap to zoom.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
2012-05-10 Kent Hansen <kent.hansen@nokia.com>
[Qt] Rename QDeclarative* to QQml*
https://bugs.webkit.org/show_bug.cgi?id=86089
Reviewed by Simon Hausmann.
The QtDeclarative module was deprecated in favor of QtQml.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::_q_onReceivedResponseFromDownload):
(QQuickWebViewExperimental::alertDialog):
(QQuickWebViewExperimental::setAlertDialog):
(QQuickWebViewExperimental::confirmDialog):
(QQuickWebViewExperimental::setConfirmDialog):
(QQuickWebViewExperimental::promptDialog):
(QQuickWebViewExperimental::setPromptDialog):
(QQuickWebViewExperimental::authenticationDialog):
(QQuickWebViewExperimental::setAuthenticationDialog):
(QQuickWebViewExperimental::proxyAuthenticationDialog):
(QQuickWebViewExperimental::setProxyAuthenticationDialog):
(QQuickWebViewExperimental::certificateVerificationDialog):
(QQuickWebViewExperimental::setCertificateVerificationDialog):
(QQuickWebViewExperimental::itemSelector):
(QQuickWebViewExperimental::setItemSelector):
(QQuickWebViewExperimental::filePicker):
(QQuickWebViewExperimental::setFilePicker):
(QQuickWebViewExperimental::databaseQuotaDialog):
(QQuickWebViewExperimental::setDatabaseQuotaDialog):
(QQuickWebViewExperimental::schemeDelegates_At):
(QQuickWebViewExperimental::schemeDelegates_Append):
(QQuickWebViewExperimental::schemeDelegates_Count):
(QQuickWebViewExperimental::schemeDelegates_Clear):
(QQuickWebViewExperimental::schemeDelegates):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/qwebiconimageprovider.cpp:
(QWebIconImageProvider::QWebIconImageProvider):
* UIProcess/API/qt/qwebiconimageprovider_p.h:
* UIProcess/API/qt/qwebviewportinfo_p.h:
* UIProcess/API/qt/tests/tests.pri:
* UIProcess/qt/QtDialogRunner.h:
(QtDialogRunner):
* UIProcess/qt/WebPopupMenuProxyQt.h:
(WebPopupMenuProxyQt):
2012-05-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Fix sites with a viewport meta tag when devicePixelRatio isn't explicitely set on the WebView
https://bugs.webkit.org/show_bug.cgi?id=86002
Reviewed by Kenneth Rohde Christiansen.
The preference was recently changed to a double ratio, but was still left under
FOR_EACH_WEBKIT_UINT32_PREFERENCE and was initialized to inf instead of 1.0.
This would cause the viewport constraints to apply a multi-millionaire device
pixel ratio and make the contents invisible.
This moves it with other double preferences under FOR_EACH_WEBKIT_DOUBLE_PREFERENCE.
* Shared/WebPreferencesStore.h:
(WebKit):
2012-05-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Implement fit-to-width behaviour
https://bugs.webkit.org/show_bug.cgi?id=86085
Reviewed by Simon Hausmann.
We don't restrict the minimum scale to the layout viewport anymore,
but instead update the minimum scale when the content size changes.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::didChangeViewportProperties):
(QQuickWebViewFlickablePrivate::didChangeContentsSize):
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::minimumScale):
(QWebViewportInfo::maximumScale):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
2012-05-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
WebPageProxy::activeURL() should return the pending API request, even when there's no main frame
https://bugs.webkit.org/show_bug.cgi?id=85806
The m_pendingAPIRequestURL member is used (presumably) to mask over the async
nature of WebKit2, so that starting a load of a URL will reflect that URL
immedeatly from activeURL, even if the request has not been passed over to
the web process yet and reflected there.
This works well, except in the case of the initial request, where the main
frame creation happens on the web process side and is notified back to the
UI process. Until we've recived the notification we don't know about the main
frame, and this race condition will potentially give us an empty url instead
of the pending request.
To solve this we always return the pending API request if it's set, even
when there's no mainframe yet (that we known about).
Reviewed by Simon Hausmann.
* UIProcess/WebPageProxy.cpp:
2012-05-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move suspendAnimations to use Internals interface.
https://bugs.webkit.org/show_bug.cgi?id=85986
Reviewed by Ryosuke Niwa.
* win/WebKit2.def: Add a symbol filter for suspendAnimations.
2012-05-09 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Split WebKit2 Makefile moving source code listings to GNUmakefile.list.am
https://bugs.webkit.org/show_bug.cgi?id=85985
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am:
* GNUmakefile.list.am: Copied from Source/WebKit2/GNUmakefile.am.
2012-05-09 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use independent version numbers for public libraries
https://bugs.webkit.org/show_bug.cgi?id=85984
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Use LIBWEBKIT2GTK_VERSION for library version.
2012-05-09 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Tap-to-zoom zooms to wrong area.
https://bugs.webkit.org/show_bug.cgi?id=85982
Reviewed by Kenneth Rohde Christiansen.
Fix computation and take more care when to use CSS scale and when to use Item scale.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
2012-05-09 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Define clear split between QtWebPageLoadClient and QQuickWebViewPrivate for loading tasks.
https://bugs.webkit.org/show_bug.cgi?id=84527#c3
Reviewed by Simon Hausmann.
Moving loading related code and signal emission from QtWebPageLoadClient to QQuickWebViewPrivate.
It puts the loading code that implements an API right where the API is defined, including
signal emission as well as translation of WebPageProxy internals to public Qt API with correct types.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::provisionalLoadDidStart):
(QQuickWebViewPrivate::loadDidCommit):
(QQuickWebViewPrivate::didSameDocumentNavigation):
(QQuickWebViewPrivate::titleDidChange):
(QQuickWebViewPrivate::loadProgressDidChange):
(QQuickWebViewPrivate::backForwardListDidChange):
(QQuickWebViewPrivate::loadDidFail):
(QQuickWebViewPrivate::processDidCrash):
(QQuickWebView::loadProgress):
* UIProcess/API/qt/qquickwebview_p_p.h:
(WebKit):
(QQuickWebViewPrivate):
(QQuickWebViewPrivate::didChangeViewportProperties):
(QQuickWebViewPrivate::loadProgress):
(QQuickWebViewFlickablePrivate):
* UIProcess/qt/QtWebError.cpp:
(WebKit::QtWebError::isCancellation):
(WebKit):
* UIProcess/qt/QtWebError.h:
* UIProcess/qt/QtWebPageLoadClient.cpp:
(WebKit::QtWebPageLoadClient::QtWebPageLoadClient):
(WebKit):
(WebKit::QtWebPageLoadClient::didStartProvisionalLoad):
(WebKit::QtWebPageLoadClient::didCommitLoad):
(WebKit::QtWebPageLoadClient::didSameDocumentNavigation):
(WebKit::QtWebPageLoadClient::didReceiveTitle):
(WebKit::QtWebPageLoadClient::didChangeProgress):
(WebKit::QtWebPageLoadClient::didChangeBackForwardList):
(WebKit::QtWebPageLoadClient::dispatchLoadFailed):
(WebKit::QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::QtWebPageLoadClient::didFailLoadWithErrorForFrame):
(WebKit::QtWebPageLoadClient::didStartProgress):
(WebKit::QtWebPageLoadClient::didFinishProgress):
* UIProcess/qt/QtWebPageLoadClient.h:
(WebKit):
(QtWebPageLoadClient):
2012-05-09 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Remove delayed loadDidSucceed() signaling and m_deferedUrlToLoad from QQuickWebViewPrivate
https://bugs.webkit.org/show_bug.cgi?id=85906
Reviewed by Kenneth Rohde Christiansen.
Deferred loading activies were introduced to work around the delayed Flickable construction
at onComponentComplete(). QQuickWebView inherits from QQuickFlickable now,
so no need for the workaround anymore.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
(QQuickWebViewFlickablePrivate::onComponentComplete):
(QQuickWebView::setUrl):
(QQuickWebView::componentComplete):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::onComponentComplete):
(QQuickWebViewPrivate):
(QQuickWebViewFlickablePrivate):
2012-05-08 Jon Lee <jonlee@apple.com>
Unreviewed build fix.
* WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h:
(LayerTreeHostCAWin):
2012-05-08 Anders Carlsson <andersca@apple.com>
DrawingAreaProxyImpl doesn't work with window server hosting
https://bugs.webkit.org/show_bug.cgi?id=85947
<rdar://problem/11213718>
Reviewed by Andreas Kling.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::updateAcceleratedCompositingMode):
Update the layer tree context and call WebPage::updateAcceleratedCompositingMode.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setLayerHostingMode):
If setting the layer hosting mode changed the layer tree context, send back an UpdateAcceleratedCompositingMode message
with the new context.
* WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
(WebKit::LayerTreeHostCA::initialize):
platformInitialize no longer takes a context.
* WebProcess/WebPage/ca/LayerTreeHostCA.h:
(LayerTreeHostCA):
Make m_layerTreeContext protected instead.
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
(WebKit::LayerTreeHostCAMac::platformInitialize):
Assign to m_layerTreeContext directly.
(WebKit::LayerTreeHostCAMac::setLayerHostingMode):
Set m_layerTreeContext.contextID.
* WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
(WebKit::LayerTreeHostCAWin::platformInitialize):
Assign to m_layerTreeContext directly.
2012-05-08 Jon Lee <jonlee@apple.com>
Safari warns that it needs to resend the form in an iFrame when going back
https://bugs.webkit.org/show_bug.cgi?id=82658
<rdar://problem/11292558>
Reviewed by Darin Adler.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Add wkCFURLRequestAllowAllPostCaching.
2012-05-08 Anders Carlsson <andersca@apple.com>
Can't scroll PDF in subframe
https://bugs.webkit.org/show_bug.cgi?id=85932
<rdar://problem/11405527>
Reviewed by Sam Weinig.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.mm:
(WebKit::BuiltInPDFView::updateScrollbars):
Trigger a layout when scrollbars come and go so the non fast scrollable region gets recomputed.
(WebKit::BuiltInPDFView::scrollableAreaBoundingBox):
Implement this by calling out to the PluginView.
2012-05-06 Jon Lee <jonlee@apple.com>
[WK2] Push wheel events if there are too many in queue
https://bugs.webkit.org/show_bug.cgi?id=85747
<rdar://problem/11390790>
Reviewed by Anders Carlsson.
It is possible that a whole bunch of messages added to the message queue, or a series
of long-running messages, cause unresponsiveness. The reason for this is that we have
a scroll event waiting for acknowledgment from the web process before it sends the next
event. And in the time between the user has scrolled, causing a large backlog of scroll
events to be held in the UI process.
We should push new scroll events if the queue accumulates too many of them.
* UIProcess/WebPageProxy.h: The vector m_currentlyProcessedWheelEvents used to hold the
series of wheel events that were coalesced and sent as a single wheel event to the web
process. When the web process acknowledges this with didReceiveEvent, the UI process
cleared that vector, then tried to coalesce the next wheel event to send. Now we might have
multiple sets of coalesced wheel events that we are sending to the web process. To keep
track of these sets, m_currentlyProcessedWheelEvents now is a queue of Vectors.
(WebPageProxy):
* UIProcess/WebPageProxy.cpp: Add new constant wheelEventQueueSizeThreshold representing
the threshold of scroll events to look for before we start pushing events.
(WebKit::canCoalesce): Move static function so that handleWheelEvent() has access. No changes.
(WebKit::coalesce): Move static function so that handleWheelEvent() has access. No changes.
(WebKit::coalescedWheelEvent): Move static function so that handleWheelEvent() has access. No changes.
(WebKit::WebPageProxy::handleWheelEvent): If we are currently waiting for acknowledgment
from the web process that a wheel event has been handled, we add it to the queue. We
check to see that the queue size is within our threshold before we return early. Otherwise
we will start pushing events in the queue. Refactor the rest of the function into
processNextQueuedWheelEvent() and sendWheelEvent(). If we are not currently waiting for
acknowledgment, nor have events in the queue, then we send the current wheel event.
(WebKit::WebPageProxy::processNextQueuedWheelEvent): Try to coalesce events based on the
wheel event at the head of the queue, and send that event to the web process.
(WebKit::WebPageProxy::sendWheelEvent): Refactored from handleWheelEvent().
(WebKit::WebPageProxy::didReceiveEvent): Instead of clearing m_currentlyProcessedWheelEvents,
which contained the set of one coalesced wheel event, we pull the head Vector, which
contains the same set of events. Refactor to use processNextQueuedWheelEvent().
2012-05-08 Timothy Hatcher <timothy@apple.com>
Fix the SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL macro so it passes the full path to dlopen.
<rdar://problem/11406517>
Reviewed by Mark Rowe.
* UIProcess/mac/WebInspectorProxyMac.mm: Pass A to SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL for the version.
* WebProcess/WebPage/mac/WebInspectorMac.mm: Ditto.
2012-05-08 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[WK2] Integrate Page Visibility state change and WK2 Suspend/Resume API
https://bugs.webkit.org/show_bug.cgi?id=85650
Reviewed by Kenneth Rohde Christiansen.
This patch uses state changes of the Page Visibility API to trigger the
automatic suspension/resume of animations on the WebPage and its main frame,
in the same fashion of what is used by the Suspend/Resume API of WebKit2.
By telling the WebPage it will move off/on the screen and the FrameView to
hide/show, this patch is suspending/resuming animations (animated painting)
but not timers and other active DOM objects.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setVisibilityState):
2012-05-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Add QML/WK2 evaluateJavaScript experimental API
https://bugs.webkit.org/show_bug.cgi?id=85496
Reviewed by Simon Hausmann.
This is an initial patch adding support for strings,
numbers and bools as return values.
Test: qmltests/WebView/tst_evaluateJavaScript.qml
* UIProcess/API/qt/qquickwebview.cpp:
(JSCallbackClosure):
(toQString):
(toQJSValue):
(buildQJSValue):
(javaScriptCallback):
(QQuickWebViewExperimental::evaluateJavaScript):
(QQuickWebView::runJavaScriptInMainFrame):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qmltests/WebView/tst_evaluateJavaScript.qml: Added.
2012-05-07 Alexis Menard <alexis.menard@openbossa.org>
[Qt] Unbreak debugging of WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=85839
Reviewed by Simon Hausmann.
When you attach GDB to a running process, it stops it.
http://trac.webkit.org/changeset/115958 introduced a pause()
call to wait the debugger to be attached to then continue
the execution of the WebProcess. Unfortunately the pause()
function does not return unless a signal handler is called.
This patch introduce an event handler to exit from the paused
state when the debugger send the signal SIGCONT. The old code
works with older version of GDB (<7.0) but not with newer
versions where the behavior of pause() is correct.
* qt/MainQt.cpp:
(sigcontHandler):
(main):
2012-05-07 Julien Chaffraix <jchaffraix@webkit.org>
Refactor windowClipRectForLayer to remove the explicit RenderLayer dependency
https://bugs.webkit.org/show_bug.cgi?id=84090
Reviewed by David Hyatt.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::clipRectInWindowCoordinates):
Updated after windowClipRectForLayer name and signature change.
2012-05-07 Andy Estes <aestes@apple.com>
ENABLE_IFRAME_SEAMLESS should be part of FEATURE_DEFINES.
* Configurations/FeatureDefines.xcconfig:
2012-05-07 Eric Seidel <eric@webkit.org>
Add ENABLE_IFRAME_SEAMLESS so Apple can turn off SEAMLESS if needed
https://bugs.webkit.org/show_bug.cgi?id=85822
Reviewed by Adam Barth.
* Configurations/FeatureDefines.xcconfig:
2012-05-07 Alexis Menard <alexis.menard@openbossa.org>
Unreviewed Qt build fix in Debug.
We need some system includes here for getpid() to be recognized.
* qt/MainQt.cpp:
2012-05-07 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r116299, r116301, and r116303.
http://trac.webkit.org/changeset/116299
http://trac.webkit.org/changeset/116301
http://trac.webkit.org/changeset/116303
https://bugs.webkit.org/show_bug.cgi?id=85795
Build is still broken (Requested by Ossy on #webkit).
* qt/MainQt.cpp:
(main):
2012-05-07 Balazs Kelemen <kbalazs@webkit.org>
[Qt] Add test specific platform plugin to achieve unified layout test results
https://bugs.webkit.org/show_bug.cgi?id=80996
Reviewed by Simon Hausmann.
Initialize the test platform plugin before initializing
the web process if we are in a WTR run.
It is necessary to place this initialization here as we
cannot control wich platform plugin will be used after
the instantiation of the QApplication.
* qt/MainQt.cpp:
(initializeTestPlatformPluginForWTRIfRequired):
(main):
2012-05-06 MORITA Hajime <morrita@google.com>
https://bugs.webkit.org/show_bug.cgi?id=85265
[Shadow DOM] ShadowTree needs a better name
Reviewed by Dimitri Glazkov.
* win/WebKit2.def: Updated exported symbol names according to the rename.
* win/WebKit2CFLite.def: Updated exported symbol names according to the rename.
2012-05-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Convert isPageBoxVisible to use Internals interface.
https://bugs.webkit.org/show_bug.cgi?id=85692
Reviewed by Darin Adler.
* win/WebKit2.def: Add isPageBoxVisible symbol filter.
2012-05-05 Dean Jackson <dino@apple.com>
Add new Setting/Preference to disable requestAnimationFrame
https://bugs.webkit.org/show_bug.cgi?id=85693
Reviewed by Simon Fraser.
Exposes a new WebPreference: WebKitRequestAnimationFrameEnabled.
The default value is true. The majority of applications will leave
it this way.
* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetRequestAnimationFrameEnabled):
(WKPreferencesGetRequestAnimationFrameEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2012-05-04 Jon Lee <jonlee@apple.com>
[WK2] Incoming events may be processed out-of-order
https://bugs.webkit.org/show_bug.cgi?id=85696
<rdar://problem/11386129>
Reviewed by Maciej Stachowiak.
All messages go to a single queue that gets iterated over by dispatchMessages(). If an input
event arrives in the middle of a flood of messages, all of them will be dispatched before the
input event is dispatched.
In other words, the first dispatchMessages() call will process all of the messages in the queue,
and all subsequent dispatchMessages() calls will act as no-ops, since there is nothing in the queue.
To fix this, we rename dispatchMessages to dispatchOneMessage, and only process one message at a
time.
* Platform/CoreIPC/Connection.h: Rename dispatchMessages() to dispatchOneMessage().
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::enqueueIncomingMessage): Dispatch a call to dispatchOneMessage() on the
run loop.
(CoreIPC::Connection::dispatchOneMessage): Remove the while(true) loop.
2012-05-04 Gustavo Noronha Silva <gns@gnome.org>
[GTK] Simplify how libWebCoreModules is linked in, and fix WebKit2 build
https://bugs.webkit.org/show_bug.cgi?id=85691
* GNUmakefile.am: no longer link libWebCoreModules, and remove -no-
fast-install and -no-install from link flags, since we want those
programs installed.
2012-05-04 Mark Rowe <mrowe@apple.com>
Fix a leak in WebProcess when it is used to launch the UI process.
Rubber-stamped by Anders Carlsson.
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain): Destory the attributes and file actions after
spawning the subprocess.
2012-05-02 Jer Noble <jer.noble@apple.com>
Flash of white when exiting full screen HTML5 video
https://bugs.webkit.org/show_bug.cgi?id=85438
Reviewed by Maciej Stachowiak.
Force a repaint before displaying the newly exited WebView window. This gives the window
a chance to seamlessly repaint before enabling screen updates.
Also, send the WebProcess the didExitFullScreen and setAnimatingFullScreen(false) messages
after swapping the WebView back into its original window. Doing otherwise seems to cause
forceRepaint to paint a white frame.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
(-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
(completeFinishExitFullScreenAnimationAfterRepaint):
2012-05-04 Anders Carlsson <andersca@apple.com>
Set the right device scale factor when creating the web page
https://bugs.webkit.org/show_bug.cgi?id=85667
<rdar://problem/11376611>
Reviewed by Oliver Hunt.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
Set the scale factor before initializing the page, to ensure that the WebPageCreationParameters struct gets the right scale factor.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setIntrinsicDeviceScaleFactor):
This can now be called with a null drawing area. Also, remove the isValid() check since we still want to update the scale factor even if the web process has crashed.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Set the device scale factor from the creation parameters.
2012-05-02 Jer Noble <jer.noble@apple.com>
Taking a visibility:hidden element full screen causes full screen window to disappear.
https://bugs.webkit.org/show_bug.cgi?id=85432
Reviewed by Maciej Stachowiak.
When given an initial or final frame with a zero width or height, return a rect representing
the entire screen, rather than a rect with a zero or infinite size. Doing otherwise will
confuse the window server when it's instructed to scale the full screen window to that size.
* UIProcess/mac/WKFullScreenWindowController.mm:
(windowFrameFromApparentFrames):
2012-04-30 Jer Noble <jer.noble@apple.com>
Full screen will exit during a provisional load of a non-ancestor iframe.
https://bugs.webkit.org/show_bug.cgi?id=85230
Reviewed by Maciej Stachowiak .
Only exit full screen mode if the frame being loaded contains the full
screen element:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
Move the full screen exiting logic up into WebFrameLoaderClient in the
WebProcess:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
Add a WebFullScreenManager "close" method & message:
* UIProcess/WebFullScreenManagerProxy.messages.in:
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::close):
* WebProcess/FullScreen/WebFullScreenManager.h:
Add support for this new message to the WKBundlePage and client:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
(WebKit::InjectedBundlePageFullScreenClient::closeFullScreen):
* WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
2012-05-04 Anders Carlsson <andersca@apple.com>
TiledCoreAnimationDrawingArea should handle visibility changes
https://bugs.webkit.org/show_bug.cgi?id=85645
<rdar://problem/11247192>
Reviewed by Oliver Hunt.
Replicate the visibility handling logic from DrawingAreaImpl and LayerTreeHostCAMac.
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
(TiledCoreAnimationDrawingAreaProxy):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::visibilityDidChange):
(WebKit):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::suspendPainting):
(WebKit):
(WebKit::TiledCoreAnimationDrawingArea::resumePainting):
2012-05-04 Nate Chapin <japhet@chromium.org>
Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
https://bugs.webkit.org/show_bug.cgi?id=85533
Reviewed by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::finishedLoading):
2012-05-04 Kent Hansen <kent.hansen@nokia.com>
[Qt] Update Qt bridge after changes to QMetaMethod
https://bugs.webkit.org/show_bug.cgi?id=85478
Reviewed by Tor Arne Vestbø.
QMetaMethod::signature() has been renamed to methodSignature() and
returns a QByteArray.
The new function QMetaMethod::name() gives direct access to a
method's name. returnType(), parameterCount(), and parameterType()
give direct access to type information.
Ported the custom QtConnectionObject meta-object to revision 7;
revision 6 and below aren't supported (and don't compile) with Qt5.
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
(gatherAPI):
2012-05-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Don't pass viewport-create function to quick_test_main.
https://bugs.webkit.org/show_bug.cgi?id=85478
Reviewed by Csaba Osztrogonác.
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
(main):
2012-05-04 Csaba Osztrogonác <ossy@webkit.org>
[Qt] Buildfix for newer Qt5
https://bugs.webkit.org/show_bug.cgi?id=85478
Reviewed by Tor Arne Vestbø.
* Shared/qt/ProcessExecutablePathQt.cpp:
(WebKit::executablePath):
* UIProcess/API/qt/qwebiconimageprovider_p.h:
2012-05-03 Alexis Menard <alexis.menard@openbossa.org>
[Qt] Enable fullscreen API for WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=85498
Reviewed by Simon Hausmann.
Enable the fullscreen API for Qt port. It is only
supported on WebKit2. It adds experimental settings
to enable it and also add two experimental signals so
the API user can react when the fullscreen is requested
(e.g hide the urlbar of a browser and change the state
of the window to be fullscreen).
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebpreferences.cpp:
(QWebPreferencesPrivate::testAttribute):
(QWebPreferencesPrivate::setAttribute):
(QWebPreferences::fullScreenEnabled):
(QWebPreferences::setFullScreenEnabled):
* UIProcess/API/qt/qwebpreferences_p.h:
* UIProcess/API/qt/qwebpreferences_p_p.h:
* UIProcess/WebFullScreenManagerProxy.h:
(WebKit):
* UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
(WebKit::WebFullScreenManagerProxy::enterFullScreen):
(WebKit::WebFullScreenManagerProxy::exitFullScreen):
2012-05-04 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Images are scaled badly in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=85610
Reviewed by Jocelyn Turcotte.
Enable smooth pixmap transforms for WK2 bitmaps.
* Shared/qt/ShareableBitmapQt.cpp:
(WebKit::ShareableBitmap::createGraphicsContext):
2012-05-03 Ojan Vafai <ojan@chromium.org>
Histogram total allocated bytes in the arena in addition to the render tree size
https://bugs.webkit.org/show_bug.cgi?id=85537
Reviewed by Eric Seidel.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::renderTreeSize):
2012-05-03 Raphael Kubo da Costa <rakuco@webkit.org>
[CMake] Rewrite FindCairo.cmake.
https://bugs.webkit.org/show_bug.cgi?id=84895
Reviewed by Daniel Bates.
The old approach relied on pkg-config for finding Cairo (which
introduced a dependency on pkg-config that could be avoided), used
the LibFindMacros code that we should probably remove in the
future and did not use the FindPackageHandleStandardArguments
module.
Change all that by rewriting the module.
- Use the pkg-config output optionally instead of requiring it
like LibFindMacros did.
- Remove the implicit dependency on FreeType which often found it
the wrong way via pkg-config and without considering
CMAKE_PREFIX_PATH.
- Retrieve the Cairo version by looking at cairo-version.h instead
of relying on pkg-config. It requires some additional code for
checking if the desired version has been found, but that will not
be needed once we start depending on CMake 2.8.3 or later.
The only downside is that FPHSA sets <UPPERCASED_NAME>_FOUND
instead of <Name>_FOUND, and to keep things consistent
Cairo_LIBRARIES and Cairo_INCLUDE_DIRS have become CAIRO_LIBRARIES
and CAIRO_INCLUDE_DIRS.
* PlatformEfl.cmake: Use CAIRO_FOO instead of Cairo_FOO.
2012-05-03 Tobias Netzel <tobias.netzel@googlemail.com>
Bugs in WebFullScreenController
https://bugs.webkit.org/show_bug.cgi?id=85388
Reviewed by Alexey Proskuryakov.
Leopard specific fixes:
NSWindow doesn't respond to isOnActiveSpace so find out first.
Values passed to SetSystemUIMode were swapped.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]):
(-[WKFullScreenWindowController _updateMenuAndDockForFullScreen]):
2012-04-18 Jon Honeycutt <jhoneycutt@apple.com>
WebFrameLoaderClient::dispatchWillSendSubmitEvent() needs to be
implemented for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=84304
Reviewed by Jessie Berlin.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
Declare willSendSubmitEvent on WKBundlePageFormClient.
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
(WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
From the String pair vector, create a map from control name to value.
Call the client's willSendSubmitEvent.
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
Declare willSendSubmitEvent.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
Call the injected bundle form client's willSendSubmitEvent.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
Un-stub willSendSubmitEvent.
* Shared/APIClientTraits.cpp:
(WebKit):
Set the interface sizes for WKBundlePageFormClient; version 1 includes
willSendSubmitEvent.
* Shared/APIClientTraits.h:
Declare a specialization for WKBundlePageFormClient.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
Bump the WKBundlePageFormClient version number.
2012-05-03 Fady Samuel <fsamuel@chromium.org>
Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
https://bugs.webkit.org/show_bug.cgi?id=70609
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::layoutSize):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::sendViewportAttributesChanged):
(WebKit::WebPage::viewportConfigurationAsText):
2012-05-03 Michael Brüning <michael.bruning@nokia.com>
[Qt][WK2] Also update Qt::ImEnabled flag when updating the input method.
https://bugs.webkit.org/show_bug.cgi?id=85495
Reviewed by Simon Hausmann.
QInputMethod only issues a new inputMethodQuery if the Qt::ImEnabled
flag got updated as well.
* UIProcess/qt/QtWebPageEventHandler.cpp:
(WebKit::QtWebPageEventHandler::updateTextInputState):
(WebKit::QtWebPageEventHandler::doneWithGestureEvent):
2012-05-03 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Tap-highlight blinks when activated.
https://bugs.webkit.org/show_bug.cgi?id=85481
Reviewed by Kenneth Rohde Christiansen.
Set the opacity on the page-overlay the first time it is requested to be drawn. Otherwiser
it will start fully opaque before fading in.
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::setNeedsDisplay):
2012-05-03 Kenneth Rohde Christiansen <kenneth@webkit.org>
Document the QML WebViewExperimental API devicePixelRatio.
Rubberstamped by Simon Hausmann.
* UIProcess/API/qt/qquickwebview.cpp:
2012-05-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Allow the web process and WTR to be paused on startup
Makes it easier to debug the web process or run-webkit-tests -2, as you
have ample time to attach gdb to the process.
Reviewed by Simon Hausmann.
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):
* qt/MainQt.cpp:
(main):
2012-05-03 Alexander Færøy <ahf@0x90.dk>
Rename deviceDPI to devicePixelRatio
https://bugs.webkit.org/show_bug.cgi?id=85049
Reviewed by Kenneth Rohde Christiansen.
This patch fixes an API test regression from r115948 in
tst_QQuickWebView::scrollRequest() by setting the device pixel ratio
for the test WebView to 1.5.
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::newWebView):
2012-05-03 Stephanie Lewis <slewis@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=85450 unbounded growth of JSDOMWindowShells loading pages in the same window
<rdar://problem/11320059> REGRESSION (r115083): PLT3 shows linear memory growth and gets slower with each run
Reviewed by Brady Eidson.
The API added for DOMWindowExtension, didCreateGlobalObjectForFrame, would create a global object
for every world, even those that did not need the callback. This had the side effect of creating a
JSDOMWindowShell that the associated world didn't necessarily know to clean up. Instead of creating
unnecessary objects change the API to globalObjectIsAvailableForFrame and do not pass the global object
in the API. The object can be accessed later by those worlds which require it.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame): rename API and remove globalObject parameter
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
(InjectedBundlePageLoaderClient): ditto
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable): ditto
2012-05-02 Alexander Færøy <ahf@0x90.dk>
Rename deviceDPI to devicePixelRatio
https://bugs.webkit.org/show_bug.cgi?id=85049
Reviewed by Kenneth Rohde Christiansen.
Add experimental QML API to set and get the device pixel ratio.
* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::updateViewportSize):
(QQuickWebViewExperimental::devicePixelRatio):
(QQuickWebViewExperimental::setDevicePixelRatio):
* UIProcess/API/qt/qquickwebview_p.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::sendViewportAttributesChanged):
(WebKit::WebPage::updatePreferences):
2012-05-02 Jon Lee <jonlee@apple.com>
Migrate permission functions to Notification from NotificationCenter
https://bugs.webkit.org/show_bug.cgi?id=80485
<rdar://problem/10965458>
Reviewed by Jian Li.
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::startRequest): Add version to support both kinds of
callbacks.
(WebKit::NotificationPermissionRequestManager::cancelRequest):
(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
* WebProcess/Notifications/NotificationPermissionRequestManager.h: Add another map for new callback type.
(NotificationPermissionRequestManager):
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show): Add #ifdef to use replaceId() or tag() depending on which feature
has been enabled. In the case where both are enabled, we prefer tag() since that is in the latest spec.
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
(WebKit::WebNotificationClient::requestPermission):
* WebProcess/WebCoreSupport/WebNotificationClient.h: Implement both client functions to request permissions.
2012-05-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r115907.
http://trac.webkit.org/changeset/115907
https://bugs.webkit.org/show_bug.cgi?id=85458
It broke all viewport tests on Qt and on GTK (Requested by
Ossy on #webkit).
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::layoutSize):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::sendViewportAttributesChanged):
(WebKit::WebPage::viewportConfigurationAsText):
2012-05-02 Eric Seidel <eric@webkit.org>
Sort ENABLE_ defines in FeatureDefines.xcconfig files to make them easier to compare with one another (and easier to autogenerate)
https://bugs.webkit.org/show_bug.cgi?id=85433
Reviewed by Adam Barth.
I have a script which can autogenerate these xcconfig files as well as the
vsprops files (and soon the Chromium, cmake, gnumake and qmake) feature lists
from a central feature list file.
In preparation for posting such a tool, I'm re-sorting these xcconfig files to be
alphabetically ordered (currently they're close, but not quite).
There is also at least one inconsistency between these files (CSS_LEGACY_PREFIXES) which
I will fix in a second pass. I will also sort the FEATURE_DEFINES = line in a follow-up patch.
* Configurations/FeatureDefines.xcconfig:
2012-04-18 Jon Honeycutt <jhoneycutt@apple.com>
FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
information about the form being submitted
https://bugs.webkit.org/show_bug.cgi?id=84297
Reviewed by Andy Estes.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
(WebFrameLoaderClient):
Updated method declaration.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::willSendSubmitEvent):
Stubbed.
2012-05-01 Jon Honeycutt <jhoneycutt@apple.com>
Make Page::setDefersLoading() have a call count so that each time
loading is deferred, it must be balanced with a call to resume.
https://bugs.webkit.org/show_bug.cgi?id=84522
Reviewed by Andy Estes.
* Shared/WebPreferencesStore.h:
Use the macro to declare the new preference.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Set the setting from the WebPreferencesStore's value.
2012-05-02 Ojan Vafai <ojan@chromium.org>
Add a histogram for rendertree size
https://bugs.webkit.org/show_bug.cgi?id=85226
Reviewed by Eric Seidel.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::renderTreeSize):
Move the renderTreeSize code into Page.cpp, so it can be reused.
2012-05-02 Anders Carlsson <andersca@apple.com>
PDF page does not show up when opened in the background
https://bugs.webkit.org/show_bug.cgi?id=85427
<rdar://problem/11259951>
Reviewed by Sam Weinig.
Ensure that the accelerated hosting view is always the bottom view so it won't obscure subviews that are before it.
* UIProcess/API/mac/WKView.mm:
(-[WKView _enterAcceleratedCompositingMode:]):
2012-05-02 Fady Samuel <fsamuel@chromium.org>
Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
https://bugs.webkit.org/show_bug.cgi?id=70609
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::layoutSize):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::viewportConfigurationAsText):
2012-05-02 Emil A Eklund <eae@chromium.org>
Fix usage of layout types in platform code
https://bugs.webkit.org/show_bug.cgi?id=85392
Reviewed by Eric Seidel.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
Use enclosingIntRect to convert visible rect for transform results to
line up with device pixels.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
Use pixelSnapped rect for editor rect calculation as it represents a
device coordinate.
2012-05-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Revert r115191 - "Make the web view's url property follow the active url"
It uncovered/caused issues in the icon-implementation that can't be
easily fixed, so rolling out instead.
https://bugs.webkit.org/show_bug.cgi?id=77554
Rubber-stamped by Simon Hausmann.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::onComponentComplete):
(QQuickWebView::reload):
(QQuickWebView::url):
(QQuickWebView::setUrl):
(QQuickWebView::loadHtml):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
* UIProcess/API/qt/tests/qmltests/WebView.pro:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
* UIProcess/API/qt/tests/qmltests/common/link.html: Removed.
* UIProcess/API/qt/tests/qmltests/common/redirect.html: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::activeURL):
* UIProcess/qt/QtWebPageLoadClient.cpp:
(WebKit::QtWebPageLoadClient::QtWebPageLoadClient):
(WebKit::QtWebPageLoadClient::didCommitLoad):
(WebKit::QtWebPageLoadClient::didSameDocumentNavigation):
(WebKit::QtWebPageLoadClient::dispatchLoadFailed):
(WebKit::QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::QtWebPageLoadClient::didFailLoadWithErrorForFrame):
* UIProcess/qt/QtWebPageLoadClient.h:
(QtWebPageLoadClient):
2012-05-02 Anders Carlsson <andersca@apple.com>
When viewing a PDF, the Safari Status Bar shows other text
https://bugs.webkit.org/show_bug.cgi?id=85395
<rdar://problem/11297250>
Reviewed by Beth Dakin.
Set the layer contents placement for the WKView so that its layer will get masksToBounds set.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
2012-05-02 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
Unreviewed. Build fix for Qt port on mac.
* UIProcess/API/qt/qwebnavigationhistory_p.h:
2012-05-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Make ShareableSurface's ref-counting thread-safe
Fixes assert when threaded rendering is enabled for the Qt scene-graph.
https://bugs.webkit.org/show_bug.cgi?id=85381
Reviewed by Noam Rosenthal.
* Shared/ShareableSurface.h:
2012-05-02 No'am Rosenthal <noam.rosenthal@nokia.com>
[Texmap] Enable css filters in TextureMapperGL
https://bugs.webkit.org/show_bug.cgi?id=75778
Add the plumbing in the ui-side compositing code in Qt to support filters.
Serialize the filter operations for a layer when it's changed.
Reviewed by Jocelyn Turcotte.
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC):
(CoreIPC::::encode):
(CoreIPC::::decode):
* Shared/WebCoreArgumentCoders.h:
(WebCore):
* UIProcess/LayerTreeHostProxy.cpp:
(WebKit):
(WebKit::LayerTreeHostProxy::setCompositingLayerFilters):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/LayerTreeHostProxy.messages.in:
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit):
(WebKit::WebLayerTreeRenderer::setLayerFilters):
* UIProcess/WebLayerTreeRenderer.h:
(WebLayerTreeRenderer):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore):
(WebCore::WebGraphicsLayer::didChangeFilters):
(WebCore::WebGraphicsLayer::setFilters):
(WebCore::WebGraphicsLayer::syncFilters):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayerClient):
(WebGraphicsLayer):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit):
(WebKit::LayerTreeHostQt::syncLayerFilters):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
2012-05-02 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Fix vkb showing incorrect flags/keys when content changes
Reviewed by Tor Arne Vestbø.
When the editor state changes we have to inform the input method about changed
properties so that it can issue a new input method query. Otherwise it may use old values
from other QQuickItems or other incorrectly initialized data.
Also use isActiveFocus() instead of hasFocus() to detect whether we're actively focused.
This is also what QQuick uses internally to determine whether it can make calls to the input method
or not.
* UIProcess/qt/QtWebPageEventHandler.cpp:
(WebKit::QtWebPageEventHandler::inputPanelVisibleChanged):
(WebKit::QtWebPageEventHandler::updateTextInputState):
(WebKit::QtWebPageEventHandler::doneWithGestureEvent):
2012-05-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Add initial QML documentation
https://bugs.webkit.org/show_bug.cgi?id=85370
Reviewed by Simon Hausmann.
Add initial documentation which also serves as an example on how it
should be done.
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/qwebloadrequest.cpp:
2012-05-02 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Remove redundant updateViewportArguments() call from HTMLBodyElement::didNotifyDescendantInseretions()
https://bugs.webkit.org/show_bug.cgi?id=84241
Reviewed by Kenneth Rohde Christiansen.
Add ASSERT to ensure at least one viewport argument change call is dispatched to WebPage per main frame.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
2012-05-02 Lars Knudsen <lars.knudsen@nokia.com>
[Qt] Make DeviceMotion and DeviceOrientation work with WebKit2
https://bugs.webkit.org/show_bug.cgi?id=64595
Reviewed by Kenneth Rohde Christiansen.
Adding support for DeviceOrientation in WK2 WebPage
* Target.pri:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2012-05-02 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Minibrowser's progress bar should reset when WebProcess crashes while loading.
https://bugs.webkit.org/show_bug.cgi?id=84445
Reviewed by Jocelyn Turcotte.
Progress value needs resetting, when WebProcess crashes.
This patch moves crash logic for loading to QtWebPageLoadClient. It
also simplifies the callback function names in QtWebPageLoadClient, as they
all valid only for main frames.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::processDidCrash):
(QQuickWebViewFlickablePrivate::loadDidSucceed):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::didChangeViewportProperties):
(QQuickWebViewPrivate):
* UIProcess/qt/QtWebPageLoadClient.cpp:
(WebKit::QtWebPageLoadClient::QtWebPageLoadClient):
(WebKit::QtWebPageLoadClient::completeLoadWhenProcessDidCrashIfNeeded):
(WebKit):
(WebKit::QtWebPageLoadClient::didStartProvisionalLoad):
(WebKit::QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoad):
(WebKit::QtWebPageLoadClient::didCommitLoad):
(WebKit::QtWebPageLoadClient::didSameDocumentNavigation):
(WebKit::QtWebPageLoadClient::didReceiveTitle):
(WebKit::QtWebPageLoadClient::didFirstVisuallyNonEmptyLayout):
(WebKit::QtWebPageLoadClient::didStartProvisionalLoadForFrame):
(WebKit::QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::QtWebPageLoadClient::didCommitLoadForFrame):
(WebKit::QtWebPageLoadClient::didSameDocumentNavigationForFrame):
(WebKit::QtWebPageLoadClient::didReceiveTitleForFrame):
(WebKit::QtWebPageLoadClient::didFirstVisuallyNonEmptyLayoutForFrame):
* UIProcess/qt/QtWebPageLoadClient.h:
(WebKit):
(QtWebPageLoadClient):
2012-05-02 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] QQuickWebView does not allow for input from virtual keyboard
https://bugs.webkit.org/show_bug.cgi?id=85350
Reviewed by Kenneth Christiansen.
It is necessary to set the ItemAcceptsInputMethod flag on the QQuickWebView if we have editable
content, in order for the input method to recognize that we can handle input method events.
Analyzed by Michael Brüning.
* UIProcess/API/qt/qquickwebview.cpp: Add simple hook for executing JS as private C++ API.
(JSCallbackClosure):
(javaScriptCallback):
(QQuickWebView::runJavaScriptInMainFrame):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/html/inputmethod.html: Added.
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView):
(tst_QQuickWebView::runJavaScript): Simple helper for running JS.
(tst_QQuickWebView::inputMethod): Added simple test for ItemAcceptsInputMethod toggling.
* UIProcess/qt/QtWebPageEventHandler.cpp:
(WebKit::QtWebPageEventHandler::updateTextInputState): Set ItemAcceptsInputMethod as soon as we
have editable content.
2012-05-01 Anders Carlsson <andersca@apple.com>
inspectorReallyUsesWebKitUserInterface should be more robust against missing files
https://bugs.webkit.org/show_bug.cgi?id=85327
<rdar://problem/11332864>
Reviewed by Timothy Hatcher.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::inspectorReallyUsesWebKitUserInterface):
* WebProcess/WebPage/mac/WebInspectorMac.mm:
(WebKit::inspectorReallyUsesWebKitUserInterface):
2012-05-01 Jeffrey Pfau <jpfau@apple.com>
<rdar://problem/10422318> Support for web content filter delegate for filtering https content
https://bugs.webkit.org/show_bug.cgi?id=85300
Reviewed by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2012-05-01 Ryosuke Niwa <rniwa@webkit.org>
*Command.h files shouldn't be exported to WebKit layer
https://bugs.webkit.org/show_bug.cgi?id=74778
Reviewed by Eric Seidel.
* WebProcess/WebPage/WebPage.cpp:
2012-05-01 Anders Carlsson <andersca@apple.com>
Use the new barrier function in TiledCoreAnimationDrawingArea::forceRepaintAsync
https://bugs.webkit.org/show_bug.cgi?id=85313
<rdar://problem/10996039>
Reviewed by Sam Weinig.
Use the new dispatchAfterEnsuringUpdatedScrollPosition function in forceRepaintAsync to
ensure that the scroll position is up to date.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
2012-05-01 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Add an experimental extension to set the min. contents width
https://bugs.webkit.org/show_bug.cgi?id=85281
Reviewed by Antonio Gomes.
Add the experimental property preferredMinimumContentsWidth: which
can be used to set the minimum contents width when not overriden by
the page itself.
Default value is set to 0, which defines normal [desktop] behaviour.
* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewExperimental::preferredMinimumContentsWidth):
(QQuickWebViewExperimental::setPreferredMinimumContentsWidth):
* UIProcess/API/qt/qquickwebview_p.h:
2012-05-01 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Stop repeating timers which should only fire once
https://bugs.webkit.org/show_bug.cgi?id=85277
Reviewed by Antonio Gomes.
The TapGestureRecognizer uses QBasicTimers which are
repeating timers, so stop then when they fire.
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::highlightTimeout):
(WebKit::QtTapGestureRecognizer::singleTapTimeout):
(WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
2012-04-30 Anders Carlsson <andersca@apple.com>
Crash when opening plug-ins in background tabs
https://bugs.webkit.org/show_bug.cgi?id=85255
<rdar://problem/11344053>
Reviewed by Dan Bernstein.
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::setLayerHostingMode):
m_layerHostingContext can be null for plug-ins that don't use the Core Animation drawing model, so check for that.
2012-04-30 Yael Aharon <yael.aharon@nokia.com>
[Qt][WK2] Fixed layers are shaking when zoom level is not 1.0 due to a rounding error.
https://bugs.webkit.org/show_bug.cgi?id=84306
Reviewed by Noam Rosenthal.
When zooming, we need to be careful about how to convert the visible rect from float to int.
Using toAlignedRect can produce inconsistent width and height when we are scrolling.
This patch carefully modifies each piece of the visible rect, to avoid such rounding errors.
In addition, the TransformationMatrix we use for painting, needs to be adjusted for the same rounding error.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::visibleContentsRect):
(QQuickWebViewFlickablePrivate::_q_contentViewportChanged):
* UIProcess/DrawingAreaProxy.h:
(WebCore):
(WebKit::DrawingAreaProxy::setVisibleContentsRect):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeHostProxy.cpp:
(WebKit::LayerTreeHostProxy::setVisibleContentsRect):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
(WebKit::WebLayerTreeRenderer::setVisibleContentsRect):
* UIProcess/WebLayerTreeRenderer.h:
(WebLayerTreeRenderer):
2012-04-30 Anders Carlsson <andersca@apple.com>
ScrollingCoordinator::requestScrollPositionUpdate should not update the main frame scroll position
https://bugs.webkit.org/show_bug.cgi?id=85240
<rdar://problem/11286609>
Reviewed by Sam Weinig.
The find machinery should cope with asynchronous scroll position updates.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
Split the code that handles updating the find indicator and find overlay out into a separate function.
(WebKit::FindController::findString):
Call updateFindUIAfterPageScroll once we know that the scroll position has been updated.
2012-04-30 Anders Carlsson <andersca@apple.com>
Add a way to asynchronously call a function once the scroll position of a page has been updated
https://bugs.webkit.org/show_bug.cgi?id=85237
Reviewed by Sam Weinig.
Add DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition, which will call the given function object after
making sure that the scroll position has been updated correctly. This is important for TiledCoreAnimationDrawingArea,
which updates the scrolling position asynchronously.
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
Since scroll position updates are synchronous by default, just call function directly.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
Commit the layer tree state and then use ScrollingThread::dispatchBarrier to make sure that the function is called when any
scroll position changes have been made. If possible, freeze the layer tree to make sure that the update is atomic.
2012-04-30 Anders Carlsson <andersca@apple.com>
Fix ALL the build failures!
* UIProcess/API/mac/WKView.mm:
(-[WKView WebKit::]):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2012-04-30 Anders Carlsson <andersca@apple.com>
Build fix.
* Shared/DrawingAreaInfo.h:
2012-04-30 Emil A Eklund <eae@chromium.org>
[gtk, qt, chromium, win] Fix usage of LayoutUnits and rounding in platform code
https://bugs.webkit.org/show_bug.cgi?id=85222
Reviewed by Eric Seidel.
Update platform code to use the pixel snapped values for painting rects
to line up with device pixels and change platform specific hit testing
code to use roundedPoint as hit testing is still mostly done on integer
bounds.
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):
2012-04-30 Anders Carlsson <andersca@apple.com>
Put all of TiledCoreAnimationDrawingArea in #if ENABLE(THREADED_SCROLLING)
https://bugs.webkit.org/show_bug.cgi?id=85232
Reviewed by Sam Weinig.
Stop pretending that TiledCoreAnimationDrawingArea works without threaded scrolling.
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
(WebKit::dispatchBackToMainThread):
(WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
(WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
2012-04-30 Benjamin Poulain <benjamin@webkit.org>
Add String::startsWith() and endsWith() for string literals
https://bugs.webkit.org/show_bug.cgi?id=85154
Reviewed by Darin Adler.
Update WebKit2 to use String::endsWith(UChar).
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::pathExtension):
2012-04-30 Alexey Proskuryakov <ap@apple.com>
Validate keypress command names
https://bugs.webkit.org/show_bug.cgi?id=85204
<rdar://problem/11249368>
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm:
(-[WKView doCommandBySelector:]):
(-[WKView insertText:replacementRange:]):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::registerKeypressCommandName):
(WebKit::WebPageProxy::isValidKeypressCommandName):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::executeSavedCommandBySelector):
2012-04-30 Mario Sanchez Prada <msanchez@igalia.com>
[GTK] Implement WebUIClient's runOpenPanel in WebKit2GTK+
https://bugs.webkit.org/show_bug.cgi?id=78491
Reviewed by Martin Robinson.
Add a new public class to the API, WebKitFileChooserRequest, to be
emitted along with a new WebKitWebView::run-file-chooser signal to
let client applications to provide their own file chooser dialog
when the use interacts with HTML Input elements of type 'file'.
* GNUmakefile.am: Added new source files and headers.
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp: Added.
(_WebKitFileChooserRequestPrivate):
(webkit_file_chooser_request_init):
(webkitFileChooserRequestFinalize):
(webkitFileChooserRequestGetProperty):
(webkit_file_chooser_request_class_init):
(webkitFileChooserRequestCreate):
(webkit_file_chooser_request_get_mime_types):
(webkit_file_chooser_request_get_mime_types_filter):
(webkit_file_chooser_request_get_select_multiple):
(webkit_file_chooser_request_select_files):
(webkit_file_chooser_request_get_selected_files):
(webkit_file_chooser_request_cancel):
* UIProcess/API/gtk/WebKitFileChooserRequest.h: Added.
(_WebKitFileChooserRequest):
(_WebKitFileChooserRequestClass):
* UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h: Added,
containing the prototype of webkitFileChooserRequestCreate.
Provide private API to make a file chooser request from the
WebView, and provide a default handler for it.
* UIProcess/API/gtk/WebKitWebView.cpp:
(fileChooserDialogResponseCallback): Handler for the 'response'
signal for the GtkFileChooserDialog used in the default
handler. It will call to webkit_file_chooser_request_select_files
or webkit_file_chooser_request_cancel as needed.
(webkitWebViewRunFileChooser): Default handler for the new
'run-file-chooser' signal. It will create a GtkFileChooserDialog,
connect to the 'response' signal and show it.
(webkit_web_view_class_init): Connect the 'run-file-chooser'
signal to the default handler, webkitWebViewRunFileChooser.
(webkitWebViewRunFileChooserRequest):
* UIProcess/API/gtk/WebKitWebView.h:
(_WebKitWebViewClass): Added prototype for the handler of the new
'run-file-chooser' signal.
* UIProcess/API/gtk/WebKitWebViewPrivate.h: Added prototype for
private new function webkitWebViewRunFileChooserRequest.
Provide an implementation for runOpenPanel in WebKitUIClient.
* UIProcess/API/gtk/WebKitUIClient.cpp:
(runOpenPanel): New, implements runOpenPanel by creating an
instance of WebKitFileChooserRequest and asking the WebView to
emit the 'run-file-chooser' signal with it.
(attachUIClientToView): Reference the new runOpenPanel function.
Added the new publich header to the main header.
* UIProcess/API/gtk/webkit2.h: Added WebKitFileChooserRequest.h.
New unit tests for the new WebKitFileChooserRequest API. Also,
extended the WebViewTest class to allow simulating mouse clicks.
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(checkMimeTypeForFilter): New, checks whether a GtkFileFilter
filters a given MIME type, as specified by RFC 2046.
(testWebViewFileChooserRequest): New unit test.
(beforeAll): Add the new unit test as an UIClientTest.
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::clickMouseButton): New public function to simulate a
mouse click through GdkEvents, as the combination of a 'press' and
a 'release' event. Used from the new unit test to simulate the
user pressing in the button rendered for a HTML Input element.
(WebViewTest::executeMouseButtonEvent): New private function to
simulate a mouse event through GdkEvents.
* UIProcess/API/gtk/tests/WebViewTest.h:
Updated documentation related files with the new API.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new API.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Added new section.
* UIProcess/API/gtk/docs/webkit2gtk.types: Added get_type function.
2012-04-28 Yury Semikhatsky <yurys@chromium.org>
Unreviewed. Added new exported symbols after r115553.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-04-27 Geoffrey Garen <ggaren@apple.com>
Made WeakSet::allocate() static and removed its JSGlobalData argument
https://bugs.webkit.org/show_bug.cgi?id=85128
Reviewed by Anders Carlsson.
Mechanically removed JSGlobalData arguments from PassWeak<T> and Weak<T> allocation.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
2012-04-27 Yael Aharon <yael.aharon@nokia.com>
[Qt][WK2] Don't call syncRemoteContents from WebLayerTreeRenderer::paintToCurrentGLContext
https://bugs.webkit.org/show_bug.cgi?id=85088
Reviewed by Noam Rosenthal.
Remove the call to syncRemoteContents from WebLayerTreeRenderer::paintToCurrentGLContext,
since it was moved to QQuickWebPage::updatePaintNode.
To make sure that we always sync before painting, this patch also calls page->update()
when the viewport changes.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::_q_contentViewportChanged):
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
2012-04-27 Gavin Peters <gavinp@chromium.org>
Add new ENABLE_LINK_PRERENDER define to control the Prerendering API
https://bugs.webkit.org/show_bug.cgi?id=84871
Reviewed by Adam Barth.
Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
API separates it from prefetching. Having separate include guards lets ports enable prefetching,
a relatively easy change, without needing to build the infrastructure for prerendering, which
is considerably more complicated.
2012-04-27 Yael Aharon <yael.aharon@nokia.com>
[Qt][WK2] setVisibleContentsRect is not thread safe
https://bugs.webkit.org/show_bug.cgi?id=85060
Reviewed by Noam Rosenthal.
Don't call WebLayerTreeRenderer::setVisibleContentsRect directly. Use bind() instead.
* UIProcess/LayerTreeHostProxy.cpp:
(WebKit::LayerTreeHostProxy::setVisibleContentsRect):
2012-04-26 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Add a way to register custom uri schemes in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=84130
Reviewed by Martin Robinson.
* GNUmakefile.am: Add new files to compilation.
* Platform/CoreIPC/MessageID.h: Add
MessageClassWebSoupRequestManager and
MessageClassWebSoupRequestManagerProxy message types to identify
WebSoupRequestManager messages.
* Shared/API/c/WKBase.h: Include WKBaseSoup.h when building with
soup network backend.
* Shared/API/c/soup/WKBaseSoup.h: Added.
* Shared/APIObject.h: Add SoupRequestManager type when using soup.
* UIProcess/API/C/WKAPICast.h: Include WKAPICastSoup.h when
building with soup network backend.
* UIProcess/API/C/soup/WKAPICastSoup.h: Added.
(WebKit): Map WKSoupRequestManagerRef to
WebSoupRequestManagerProxy.
* UIProcess/API/C/soup/WKContextSoup.cpp: Added.
(WKContextGetSoupRequestManager): Return WKSoupRequestManagerRef
associated to the context.
* UIProcess/API/C/soup/WKContextSoup.h: Added.
* UIProcess/API/C/soup/WKSoupRequestManager.cpp: Added.
(WKSoupRequestManagerGetTypeID): Return the
WebSoupRequestManagerProxy API type.
(WKSoupRequestManagerSetClient): Set the WKSoupRequestManagerClient.
(WKSoupRequestManagerRegisterURIScheme): Call
WebSoupRequestManagerProxy::registerURIScheme().
(WKSoupRequestManagerHandleURIRequest): Call
WebSoupRequestManagerProxy::handleURIRequest().
* UIProcess/API/C/soup/WKSoupRequestManager.h: Added.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext): Initialize
m_soupRequestManagerProxy when using soup.
(WebKit::WebContext::~WebContext): Invalidate and clear the
m_soupRequestManagerProxy when using soup.
(WebKit::WebContext::disconnectProcess): Invalidate the
m_soupRequestManagerProxy when using soup.
(WebKit::WebContext::didReceiveMessage): Forward the message to
m_soupRequestManagerProxy if it's a
MessageClassWebSoupRequestManagerProxy message.
* UIProcess/WebContext.h:
(WebKit::WebContext::soupRequestManagerProxy): Return
m_soupRequestManagerProxy.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage): Forward message to
the web context if it's a MessageClassWebSoupRequestManagerProxy
message.
* UIProcess/soup/WebSoupRequestManagerClient.cpp: Added.
(WebKit::WebSoupRequestManagerClient::didReceiveURIRequest): Call
didReceiveURIRequest callback if it has an implementation.
* UIProcess/soup/WebSoupRequestManagerClient.h: Added.
* UIProcess/soup/WebSoupRequestManagerProxy.cpp: Added.
(WebKit::WebSoupRequestManagerProxy::create): Create a new
WebSoupRequestManagerProxy.
(WebKit::WebSoupRequestManagerProxy::WebSoupRequestManagerProxy):
(WebKit::WebSoupRequestManagerProxy::~WebSoupRequestManagerProxy):
(WebKit::WebSoupRequestManagerProxy::invalidate):
(WebKit::WebSoupRequestManagerProxy::initializeClient):
(WebKit::WebSoupRequestManagerProxy::didReceiveMessage):
(WebKit::WebSoupRequestManagerProxy::registerURIScheme): Send
RegisterURIScheme message to the WebProcess to register the given
URI scheme.
(WebKit::WebSoupRequestManagerProxy::handleURIRequest): Send
HandleURIRequest message to the WebProcess with the given data and
data type.
(WebKit::WebSoupRequestManagerProxy::didReceiveURIRequest): Call
didReceiveURIRequest callback to allow the user to handle the
request.
* UIProcess/soup/WebSoupRequestManagerProxy.h: Added.
* UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Added.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Initialize m_soupRequestManager
when using soup.
(WebKit::WebProcess::didReceiveMessage): Forward the message to
m_soupRequestManager if it's a MessageClassWebSoupRequestManager
message.
* WebProcess/WebProcess.h:
(WebKit::WebProcess::soupRequestManager): Return m_soupRequestManager.
* WebProcess/soup/WebKitSoupRequestGeneric.cpp: Added.
(webkitSoupRequestGenericFinalize):
(webkit_soup_request_generic_init):
(webkitSoupRequestGenericSendAsync): Create a GSimpleAsyncResult
to handle the request and pass it to the WebSoupRequestManager.
(webkitSoupRequestGenericSendFinish): Finish the async operation
started by webkitSoupRequestGenericSendAsync() and return the
contents of the request as returned by WebSoupRequestManager.
(webkitSoupRequestGenericGetContentLength): Get the request
contents length.
(webkitSoupRequestGenericGetContentType): Get the request mime
type.
(webkit_soup_request_generic_class_init):
(webkitSoupRequestGenericSetContentLength): Set the request
contents length.
(webkitSoupRequestGenericSetContentType): Set the request mime
type.
* WebProcess/soup/WebKitSoupRequestGeneric.h: Added.
* WebProcess/soup/WebSoupRequestManager.cpp: Added.
(WebKit::generateSoupRequestID): Helper function to generate a
unique request identifier.
(WebKit::WebSoupRequestManager::WebSoupRequestManager):
(WebKit::WebSoupRequestManager::~WebSoupRequestManager):
(WebKit::WebSoupRequestManager::didReceiveMessage):
(WebKit::WebSoupRequestManager::registerURIScheme): Add the scheme
to the schemes array and add a new WebKitSoupRequestGeneric
feature with the new scheme list to the SoupRequester feature.
(WebKit::WebSoupRequestManager::handleURIRequest): Complete the
async operation by creating a GInputStream with the request data,
or setting an error in case of failure.
(WebKit::WebSoupRequestManager::send): Send DidReceiveURIRequest
message to the UI process.
(WebKit::WebSoupRequestManager::finish): Return the GInputStream
containing the request data.
* WebProcess/soup/WebSoupRequestManager.h: Added.
* WebProcess/soup/WebSoupRequestManager.messages.in: Added.
2012-04-26 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] A GraphicsSurface instance is created with every update
https://bugs.webkit.org/show_bug.cgi?id=85014
Reviewed by Kenneth Rohde Christiansen.
Keep a copy of the GraphicsSurface in the UI process, and reuse it for
subsequent updates. This ensure that the texture and other data associated
with the GraphicsSurface does not need to be reconstructed.
* Shared/ShareableSurface.h:
(Handle):
(WebKit::ShareableSurface::Handle::graphicsSurfaceToken):
* UIProcess/LayerTreeHostProxy.cpp:
(WebKit::LayerTreeHostProxy::updateTileForLayer):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
2012-04-26 Martin Robinson <mrobinson@igalia.com>
[Cairo] Wrap cairo surfaces in a class when storing native images
https://bugs.webkit.org/show_bug.cgi?id=83611
Reviewed by Alejandro G. Castro.
* Shared/gtk/ArgumentCodersGtk.cpp: Updated to reflect the addition of NativeImageCairo.
2012-04-26 Jon Lee <jonlee@apple.com>
[WK2] AlternativeTextClient leaks when the page is destroyed
https://bugs.webkit.org/show_bug.cgi?id=84307
<rdar://problem/11328431>
Reviewed by Enrica Casucci.
* WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Implement pageDestroyed(), as in EditorClient.
(WebAlternativeTextClient):
* WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
(WebKit::WebAlternativeTextClient::pageDestroyed): Deletes itself.
2012-04-26 Jer Noble <jer.noble@apple.com>
Full Screen mode does not preserve CALayer ordering after exiting.
https://bugs.webkit.org/show_bug.cgi?id=83931
Reviewed by Eric Carlson.
Further corrections to r114567. When swapping view for otherView, give the correct
relative view to -[NSView addSubview:positioned:relativeTo:].
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController _swapView:with:]):
2012-04-25 Jer Noble <jer.noble@apple.com>
Placeholder view is immediately removed from hosting window upon entering full screen.
https://bugs.webkit.org/show_bug.cgi?id=84916
Reviewed by Darin Adler.
Correct a mistake added in r114567. When swapping view for otherView, add otherView and
remove view (rather than adding otherView and removing otherView).
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController _swapView:with:]):
2012-04-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Build and run TestWebKitAPI WebKit2 unit tests
https://bugs.webkit.org/show_bug.cgi?id=84446
Reviewed by Philippe Normand.
* UIProcess/API/C/WKNativeEvent.h: Define WKNativeEventPtr as
GdkEvent for the GTK+ port.
2012-04-26 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Tap highlight should have a delay not to interfere with panning
https://bugs.webkit.org/show_bug.cgi?id=84948
Reviewed by Kenneth Rohde Christiansen.
Start the tap highlight animation after a slight delay so that pan
gestures do not result in flashing highlight rects which slow down
flicking, especially during continuous pan gestures.
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::update):
(WebKit::QtTapGestureRecognizer::highlightTimeout):
(WebKit):
(WebKit::QtTapGestureRecognizer::reset):
(WebKit::QtTapGestureRecognizer::timerEvent):
* UIProcess/qt/QtTapGestureRecognizer.h:
(QtTapGestureRecognizer):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(WebKit::QtWebPageEventHandler::doneWithTouchEvent):
2012-04-26 Lars Knudsen <lars.knudsen@nokia.com>
Make it possible to use accelerated compositing for page overlay fading
https://bugs.webkit.org/show_bug.cgi?id=82336
Reviewed by Noam Rosenthal.
Page overlay fading will use AC where possible. Otherwise, it will
fall back to the previous method of redrawing each frame in the animation.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setPageOverlayOpacity):
(DrawingArea):
(WebKit::DrawingArea::pageOverlayShouldApplyFadeWhenPainting):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setPageOverlayOpacity):
(WebKit):
(WebKit::DrawingAreaImpl::pageOverlayShouldApplyFadeWhenPainting):
* WebProcess/WebPage/DrawingAreaImpl.h:
(DrawingAreaImpl):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::setPageOverlayOpacity):
(WebKit::LayerTreeHost::pageOverlayShouldApplyFadeWhenPainting):
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::PageOverlay):
(WebKit::PageOverlay::setPage):
(WebKit::PageOverlay::fadeAnimationTimerFired):
* WebProcess/WebPage/PageOverlay.h:
* WebProcess/WebPage/TapHighlightController.cpp:
(WebKit::TapHighlightController::drawRect):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::setPageOverlayOpacity):
(WebKit):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
(WebKit::LayerTreeHostQt::pageOverlayShouldApplyFadeWhenPainting):
2012-04-26 Alexander Færøy <ahf@0x90.dk>
[Qt] r115300 broke the Qt build on Mac OS X.
This patch adds guards around the createPluginContainer and
windowedPluginGeometryDidChange member functions in WebPageProxy.
Unreviewed build fix.
* UIProcess/qt/WebPageProxyQt.cpp:
(WebKit):
2012-04-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WebKit2] Initial windowed plugins implementation
https://bugs.webkit.org/show_bug.cgi?id=61065
Reviewed by Philippe Normand.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::createPluginContainer):
(WebKit::PluginControllerProxy::windowedPluginGeometryDidChange):
* PluginProcess/PluginControllerProxy.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseContainerAdd): Implement GtkContainer::add().
(webkitWebViewBaseContainerRemove): Implement GtkContainer::remove().
(webkitWebViewBaseContainerForall): Implement GtkContainer::forall().
(webkitWebViewBaseChildMoveResize): Set a new geometry for a child widget.
(webkitWebViewBaseChildAllocate): Allocate a child widget.
(resizeWebKitWebViewBaseFromAllocation): Allocate child widgets.
(webkit_web_view_base_class_init):
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Add webkitWebViewBaseSizeAllocate().
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Add createPluginContainer
and windowedPluginGeometryDidChange messages.
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::pluginWindowMap):
(WebKit::pluginContainerPlugRemoved): Remove the socket from the
hash map when its plug is removed.
(WebKit::WebPageProxy::createPluginContainer): Create a GtkSocket
as container widget for windowed plugins.
(WebKit::WebPageProxy::windowedPluginGeometryDidChange): Call
webkitWebViewBaseSizeAllocate() to update the plugin widget
geometry.
* UIProcess/qt/WebPageProxyQt.cpp:
(WebKit::WebPageProxy::createPluginContainer):
(WebKit::WebPageProxy::windowedPluginGeometryDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::socketPlugRemovedCallback): Return TRUE to avoid the
socket to be destroyed, since we need to reuse it.
(WebKit::NetscapePlugin::platformPostInitializeWindowed): Ask the
ui process to create a plugin container.
(WebKit::NetscapePlugin::platformPostInitializeWindowless):
(WebKit::NetscapePlugin::platformPostInitialize):
(WebKit::NetscapePlugin::platformGeometryDidChange): For windowed
plugins notify the ui process that the plugin geometry has
changed.
(WebKit::NetscapePlugin::platformPaint): Do nothing for windowed
plugins, the caller already calls callSetWindow().
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::createPluginContainer):
(WebKit::PluginProxy::windowedPluginGeometryDidChange):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginProxy.messages.in:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::createPluginContainer):
(WebKit::PluginView::windowedPluginGeometryDidChange):
* WebProcess/Plugins/PluginView.h:
2012-04-26 Chris Fleizach2 <cfleizach@apple.com>
CrashTracer: [USER] 157 crashes in WebProcess at com.apple.WebCore: WebCore::AccessibilityRenderObject::isAttachment const + 29
https://bugs.webkit.org/show_bug.cgi?id=84463
Reviewed by Darin Adler.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
(WebKit):
2012-04-25 Benjamin Poulain <benjamin@webkit.org>
Add a version of StringImpl::find() without offset
https://bugs.webkit.org/show_bug.cgi?id=83968
Update the symbols files.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-04-25 Mark Hahnenberg <mhahnenberg@apple.com>
WebCore shouldn't call collectAllGarbage directly
https://bugs.webkit.org/show_bug.cgi?id=84897
Reviewed by Geoffrey Garen.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose): Changed to call garbageCollectSoon. This is the
function that causes us to do so much collection on page navigation.
2012-04-25 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=84909
Background tabs are fuzzy until repaint when deviceScaleFactor > 1
-and corresponding-
<rdar://problem/11312064>
Rubber-stamped by Darin Adler.
Re-order the parameters of paintBitmapContext to match paintImage.
* Platform/cg/CGUtilities.cpp:
(WebKit::paintBitmapContext):
* Platform/cg/CGUtilities.h:
(WebKit):
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::resetScrolledRect):
(WebKit::BackingStore::paint):
(WebKit::BackingStore::backingStoreContext):
2012-04-25 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=84909
Background tabs are fuzzy until repaint when deviceScaleFactor > 1
-and corresponding-
<rdar://problem/11312064>
Reviewed by Darin Adler.
BackingStoreMac paints into a Bitmap instead of a CGLayer when there is no
containing window. That bitmap is used for the initial paint when a background tab
first comes to he foreground, so it needs to be HiDPI-aware.
paintBitmapContext() now takes a scale factor that it passes along to paintImage
rather than hardcoding a scale factor of 1 for paintImage.
* Platform/cg/CGUtilities.cpp:
(WebKit::paintBitmapContext):
* Platform/cg/CGUtilities.h:
(WebKit):
When these functions fall into the bitmap case, they need to adopt the device
scale factor, which means they need to scale in size by the scale factor, and also
scale their context.
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::resetScrolledRect):
(WebKit::BackingStore::paint):
(WebKit::BackingStore::backingStoreContext):
2012-04-25 Enrica Casucci <enrica@apple.com>
REGRESSION (r110494): Dragging images from Safari to Finder results in .webloc rather than image file
https://bugs.webkit.org/show_bug.cgi?id=84878
<rdar://problem/11155407>
In WebKit2, it could happen to try to start the drag twice, given the asynchronous nature
of the communication between the UI process and the WebProcess.
We need to guarantee that we don't do that, otherwise on OS X the pasteboard ownership
gets changed which affects the promised file types.
The fix for the problem is in WebCore and we can now remove the guard on _setDragImage.
Reviewed by Alexey Proskuryakov.
* UIProcess/API/mac/WKView.mm:
(-[WKView mouseDown:]):
(-[WKView _setDragImage:at:linkDrag:]):
2012-04-18 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Make the web view's url property follow the active url
https://bugs.webkit.org/show_bug.cgi?id=77554
The url property of the webview now reflects the 'active' url of the
page, which maps to either the currently loading url, in the case of
an ongoing load, or the result of a load, even when the load failed.
In practice this means that setting the url though QML, or navigating
to a new url in the page by e.g clicking, will both instantly change
the url-property of the webview to the target url. This differs from
earlier behavior, where we would update the url when the load
committed.
An optional argument is added to loadHtml(), to allow setting
the unreachable url when providing replacement content for failed
loads.
A slight change in the activeUrl() implementation is also done,
where we now favour the url of an pending API request, even when
we don't have a mainframe yet.
Finally, the location bar in the minibrowser is updated to behave
a bit more like normal browsers in terms of when the url will change
and how active focus is handled.
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::onComponentComplete):
(QQuickWebView::reload):
(QQuickWebView::url):
(QQuickWebView::setUrl):
(QQuickWebView::loadHtml):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
* UIProcess/API/qt/tests/qmltests/WebView.pro:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
* UIProcess/API/qt/tests/qmltests/common/link.html: Added.
* UIProcess/API/qt/tests/qmltests/common/redirect.html: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::activeURL):
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::QtWebPageLoadClient):
(QtWebPageLoadClient::didStartProvisionalLoadForFrame):
(QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(QtWebPageLoadClient::didCommitLoadForFrame):
(QtWebPageLoadClient::dispatchLoadFailed):
(QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame):
(QtWebPageLoadClient::didFailLoadWithErrorForFrame):
* UIProcess/qt/QtWebPageLoadClient.h:
(QtWebPageLoadClient):
2012-04-25 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Zoom back can overscroll document edges.
https://bugs.webkit.org/show_bug.cgi?id=84851
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
2012-04-18 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Make the web view's url property follow the active url
https://bugs.webkit.org/show_bug.cgi?id=77554
The url property of the webview now reflects the 'active' url of the
page, which maps to either the currently loading url, in the case of
an ongoing load, or the result of a load, even when the load failed.
In practice this means that setting the url though QML, or navigating
to a new url in the page by e.g clicking, will both instantly change
the url-property of the webview to the target url. This differs from
earlier behavior, where we would update the url when the load
committed.
An optional argument is added to loadHtml(), to allow setting
the unreachable url when providing replacement content for failed
loads.
A slight change in the activeUrl() implementation is also done,
where we now favour the url of an pending API request, even when
we don't have a mainframe yet.
Finally, the location bar in the minibrowser is updated to behave
a bit more like normal browsers in terms of when the url will change
and how active focus is handled.
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::onComponentComplete):
(QQuickWebView::reload):
(QQuickWebView::url):
(QQuickWebView::setUrl):
(QQuickWebView::loadHtml):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
* UIProcess/API/qt/tests/qmltests/WebView.pro:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
* UIProcess/API/qt/tests/qmltests/common/link.html: Added.
* UIProcess/API/qt/tests/qmltests/common/redirect.html: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::activeURL):
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::QtWebPageLoadClient):
(QtWebPageLoadClient::didStartProvisionalLoadForFrame):
(QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(QtWebPageLoadClient::didCommitLoadForFrame):
(QtWebPageLoadClient::dispatchLoadFailed):
(QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame):
(QtWebPageLoadClient::didFailLoadWithErrorForFrame):
* UIProcess/qt/QtWebPageLoadClient.h:
(QtWebPageLoadClient):
2012-04-24 Enrica Casucci <enrica@apple.com>
REGRESSION (r109022) Safari not placing service data on pasteboard.
https://bugs.webkit.org/show_bug.cgi?id=84766
<rdar://problem/11085756>
The support for OS X services requires that the write operations to
the pasteboard occur synchronously. This behavior was changed with r109022.
This change removes the original synchronous call to the WebProcess to perform
the pasteboard write that had become asynchronous after r109022.
It implements instead a synchronous call to retrive the content to be placed
in the pasteboard.
Reviewed by Alexey Proskuryakov.
* UIProcess/API/mac/WKView.mm:
(-[WKView writeSelectionToPasteboard:types:]): Uses new methods.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm: Removed writeSelectionToPasteboard.
(WebKit::WebPageProxy::getStringSelectionForPasteboard): Added.
(WebKit::WebPageProxy::getBufferSelectionForPasteboard): Added.
* WebProcess/WebPage/WebPage.h: Added support for the new messages and
removed old message.
* WebProcess/WebPage/WebPage.messages.in: Ditto.
* WebProcess/WebPage/mac/WebPageMac.mm: Ditto.
(WebKit::WebPage::readSelectionFromPasteboard): Added.
(WebKit::WebPage::getBufferSelectionForPasteboard): Added.
2012-04-24 Brady Eidson <beidson@apple.com>
Fix Windows build.
* WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
(~InjectedBundleDOMWindowExtension): VS doesn't like OVERRIDE on d'tor's
2012-04-24 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt] Unreviewed build fix after r115083
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
2012-04-24 Brady Eidson <beidson@apple.com>
<rdar://problem/10120155> and https://bugs.webkit.org/show_bug.cgi?id=82664
Need DOMWindow mechanism to supplement UserScripts for page cache notifications
Reviewed by Sam Weinig.
- Adds a new API object WKBundleDOMWindowExtension
- Exposes callbacks about the lifetime of DOMWindowExtensions through BundlePageLoaderClient
Add new API casts:
* Shared/API/c/WKBase.h:
* Shared/APIClientTraits.cpp:
* Shared/APIObject.h:
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
Add API for the new DOMWindowExtension object:
* WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp: Added.
(WKBundleDOMWindowExtensionGetTypeID):
(WKBundleDOMWindowExtensionCreate):
(WKBundleDOMWindowExtensionGetFrame):
(WKBundleDOMWindowExtensionGetScriptWorld):
* WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.h: Added.
Add implementation for that API which wraps the WebCore::DOMWindowExtension:
* WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp: Added.
(WebKit::allExtensions):
(WebKit::InjectedBundleDOMWindowExtension::create):
(WebKit::InjectedBundleDOMWindowExtension::get):
(WebKit::InjectedBundleDOMWindowExtension::InjectedBundleDOMWindowExtension):
(WebKit::InjectedBundleDOMWindowExtension::~InjectedBundleDOMWindowExtension):
(WebKit::InjectedBundleDOMWindowExtension::frame):
(WebKit::InjectedBundleDOMWindowExtension::world):
* WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h: Added.
(InjectedBundleDOMWindowExtension):
(WebKit::InjectedBundleDOMWindowExtension::type):
Add new BundlePageLoaderClient methods:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didCreateGlobalObjectForFrame):
(WebKit::InjectedBundlePageLoaderClient::willDisconnectDOMWindowExtensionFromGlobalObject):
(WebKit::InjectedBundlePageLoaderClient::didReconnectDOMWindowExtensionToGlobalObject):
(WebKit::InjectedBundlePageLoaderClient::willDestroyGlobalObjectForDOMWindowExtension):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
(InjectedBundlePageLoaderClient):
Implement the 4 new callbacks from WebCore which notify the BundlePageLoaderClient:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable):
(WebKit::WebFrameLoaderClient::dispatchWillDisconnectDOMWindowExtensionFromGlobalObject):
(WebKit::WebFrameLoaderClient::dispatchDidReconnectDOMWindowExtensionToGlobalObject):
(WebKit::WebFrameLoaderClient::dispatchWillDestroyGlobalObjectForDOMWindowExtension):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
Project Files:
* CMakeLists.txt:
* GNUmakefile.am:
* Target.pri:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
2012-04-24 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Implement axis locking on the WebView for pan gestures
https://bugs.webkit.org/show_bug.cgi?id=84350
Reviewed by Kenneth Rohde Christiansen.
If a pan gesture has sufficient velocity along one axis the WebView
should automatically lock the page movement to that axis.
This locking should be maintained until the ongoing pan gesture ends.
This patch implements a simple axis locker which adjusts the positions
sent to the Flickable to the initial reference position according to the
direction an velocity information it gathered from incoming touch events.
The FlickableAxisLocker makes use of the velocity information of the touch point
if available, else an approximate velocity of the incoming event is
calculated.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::FlickableAxisLocker::FlickableAxisLocker):
(QQuickWebViewPrivate::FlickableAxisLocker::touchVelocity):
(QQuickWebViewPrivate::FlickableAxisLocker::update):
(QQuickWebViewPrivate::FlickableAxisLocker::setReferencePosition):
(QQuickWebViewPrivate::FlickableAxisLocker::reset):
(QQuickWebViewPrivate::FlickableAxisLocker::adjust):
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebView::touchEvent):
(QQuickWebView::handleFlickableMousePress):
(QQuickWebView::handleFlickableMouseMove):
(QQuickWebView::handleFlickableMouseRelease):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
2012-04-24 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Tap-to zoom should navigate when appropiate
https://bugs.webkit.org/show_bug.cgi?id=84602
Reviewed by Simon Hausmann.
When a zoomable area is returned and has the same zoom-level as the current,
examine if the using this target would expose currently unexposed parts of
the zoom-target. If it does, pan to that area instead of zooming back.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
2012-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add WebKitCookieManager::changed signal to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=82598
Reviewed by Philippe Normand.
* UIProcess/API/gtk/WebKitCookieManager.cpp:
(webkitCookieManagerFinalize): Stop observing cookie changes.
(webkit_cookie_manager_class_init): Add
WebKitCookieManager::changed signal.
(cookiesDidChange): Emit WebKitCookieManager::changed signal.
(webkitCookieManagerCreate): Implement WKCookieManagerClient and
start observing cookie changes.
* UIProcess/API/gtk/tests/TestCookieManager.cpp:
(testCookieManagerCookiesChanged):
(beforeAll):
2012-04-24 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Restore x-position when restoring previous zoom-level.
https://bugs.webkit.org/show_bug.cgi?id=84591
Reviewed by Simon Hausmann.
Tap-to-zoom fits content to width, therefore it is essentional that
the content is refitted to width when zooming out.
This patch pairs horizontal position and scale on the zoom-out stack.
Additionally it fixes a problem with not detecting zoom-out properly
due to floating point errors.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::fuzzyCompare):
(WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
* UIProcess/qt/QtViewportInteractionEngine.h:
(WebKit::QtViewportInteractionEngine::ScaleStackItem::ScaleStackItem):
(QtViewportInteractionEngine):
2012-04-24 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Incomplete interaction-engine reset.
https://bugs.webkit.org/show_bug.cgi?id=84594
Reviewed by Simon Hausmann.
Reset a few values forgotten in the reset function.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::reset):
2012-04-23 Andreas Kling <kling@webkit.org>
[Mac] WebProcess should empty cache on a background thread/block.
<http://webkit.org/b/84619>
<rdar://problem/10668689>
Reviewed by Anders Carlsson.
Move the removeAllCachedResponses call to a dispatch queue and wait for it on exit.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* WebProcess/WebProcess.h:
(WebProcess):
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformClearResourceCaches):
(WebKit::WebProcess::platformTerminate):
2012-04-23 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt][WK2] Convert touch-point area.
https://bugs.webkit.org/show_bug.cgi?id=84434
Reviewed by Kenneth Rohde Christiansen.
Missed WebKit2 conversion in commit r106470.
* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::WebEventFactory::createWebTouchEvent):
2012-04-23 Balazs Kelemen <kbalazs@webkit.org>
[Qt] Add desktop zooming support for QQuickWebView
https://bugs.webkit.org/show_bug.cgi?id=82337
Reviewed by Simon Hausmann.
Add private C++ API for programmatic zooming.
This is important on desktop where we don't
have any way to zoom currently.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewLegacyPrivate::zoomFactor):
(QQuickWebViewLegacyPrivate::setZoomFactor):
(QQuickWebView::zoomFactor):
(QQuickWebView::setZoomFactor):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::zoomFactor):
(QQuickWebViewPrivate::setZoomFactor):
(QQuickWebViewPrivate):
(QQuickWebViewLegacyPrivate):
2012-04-23 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Move non-api classes to WebKit namespace at WebKit2/UiProcess/qt
https://bugs.webkit.org/show_bug.cgi?id=84528
Reviewed by Simon Hausmann.
Fix namespace usage in non-api classes for Qt.
* UIProcess/API/qt/qquickwebpage.cpp:
* UIProcess/API/qt/qquickwebpage_p.h:
(WebKit):
* UIProcess/API/qt/qquickwebpage_p_p.h:
(WebKit):
(QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/qquickwebview_p.h:
(WebKit):
* UIProcess/API/qt/qquickwebview_p_p.h:
(WebKit):
(QQuickWebViewPrivate::viewportInteractionEngine):
(QQuickWebViewPrivate):
(QQuickWebViewFlickablePrivate::viewportInteractionEngine):
(QQuickWebViewFlickablePrivate):
* UIProcess/API/qt/qwebdownloaditem_p.h:
(WebKit):
* UIProcess/API/qt/qwebviewportinfo.cpp:
* UIProcess/qt/LayerBackingStore.cpp:
* UIProcess/qt/LayerBackingStore.h:
(WebKit):
* UIProcess/qt/QtDialogRunner.cpp:
(WebKit):
* UIProcess/qt/QtDialogRunner.h:
(WebKit):
* UIProcess/qt/QtDownloadManager.cpp:
* UIProcess/qt/QtDownloadManager.h:
(WebKit):
* UIProcess/qt/QtGestureRecognizer.cpp:
* UIProcess/qt/QtGestureRecognizer.h:
(WebKit):
* UIProcess/qt/QtPageClient.cpp:
(WebKit):
* UIProcess/qt/QtPageClient.h:
(WebKit):
(QtPageClient):
* UIProcess/qt/QtPanGestureRecognizer.cpp:
* UIProcess/qt/QtPanGestureRecognizer.h:
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
* UIProcess/qt/QtPinchGestureRecognizer.h:
* UIProcess/qt/QtTapGestureRecognizer.h:
(WebKit):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
* UIProcess/qt/QtViewportInteractionEngine.h:
* UIProcess/qt/QtWebContext.cpp:
* UIProcess/qt/QtWebContext.h:
* UIProcess/qt/QtWebError.cpp:
(WebKit):
* UIProcess/qt/QtWebError.h:
(WebKit):
* UIProcess/qt/QtWebIconDatabaseClient.cpp:
(WebKit):
* UIProcess/qt/QtWebIconDatabaseClient.h:
(WTF):
(WebKit):
(QtWebIconDatabaseClient):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(WebKit):
* UIProcess/qt/QtWebPageEventHandler.h:
(WebCore):
(WebKit):
* UIProcess/qt/QtWebPageLoadClient.cpp:
(WebKit):
* UIProcess/qt/QtWebPageLoadClient.h:
(WebKit):
* UIProcess/qt/QtWebPagePolicyClient.cpp:
(WebKit):
* UIProcess/qt/QtWebPagePolicyClient.h:
(WebKit):
* UIProcess/qt/QtWebPageSGNode.cpp:
* UIProcess/qt/QtWebPageSGNode.h:
(WebKit):
* UIProcess/qt/QtWebPageUIClient.cpp:
* UIProcess/qt/QtWebPageUIClient.h:
(WebKit):
* UIProcess/qt/QtWebUndoController.cpp:
(WebKit):
* UIProcess/qt/QtWebUndoController.h:
(WebKit):
* UIProcess/qt/WebContextMenuProxyQt.cpp:
* UIProcess/qt/WebContextQt.cpp:
* UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
* UIProcess/qt/WebGeolocationProviderQt.cpp:
(WebKit):
* UIProcess/qt/WebGeolocationProviderQt.h:
(WebKit):
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
(WebKit):
* UIProcess/qt/WebPopupMenuProxyQt.h:
2012-04-23 Kent Tamura <tkent@chromium.org>
Add test function to get placeholder string
https://bugs.webkit.org/show_bug.cgi?id=84536
Reviewed by Ryosuke Niwa.
* win/WebKit2.def: Expose HTMLNames::inputTag,
HTMLTextFormControlElement::placeholderShouldBeVisible(), and
Node::textContent.
* win/WebKit2CFLite.def: ditto.
2012-04-22 Sriram Neelakandan <sriram.neelakandan@gmail.com>
[Gtk] Added MOZ_X11 build flag for TARGET_X11
[Qt] Added MOZ_X11 build flag for !embedded
https://bugs.webkit.org/show_bug.cgi?id=40785
Reviewed by Anders Carlsson.
* GNUmakefile.am:
* Target.pri:
2012-04-22 Jon Lee <jonlee@apple.com>
Remove notifications support on Mac Lion.
https://bugs.webkit.org/show_bug.cgi?id=84554
<rdar://problem/11297128>
Reviewed by Sam Weinig.
* Configurations/FeatureDefines.xcconfig:
2012-04-22 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Multi-level tap-to-zoom.
https://bugs.webkit.org/show_bug.cgi?id=84456
Reviewed by Kenneth Rohde Christiansen.
Replace tap-to-zoomed flag with a stack of progressively higher zoom levels,
and zoom out to last zoom-level when attempting to zoom to current level.
Additionally detect a series of tap-to-zoom gestures on the same level and
continue to zoom out.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
2012-04-20 Jon Lee <jonlee@apple.com>
Add Notification constructor
https://bugs.webkit.org/show_bug.cgi?id=80477
<rdar://problem/10912431>
Reviewed by Jian Li.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show): If the notification doesn't get shown,
we should return false, since it will not go through a setPendingActivity cycle.
(WebKit::WebNotificationManager::clearNotifications): When clearing notifications,
finalize them so that they can be cleaned up by the GC.
2012-04-20 Timothy Hatcher <timothy@apple.com>
Make the Web Inspector be the first responder when opening docked.
<rdar://problem/11294217>
Reviewed by Brian Weinstein.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformAttach): Call makeFirstResponder: on
the window and pass the Inspector's WKView.
2012-04-06 Jer Noble <jer.noble@apple.com>
apple.com top navigation bar appears inside video during full screen exit animation
https://bugs.webkit.org/show_bug.cgi?id=83095
Reviewed by Eric Carlson.
Add new WebCore symbols needed by DumpRenderTree to exported symbol list.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-04-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Ignore resources while replacing content in WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=79777
Reviewed by Philippe Normand.
* UIProcess/API/gtk/WebKitResourceLoadClient.cpp:
(didSendRequestForResource): Return early if resources is Null.
(didReceiveResponseForResource): Ditto.
(didReceiveContentLengthForResource): Ditto.
(didFinishLoadForResource): Ditto.
(didFailLoadForResource): Ditto.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewLoadChanged): Clear resources before checking
whether we are replacing content.
(webkitWebViewIsReplacingContentOrDidReplaceContent): Helper
function to check whether view is replacing content or current
content is replaced.
(webkitWebViewResourceLoadStarted): Do not create resources when
replacing content.
(webkitWebViewGetLoadingWebResource): Ignore when replacing
content. Also add an assert when getting a loading resources to
make sure we only return Null when replacing content.
(webkitWebViewRemoveLoadingWebResource): Ditto.
(webkitWebViewResourceLoadFinished): Ditto.
* UIProcess/API/gtk/tests/TestResources.cpp:
(replacedContentResourceLoadStartedCallback):
(testWebViewResourcesReplacedContent):
(beforeAll):
2012-04-19 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] ASSERT(m_thread == currentThread()) on Mac when threaded rendering is enabled for the Qt scenegraph
https://bugs.webkit.org/show_bug.cgi?id=84278
Reviewed by Noam Rosenthal.
Delete the whole layer tree on UI side when paint node is deleted and force resync of the layers when
page becomes visible again.
* UIProcess/LayerTreeHostProxy.cpp:
(WebKit::LayerTreeHostProxy::purgeBackingStores):
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::WebLayerTreeRenderer):
(WebKit::WebLayerTreeRenderer::purgeGLResources):
(WebKit::WebLayerTreeRenderer::appendUpdate):
(WebKit::WebLayerTreeRenderer::setActive):
(WebKit):
* UIProcess/WebLayerTreeRenderer.h:
(WebLayerTreeRenderer):
* UIProcess/qt/QtWebPageSGNode.cpp:
(WebKit::ContentsSGNode::ContentsSGNode):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::purgeBackingStores):
2012-04-19 Vivek Galatage <vivekgalatage@gmail.com>
DevTools: assertion failure upon devtools window reopen.
https://bugs.webkit.org/show_bug.cgi?id=53493
Reviewed by Pavel Feldman.
The pointers pointed to by WebInspector must be reset explicitly
in WebInspector::didClose() method
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::closeInspectorFrontend):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::didClose):
2012-04-19 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Zoom out on the second double click does not always scale right.
https://bugs.webkit.org/show_bug.cgi?id=84332
Reviewed by Simon Hausmann.
Zoom out to the minimum scale value instead of the fixed 1.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
2012-04-18 Jer Noble <jer.noble@apple.com>
Full Screen mode does not preserve CALayer ordering after exiting.
https://bugs.webkit.org/show_bug.cgi?id=83931
Reviewed by Eric Carlson.
When swapping the placeholder and web views, use -[NSView addSubview:positioned:relativeTo:]
instead of -[NSView replaceSubview:with:], as the latter does not preserve the relative order
of the view's backing CALayers.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController _swapView:with:]):
2012-04-18 Alexey Proskuryakov <ap@apple.com>
[WK2] Sandbox violations prevent attaching files to gmail messages
https://bugs.webkit.org/show_bug.cgi?id=84263
<rdar://problem/11248260>
Reviewed by Oliver Hunt.
* WebProcess/WebCoreSupport/WebDragClient.cpp: (WebKit::WebDragClient::willPerformDragDestinationAction):
Prepare to the possibility that file data will be read. This needs to happen on every drop
with files, not just after event dispatch.
* WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mayPerformUploadDragDestinationAction):
* WebProcess/WebPage/WebPage.h:
Renamed performUploadDragDestinationAction to mayPerformUploadDragDestinationAction. We don't
know if an upload will actually happen, it's up to JavaScript code to decide.
2012-04-18 Allan Sandfeld Jensen <allan.jensen@nokia.com>
Clean-up WheelEvent Conversion.
https://bugs.webkit.org/show_bug.cgi?id=84243
Reviewed by Simon Hausmann.
* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::WebEventFactory::createWebWheelEvent):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::wheelEvent):
2012-04-18 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Minibrowser asserts on startup at QtViewportInteractionEngine::ensureContentWithinViewportBoundary()
https://bugs.webkit.org/show_bug.cgi?id=84172
Reviewed by Simon Hausmann.
After the viewport computing refactor, ensureContentWithinViewportBoundary() can be called
with resumed page. QtViewportInteractionEngine::ensureContentWithinViewportBoundary()
functionality does not necessarily require the page to be suspended. It's the caller's context
that determines whether the page needs to be suspended, so it's the caller's responsibility
to enforce the ASSERT().
Remove the invalid ASSERT on m_suspendCount at QtViewportInteractionEngine::ensureContentWithinViewportBoundary()
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
2012-04-17 Alexey Proskuryakov <ap@apple.com>
[Mac] USPS Shipping label prints without barcode
https://bugs.webkit.org/show_bug.cgi?id=84099
<rdar://problem/11133877>
Reviewed by Sam Weinig.
Use PDFDocuemnt instead of CGPDFDocument when printing PDFs, because PDFKit knows
how to draw PDF buttons, and CG does not.
* Shared/mac/PDFKitImports.h: Added.
* Shared/mac/PDFKitImports.mm: Added.
* UIProcess/API/mac/WKPrintingView.mm:
Moved code for dealing with dynamically loaded PDFKit from WKPrintingView, as we
now also need it elsewhere.
* WebKit2.xcodeproj/project.pbxproj: Added
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp: Rebamed to .mm.
* WebProcess/Plugins/PDF/BuiltInPDFView.h: Changed m_pdfDocument to PDFDocument.
* WebProcess/Plugins/PDF/BuiltInPDFView.mm: Copied from Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp.
(WebKit::BuiltInPDFView::pdfDocumentDidLoad):
(WebKit::BuiltInPDFView::calculateSizes):
(WebKit::BuiltInPDFView::paintContent):
Changed m_pdfDocument to PDFDocument, and updated for the changes. We still use
CGPDF when drawing to screen though, because that doesn't affect USPS.
* WebProcess/Plugins/Plugin.h: (WebKit::Plugin::pdfDocumentForPrinting): Updated
the type, and changed ifsed from CG to MAC, as we're now fully dependent on Cocoa.
* WebProcess/Plugins/PluginView.h: (WebKit::PluginView::pdfDocumentForPrinting):
Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::pdfDocumentForPrintingFrame):
(WebKit::WebPage::beginPrinting):
(WebKit::WebPage::computePagesForPrinting):
(WebKit::WebPage::drawRectToPDF):
(WebKit::WebPage::drawPagesToPDF):
* WebProcess/WebPage/WebPage.h:
Moved PDF document printing code to WebPageMac.mm, as it's now Objective C.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::computePagesForPrintingPDFDocument):
(WebKit::roundCGFloat):
(WebKit::drawPDFPage): While moving, also fixed a logic error in calculating the box
(it used to intersect with an empty box).
(WebKit::WebPage::drawRectToPDFFromPDFDocument):
(WebKit::WebPage::drawPagesToPDFFromPDFDocument):
2012-04-17 Anders Carlsson <andersca@apple.com>
Need a client callback for when the user tires to interact with an already unresponsive page
https://bugs.webkit.org/show_bug.cgi?id=84201
<rdar://problem/11140862>
Reviewed by Andreas Kling.
Add a interactionOccurredWhileProcessUnresponsive callback that's called when the unresponsiveness timer
fires while it's already unresponsive.
* UIProcess/API/C/WKPage.h:
* UIProcess/ResponsivenessTimer.cpp:
(WebKit):
(WebKit::ResponsivenessTimer::timerFired):
(WebKit::ResponsivenessTimer::start):
* UIProcess/ResponsivenessTimer.h:
(Client):
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::processDidBecomeUnresponsive):
(WebKit):
(WebKit::WebLoaderClient::interactionOccurredWhileProcessUnresponsive):
* UIProcess/WebLoaderClient.h:
(WebLoaderClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
(WebKit):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive):
(WebKit):
* UIProcess/WebProcessProxy.h:
(WebProcessProxy):
2012-04-17 Anders Carlsson <andersca@apple.com>
Make sure that the layer hosting mode is kept up to date if it changes before the plug-in is initialized
https://bugs.webkit.org/show_bug.cgi?id=84180
<rdar://problem/11265113>
Reviewed by Andreas Kling.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setLayerHostingMode):
2012-04-17 Jer Noble <jer.noble@apple.com>
Exiting full screen video brings the wrong Safari window to the foreground
https://bugs.webkit.org/show_bug.cgi?id=83936
Reviewed by Adele Peterson.
Tell the original webView's window to makeKeyAndOrderFront once the exit
animation completes.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2012-04-17 Michał Pakuła vel Rutka <m.pakula@samsung.com>
[EFL][WK2] Fix build break when FULLSCREEN_API is enabled.
https://bugs.webkit.org/show_bug.cgi?id=84142
Reviewed by Martin Robinson.
Create a cpp file needed to build EFL port with FULLSCREEN_API.
* PlatformEfl.cmake: Added WebFullScreenManagerProxyEfl.cpp to build list.
* UIProcess/WebFullScreenManagerProxy.h:
(WebKit):
* UIProcess/efl/WebFullScreenManagerProxyEfl.cpp: Added.
(WebKit):
(WebKit::WebFullScreenManagerProxy::invalidate):
(WebKit::WebFullScreenManagerProxy::close):
(WebKit::WebFullScreenManagerProxy::isFullScreen):
(WebKit::WebFullScreenManagerProxy::enterFullScreen):
(WebKit::WebFullScreenManagerProxy::exitFullScreen):
(WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
(WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
2012-04-17 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Refactor the gesture recognizers
https://bugs.webkit.org/show_bug.cgi?id=83044
Reviewed by Kenneth Rohde Christiansen and Simon Hausmann.
This patch implements a simple decision tree in the web page event handler
on the basis of how many active touch points the current touch event has.
Active touch points are pressed, moved or stationary and the number of these
fully determine which gesture recognizer should be updated, cancelled or
finished.
This new structure makes the internal states of the pinch and pan gesture
recognizers independent from the event type, thus makes it possible to handle
the transitions between these gestures in one centralized place which reduces
code duplication and complexity and fixes some issues regarding incorrectly
handled transitions.
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::update):
(WebKit::QtPanGestureRecognizer::finish):
(WebKit):
(WebKit::QtPanGestureRecognizer::cancel):
* UIProcess/qt/QtPanGestureRecognizer.h:
(QtPanGestureRecognizer):
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit):
(WebKit::QtPinchGestureRecognizer::update):
(WebKit::QtPinchGestureRecognizer::finish):
* UIProcess/qt/QtPinchGestureRecognizer.h:
(QtPinchGestureRecognizer):
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::withinDistance):
(WebKit::QtTapGestureRecognizer::update):
(WebKit::QtTapGestureRecognizer::cancel):
(WebKit):
(WebKit::QtTapGestureRecognizer::singleTapTimeout):
(WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
(WebKit::QtTapGestureRecognizer::reset):
* UIProcess/qt/QtTapGestureRecognizer.h:
(QtTapGestureRecognizer):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::resetGestureRecognizers):
(QtWebPageEventHandler::doneWithTouchEvent):
2012-04-17 Allan Sandfeld Jensen <allan.jensen@nokia.com>
REGRESSION(r113172) Wheel events are scrolling inversed.
https://bugs.webkit.org/show_bug.cgi?id=84156
Reviewed by Simon Hausmann.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::wheelEvent):
2012-04-17 Balazs Kelemen <kbalazs@webkit.org>
[Qt] Unreviewed ARM build fix
* PluginProcess/qt/PluginProcessMainQt.cpp:
(WebKit::PluginProcessMain): Export this function.
2012-04-17 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Zoom out on second double-tap.
https://bugs.webkit.org/show_bug.cgi?id=84145
Reviewed by Simon Hausmann.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
2012-04-17 Mariusz Grzegorczyk <mariusz.g@samsung.com>
[EFL][WK2] Fix build break when CONTEXT_MENUS is disabled.
https://bugs.webkit.org/show_bug.cgi?id=83285
Reviewed by Ryosuke Niwa.
Surround code related to context menu with ENABLE(CONTEXT_MENUS) macro.
Add dummy functions for public API implementation related to context menu.
* Shared/API/c/WKContextMenuItem.cpp:
(WKContextMenuItemGetTypeID):
(WKContextMenuItemCreateAsAction):
(WKContextMenuItemCreateAsCheckableAction):
(WKContextMenuItemCreateAsSubmenu):
(WKContextMenuItemSeparatorItem):
(WKContextMenuItemGetTag):
(WKContextMenuItemGetType):
(WKContextMenuItemCopyTitle):
(WKContextMenuItemGetEnabled):
(WKContextMenuItemGetChecked):
(WKContextMenuCopySubmenuItems):
(WKContextMenuItemGetUserData):
(WKContextMenuItemSetUserData):
* Shared/WebContextMenuItem.cpp:
* Shared/WebContextMenuItem.h:
* Shared/WebContextMenuItemData.cpp:
* Shared/WebContextMenuItemData.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient):
* UIProcess/WebPageContextMenuClient.cpp:
* UIProcess/WebPageContextMenuClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetContextMenuClient):
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
* WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
* WebProcess/WebPage/WebContextMenu.cpp:
* WebProcess/WebPage/WebContextMenu.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit):
(WebKit::handleMouseEvent):
(WebKit::WebPage::mouseEvent):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:
2012-04-16 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Add missing files to build webkit2/Efl.
https://bugs.webkit.org/show_bug.cgi?id=76139
Reviewed by Ryosuke Niwa.
Add missing files needed to build webkit2/Efl.
* Shared/efl/PlatformCertificateInfo.h: Added.
(WebKit):
(PlatformCertificateInfo):
(WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
(WebKit::PlatformCertificateInfo::encode):
(WebKit::PlatformCertificateInfo::decode):
* UIProcess/Launcher/efl/ThreadLauncherEfl.cpp: Added.
(WebKit):
(WebKit::ThreadLauncher::createWebThread):
2012-04-16 Brady Eidson <beidson@apple.com>
Followup to http://trac.webkit.org/changeset/114323
For more correctness, actually include an autorelease pool instead of cleverly trying to avoid its use.
Reviewed by Mark Rowe.
* PluginProcess/mac/PluginProcessMainMac.mm:
(WebKit::PluginProcessMain):
2012-04-16 Brady Eidson <beidson@apple.com>
<rdar://problem/11238965> Leak in Plugin Process when launched 32-bit
Reviewed by Jessie Berlin.
* PluginProcess/mac/PluginProcessMainMac.mm:
(WebKit::PluginProcessMain): alloc/init an NSDictionary then release it, instead of leaking an autoreleased one.
2012-04-16 Anders Carlsson <andersca@apple.com>
Nightly Back/Forward no longer calls plug-in's NPP_NewStream
https://bugs.webkit.org/show_bug.cgi?id=83805
<rdar://problem/11238748>
Reviewed by Simon Fraser.
When a page with a full-frame plug-in is restored from the page cache, it needs to re-fetch the plug-in stream.
Fix this by breaking the assumption that a plug-in will always get its data from WebCore if it's a full-frame plug-in;
instead it only get its data from WebCore if it's a full-frame plug-in that's not being restored from the page cache.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
Rename m_loadManually to m_shouldUseManualLoader.
(WebKit::NetscapePlugin::initialize):
Get the mode from parameters.isFullFramePlugin instead.
(WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
(WebKit::NetscapePlugin::manualStreamDidReceiveData):
(WebKit::NetscapePlugin::manualStreamDidFinishLoading):
(WebKit::NetscapePlugin::manualStreamDidFail):
Rename m_loadManually to m_shouldUseManualLoader.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
Rename m_loadManually to m_shouldUseManualLoader.
* WebProcess/Plugins/Plugin.cpp:
(WebKit::Plugin::Parameters::encode):
(WebKit::Plugin::Parameters::decode):
* WebProcess/Plugins/Plugin.h:
(Parameters):
Add an extra isFullFramePlugin parameter, and rename loadManually to shouldUseManualLoader.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
Initialize m_frameCameFromPageCache.
(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
Set m_frameCameFromPageCache to true.
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
Set m_frameCameFromPageCache to false.
(WebKit::WebFrameLoaderClient::createPlugin):
Initialize isFullFramePlugin and shouldUseManualLoader.
2012-04-16 Alexey Proskuryakov <ap@apple.com>
EndPrinting message should be sent synchronously when printing was initiated from DOM.
https://bugs.webkit.org/show_bug.cgi?id=84049
<rdar://problem/11096575>
Reviewed by Oliver Hunt.
* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::printFrame): When printing is
initiated by WebProcess, all messages from UI process are sent synchronously to
avoid being queued, and so should EndPrinting.
2012-04-16 Brady Eidson <beidson@apple.com>
<rdar://problem/11249336> and https://bugs.webkit.org/show_bug.cgi?id=84050
WebKit2 back/forward items in the page cache are never removed when the page is closed
Reviewed by Jessie Berlin and unofficially reviewed by Jon Lee.
Individual WebBackForwardListProxy's had no idea which items are associated with them.
This adds that association and makes sure the proxy removes all associated items from the PageCache when it closes.
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::removeItem): Remove the item from the PageCache in case it was in it.
(WebKit::WebBackForwardListProxy::addItem): Add the item ID to this back/forward list's set of associated IDs.
(WebKit::WebBackForwardListProxy::close): Remove each associated item from the PageCache.
* WebProcess/WebPage/WebBackForwardListProxy.h:
2012-04-16 Michał Pakuła vel Rutka <m.pakula@samsung.com>
[EFL][WK2] Fix build break in PageClientImpl.cpp.
https://bugs.webkit.org/show_bug.cgi?=id=84034
Reviewed by Kenneth Rohde Christiansen.
Fixes typo in didChangeViewportProperites definition.
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::didChangeViewportProperties):
2012-04-16 Yael Aharon <yael.aharon@nokia.com>
[Qt][WK2] Fixed elements position is wrong after zooming.
https://bugs.webkit.org/show_bug.cgi?id=83981
Reviewed by Kenneth Rohde Christiansen.
Turn on the flag setFixedElementsLayoutRelativeToFrame. This causes fixed elements position to be calculated based on
visibleWidth and visibleHeight. When zoom level grows, the visibleWidth and visibleHeight become smaller.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setResizesToContentsUsingLayoutSize):
2012-04-16 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Clean up how the interaction engine is making use of ViewportAttributes
https://bugs.webkit.org/show_bug.cgi?id=83895
Reviewed by Simon Hausmann.
Refactor how the interaction engine is using the ViewportAttributes
and get rid of the Contraints subclass.
Push the ViewportAttributes through to the QQuickWebViewPrivate class
and add some default values in the case the Legacy view is used.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewLegacyPrivate::QQuickWebViewLegacyPrivate):
(QQuickWebViewFlickablePrivate::didChangeViewportProperties):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::QWebViewportInfo):
(QWebViewportInfo::~QWebViewportInfo):
(QWebViewportInfo::currentScale):
(QWebViewportInfo::devicePixelRatio):
(QWebViewportInfo::initialScale):
(QWebViewportInfo::minimumScale):
(QWebViewportInfo::maximumScale):
(QWebViewportInfo::isScalable):
(QWebViewportInfo::layoutSize):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::cssScaleFromItem):
(WebKit::QtViewportInteractionEngine::itemScaleFromCSS):
(WebKit::QtViewportInteractionEngine::itemCoordFromCSS):
(WebKit::QtViewportInteractionEngine::innerBoundedCSSScale):
(WebKit::QtViewportInteractionEngine::outerBoundedCSSScale):
(WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
(WebKit::QtViewportInteractionEngine::setCSSScaleBounds):
(WebKit::QtViewportInteractionEngine::setCSSScale):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::hadUserInteraction):
(WebKit::QtViewportInteractionEngine::setAllowsUserScaling):
(WebKit::QtViewportInteractionEngine::setContentToDevicePixelRatio):
2012-04-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use GRefPtr to delete the default web context in WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=83752
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):
2012-04-13 Jer Noble <jer.noble@apple.com>
Video at apple.com gets standard controls in addition to custom controls after returning from full screen
https://bugs.webkit.org/show_bug.cgi?id=83939
Reviewed by Eric Carlson.
So that the media controls don't show up momentarily during full screen animations, call setAnimatingFullScreen(true)
before calling will{Enter,Exit}FullScreen(), so that the CSS rule for full screen animation will be in effect
immediately.
Similarly, call setAnimatingFullScreen(false) after calling did{Enter,Exit}FullScreen, so that the full screen media
controls don't momentarily appear at the end of an animation.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2012-04-13 Anders Carlsson <andersca@apple.com>
Make sure that we're using the right compiler for generating derived sources.
Rubber-stamped by Dan Bernstein.
* WebKit2.xcodeproj/project.pbxproj:
2012-04-13 Anders Carlsson <andersca@apple.com>
Include the error if we fail to initialize the web process sandbox
https://bugs.webkit.org/show_bug.cgi?id=83927
Reviewed by Alexey Proskuryakov.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::initializeSandbox):
2012-04-13 Brady Eidson <beidson@apple.com>
<rdar://problem/11176921> and https://bugs.webkit.org/show_bug.cgi?id=83600
Need WebKit2 API to notify whether history loads are in the page cache
- Add a new WKBundlePageLoaderClient callback allowing the bundle to be notified
of back/forward navigations (and deny them if it chooses)
- Add a new API to WKBundleBackForwardListItem to probe if the item is in the page cache.
Reviewed by Darin Adler.
Add the new WKBundleBackForwardListItem API:
* WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
(WKBundleBackForwardListItemIsInPageCache):
* WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
* WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
(WebKit::InjectedBundleBackForwardListItem::isInPageCache):
Update the UI page loader client to allow for a user data object to be passed from the bundle:
* UIProcess/API/C/WKPage.h:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::shouldGoToBackForwardListItem): Update a comment typo.
(WebKit::WebLoaderClient::willGoToBackForwardListItem): Update for the user data field.
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willGoToBackForwardListItem):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Add the new callback to the bundle loader client:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
(InjectedBundlePageLoaderClient):
Call the bundle client before doing anything else, possibly canceling the navigation:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage) Adopt new bundle client interface.
2012-04-13 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][WK2] Title in MiniBrowser is not updated for a page with no title
https://bugs.webkit.org/show_bug.cgi?id=82483
Reviewed by Noam Rosenthal.
This fixes API tests broken by r113715.
* UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml:
2012-04-13 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r113714.
http://trac.webkit.org/changeset/113714
https://bugs.webkit.org/show_bug.cgi?id=83887
It is behaving strange on the bots and needs more
investigation. (Requested by jeez_ on #webkit).
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::isViewWindowActive):
2012-04-12 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Use QQuickFlickable::setPixelAligned instead of doing pixel-alignment when rendering.
https://bugs.webkit.org/show_bug.cgi?id=83770
Reviewed by Kenneth Rohde Christiansen.
- Do the alignment on the highest level as possible: the QQuickFlickable content item
position. It already supports this with setPixelAligned which rounds the content item's position.
- Also move the setClip(true) to the common constructor as this constructor is currently only used by WTR.
- Remove setFlags(QQuickItem::ItemClipsChildrenToShape) as it is redundant with setClip(true).
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebView::QQuickWebView):
2012-04-12 Alexey Proskuryakov <ap@apple.com>
Preprocessing text files with modern clang treats double slashes in comments
https://bugs.webkit.org/show_bug.cgi?id=83827
Reviewed by Mark Rowe.
* DerivedSources.make: Pass appropriate flags to both llvm and gcc.
2012-04-12 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Build fix after Windows export definition file change.
* win/WebKit2CFLite.def: This file needs to be kept in sync with
WebKit2.def (aside from the WebKitInterface exports.)
2012-04-12 Bear Travis <betravis@adobe.com>
[CSS Exclusions] Add flag to enable / disable exclusions at runtime
https://bugs.webkit.org/show_bug.cgi?id=83313
Reviewed by Ryosuke Niwa.
Adding windows symbols
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-04-12 Yael Aharon <yael.aharon@nokia.com>
[Qt][WK2] Nested fixed elements scroll too fast
https://bugs.webkit.org/show_bug.cgi?id=83720
Reviewed by Noam Rosenthal.
Set the fixedToViewport flag on the fixed position layers and adjust to
the new function name for setting scrollPositionDelta.
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::adjustPositionForFixedLayers):
(WebKit::WebLayerTreeRenderer::setLayerState):
2012-04-12 Kenneth Rohde Christiansen <kenneth@webkit.org>
Move viewport meta handling to the web process side
https://bugs.webkit.org/show_bug.cgi?id=83771
Reviewed by Simon Hausmann.
Instead of computing the viewport attributes on both sides,
we now do everything on the web process side, and just send
over the computed result.
* Scripts/webkit2/messages.py:
(struct_or_class):
(headers_for_type):
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
* Shared/WebCoreArgumentCoders.h:
(WebCore):
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::didChangeViewportProperties):
* UIProcess/API/efl/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::didChangeViewportProperties):
* UIProcess/API/gtk/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/mac/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didChangeViewportProperties):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::didRelaunchProcess):
(QQuickWebViewFlickablePrivate::didChangeViewportProperties):
(QQuickWebViewFlickablePrivate::updateViewportSize):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::didChangeViewportProperties):
(QQuickWebViewPrivate):
(QQuickWebViewFlickablePrivate):
* UIProcess/PageClient.h:
(WebCore):
(PageClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeViewportProperties):
* UIProcess/WebPageProxy.h:
(WebCore):
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::didChangeViewportProperties):
* UIProcess/qt/QtPageClient.h:
(QtPageClient):
* UIProcess/win/WebView.cpp:
(WebKit::WebView::didChangeViewportProperties):
* UIProcess/win/WebView.h:
(WebView):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
(WebKit):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::sendViewportAttributesChanged):
(WebKit):
(WebKit::WebPage::setViewportSize):
* WebProcess/WebPage/WebPage.h:
(WebPage):
2012-04-12 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Zoom gesture with double tap crashes on iframe when main frame has scroll offset.
https://bugs.webkit.org/show_bug.cgi?id=83428
Reviewed by Kenneth Rohde Christiansen.
When delegate scrolling is on, the frame view needs to ignore scrolling offset when converting
coordinates. It is already done at ScrollView base class and this patch copies the logic to the
FrameView subclass.
Also make sure that TouchAdjustment's findBest*() functions' return value are not ignored by the caller.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::highlightPotentialActivation):
(WebKit::WebPage::findZoomableAreaForPoint):
2012-04-11 Andy Estes <aestes@apple.com>
Remove an autorelease pool made redundant by r113923.
https://bugs.webkit.org/show_bug.cgi?id=83730
Reviewed by Dan Bernstein.
Remove flushLayer()'s autorelease pool, since one now exists in the
call frame above it (in LayerFlushScheduler::runLoopObserverCallback()).
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
(WebKit::LayerTreeHostCAMac::flushLayers):
2012-04-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Initial cookies API for WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=82441
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitCookieManager.cpp: Added.
(webkit_cookie_manager_init):
(webkitCookieManagerFinalize):
(webkit_cookie_manager_class_init):
(webkitCookieManagerCreate): Create a new WebKitCookieManager for
the given WKCookieManagerRef.
(webkit_cookie_manager_set_accept_policy): Set the cookie
acceptance policy.
(webkitCookieManagerGetAcceptPolicyCallback): Callback called by
the C API when the cookie acceptance policy has been received.
(webkit_cookie_manager_get_accept_policy): Asynchronously get the
cookie acceptance policy.
(webkit_cookie_manager_get_accept_policy_finish): Finish async
operation started by webkit_cookie_manager_get_accept_policy()
returning the cookie acceptance policy.
(webkitCookieManagerGetDomainsWithCookiesCallback): Callback
called by the C API when the list of hostnames with cookies has
been received.
(webkit_cookie_manager_get_domains_with_cookies): Asynchronously
get the list of domains with cookies.
(webkit_cookie_manager_get_domains_with_cookies_finish): Finish
async operation started by
webkit_cookie_manager_get_domains_with_cookies() returning the
list of domains.
(webkit_cookie_manager_delete_cookies_for_domain): Delete all
cookies for the given domain.
(webkit_cookie_manager_delete_all_cookies): Delete all cookies.
* UIProcess/API/gtk/WebKitCookieManager.h: Added.
* UIProcess/API/gtk/WebKitCookieManagerPrivate.h: Added.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_get_cookie_manager): Get the
WebKitCookieManager associated with the web context.
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new chapter for
WebKitCookieManager.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_cookie_manager_get_type.
* UIProcess/API/gtk/tests/GNUmakefile.am:
* UIProcess/API/gtk/tests/TestCookieManager.cpp: Added.
(testCookieManagerAcceptPolicy):
(testCookieManagerDeleteCookies):
(serverCallback):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/webkit2.h: Include WebKitCookieManager.h.
2012-04-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] InspectorServer: Add an API level auto test
https://bugs.webkit.org/show_bug.cgi?id=83594
Reviewed by Kenneth Rohde Christiansen.
This tests InspectorServer and WebSocketServer.
* UIProcess/API/qt/tests/inspectorserver/inspectorserver.pro: Added.
* UIProcess/API/qt/tests/inspectorserver/tst_inspectorserver.cpp: Added.
(tst_InspectorServer):
(tst_InspectorServer::tst_InspectorServer):
(tst_InspectorServer::prepareWebViewComponent):
(tst_InspectorServer::newWebView):
(tst_InspectorServer::init):
(tst_InspectorServer::cleanup):
(tst_InspectorServer::webView):
(tst_InspectorServer::fetchPageList):
(tst_InspectorServer::testPageList): This tests that pages with developerExtrasEnabled appear available for inspection.
(tst_InspectorServer::testRemoteDebuggingMessage): This tests a web socket connection using a raw inspector command.
(tst_InspectorServer::openRemoteDebuggingSession): This tests the whole pipeline by starting a remote inspection session.
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView):
(tst_QQuickWebView::prepareWebViewComponent):
* UIProcess/API/qt/tests/tests.pri:
* UIProcess/API/qt/tests/util.cpp:
(LoadStartedCatcher::LoadStartedCatcher):
(LoadStartedCatcher::onLoadingChanged):
* UIProcess/API/qt/tests/util.h:
(LoadStartedCatcher):
2012-04-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] InspectorServer: Improve the JSON page list's parameter names
https://bugs.webkit.org/show_bug.cgi?id=83592
Reviewed by Simon Hausmann.
- Add "id" that would be needed to build the URL when using local front-end resources
(and will be used by tests)
- Rename description to "title", the description contains both the title and URL on the final list
- Rename inspectorLocation to "inspectorUrl" to match with the url parameter.
* UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp:
(WebKit::WebInspectorServer::buildPageList):
* qt/Resources/inspectorPageIndex.html:
2012-04-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Fix issues when using the WebView as ShaderEffectSource
https://bugs.webkit.org/show_bug.cgi?id=83587
Reviewed by Noam Rosenthal.
Qt is going to mirror the projection matrix when the shader effect source
is grabbed. Detect that the matrix is mirrored and pass on this information
to TextureMapper so that it can do the same.
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
* UIProcess/WebLayerTreeRenderer.h:
(WebLayerTreeRenderer):
* UIProcess/qt/QtWebPageSGNode.cpp:
(WebKit::ContentsSGNode::render):
2012-04-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Remove unnecessary rendering code
https://bugs.webkit.org/show_bug.cgi?id=83591
Reviewed by Noam Rosenthal.
- Remove code that isn't needed since the introduction of WebLayerTreeRenderer
- Remove TextureMapper::bindSurface(0) calls following beginPainting, which calls it itself.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paint):
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeHostProxy.cpp:
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
(WebKit::WebLayerTreeRenderer::paintToGraphicsContext):
2012-04-10 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck issues.
* GNUmakefile.am: Add missing header file.
2012-04-10 Mark Rowe <mrowe@apple.com>
<rdar://problem/10583749> WebKit2 should log to both ASL and stderr
Replace direct calls to fprintf stderr with calls to WTFLogAlways.
Reviewed by Sam Weinig.
* PluginProcess/mac/PluginProcessMainMac.mm:
(WebKit::PluginProcessMain):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
(WebKit::WebProcessProxy::didReceiveInvalidMessage):
* WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
(WebKit::InjectedBundle::load):
* WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
(readSandboxProfile):
(WKN_EnterSandbox):
* WebProcess/mac/WebProcessMac.mm:
(WebKit::initializeSandbox):
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain):
2012-04-10 Yael Aharon <yael.aharon@nokia.com>
Unreviewed build fix after r113791.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
2012-04-10 Yael Aharon <yael.aharon@nokia.com>
Initial support for fixed position elements in Qt WebKit2
https://bugs.webkit.org/show_bug.cgi?id=81786
Reviewed by Noam Rosenthal.
Turn on the flag acceleratedCompositingForFixedPositionEnabled when using fixed layout.
As we scroll, we keep track of the delta in scroll position between the UI and web processes,
and adjust the position of all the fixed layers by that delta.
When WebLayerTreeRenderer receives a new scroll position from the web process, it keeps it as pending,
and commit the new scroll position in flushLayerChanges.
This patch does not address scrolling overshoot and it does not fix the wrong positioning
that occurs when we zoom. These issues will be addressed in future patches.
* Shared/WebLayerTreeInfo.h:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::updateSize):
* UIProcess/LayerTreeHostProxy.cpp:
(WebKit::LayerTreeHostProxy::setContentsSize):
(WebKit):
(WebKit::LayerTreeHostProxy::renderNextFrame):
(WebKit::LayerTreeHostProxy::didChangeScrollPosition):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/LayerTreeHostProxy.messages.in:
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::boundedScrollPosition):
(WebKit):
(WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
(WebKit::WebLayerTreeRenderer::setContentsSize):
(WebKit::WebLayerTreeRenderer::adjustPositionForFixedLayers):
(WebKit::WebLayerTreeRenderer::didChangeScrollPosition):
(WebKit::WebLayerTreeRenderer::syncLayerParameters):
(WebKit::WebLayerTreeRenderer::deleteLayer):
(WebKit::WebLayerTreeRenderer::flushLayerChanges):
* UIProcess/WebLayerTreeRenderer.h:
(WebLayerTreeRenderer):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
(WebCore::WebGraphicsLayer::syncCompositingState):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayerClient):
(WebCore::WebGraphicsLayer::fixedToViewport):
(WebCore::WebGraphicsLayer::setFixedToViewport):
(WebGraphicsLayer):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setResizesToContentsUsingLayoutSize):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::LayerTreeHostQt):
(WebKit::LayerTreeHostQt::didSyncCompositingStateForLayer):
(WebKit::updateOffsetFromViewportForSelf):
(WebKit):
(WebKit::updateOffsetFromViewportForLayer):
(WebKit::LayerTreeHostQt::syncFixedLayers):
(WebKit::LayerTreeHostQt::setVisibleContentsRect):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
2012-04-10 Anders Carlsson <andersca@apple.com>
Fix fast/images/exif-orientation.html WebKitTestRunner failure
https://bugs.webkit.org/show_bug.cgi?id=83627
Reviewed by Sam Weinig.
Handle overriding the WebKitShouldRespectImageOrientation preference.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2012-04-10 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Manage graphics buffers in the web process
https://bugs.webkit.org/show_bug.cgi?id=78675
Added ShareableSurface, a class allowing the use of GPU-enabled
surfaces for bitmap transfer between the web and UI processes.
Since GraphicsSurfaces may not always be available, ShareableSurface
uses a standard ShareableBitmap as a fallback backend.
The necessary plumbing was added in WebKit2 for passing updates via
ShareableSurfaces instead of ShareableBitmaps. SurfaceUpdateInfo was
added, as to not make UpdateInfo more complicated.
Reviewed by Kenneth Rohde Christiansen.
* Shared/ShareableSurface.cpp: Added.
* Shared/ShareableSurface.h: Added.
* Shared/SurfaceUpdateInfo.cpp: Added.
* Shared/SurfaceUpdateInfo.h: Added.
* Target.pri:
* UIProcess/LayerTreeHostProxy.cpp:
(WebKit::LayerTreeHostProxy::createTileForLayer):
(WebKit::LayerTreeHostProxy::updateTileForLayer):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/LayerTreeHostProxy.messages.in:
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::updateTile):
* UIProcess/WebLayerTreeRenderer.h:
(TileUpdate):
(WebKit::WebLayerTreeRenderer::TileUpdate::TileUpdate):
* UIProcess/qt/LayerBackingStore.cpp:
(WebKit::LayerBackingStoreTile::swapBuffers):
(WebKit::LayerBackingStoreTile::setBackBuffer):
(WebKit::LayerBackingStore::updateTile):
* UIProcess/qt/LayerBackingStore.h:
(LayerBackingStoreTile):
(LayerBackingStore):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::beginContentUpdate):
(WebCore::WebGraphicsLayer::createTile):
(WebCore::WebGraphicsLayer::updateTile):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayerClient):
(WebGraphicsLayer):
* WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
(WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
* WebProcess/WebPage/TiledBackingStoreRemoteTile.h:
(WebKit):
(TiledBackingStoreRemoteTileClient):
* WebProcess/WebPage/UpdateAtlas.cpp:
(WebKit::UpdateAtlas::UpdateAtlas):
(WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer):
* WebProcess/WebPage/UpdateAtlas.h:
(WebKit::UpdateAtlas::surface):
(WebKit::UpdateAtlas::size):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::createTile):
(WebKit::LayerTreeHostQt::updateTile):
(WebKit::LayerTreeHostQt::beginContentUpdate):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
2012-04-10 Patrick Gansterer <paroga@webkit.org>
[CMake] Enable USE_FOLDERS property
https://bugs.webkit.org/show_bug.cgi?id=83571
Reviewed by Daniel Bates.
Setting the FOLDER property on targets gives more structure
to the generated Visual Studio solutions.
This does not affect other CMake generators.
* CMakeLists.txt:
2012-04-10 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][WK2] Assertion failure on loading new page after panning/zooming
https://bugs.webkit.org/show_bug.cgi?id=83049
Reviewed by Kenneth Rohde Christiansen.
When handling contents size change, set the visible content rectangle immediately,
instead of animating to it.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::itemSizeChanged):
2012-04-10 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][WK2] Title in MiniBrowser is not updated for a page with no title
https://bugs.webkit.org/show_bug.cgi?id=82483
Reviewed by Kenneth Rohde Christiansen.
titleChanged signal is not emitted on comitting a new load.
* UIProcess/API/qt/tests/html/basic_page.html:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView):
(tst_QQuickWebView::titleUpdate):
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::didCommitLoadForFrame):
2012-04-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Implement PageClient::isViewWindowActive()
https://bugs.webkit.org/show_bug.cgi?id=81143
Reviewed by Kenneth Rohde Christiansen.
This patch implements PageClient::isViewWindowActive()
now that QQuickCanvas::isActive() is available (from QWindow).
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::isViewWindowActive):
2012-04-10 Philippe Normand <pnormand@igalia.com> and Carlos Garcia Campos <cgarcia@igalia.com>
[WK2][GTK] FullScreen signals
https://bugs.webkit.org/show_bug.cgi?id=76166
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp:
(WKViewSetFullScreenClientGtk): Initialize WebKitWebViewBase
fullscreen client.
* UIProcess/API/C/gtk/WKFullScreenClientGtk.h:
* UIProcess/API/gtk/WebKitFullscreenClient.cpp: Added.
(willEnterFullScreen): Call webkitWebViewEnterFullScreen().
(willExitFullScreen): Call webkitWebViewLeaveFullScreen().
(attachFullScreenClientToView): Initialize FullScreenClient adding
implementations for willEnterFullScreen and willExitFullScreen callbacks.
* UIProcess/API/gtk/WebKitFullscreenClient.h: Added.
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed): Attach fullscreen client to view.
(webkit_web_view_class_init): Add WebKitWebView::enter-fullscreen
and WebKitWebView::leave-fullscreen signals.
(webkitWebViewEnterFullScreen): Emit
WebKitWebView::enter-fullscreen signal.
(webkitWebViewLeaveFullScreen): Emit
WebKitWebView::leave-fullscreen signal.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseKeyPressEvent): Only return early when leaving
fullscreen, otherwise let the view process the key pressed.
(webkitWebViewBaseEnterFullScreen): Return early if
willEnterFullScreen callback is handled and returns false.
(webkitWebViewBaseExitFullScreen): Return early if
willExitFullScreen callback is handled and returns false.
(webkitWebViewBaseInitializeFullScreenClient): Initialize the
fullscreen client.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewFullScreen):
(beforeAll):
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::keyStroke): Helper function to synthesize key
press/release events.
* UIProcess/API/gtk/tests/WebViewTest.h:
* UIProcess/API/gtk/webkit2marshal.list:
* UIProcess/gtk/WebFullScreenClientGtk.cpp:
(WebKit::WebFullScreenClientGtk::willEnterFullScreen): Call
willEnterFullScreen callback if defined.
(WebKit::WebFullScreenClientGtk::willExitFullScreen): Call
willExitFullScreen callback if defined.
* UIProcess/gtk/WebFullScreenClientGtk.h:
2012-04-10 Patrick Gansterer <paroga@webkit.org>
[CMake] Add missing source files to build system
* CMakeLists.txt:
2012-04-09 No'am Rosenthal <noam.rosenthal@nokia.com>
[WK2] Enable using a single ShareableBitmap for multiple updates
https://bugs.webkit.org/show_bug.cgi?id=83424
Reviewed by Kenneth Rohde Christiansen.
Enabled creating a GraphicsContext that references a rect inside ShareableBitmap.
Added bitmapOffset to UpdateInfo, to allow updates to reference an offset inside the bitmap.
Added UpdateAtlas, a class that manages available rects in a larger ShareableBitmap.
In this iteration, UpdateAtlas has a simple behavior where a rect inside the bitmap is
either available or used. When the buffers are swapped, all used buffers become available
again. A future enhancement might allow triple-buffering, where available rects can be
updated while other rects from the same atlas are in use.
Added the necessary plumbing to allow Qt's UI-side compositing to take advantage of
UpdateAtlas. LayerTreeHostQt creates an atlas per type of bitmap (i.e. one opaque and one
alpha-enabled atlas). When a tile wants to update and there's no available scratch-buffer,
the update would be postponed to the next frame, creating a tiling-artifact in low memory
situations.
* Shared/UpdateInfo.cpp:
(WebKit::UpdateInfo::encode):
(WebKit::UpdateInfo::decode):
* Shared/UpdateInfo.h:
(UpdateInfo):
* Target.pri:
* UIProcess/LayerTreeHostProxy.cpp:
(WebKit::LayerTreeHostProxy::updateTileForLayer):
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::syncLayerParameters):
(WebKit::WebLayerTreeRenderer::updateTile):
(WebKit::WebLayerTreeRenderer::createImage):
* UIProcess/WebLayerTreeRenderer.h:
(TileUpdate):
(WebKit::WebLayerTreeRenderer::TileUpdate::TileUpdate):
(WebLayerTreeRenderer):
* UIProcess/qt/LayerBackingStore.cpp:
(WebKit::LayerBackingStoreTile::swapBuffers):
(WebKit::LayerBackingStoreTile::setBackBuffer):
(WebKit::LayerBackingStore::createTile):
* UIProcess/qt/LayerBackingStore.h:
(LayerBackingStoreTile):
(LayerBackingStore):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::tiledBackingStoreBackgroundColor):
(WebCore::WebGraphicsLayer::beginContentUpdate):
(WebCore):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayerClient):
(WebGraphicsLayer):
* WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
(WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
* WebProcess/WebPage/TiledBackingStoreRemoteTile.h:
(TiledBackingStoreRemoteTileClient):
* WebProcess/WebPage/UpdateAtlas.cpp: Added.
(WebKit):
(WebKit::UpdateAtlas::UpdateAtlas):
(WebKit::nextPowerOfTwo):
(WebKit::UpdateAtlas::buildLayoutIfNeeded):
(WebKit::UpdateAtlas::findAvailableIndex):
(WebKit::UpdateAtlas::didSwapBuffers):
(WebKit::UpdateAtlas::acquireScratchBuffer):
(WebKit::UpdateAtlas::offsetForIndex):
* WebProcess/WebPage/UpdateAtlas.h: Added.
(WebCore):
(WebKit):
(UpdateAtlas):
(WebKit::UpdateAtlas::bitmap):
(WebKit::UpdateAtlas::size):
(WebKit::UpdateAtlas::flags):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::adoptImageBackingStore):
(WebKit::LayerTreeHostQt::renderNextFrame):
(WebKit::LayerTreeHostQt::purgeBackingStores):
(WebKit):
(WebKit::LayerTreeHostQt::getAtlas):
(WebKit::LayerTreeHostQt::beginContentUpdate):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
2012-04-09 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Sync the layer's state and the layer's children separately
https://bugs.webkit.org/show_bug.cgi?id=82534
Reviewed by Kenneth Rohde Christiansen.
Switched the WebLayerInfo struct, which includes a single layer's state,
to use only POD types that can be serialized via SimpleArgumentCoder.
To allow POD-serialization, we serialize the children IDs in a seperate
message (SetLayerChildren), and only when the tree layout has actually
been modified.
* Shared/WebLayerTreeInfo.cpp:
(WebKit::WebLayerInfo::encode):
(WebKit::WebLayerInfo::decode):
* Shared/WebLayerTreeInfo.h:
(WebKit::WebLayerInfo::WebLayerInfo):
* UIProcess/LayerTreeHostProxy.cpp:
(WebKit::LayerTreeHostProxy::setCompositingLayerState):
(WebKit):
(WebKit::LayerTreeHostProxy::setCompositingLayerChildren):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/LayerTreeHostProxy.messages.in:
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::setLayerChildren):
(WebKit):
(WebKit::WebLayerTreeRenderer::setLayerState):
* UIProcess/WebLayerTreeRenderer.h:
(WebLayerTreeRenderer):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::didChangeLayerState):
(WebCore):
(WebCore::WebGraphicsLayer::didChangeChildren):
(WebCore::WebGraphicsLayer::didChangeGeometry):
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
(WebCore::WebGraphicsLayer::setChildren):
(WebCore::WebGraphicsLayer::addChild):
(WebCore::WebGraphicsLayer::addChildAtIndex):
(WebCore::WebGraphicsLayer::addChildAbove):
(WebCore::WebGraphicsLayer::addChildBelow):
(WebCore::WebGraphicsLayer::replaceChild):
(WebCore::WebGraphicsLayer::removeFromParent):
(WebCore::WebGraphicsLayer::setDrawsContent):
(WebCore::WebGraphicsLayer::setContentsOpaque):
(WebCore::WebGraphicsLayer::setBackfaceVisibility):
(WebCore::WebGraphicsLayer::setOpacity):
(WebCore::WebGraphicsLayer::setContentsRect):
(WebCore::WebGraphicsLayer::setContentsToImage):
(WebCore::WebGraphicsLayer::setMaskLayer):
(WebCore::WebGraphicsLayer::setReplicatedByLayer):
(WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
(WebCore::WebGraphicsLayer::id):
(WebCore::WebGraphicsLayer::syncChildren):
(WebCore::WebGraphicsLayer::syncLayerState):
(WebCore::WebGraphicsLayer::syncImageBackingStore):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::setRootLayer):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayerClient):
(WebGraphicsLayer):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::syncLayerState):
(WebKit):
(WebKit::LayerTreeHostQt::syncLayerChildren):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
2012-04-09 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Accelerated and non-accelerated animations need to be synchronized
https://bugs.webkit.org/show_bug.cgi?id=75780
Reviewed by Kenneth Rohde Christiansen.
Remove the ui-side animation code, and return false from addAnimation so that web-side
animations kick in.
* Shared/WebLayerTreeInfo.cpp:
(WebKit):
* Shared/WebLayerTreeInfo.h:
(WebLayerInfo):
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
(WebKit::WebLayerTreeRenderer::setLayerState):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::didChangeGeometry):
(WebCore::WebGraphicsLayer::syncLayerState):
(WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayer):
2012-04-09 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Don't synchronize WebGraphicsLayers to the UI process if the actual layer information wasn't changed
https://bugs.webkit.org/show_bug.cgi?id=82522
Reviewed by Kenneth Rohde Christiansen.
Currently we set the m_modified flags for all of the descendants of a layer
that has changed its geometry. This causes unnecessary layer sync messages.
Instead, we only sync when the actual layer has changed, and add a flag
called m_shouldUpdateVisibleRect that applies to descendants of a layer
that has a modified geometry.
* Shared/WebLayerTreeInfo.h:
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::didChangeChildren):
(WebCore):
(WebCore::WebGraphicsLayer::setShouldUpdateVisibleRect):
(WebCore::WebGraphicsLayer::didChangeGeometry):
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
(WebCore::WebGraphicsLayer::setPosition):
(WebCore::WebGraphicsLayer::setAnchorPoint):
(WebCore::WebGraphicsLayer::setSize):
(WebCore::WebGraphicsLayer::setTransform):
(WebCore::WebGraphicsLayer::setChildrenTransform):
(WebCore::WebGraphicsLayer::setPreserves3D):
(WebCore::WebGraphicsLayer::setContentsToImage):
(WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
(WebCore::WebGraphicsLayer::syncImageBackingStore):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::tiledBackingStorePaintBegin):
(WebCore::WebGraphicsLayer::setRootLayer):
(WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
(WebCore::WebGraphicsLayer::setContentsScale):
(WebCore::WebGraphicsLayer::effectiveContentsScale):
(WebCore::WebGraphicsLayer::adjustContentsScale):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayer):
2012-04-09 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Remove all USE(TILED_BACKING_STORE) defines from code that contains UI_SIDE_COMPOSITING
https://bugs.webkit.org/show_bug.cgi?id=82533
Reviewed by Kenneth Rohde Christiansen.
No change in behavior, removing some #defines.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::setShouldUpdateVisibleRect):
(WebCore::WebGraphicsLayer::adjustContentsScale):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayer):
* WebProcess/WebPage/LayerTreeHost.h:
(LayerTreeHost):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::LayerTreeHostQt):
(WebKit::LayerTreeHostQt::detachLayer):
2012-04-09 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Disable the content-scaling and visible contents rect when the layer's transform is not affine
https://bugs.webkit.org/show_bug.cgi?id=82523
Reviewed by Kenneth Rohde Christiansen.
Always use contentsScale of 1 and a full visibleContentsRect when
the layer's transform is not affine. That's because layer's with
complex transform would not gain from the benefit of contents scaling,
and might also create unexpected layer content sizes.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::createBackingStore):
(WebCore):
(WebCore::WebGraphicsLayer::tiledBackingStorePaint):
(WebCore::WebGraphicsLayer::tiledBackingStorePaintEnd):
(WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
(WebCore::WebGraphicsLayer::updateTile):
(WebCore::WebGraphicsLayer::removeTile):
(WebCore::WebGraphicsLayer::updateContentBuffers):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayer):
2012-04-09 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Fail to activate links after double tap gesture.
https://bugs.webkit.org/show_bug.cgi?id=83468
Reviewed by Kenneth Rohde Christiansen.
After a recognized double tap gesture, QtTapGestureRecognizer
gets stuck in the double-tap state. Only tapping outside of
the double tap radius cancels it.
Call reset() to set the default state back.
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::recognize):
ManualTests/link-activation-fails-after-double-tap-gesture.html: Added.
2012-04-07 Patrick Gansterer <paroga@webkit.org>
[CMake] Cleanup WTF include directories
https://bugs.webkit.org/show_bug.cgi?id=82716
Reviewed by Eric Seidel.
* CMakeLists.txt:
2012-04-06 Jon Lee <jonlee@apple.com>
Build fix for Windows bots.
* win/WebKit2.def: Add missing export symbol.
2012-04-06 Hironori Bono <hbono@chromium.org>
REGRESSION: Cannot write a word with Korean double consonant
https://bugs.webkit.org/show_bug.cgi?id=81186
Reviewed by Dan Bernstein.
WebKit change r103859 posts fake mouse-move events when the keyboard status is
changed. Unfortunately, these mouse events go to input methods and confuse a
Korean input method. This change directly calls handleMouseEvent() instead of
-mouseMoved: to prevent sending these fake events to input methods.
* UIProcess/API/mac/WKView.mm:
(-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
2012-04-06 Alexey Proskuryakov <ap@apple.com>
[Mac] Adopt a different method of telling AppKit when inline input isn't supported
https://bugs.webkit.org/show_bug.cgi?id=83408
<rdar://problem/9205734>
Reviewed by Adele Peterson.
* UIProcess/API/mac/WKTextInputWindowController.mm:
(-[WKTextInputView validAttributesForMarkedText]):
(-[WKTextInputPanel init]):
(-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]): Added a comment
about old approach.
2012-04-06 Jer Noble <jer.noble@apple.com>
WebFullScreenManagerProxy::isFullScreen() will create an empty full screen window; steal focus.
https://bugs.webkit.org/show_bug.cgi?id=83388
Reviewed by Geoffrey Garen.
Calling WebFullScreenManagerProxy::isFullScreen() will create a WKFullScreenWindowController if
one does not already exist, since the -[WKView fullScreenWindowController] method will create-on-access.
Add a new call, -[WKView hasFullScreenWindowController], which does not auto-create the controller
and add that check to WebFullScreenManagerProxy::isFullScreen().
* UIProcess/API/mac/WKView.mm:
(-[WKView hasFullScreenWindowController]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/WebFullScreenManagerProxyMac.mm:
(WebKit::WebFullScreenManagerProxy::isFullScreen):
2012-04-06 Tim Horton <timothy_horton@apple.com>
Add autodetection of image orientation from EXIF information
https://bugs.webkit.org/show_bug.cgi?id=19688
<rdar://problem/4126979> and <rdar://problem/11091578>
Original patch by David Carson and Eric Seidel.
Reviewed by Simon Fraser.
Add a preference, ShouldRespectImageOrientation, which will cause WebCore to respect EXIF orientation in all images.
* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetShouldRespectImageOrientation):
(WKPreferencesGetShouldRespectImageOrientation):
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2012-04-06 Dan Bernstein <mitz@apple.com>
<rdar://problem/10912476> HiDPI: Have canvas use a hidpi backing store, but downsample upon access
Reviewed by Sam Weinig.
* Configurations/FeatureDefines.xcconfig: Added ENABLE_HIGH_DPI_CANVAS.
2012-04-05 Anders Carlsson <andersca@apple.com>
Crash when switching to a tab with plug-ins
https://bugs.webkit.org/show_bug.cgi?id=83339
<rdar://problem/11183338>
Reviewed by Oliver Hunt.
Add an additional check so we don't try to call into plug-ins that haven't yet been initialized.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setLayerHostingMode):
2012-04-05 Dean Jackson <dino@apple.com>
[mac] requestAnimationFrame sometimes stuck when page loads in a background tab
https://bugs.webkit.org/show_bug.cgi?id=76105
Unreviewed build fix for Windows. windowIsVisible() is PLATFORM(MAC) only.
This means a Page might start requestAnimationFrame-based animations
even when it isn't visible. This should only happen when a Page is
opened in the background though. The regular hide and show should still
pause animations.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::resumePainting):
2012-04-05 Dean Jackson <dino@apple.com>
[mac] requestAnimationFrame sometimes stuck when page loads in a background tab
https://bugs.webkit.org/show_bug.cgi?id=76105
Reviewed by Simon Fraser.
When we are resuming painting only start the scripted animations
if we're a visible window. This can happen when tabs are opened
in the background.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::resumePainting):
2012-04-05 Patrick Gansterer <paroga@webkit.org>
[Qt] Correct <wtf/*.h> include paths.
https://bugs.webkit.org/show_bug.cgi?id=83270
Reviewed by Eric Seidel.
Modify the #include declerations so that the
wtf types are included using the full path.
* Shared/qt/QtNetworkReplyData.cpp:
* UIProcess/WebLayerTreeRenderer.cpp:
* UIProcess/qt/LayerBackingStore.h:
* UIProcess/qt/QtViewportInteractionEngine.cpp:
* UIProcess/qt/QtViewportInteractionEngine.h:
* UIProcess/qt/QtWebPageSGNode.h:
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2012-04-05 Jia Pu <jpu@apple.com>
Move correction panel related functions from EditorClient into separated AlternativeTextClient class.
https://bugs.webkit.org/show_bug.cgi?id=82970
Reviewed by Enrica Casucci.
Move correction panel related functions from WebEditorClient to the new WebAlternativeTextClient.
See WebCore/ChangeLog for details.
* UIProcess/API/gtk/PageClientImpl.cpp:
* UIProcess/API/mac/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::recordAutocorrectionResponse):
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/PageClient.h:
(PageClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::recordAutocorrectionResponse):
* UIProcess/mac/CorrectionPanel.h:
* UIProcess/mac/CorrectionPanel.mm:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp: Added.
(WebKit):
(WebKit::WebAlternativeTextClient::WebAlternativeTextClient):
(WebKit::WebAlternativeTextClient::~WebAlternativeTextClient):
(WebKit::WebAlternativeTextClient::showCorrectionAlternative):
(WebKit::WebAlternativeTextClient::dismissAlternative):
(WebKit::WebAlternativeTextClient::dismissAlternativeSoon):
(WebKit::WebAlternativeTextClient::recordAutocorrectionResponse):
* WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Added.
(WebKit):
(WebAlternativeTextClient):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2012-04-05 Csaba Osztrogonác <ossy@webkit.org>
[Qt] Fix includes after QtDeclarative -> QtQML renaming
https://bugs.webkit.org/show_bug.cgi?id=82195
Relanding r112651, because Qt5 is updated everywhere.
* UIProcess/API/qt/qquicknetworkreply_p.h:
* UIProcess/API/qt/qquicknetworkrequest_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebiconimageprovider_p.h:
* UIProcess/API/qt/qwebnavigationhistory.cpp:
* UIProcess/API/qt/qwebnavigationhistory_p.h:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
* UIProcess/qt/QtDialogRunner.cpp:
(QtDialogRunner::initForAlert):
(QtDialogRunner::initForConfirm):
(QtDialogRunner::initForPrompt):
(QtDialogRunner::initForAuthentication):
(QtDialogRunner::initForProxyAuthentication):
(QtDialogRunner::initForCertificateVerification):
(QtDialogRunner::initForFilePicker):
(QtDialogRunner::initForDatabaseQuotaDialog):
(QtDialogRunner::createDialog):
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
(WebKit::WebPopupMenuProxyQt::createItem):
(WebKit::WebPopupMenuProxyQt::createContext):
2012-04-04 Hayato Ito <hayato@chromium.org>
Remove ReifiedTreeTraversal.
https://bugs.webkit.org/show_bug.cgi?id=83110
Reviewed by Dimitri Glazkov.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-04-04 Shinya Kawanaka <shinyak@chromium.org>
Shadow DOM is exposed in JS.
https://bugs.webkit.org/show_bug.cgi?id=82607
Reviewed by Hajime Morita.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-04-04 Anders Carlsson <andersca@apple.com>
Text input doesn't work for some Flash forms
https://bugs.webkit.org/show_bug.cgi?id=83232
<rdar://problem/11186162>
Reviewed by Alexey Proskuryakov.
If a plug-in is instantiated when the WKView is not focused, text input wouldn't work. The reason for this
is that WebPage::windowIsFocused() would only return true if the window and the WKView are both focused. Rename
this member function to windowAndWebPageAreFocused, add a new windowIsFocused member function that does the right thing
and change WebPage::focusedWebPage to use windowAndWebPageAreFocused.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowIsFocused):
(WebKit):
(WebKit::WebPage::windowAndWebPageAreFocused):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::focusedWebPage):
2012-03-15 Jer Noble <jer.noble@apple.com>
Full Screen mode should cancel before navigation.
https://bugs.webkit.org/show_bug.cgi?id=81295
Reviewed by Anders Carlsson.
When a provisional load is started, if the page is currently in full screen mode, instruct
the full screen controller to close the full screen window immediately.
Close the full screen window controller, if present and in full screen mode:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
Add boilerplate to support passing through isFullScreen() and close() methods from the WebPageProxy
to the WKFullScreenWindowController:
* UIProcess/WebFullScreenManagerProxy.h:
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController isFullScreen]): Added simple accessor.
* UIProcess/mac/WebFullScreenManagerProxyMac.mm:
(WebKit::WebFullScreenManagerProxy::close): Pass through to the WKFullScreenWindowController.
(WebKit::WebFullScreenManagerProxy::isFullScreen): Ditto.
2012-04-04 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
WKTR needs to implement layoutTestController.setPageVisibility()
https://bugs.webkit.org/show_bug.cgi?id=69554
Reviewed by Simon Fraser.
This patch implements the setPageVisibilityState through InjectedBundle
so WKTR supports the Page Visibility API and can set the visibility state
directly to Page.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetPageVisibilityState):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit):
(WebKit::InjectedBundle::setPageVisibilityState):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):
2012-04-04 Alexis Menard <alexis.menard@openbossa.org>
Animation related classes should use CSSPropertyId rather than integers when manipulating CSS property ids.
https://bugs.webkit.org/show_bug.cgi?id=83050
Reviewed by Simon Fraser.
The property of the Animation is a CSSPropertyID. It's ok to cast it here as an int for IPC transmission.
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
2012-04-04 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Entire page highlighted on panning.
https://bugs.webkit.org/show_bug.cgi?id=83158
Reviewed by Kenneth Rohde Christiansen.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::highlightPotentialActivation):
2012-04-04 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] QtWebKit2 should support Page Visibility API
https://bugs.webkit.org/show_bug.cgi?id=81164
Reviewed by Kenneth Rohde Christiansen.
Implementing the last bits needed for getting the expected
behavior for Page Visibility API, according to its spec.
The only missing part in Qt was a way to check whether
the view was exposed or not.
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::isViewVisible):
2012-04-04 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[WK2] Add Page Visibility API support
https://bugs.webkit.org/show_bug.cgi?id=81154
Reviewed by Kenneth Rohde Christiansen.
Use WebPageProxy::viewStateDidChange to correctly define the page's
visibilityState and then set it to the WebProcess. The WebKit2's based
ports just need to implement the related PageClient functions in order
to get this API enabled and working properly.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::viewStateDidChange):
* WebProcess/WebPage/WebPage.cpp:
(WebKit):
(WebKit::WebPage::setVisibilityState):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:
2012-04-04 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Further improvements of the tap gesture recognizer
https://bugs.webkit.org/show_bug.cgi?id=83149
Reviewed by Zoltan Herczeg.
Ignore single tap while finger is still pressed.
Some renaming to make the states more clear.
A pan further than the maxPanDistance can now invalidate
double-taps as well.
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
(WebKit::QtTapGestureRecognizer::recognize):
(WebKit::QtTapGestureRecognizer::singleTapTimeout):
(WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
(WebKit::QtTapGestureRecognizer::reset):
* UIProcess/qt/QtTapGestureRecognizer.h:
2012-04-04 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Make the WebView a subclass of Flickable
https://bugs.webkit.org/show_bug.cgi?id=83033
Reviewed by Kenneth Rohde Christiansen.
Hitherto, the experiment of a QML WebView with an internal Flickable
instance showed that the approach of hiding the Flickable raises more
problems than it solves.
One set of problems arose because the internal Flickable was a separate
item which received and reacted on automatically synthesized mouse events
send by the canvas, this interfered with the gesture recognizers of the
WebView.
Other issues were related to orientation and the integration of the
WebView item with other QML items and components (like scroll indicators)
which require a larger set of the Flickable API or the Flickable object
itself (e.g. ScrollDecorator).
These disadvantages of an internal Flickable instance outweigh the
benefits of controlling the exposed API, therefore the experiment had
the conclusion that there is no way around the public inheritance from
QQuickFlickable.
This patch removes the QtFlickProvider class, inherits QQuickWebView
from QQuickFlickable and adjusts the viewport interaction engine and
the gesture recognizers to use the Flickable API of the WebView to
keep the same behaviour as before.
* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::QQuickWebPage):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewFlickablePrivate::initialize):
(QQuickWebViewFlickablePrivate::pageItemPos):
(QQuickWebViewFlickablePrivate::updateContentsSize):
(QQuickWebViewFlickablePrivate::onComponentComplete):
(QQuickWebViewFlickablePrivate::updateViewportSize):
(QQuickWebViewExperimental::useDefaultContentItemSize):
(QQuickWebViewExperimental::setUseDefaultContentItemSize):
(QQuickWebView::QQuickWebView):
(QQuickWebView::inputMethodQuery):
(QQuickWebView::geometryChanged):
(QQuickWebView::componentComplete):
(QQuickWebView::event):
(QQuickWebView::contentPos):
(QQuickWebView::setContentPos):
(QQuickWebView::handlePress):
(QQuickWebView::handleMove):
(QQuickWebView::handleRelease):
* UIProcess/API/qt/qquickwebview_p.h:
(WebKit):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::scrollRequest):
* UIProcess/API/qt/tests/tests.pri:
* UIProcess/qt/QtFlickProvider.cpp: Removed.
* UIProcess/qt/QtFlickProvider.h: Removed.
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::recognize):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::setItemRectVisible):
(WebKit::QtViewportInteractionEngine::flickableMoveStarted):
(WebKit::QtViewportInteractionEngine::flickableMoveEnded):
(WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
(WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
(WebKit::QtViewportInteractionEngine::wheelEvent):
(WebKit::QtViewportInteractionEngine::reset):
(WebKit::QtViewportInteractionEngine::scrollAnimationActive):
(WebKit::QtViewportInteractionEngine::panGestureActive):
(WebKit::QtViewportInteractionEngine::panGestureStarted):
(WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::panGestureEnded):
(WebKit::QtViewportInteractionEngine::panGestureCancelled):
(WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):
(WebKit::QtViewportInteractionEngine::scaleContent):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::doneWithTouchEvent):
2012-04-04 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Unable to zoom to some areas.
https://bugs.webkit.org/show_bug.cgi?id=83144
Reviewed by Kenneth Rohde Christiansen.
Remember to convert touch-area to touch-point radius.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::findZoomableAreaForPoint):
2012-04-04 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Improve the tap gesture recognizer
https://bugs.webkit.org/show_bug.cgi?id=83135
Reviewed by Simon Hausmann.
Clean up the code and make sure that the first single tap
event, as part of a double tap gesture, is ignored.
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::withinDistance):
(WebKit):
(WebKit::QtTapGestureRecognizer::recognize):
(WebKit::QtTapGestureRecognizer::singleTapTimeout):
(WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
(WebKit::QtTapGestureRecognizer::reset):
* UIProcess/qt/QtTapGestureRecognizer.h:
(QtTapGestureRecognizer):
2012-04-03 Geoffrey Garen <ggaren@apple.com>
Fixed some WebKit2 crashes seen on the buildbot after my last patch.
Reviewed by Beth Dakin.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::finalize): Don't try to get our value
out of the map, since Weak<T> returns NULL during finalization. Instead,
use the handle we've been passed for finalization.
2012-03-29 Geoffrey Garen <ggaren@apple.com>
First step toward incremental Weak<T> finalization
https://bugs.webkit.org/show_bug.cgi?id=82670
Reviewed by Filip Pizlo.
Updated for API change.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::finalize):
2012-04-03 Keishi Hattori <keishi@webkit.org>
Disable ENABLE_DATALIST for now
https://bugs.webkit.org/show_bug.cgi?id=82871
Reviewed by Kent Tamura.
* Configurations/FeatureDefines.xcconfig: Disabled ENABLE_DATALIST.
2012-04-03 Yael Aharon <yael.aharon@nokia.com>
[Qt][WK2] Assert on startup after r113090
https://bugs.webkit.org/show_bug.cgi?id=83111
Reviewed by Noam Rosenthal.
Add willBeDestroyed to to WebGraphicsLayer.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::~WebGraphicsLayer):
(WebCore):
(WebCore::WebGraphicsLayer::willBeDestroyed):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayer):
2012-04-03 Sam Weinig <sam@webkit.org>
Allow the old WebKit2 drawing model to host layers in the window server
<rdar://problem/11170525>
https://bugs.webkit.org/show_bug.cgi?id=83101
Reviewed by Anders Carlsson.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::layerHostingModeDidChange):
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* WebProcess/WebPage/DrawingArea.h:
(DrawingArea):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setLayerHostingMode):
* WebProcess/WebPage/DrawingAreaImpl.h:
(DrawingAreaImpl):
* WebProcess/WebPage/LayerTreeHost.h:
(LayerTreeHost):
(WebKit::LayerTreeHost::setLayerHostingMode):
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
(LayerTreeHostCAMac):
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
(WebKit::LayerTreeHostCAMac::platformInitialize):
(WebKit::LayerTreeHostCAMac::setLayerHostingMode):
Pipe layer hosting mode to the old drawing area.
2012-04-03 Jia Pu <jpu@apple.com>
Rename SpellingCorrectionController to AlternativeTextController.
https://bugs.webkit.org/show_bug.cgi?id=82942
Reviewed by Enrica Casucci.
These changes are simply for adopting new class names.
* UIProcess/API/mac/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::showCorrectionPanel):
(WebKit::PageClientImpl::dismissCorrectionPanel):
(WebKit::PageClientImpl::dismissCorrectionPanelSoon):
* UIProcess/API/mac/WKView.mm:
(-[WKView handleCorrectionPanelResult:]):
* UIProcess/PageClient.h:
(PageClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::showCorrectionPanel):
(WebKit::WebPageProxy::dismissCorrectionPanel):
(WebKit::WebPageProxy::dismissCorrectionPanelSoon):
(WebKit::WebPageProxy::handleAlternativeTextUIResult):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/mac/CorrectionPanel.h:
(CorrectionPanel):
* UIProcess/mac/CorrectionPanel.mm:
(correctionIndicatorType):
(WebKit::CorrectionPanel::CorrectionPanel):
(WebKit::CorrectionPanel::~CorrectionPanel):
(WebKit::CorrectionPanel::show):
(WebKit::CorrectionPanel::dismiss):
(WebKit::CorrectionPanel::dismissInternal):
(WebKit::CorrectionPanel::handleAcceptedReplacement):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::showCorrectionPanel):
(WebKit::WebEditorClient::dismissCorrectionPanel):
(WebKit::WebEditorClient::dismissCorrectionPanelSoon):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::handleAlternativeTextUIResult):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:
2012-04-03 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Remove #if !USE(TILED_BACKING_STORE) from WebFrameLoaderClient::transitionToCommittedForNewPage()
https://bugs.webkit.org/show_bug.cgi?id=83070
Reviewed by Andreas Kling.
It is preventing m_frameHasCustomRepresentation to be set properly and not in sync with
WebFrameLoaderClient::transitionToCommittedFromCachedFrame()
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2012-04-03 Jer Noble <jer.noble@apple.com>
ESC key in full screen does not result in webkitFullScreenChange event.
https://bugs.webkit.org/show_bug.cgi?id=82755
<rdar://problem/11093513>
Reviewed by Eric Carlson.
Instead of exiting full screen directly, ask the document to initiate exiting full screen. This ensures
that the entire full screen element stack is cleared and that webkitFullScreenChange events are sent
out correctly.
Because the WebProcess may be stalled or hung, add a watchdog timer which will force an exit of full
screen if the WebProcess does not respond in a timely manner (defaults to 1s).
Add a new method, requestExitFullScreen, which calls through to the WebProcess and Document:
* UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::requestExitFullScreen):
* UIProcess/WebFullScreenManagerProxy.h:
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::requestExitFullScreen):
* WebProcess/FullScreen/WebFullScreenManager.h:
* WebProcess/FullScreen/WebFullScreenManager.messages.in:
Request that the document exits full screen when the ESC key is pressed:
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController cancelOperation:]):
(-[WKFullScreenWindowController exitFullScreen]):
2012-04-03 Balazs Kelemen <kbalazs@webkit.org>
[Qt][WK2] ASSERT(!(outputBytes.size() % sizeof(UChar))) in PluginProcessProxyQt.cpp
https://bugs.webkit.org/show_bug.cgi?id=83034
Reviewed by Zoltan Herczeg.
Don't allow the plugin to pollute the standard output.
Reinvent StdOutDevNullRedirector which was removed in
r112889 for this purpose.
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(StdoutDevNullRedirector):
(WebKit):
(WebKit::StdoutDevNullRedirector::StdoutDevNullRedirector):
(WebKit::StdoutDevNullRedirector::~StdoutDevNullRedirector):
(WebKit::NetscapePluginModule::scanPlugin):
2012-04-02 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Enable and connect the WebInspectorServer with WebKit2 pages.
https://bugs.webkit.org/show_bug.cgi?id=73094
Reviewed by Simon Hausmann.
Pages are registered/unregistered as they are created/destroyed, if they have
developer extras enabled. The server is run on the UI process and communicates
with the web process through IPC for each message between the inspector
controller and the remote frontend.
Includes the server spawning logic for the Qt port, the server is
started through an environment variable specifying the interface and
port to bind the server to, by default on 127.0.0.1.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::WebInspectorProxy):
(WebKit::WebInspectorProxy::invalidate):
(WebKit):
(WebKit::WebInspectorProxy::enableRemoteInspection):
(WebKit::WebInspectorProxy::remoteFrontendConnected):
(WebKit::WebInspectorProxy::remoteFrontendDisconnected):
(WebKit::WebInspectorProxy::dispatchMessageFromRemoteFrontend):
(WebKit::WebInspectorProxy::sendMessageToRemoteFrontend):
* UIProcess/WebInspectorProxy.h:
(WebInspectorProxy):
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::preferencesDidChange):
* UIProcess/qt/QtWebContext.cpp:
(WebKit::initInspectorServer):
(WebKit):
(WebKit::globalInitialization):
(WebKit::QtWebContext::create):
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::sendMessageToFrontend):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::WebInspector):
(WebKit):
(WebKit::WebInspector::sendMessageToRemoteFrontend):
(WebKit::WebInspector::dispatchMessageFromRemoteFrontend):
(WebKit::WebInspector::remoteFrontendConnected):
(WebKit::WebInspector::remoteFrontendDisconnected):
* WebProcess/WebPage/WebInspector.h:
(WebInspector):
(WebKit::WebInspector::hasRemoteFrontendConnected):
* WebProcess/WebPage/WebInspector.messages.in:
2012-03-29 Joseph Pecoraro <joepeck@webkit.org> and Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
WebInspectorServer for WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=73855
Reviewed by Simon Hausmann.
The server uses WebSocket for communication with the remote client and
normal HTTP requests are handled to optionally send the frontend on the
wire. Those decision are handled per platform and Qt currently maps:
- "/" to a static listing page.
- "/pagelist.json" to the page list for the listing page or tools.
- anything else, for example "/inspector.js" to the file with the
same name in the dynamic libraries built resources.
Invalid files should return a 404.
* Target.pri:
* UIProcess/InspectorServer/WebInspectorServer.cpp: Added.
(WebKit):
(WebKit::pageIdFromRequestPath):
(WebKit::WebInspectorServer::server):
(WebKit::WebInspectorServer::WebInspectorServer):
(WebKit::WebInspectorServer::~WebInspectorServer):
(WebKit::WebInspectorServer::registerPage):
(WebKit::WebInspectorServer::unregisterPage):
(WebKit::WebInspectorServer::sendMessageOverConnection):
(WebKit::WebInspectorServer::didReceiveUnrecognizedHTTPRequest):
(WebKit::WebInspectorServer::didReceiveWebSocketUpgradeHTTPRequest):
(WebKit::WebInspectorServer::didEstablishWebSocketConnection):
(WebKit::WebInspectorServer::didReceiveWebSocketMessage):
(WebKit::WebInspectorServer::didCloseWebSocketConnection):
(WebKit::WebInspectorServer::closeConnection):
* UIProcess/InspectorServer/WebInspectorServer.h: Added.
(WebKit):
(WebInspectorServer):
* UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp: Added.
(WebKit):
(WebKit::WebInspectorServer::platformResourceForPath):
(WebKit::WebInspectorServer::buildPageList):
* WebKit2.qrc: Added.
* qt/Resources/inspectorPageIndex.html: Added.
2012-03-29 Joseph Pecoraro <joepeck@webkit.org> and Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Add a Generic WebSocket Server.
https://bugs.webkit.org/show_bug.cgi?id=73093
Reviewed by Simon Hausmann.
The Inspector Server will be a WebSocket Server that also responds to
non-WebSocket-Upgrade HTTP Requests. This is a generic WebSocket server
that passes on what it doesn't know on to its client for extended
functionality. This code is wrapped in a new ENABLE(INSPECTOR_SERVER) flag.
There are no tests yet for a built-in WebSocket server.
This will be covered by API level tests in a later patch.
* Target.pri:
WebSocketServer is a simple server. Calling listen, or close,
multiple times is safe. Subclassing is expected.
* UIProcess/InspectorServer/WebSocketServer.cpp: Added.
(WebKit):
(WebKit::WebSocketServer::WebSocketServer):
(WebKit::WebSocketServer::~WebSocketServer):
(WebKit::WebSocketServer::listen):
(WebKit::WebSocketServer::close):
(WebKit::WebSocketServer::didAcceptConnection):
(WebKit::WebSocketServer::didCloseWebSocketServerConnection):
* UIProcess/InspectorServer/WebSocketServer.h: Added.
(WebKit):
(WebCore):
(WebSocketServer):
* UIProcess/InspectorServer/WebSocketServerClient.h: Added.
(WebCore):
(WebKit):
(WebSocketServerClient):
(WebKit::WebSocketServerClient::~WebSocketServerClient):
(WebKit::WebSocketServerClient::didReceiveUnrecognizedHTTPRequest):
(WebKit::WebSocketServerClient::didReceiveWebSocketUpgradeHTTPRequest):
(WebKit::WebSocketServerClient::didEstablishWebSocketConnection):
(WebKit::WebSocketServerClient::didReceiveWebSocketMessage):
(WebKit::WebSocketServerClient::didCloseWebSocketConnection):
Each WebSocketConnection:
- Passes unknown HTTP Requests to the server's client.
- Handles WebSocket Upgrade Requests.
- First ask the client if it is okay.
- Later notify the client about a success.
- Once upgraded the connection parses and passes WebSocket
frames to the client.
* UIProcess/InspectorServer/WebSocketServerConnection.cpp: Added.
(WebKit):
(WebKit::WebSocketServerConnection::WebSocketServerConnection):
(WebKit::WebSocketServerConnection::~WebSocketServerConnection):
(WebKit::WebSocketServerConnection::shutdownNow):
(WebKit::WebSocketServerConnection::shutdownAfterSendOrNow): meant to shutdown after an HTTP response. Ensure all platforms work as expected.
(WebKit::WebSocketServerConnection::sendWebSocketMessage): send a text message (WebSocket message) over the connection.
(WebKit::WebSocketServerConnection::sendHTTPResponseHeader):
(WebKit::WebSocketServerConnection::sendRawData): send raw data (HTTP message) over the connection.
(WebKit::WebSocketServerConnection::didCloseSocketStream): handle socket closing scenarios.
(WebKit::WebSocketServerConnection::didReceiveSocketStreamData): parse the incoming data in HTTP / WebSocket modes.
(WebKit::WebSocketServerConnection::didFailSocketStream): log errors.
(WebKit::WebSocketServerConnection::readHTTPMessage): when starting, a web socket connection reads an HTTP message.
(WebKit::WebSocketServerConnection::upgradeToWebSocketServerConnection):
(WebKit::WebSocketServerConnection::readWebSocketFrames): parse our buffer for as many frames as possible.
(WebKit::WebSocketServerConnection::readWebSocketFrame): parse an individual frame.
* UIProcess/InspectorServer/WebSocketServerConnection.h: Added.
(WebCore):
(WebKit):
(WebSocketServerConnection):
(WebKit::WebSocketServerConnection::identifier):
(WebKit::WebSocketServerConnection::setIdentifier):
Qt specific implementation.
* UIProcess/InspectorServer/qt/WebSocketServerQt.cpp: Added.
(WebKit):
(WebKit::WebSocketServer::platformInitialize):
(WebKit::WebSocketServer::platformListen):
(WebKit::WebSocketServer::platformClose):
(WebKit::QtTcpServerHandler::QtTcpServerHandler):
(WebKit::QtTcpServerHandler::handleNewConnection):
(WebKit::QtTcpServerHandler::listen):
(WebKit::QtTcpServerHandler::close):
* UIProcess/InspectorServer/qt/WebSocketServerQt.h: Added.
(WebKit):
(QtTcpServerHandler):
* WebKit2.pri:
* config.h: Add ENABLE(INSPECTOR_SERVER) for WebKit2.
2012-04-03 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Add developerExtrasEnabled to QWebPreferences.
https://bugs.webkit.org/show_bug.cgi?id=83018
Reviewed by Kenneth Rohde Christiansen.
This is required to allow inspecting pages.
* UIProcess/API/qt/qwebpreferences.cpp:
(QWebPreferencesPrivate::testAttribute):
(QWebPreferencesPrivate::setAttribute):
(QWebPreferences::developerExtrasEnabled):
(QWebPreferences::setDeveloperExtrasEnabled):
* UIProcess/API/qt/qwebpreferences_p.h:
* UIProcess/API/qt/qwebpreferences_p_p.h:
2012-04-03 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Tap highlight attempted hidden several times
https://bugs.webkit.org/show_bug.cgi?id=82903
Reviewed by Kenneth Rohde Christiansen.
Do not reset GestureRecognizer if already reset, and do not
disable tap-highlight on touch-end if already reset.
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::recognize):
(WebKit::QtTapGestureRecognizer::reset):
2012-04-03 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Tap highlight still showing when tap gesture has timed out
https://bugs.webkit.org/show_bug.cgi?id=82902
Reviewed by Kenneth Rohde Christiansen.
Disable highlight of potential tap, when tap-and-hold state
replaces potential tap state.
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
2012-04-02 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Set viewport size back, when WebProcess is relaunched.
https://bugs.webkit.org/show_bug.cgi?id=82936
Reviewed by Andreas Kling.
Fixed layout requires viewport size set properly on the WebProcess side.
Make sure it is set, when WebProcess is relaunched.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::didRelaunchProcess):
2012-04-02 Anders Carlsson <andersca@apple.com>
Call NPP_SetValue with WKNVCALayerRenderServerPort when a WKView is moved from a buffered to an unbuffered window, or vice versa
https://bugs.webkit.org/show_bug.cgi?id=82951
<rdar://problem/10589308>
Reviewed by Sam Weinig.
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::setLayerHostingMode):
Call Plugin::setLayerHostingMode).
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h:
Move WKNVCALayerRenderServerPort to the header file.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
Initialize m_layerHostingMode.
(WebKit::NetscapePlugin::initialize):
Set m_layerHostingMode from the parameters struct.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::compositingRenderServerPort):
Return MACH_PORT_NULL when hosted in the window server.
(WebKit::NetscapePlugin::platformPostInitialize):
Move the code that gets the layer out into a separate function, updatePluginLayer.
(WebKit::NetscapePlugin::setLayerHostingMode):
Let the plug-in know that the layer hosting mode changed and update the plug-in layer if
setting the new compositing port was successful.
2012-04-02 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] ResourceError::isCancellation() is always returning false
https://bugs.webkit.org/show_bug.cgi?id=82917
Reviewed by Noam Rosenthal.
We were missing the encoding of a boolean in ArgumentCoder<ResourceError>
and, therefore, we were getting always "false" for ResourceError::isCancellation()
for errors being sent through the IPC.
* Shared/qt/WebCoreArgumentCodersQt.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
2012-03-29 Sam Weinig <sam@webkit.org>
Add setting to disable Java for local files even if it is otherwise enabled
https://bugs.webkit.org/show_bug.cgi?id=82685
Reviewed by Anders Carlsson.
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetJavaEnabledForLocalFiles):
(WKPreferencesGetJavaEnabledForLocalFiles):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Add pref as SPI and forward to WebCore.
2012-04-02 Balazs Kelemen <kbalazs@webkit.org>
[Qt][WK2] Set up plugin process on Unix
https://bugs.webkit.org/show_bug.cgi?id=72121
Reviewed by Simon Hausmann.
Setup plugin process for Qt and move the task of querying the plugins
to this process in order to avoid crashes due to plugin bugs or library
incompatibility.
* GNUmakefile.am:
* PluginProcess.pro: Added.
* PluginProcess/gtk/PluginProcessMainGtk.cpp:
(WebKit::PluginProcessMainGtk):
* PluginProcess/qt/PluginProcessMainQt.cpp:
(WebKit::messageHandler):
(WebKit::initializeGtk):
(WebKit):
(WebKit::PluginProcessMain):
Implement entry point of the plugin process.
Handle -scanPlugin command line switch: produce meta data
of plugin on standard output and terminate. Move Gtk initialization
hack to there.
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
(WebKit::NetscapePluginModule::tryLoad):
Get rid of the Gtk initialization hack. We do not nead it here anymore.
* Shared/Plugins/Netscape/NetscapePluginModule.h:
(WebKit):
(NetscapePluginModule):
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::parseMIMEDescription):
(WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin):
(WebKit):
(WebKit::NetscapePluginModule::getPluginInfo):
Get plugin meta data via PluginProcessproxy. If a failure
happened we ignore to use the plugin. Remove the concept
of stdout redirection since we can control it when launching
the process.
(WebKit::NetscapePluginModule::determineQuirks):
(WebKit::truncateToSingleLine):
(WebKit::NetscapePluginModule::scanPlugin):
Produce plugin meta data on standard output.
* Shared/ProcessExecutablePath.h: Added.
(WebKit):
* Shared/gtk/ProcessExecutablePathGtk.cpp: Added.
(findWebKitProcess):
(executablePathOfWebProcess):
(executablePathOfPluginProcess):
* Shared/qt/ProcessExecutablePathQt.cpp: Copied from Source/WebKit2/UIProcess/Plugins/qt/PluginProcessProxyQt.cpp.
(WebKit):
(WebKit::executablePath):
(WebKit::executablePathOfWebProcess):
(WebKit::executablePathOfPluginProcess):
Factored the executable path determination into free functions
to avoid code duplication.
* Shared/qt/ShareableBitmapQt.cpp:
(WebKit::ShareableBitmap::paint):
Added implementation for the override with the scale factor because
it is called from PluginProxy. It does not actually handle the case
when the scale factor is not 1. However it's ok because it can only
happen on Mac in the moment.
* Target.pri:
* UIProcess/Launcher/ProcessLauncher.h:
(ProcessLauncher):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncher::launchProcess):
Use the new functions to determine the executable path.
* UIProcess/Plugins/PluginProcessProxy.h:
(WebKit):
(RawPluginMetaData):
(PluginProcessProxy):
* UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp:
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
(WebKit):
(WebKit::PluginProcessProxy::scanPlugin):
* UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
(WebKit):
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
(WebKit::PluginProcessProxy::scanPlugin):
Launch plugin process and parse it's output to get the meta data
for the plugin.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
Changed according to the removing of the flash hack. Do not try
to decide whether the plugin needs Gtk by it's name but instead
always get back the expected Gtk version (2). Only Gtk plugins
should ask for this anyway.
* qt/PluginMainQt.cpp: Copied from Source/WebKit2/UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp.
(WebKit):
(main):
2012-04-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r112868, r112879, and r112881.
http://trac.webkit.org/changeset/112868
http://trac.webkit.org/changeset/112879
http://trac.webkit.org/changeset/112881
https://bugs.webkit.org/show_bug.cgi?id=82901
"Build fail on bots." (Requested by kbalazs on #webkit).
* GNUmakefile.am:
* PluginProcess.pro: Removed.
* PluginProcess/gtk/PluginProcessMainGtk.cpp:
(WebKit::PluginProcessMainGtk):
* PluginProcess/qt/PluginProcessMainQt.cpp:
(WebKit::PluginProcessMain):
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
(WebKit::NetscapePluginModule::tryLoad):
* Shared/Plugins/Netscape/NetscapePluginModule.h:
(NetscapePluginModule):
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(StdoutDevNullRedirector):
(WebKit):
(WebKit::StdoutDevNullRedirector::StdoutDevNullRedirector):
(WebKit::StdoutDevNullRedirector::~StdoutDevNullRedirector):
(WebKit::initializeGTK):
(WebKit::NetscapePluginModule::applyX11QuirksBeforeLoad):
(WebKit::NetscapePluginModule::setMIMEDescription):
(WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin):
(WebKit::NetscapePluginModule::getPluginInfo):
(WebKit::NetscapePluginModule::determineQuirks):
* Shared/ProcessExecutablePath.h: Removed.
* Shared/gtk/ProcessExecutablePathGtk.cpp: Removed.
* Shared/qt/ProcessExecutablePathQt.cpp: Removed.
* Shared/qt/ShareableBitmapQt.cpp:
(WebKit::ShareableBitmap::paint):
* Target.pri:
* UIProcess/Launcher/ProcessLauncher.h:
(ProcessLauncher):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit):
(WebKit::findWebKitProcess):
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Plugins/PluginProcessProxy.h:
(WebKit):
(PluginProcessProxy):
* UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp:
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
* UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
* qt/PluginMainQt.cpp: Removed.
2012-04-02 Balazs Kelemen <kbalazs@webkit.org>
One more try to fix Qt build after r112868.
It's a misery why I don't have these build failures
locally.
* PluginProcess.pro:
2012-04-02 Balazs Kelemen <kbalazs@webkit.org>
Fix Qt build after r112868.
* PluginProcess.pro: Add WTF into includepath.
2012-04-02 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Call resize on frameview in WebPage::resizeToContentsIfNeeded only when the size changes.
https://bugs.webkit.org/show_bug.cgi?id=82892
Reviewed by Kenneth Rohde Christiansen.
Check against the expanded size before calling resize on frameview.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setFixedVisibleContentRect):
(WebKit::WebPage::resizeToContentsIfNeeded):
2012-04-02 Balazs Kelemen <kbalazs@webkit.org>
[Qt][WK2] Set up plugin process on Unix
https://bugs.webkit.org/show_bug.cgi?id=72121
Reviewed by Simon Hausmann.
Setup plugin process for Qt and move the task of querying the plugins
to this process in order to avoid crashes due to plugin bugs or library
incompatibility.
* GNUmakefile.am:
* PluginProcess.pro: Added.
* PluginProcess/gtk/PluginProcessMainGtk.cpp:
(WebKit::PluginProcessMainGtk):
* PluginProcess/qt/PluginProcessMainQt.cpp:
(WebKit::messageHandler):
(WebKit::initializeGtk):
(WebKit):
(WebKit::PluginProcessMain):
Implement entry point of the plugin process.
Handle -scanPlugin command line switch: produce meta data
of plugin on standard output and terminate. Move Gtk initialization
hack to there.
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
(WebKit::NetscapePluginModule::tryLoad):
Get rid of the Gtk initialization hack. We do not nead it here anymore.
* Shared/Plugins/Netscape/NetscapePluginModule.h:
(WebKit):
(NetscapePluginModule):
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::parseMIMEDescription):
(WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin):
(WebKit):
(WebKit::NetscapePluginModule::getPluginInfo):
Get plugin meta data via PluginProcessproxy. If a failure
happened we ignore to use the plugin. Remove the concept
of stdout redirection since we can control it when launching
the process.
(WebKit::NetscapePluginModule::determineQuirks):
(WebKit::truncateToSingleLine):
(WebKit::NetscapePluginModule::scanPlugin):
Produce plugin meta data on standard output.
* Shared/ProcessExecutablePath.h: Added.
(WebKit):
* Shared/gtk/ProcessExecutablePathGtk.cpp: Added.
(findWebKitProcess):
(executablePathOfWebProcess):
(executablePathOfPluginProcess):
* Shared/qt/ProcessExecutablePathQt.cpp: Copied from Source/WebKit2/UIProcess/Plugins/qt/PluginProcessProxyQt.cpp.
(WebKit):
(WebKit::executablePath):
(WebKit::executablePathOfWebProcess):
(WebKit::executablePathOfPluginProcess):
Factored the executable path determination into free functions
to avoid code duplication.
* Shared/qt/ShareableBitmapQt.cpp:
(WebKit::ShareableBitmap::paint):
Added implementation for the override with the scale factor because
it is called from PluginProxy. It does not actually handle the case
when the scale factor is not 1. However it's ok because it can only
happen on Mac in the moment.
* Target.pri:
* UIProcess/Launcher/ProcessLauncher.h:
(ProcessLauncher):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncher::launchProcess):
Use the new functions to determine the executable path.
* UIProcess/Plugins/PluginProcessProxy.h:
(WebKit):
(RawPluginMetaData):
(PluginProcessProxy):
* UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp:
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
(WebKit):
(WebKit::PluginProcessProxy::scanPlugin):
* UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
(WebKit):
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
(WebKit::PluginProcessProxy::scanPlugin):
Launch plugin process and parse it's output to get the meta data
for the plugin.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
Changed according to the removing of the flash hack. Do not try
to decide whether the plugin needs Gtk by it's name but instead
always get back the expected Gtk version (2). Only Gtk plugins
should ask for this anyway.
* qt/PluginMainQt.cpp: Copied from Source/WebKit2/UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp.
(WebKit):
(main):
2012-03-16 Philippe Normand <pnormand@igalia.com>
[GTK][WK2] Initial FullScreen support
https://bugs.webkit.org/show_bug.cgi?id=75553
Reviewed by Martin Robinson.
Full screen display support in WebKitWebViewBase. Two functions
have been added to handle this. They're called by the
WebFullScreenManagerProxy when full screen display needs to be
managed for an HTML element.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(_WebKitWebViewBasePrivate):
(webkitWebViewBaseCreateWebPage):
(onFullscreenGtkKeyPressEvent):
(webkitWebViewBaseEnterFullScreen):
(webkitWebViewBaseExitFullScreen):
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* UIProcess/WebFullScreenManagerProxy.h:
(WebKit):
* UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
(WebKit::WebFullScreenManagerProxy::enterFullScreen):
(WebKit::WebFullScreenManagerProxy::exitFullScreen):
2012-04-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r112651.
http://trac.webkit.org/changeset/112651
https://bugs.webkit.org/show_bug.cgi?id=82887
It doesn't work with older Qt5 (Requested by Ossy on #webkit).
* UIProcess/API/qt/qquicknetworkreply_p.h:
* UIProcess/API/qt/qquicknetworkrequest_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebiconimageprovider_p.h:
* UIProcess/API/qt/qwebnavigationhistory.cpp:
* UIProcess/API/qt/qwebnavigationhistory_p.h:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
* UIProcess/qt/QtDialogRunner.cpp:
(QtDialogRunner::initForAlert):
(QtDialogRunner::initForConfirm):
(QtDialogRunner::initForPrompt):
(QtDialogRunner::initForAuthentication):
(QtDialogRunner::initForProxyAuthentication):
(QtDialogRunner::initForCertificateVerification):
(QtDialogRunner::initForFilePicker):
(QtDialogRunner::initForDatabaseQuotaDialog):
(QtDialogRunner::createDialog):
* UIProcess/qt/QtFlickProvider.cpp:
* UIProcess/qt/QtFlickProvider.h:
(QtFlickProvider):
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
(WebKit::WebPopupMenuProxyQt::createItem):
(WebKit::WebPopupMenuProxyQt::createContext):
2012-04-02 Hayato Ito <hayato@chromium.org>
[Shadow DOM] Introduce ComposedShadowTreeWalker as a successor of ReifiedTreeTraversal APIs
https://bugs.webkit.org/show_bug.cgi?id=82009
Reviewed by Dimitri Glazkov.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-04-01 Jon Lee <jonlee@apple.com>
Rename notification properties and functions
https://bugs.webkit.org/show_bug.cgi?id=80482
<rdar://problem/10912432>
Reviewed by Kentaro Hara.
Rename APIs to use tag.
* UIProcess/API/C/WKNotification.cpp:
(WKNotificationCopyTag):
* UIProcess/API/C/WKNotification.h:
* UIProcess/Notifications/WebNotification.cpp:
(WebKit::WebNotification::WebNotification):
* UIProcess/Notifications/WebNotification.h:
(WebKit::WebNotification::create):
(WebKit::WebNotification::tag):
(WebNotification):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::show):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
(WebNotificationManagerProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showNotification):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show):
2012-03-31 Timothy Hatcher <timothy@apple.com>
Prevent opening external URLs in the Web Inspector's WebView.
All URLs not handled by the Inspector's JavaScript are now opened in the inspected WebView.
https://webkit.org/b/82812
rdar://problem/9488558
Reviewed by Joseph Pecoraro.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::decidePolicyForNavigationAction): Added. Only allow non-main frame and the inspector page. All other URLs
will be opened in the inspected page.
(WebKit::WebInspectorProxy::createInspectorPage): Set the policy client and use decidePolicyForNavigationAction.
* UIProcess/WebInspectorProxy.h: Made inspectorPageURL and inspectorBaseURL public for decidePolicyForNavigationAction.
2012-03-31 Anders Carlsson <andersca@apple.com>
32-bit plug-ins need to opt into magnified mode
https://bugs.webkit.org/show_bug.cgi?id=82837
<rdar://problem/9104840>
Reviewed by Simon Fraser.
* PluginProcess/mac/PluginProcessMainMac.mm:
(WebKit::PluginProcessMain):
2012-03-30 Timothy Hatcher <timothy@apple.com>
Stop creating the Web Inspector's NSWindow when detaching on close.
This fixes a UI process crash that would happen when detaching because of a Web Process crash.
https://webkit.org/b/82820
rdar://problem/11085467
Reviewed by Dan Bernstein.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformDetach): Moved the creation and showing code to the end
and added an early return if we are not visible in the middle.
2012-03-30 Emil A Eklund <eae@chromium.org>
Change WebKit/WebKit2 platform code to use pixel snapped values
https://bugs.webkit.org/show_bug.cgi?id=82549
Change WebKit and WebKit2 platform code to use rounded locations and
pixel snapped rects and sizes. This largely avoids having to expose the
fractional layout types to the platform code.
Reviewed by Eric Seidel.
* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::WebRenderObject):
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::calculatePositionAndSize):
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::renderRect):
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::invalidateScrollbarRect):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::characterIndexForPoint):
2012-03-30 Anders Carlsson <andersca@apple.com>
Fix Lion build.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
2012-03-30 Mark Pilgrim <pilgrim@chromium.org>
GEOLOCATION should be implemented as Page Supplement
https://bugs.webkit.org/show_bug.cgi?id=82228
Reviewed by Adam Barth.
Geolocation is now a Supplement in Page so the interface
has changed for setting up the page's geolocation client
initially and accessing the controller later.
* WebProcess/Geolocation/WebGeolocationManager.cpp:
(WebKit::WebGeolocationManager::didChangePosition):
(WebKit::WebGeolocationManager::didFailToDeterminePosition):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setGeoLocationPermission):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2012-03-30 Anders Carlsson <andersca@apple.com>
Show a scrolling indicator light when compositing borders are turned on
https://bugs.webkit.org/show_bug.cgi?id=82758
<rdar://problem/11143892>
Reviewed by Andreas Kling.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::updatePreferences):
Add a hook for letting drawing area subclasses know when preferences change.
* WebProcess/WebPage/WebPage.cpp:
Call DrawingArea::updatePreferences.
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
Call updatePreferences.
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
If compositing borders are enabled, create a debug root layer and tell the scrolling tree about it.
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
If we have a debug root layer, make sure it's in front.
2012-03-30 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Find zoomable area using area-based hit-testing
https://bugs.webkit.org/show_bug.cgi?id=82609
Reviewed by Kenneth Rohde Christiansen.
Add area to findZoomableAreaForPoint and use new TOUCH_ADJUSTMENT
code-path to find the best zoomable area.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findZoomableAreaForPoint):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleDoubleTapEvent):
* WebProcess/WebPage/WebPage.cpp:
(WebKit):
(WebKit::WebPage::findZoomableAreaForPoint):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:
2012-03-30 Keishi Hattori <keishi@webkit.org>
Change ENABLE_INPUT_COLOR to ENABLE_INPUT_TYPE_COLOR and enable it for chromium
https://bugs.webkit.org/show_bug.cgi?id=80972
Reviewed by Kent Tamura.
* Configurations/FeatureDefines.xcconfig:
2012-03-29 Ádám Kallai <kadam@inf.u-szeged.hu>
[Qt] Build fix by renameing QtDeclarative to QtQml in header calls.
https://bugs.webkit.org/show_bug.cgi?id=82195
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquicknetworkreply_p.h:
* UIProcess/API/qt/qquicknetworkrequest_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebiconimageprovider_p.h:
* UIProcess/API/qt/qwebnavigationhistory.cpp:
* UIProcess/API/qt/qwebnavigationhistory_p.h:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
* UIProcess/qt/QtDialogRunner.cpp:
(QtDialogRunner::initForAlert):
(QtDialogRunner::initForConfirm):
(QtDialogRunner::initForPrompt):
(QtDialogRunner::initForAuthentication):
(QtDialogRunner::initForProxyAuthentication):
(QtDialogRunner::initForCertificateVerification):
(QtDialogRunner::initForFilePicker):
(QtDialogRunner::initForDatabaseQuotaDialog):
(QtDialogRunner::createDialog):
* UIProcess/qt/QtFlickProvider.cpp:
* UIProcess/qt/QtFlickProvider.h:
(QtFlickProvider):
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
(WebKit::WebPopupMenuProxyQt::createItem):
(WebKit::WebPopupMenuProxyQt::createContext):
2012-03-29 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Direct composited image assignment doesn't work
https://bugs.webkit.org/show_bug.cgi?id=82525
Reviewed by Kenneth Rohde Christiansen.
We don't need to check whether the image or contentsRect are updated,
since assignImageToLayer is a cheap operation after the LayerBackingStore
refactor.
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::setLayerChildren):
(WebKit::WebLayerTreeRenderer::setLayerState):
(WebKit::WebLayerTreeRenderer::renderNextFrame):
2012-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r112553.
http://trac.webkit.org/changeset/112553
https://bugs.webkit.org/show_bug.cgi?id=82638
It made all tests crash on Qt WK2 (Requested by Ossy_away on
#webkit).
* WebProcess/Geolocation/WebGeolocationManager.cpp:
(WebKit::WebGeolocationManager::didChangePosition):
(WebKit::WebGeolocationManager::didFailToDeterminePosition):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setGeoLocationPermission):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2012-03-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
HashMap<>::add should return a more descriptive object
https://bugs.webkit.org/show_bug.cgi?id=71063
Reviewed by Ryosuke Niwa.
Update code to use AddResult instead of a pair.
* Platform/CoreIPC/ArgumentCoders.h:
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::SyncMessageState::getOrCreate):
* Shared/MutableDictionary.cpp:
(WebKit::MutableDictionary::add):
(WebKit::MutableDictionary::set):
* Shared/UserMessageCoders.h:
(WebKit::UserMessageDecoder::baseDecode):
* Shared/mac/CommandLineMac.cpp:
(WebKit::CommandLine::parse):
* UIProcess/API/mac/WKPrintingView.mm:
(pageDidDrawToPDF):
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::getOrCreate):
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::getOrCreate):
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::createWebPage):
(WebKit::WebProcess::webPageGroup):
2012-03-29 Mark Pilgrim <pilgrim@chromium.org>
GEOLOCATION should be implemented as Page Supplement
https://bugs.webkit.org/show_bug.cgi?id=82228
Reviewed by Adam Barth.
Geolocation is now a Supplement in Page so the interface
has changed for setting up the page's geolocation client
initially and accessing the controller later.
* WebProcess/Geolocation/WebGeolocationManager.cpp:
(WebKit::WebGeolocationManager::didChangePosition):
(WebKit::WebGeolocationManager::didFailToDeterminePosition):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setGeoLocationPermission):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2012-03-28 Anders Carlsson <andersca@apple.com>
Fix a crash and an assertion when recovering from a web process crash
https://bugs.webkit.org/show_bug.cgi?id=82559
<rdar://problem/10902574>
Reviewed by Mark Rowe.
* UIProcess/API/mac/WKView.mm:
(-[WKView _processDidCrash]):
If we're currently in accelerated compositing mode, exit.
(-[WKView updateLayer]):
Guard against a null drawing area.
2012-03-28 Nate Chapin <japhet@chromium.org>
Remove dispatchDidLoadMainResource callback, since no
port implements it.
https://bugs.webkit.org/show_bug.cgi?id=82539
Reviewed by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2012-03-28 Anders Carlsson <andersca@apple.com>
Massive lag opening a link in a new background tab
https://bugs.webkit.org/show_bug.cgi?id=82542
<rdar://problem/11004502>
Reviewed by Sam Weinig.
Defer waiting for the web process to update the page size until we're actually going to display the layer.
This matches what we do in the non-tiled code path.
* UIProcess/API/mac/WKView.mm:
(-[WKView setFrameSize:]):
(-[WKView updateLayer]):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
(TiledCoreAnimationDrawingAreaProxy):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
(WebKit):
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
2012-03-28 Anders Carlsson <andersca@apple.com>
REGRESSION (r109826): Can't type into Flash text fields
https://bugs.webkit.org/show_bug.cgi?id=82488
<rdar://problem/11022004>
Reviewed by Sam Weinig.
This was caused by the fix in r109826. Revert that change and fix the original bug by notifying the UI process
that the plug-in lost focus when it's destroyed. This will correctly reset the text input state (merely setting
the text input state to PluginComplexTextInputDisabled doesn't reset the state correctly).
* UIProcess/API/mac/WKView.mm:
(-[WKView _setPluginComplexTextInputState:]):
(-[WKView _handlePluginComplexTextInputKeyDown:]):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::~PluginView):
2012-03-28 Balazs Kelemen <kbalazs@webkit.org>
[Qt] Fix QWARN in test_loadIgnoreEmptyUrl API test.
Rubber-stamped by Csaba Osztrogonác.
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
There is no load() API of the view, we have to use the url property.
2012-03-27 YoungTaeck Song <youngtaeck.song@samsung.com>
[EFL][WK2] Add RunLoopEfl and WorkQueueEfl
https://bugs.webkit.org/show_bug.cgi?id=62777
Reviewed by Hajime Morita.
Add initial version WorkQueueEfl for WebKit2 Efl.
* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/unix/ConnectionUnix.cpp:
(CoreIPC::Connection::platformInvalidate):
(CoreIPC::Connection::open):
* Platform/PlatformProcessIdentifier.h:
(WebKit):
* Platform/WorkQueue.h:
(WorkQueue):
* Platform/efl/WorkQueueEfl.cpp: Added.
(TimerWorkItem):
(TimerWorkItem::TimerWorkItem):
(TimerWorkItem::~TimerWorkItem):
(TimerWorkItem::function):
(TimerWorkItem::queue):
(TimerWorkItem::timerID):
(WorkQueue::platformInitialize):
(WorkQueue::platformInvalidate):
(WorkQueue::performWork):
(WorkQueue::performFdWork):
(WorkQueue::sendMessageToThread):
(WorkQueue::workQueueThread):
(WorkQueue::registerSocketEventHandler):
(WorkQueue::unregisterSocketEventHandler):
(WorkQueue::dispatch):
(WorkQueue::timerFired):
(WorkQueue::dispatchAfterDelay):
* PlatformEfl.cmake:
2012-03-27 Anders Carlsson <andersca@apple.com>
Plug-ins using the Core Animation drawing model should work when hosting the layer tree in the window server
https://bugs.webkit.org/show_bug.cgi?id=82387
<rdar://problem/11031942>
Reviewed by Sam Weinig.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
(WebKit::PluginControllerProxy::initialize):
Remove m_pluginCreationParameters; it was used by the old NPRuntime short-circuit code.
Make platformInitialize take creation parameters.
* PluginProcess/PluginControllerProxy.messages.in:
Add SetLayerHostingMode message.
* PluginProcess/gtk/PluginControllerProxyGtk.cpp:
(WebKit::PluginControllerProxy::platformInitialize):
Make platformInitialize take creation parameters.
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::platformInitialize):
Call updateLayerHostingContext.
(WebKit::PluginControllerProxy::setLayerHostingMode):
Call updateLayerHostingContext and send back the new context ID.
(WebKit::PluginControllerProxy::updateLayerHostingContext):
Create a new LayerHostingContext given the layer hosting mode.
* PluginProcess/qt/PluginControllerProxyQt.cpp:
(WebKit::PluginControllerProxy::platformInitialize):
Make platformInitialize take creation parameters.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::setLayerHostingMode):
Add stub.
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
(WebKit::makeRenderLayer):
Add helper function for creating a new render layer.
(WebKit::PluginProxy::pluginLayer):
Call makeRenderLayer.
(WebKit::PluginProxy::setLayerHostingMode):
Send a message to the plug-in process.
(WebKit::PluginProxy::setLayerHostingContextID):
Update the context ID and make a new render layer.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::setLayerHostingMode):
Add stub.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/Plugin.cpp:
(WebKit::Plugin::Parameters::encode):
(WebKit::Plugin::Parameters::decode):
* WebProcess/Plugins/Plugin.h:
Add the layer hosting mode as a parameter. Add a new setLayerHostingMode pure virtual member function.
* WebProcess/Plugins/PluginProxy.messages.in:
Add a SetLayerHostingContextID message.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setLayerHostingMode):
Call down to the plug-in.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createPlugin):
Set the layer hosting mode of the page.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Initialize m_layerHostingMode to false.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::layerHostingMode):
Add m_layerHostingMode and a getter.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
Call WebPage::setLayerHostingMode.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setLayerHostingMode):
Tell all plug-ins that the layer hosting mode changed.
2012-03-27 Timothy Hatcher <timothy@apple.com>
Make WebKit properly load a staged framework when soft linking.
https://webkit.org/b/82371
rdar://problem/11125989
Reviewed by Dan Bernstein.
* UIProcess/mac/WebInspectorProxyMac.mm: Use SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL to properly
load the WebInspector framework.
* WebProcess/WebPage/mac/WebInspectorMac.mm: Ditto.
2012-03-27 Anders Carlsson <andersca@apple.com>
Don't update the layer hosting state unless the WKView is added to a window
https://bugs.webkit.org/show_bug.cgi?id=82359
Reviewed by Sam Weinig.
This avoids thrashing the layer hosting state when switching tabs.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
2012-03-27 Carlos Garcia Campos <cgarcia@igalia.com>
Implement WebFrameNetworkingContext for soup in WebKit2
[SOUP] Implement WebFrameNetworkingContext for soup in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=82081
Reviewed by Martin Robinson.
* GNUmakefile.am: Add new files to compilation
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp: Copied from Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h.
(WebKit::WebFrameNetworkingContext::soupSession): Return the
default SoupSession.
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h.
(WebKit):
(WebFrameNetworkingContext):
(WebKit::WebFrameNetworkingContext::create): Create a new
WebFrameNetworkingContext().
(WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
2012-03-27 Yael Aharon <yael.aharon@nokia.com>
[Qt][WK2] Merge setVisibleContentsRect with setFixedVisibleContentRect
https://bugs.webkit.org/show_bug.cgi?id=82289
Reviewed by Kenneth Rohde Christiansen.
As we scroll, we constantly send 2 messages. Those 2 messages can be merged into one.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::_q_contentViewportChanged):
* UIProcess/WebPageProxy.cpp:
(WebKit):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::setVisibleContentsRect):
2012-03-27 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Implement missing methods in CookieJarSoup
https://bugs.webkit.org/show_bug.cgi?id=82082
Reviewed by Martin Robinson.
* WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Use
soupCookieJar() instead of defaultCookieJar().
(WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): Ditto.
2012-03-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add method webkit_web_resource_get_data() to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=79667
Reviewed by Gustavo Noronha Silva.
* UIProcess/API/gtk/WebKitWebResource.cpp:
(webkitWebResourceCreate): Add isMainResource parameter indication
whether the resource is the main one of the frame.
(resourceDataCallback): C API callback called when resource data
is available.
(webkit_web_resource_get_data): Asynchronously get the raw data of
the resource.
(webkit_web_resource_get_data_finish): Finish asynchronous
operation started by webkit_web_resource_get_data().
* UIProcess/API/gtk/WebKitWebResource.h:
* UIProcess/API/gtk/WebKitWebResourcePrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewResourceLoadStarted): Pass isMainResource parameter
to webkitWebResourceCreate().
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/tests/TestResources.cpp:
(testWebResourceGetData):
(serverCallback):
(beforeAll):
2012-03-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add resources API to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=79477
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitResourceLoadClient.cpp: Added.
(didInitiateLoadForResource): Call
webkitWebViewResourceLoadStarted() so that view will create the
resource and emit WebKitWebView::resource-load-started.
(didSendRequestForResource): Call webkitWebResourceSentRequest()
with the given request and response.
(didReceiveResponseForResource): Call
webkitWebResourceSetResponse() with the given response.
(didReceiveContentLengthForResource): Call
webkitWebResourceNotifyProgress().
(didFinishLoadForResource): Call webkitWebResourceFinished().
(didFailLoadForResource): Create a GError for the given WKError
and call webkitWebResourceFailed().
(attachResourceLoadClientToView): Add callbacks for the
WKPageResourceLoadClient.
* UIProcess/API/gtk/WebKitResourceLoadClient.h: Added.
* UIProcess/API/gtk/WebKitWebResource.cpp: Added.
(webkitWebResourceGetProperty):
(webkit_web_resource_init):
(webkit_web_resource_class_init):
(webkitWebResourceUpdateURI): Update the active URI every time a
new request is sent to the server.
(webkitWebResourceCreate): Create a WebResource for the given
frame.
(webkitWebResourceSentRequest): Update uri and emit
WebKitWebResource::sent-request.
(webkitWebResourceSetResponse): Set the response property.
(webkitWebResourceNotifyProgress): Emit
WebKitWebResource::received-data.
(webkitWebResourceFinished): Emit WebKitWebResource::finished.
(webkitWebResourceFailed): Emit WebKitWebResource::failed and then
WebKitWebResource::finished.
(webkit_web_resource_get_uri): Return the currentr active URI.
(webkit_web_resource_get_response): Return the response received
from the server.
* UIProcess/API/gtk/WebKitWebResource.h: Added.
* UIProcess/API/gtk/WebKitWebResourcePrivate.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed): Attach the resource load client to the
view.
(webkit_web_view_class_init): Add
WebKitWebView::resource-load-started signal.
(webkitWebViewLoadChanged): Clear loading resources map when a new
load starts and loaded resources map when the new load has been
committed.
(webkitWebViewResourceLoadStarted): Create a resource for the
given identifier, add it to the loading resources map and emit
WebKitWebView::resource-load-started signal.
(webkitWebViewGetLoadingWebResource): Return the resource that is
being loaded corresponding to the given identifier.
(webkitWebViewRemoveLoadingWebResource): Remove the resouurce
corresponfing to the given identifier from the loading resources
map.
(webkitWebViewResourceLoadFinished): Move the resource from the
loading resources map to the loaded resources map.
(webkit_web_view_get_main_resource): Return the main resource.
(webkit_web_view_get_subresources): Return the list of
subresources.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
WebKitWebResource.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_web_resource_get_type.
* UIProcess/API/gtk/tests/GNUmakefile.am: Add new test for resources.
* UIProcess/API/gtk/tests/TestDownloads.cpp:
(testDownloadLocalFile): Use getWebKit1TestResoucesDir() from Test.
(testDownloadLocalFileError): Ditto.
(serverCallback): Ditto.
* UIProcess/API/gtk/tests/TestMain.h:
(Test::getWebKit1TestResoucesDir): Moed from TestDownloads so that
it can be used by other tests.
(Test): Add information about leaked objects.
* UIProcess/API/gtk/tests/TestResources.cpp: Added.
(testWebViewResources):
(testWebResourceLoading):
(testWebResourceResponse):
(testWebResourceActiveURI):
(addCacheHTTPHeadersToResponse):
(serverCallback):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/webkit2.h: Include WebKitWebResource.h
* UIProcess/API/gtk/webkit2marshal.list:
2012-03-26 Pratik Solanki <psolanki@apple.com>
Fix typo in method name - WebCore::miminumValueForLength should be WebCore::minimumValueForLength
https://bugs.webkit.org/show_bug.cgi?id=82254
Reviewed by Benjamin Poulain.
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):
2012-03-26 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][WK2] Support multi-file upload
https://bugs.webkit.org/show_bug.cgi?id=81589
Reviewed by Simon Hausmann.
Added 'allowMutipleFiles' property to filePicker context property to indicate whether to allow
multiple file selections.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::chooseFiles):
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_multiFileUpload.qml: Added.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_singleFileUpload.qml:
* UIProcess/API/qt/tests/qmltests/common/multifileupload.html: Added.
* UIProcess/API/qt/tests/qmltests/common/singlefileupload.html:
* UIProcess/API/qt/tests/qmltests/common/titleupdate.js: Added.
(updateTitle):
* UIProcess/qt/QtDialogRunner.cpp:
(FilePickerContextObject):
(FilePickerContextObject::FilePickerContextObject):
(FilePickerContextObject::allowMultipleFiles):
(FilePickerContextObject::accept):
(QtDialogRunner::initForFilePicker):
* UIProcess/qt/QtDialogRunner.h:
(QtDialogRunner):
2012-03-26 Adam Barth <abarth@webkit.org>
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-26 Anders Carlsson <andersca@apple.com>
Never remove root compositing layers in the web process
https://bugs.webkit.org/show_bug.cgi?id=82255
<rdar://problem/11058521>
Reviewed by Sam Weinig.
Since we never leave accelerated compositing mode when using tiled drawing, we should
never remove root compositing layers in the web process.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2012-03-26 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt][WK2] default families are not set in QWebPreferences
https://bugs.webkit.org/show_bug.cgi?id=81933
This is a build-fix after r112116.
Reviewed by Tor Arne Vestbø.
* UIProcess/API/qt/qwebpreferences_p_p.h:
2012-03-26 Pierre Rossi <pierre.rossi@nokia.com>
[Qt][WK2] default families are not set in QWebPreferences
https://bugs.webkit.org/show_bug.cgi?id=81933
This would result in an attempt to create FontPlatformData
with the -webkit- prefixed family name.
Logic adapted from QWebSettings.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qwebpreferences.cpp:
(QWebPreferencesPrivate::createPreferences):
(QWebPreferencesPrivate::initFontDefaults):
* UIProcess/API/qt/qwebpreferences_p_p.h:
2012-03-26 Dinu Jacob <dinu.jacob@nokia.com>
[Qt WK2] Disable/enable mouse events when displaying dialogs only for desktop view
https://bugs.webkit.org/show_bug.cgi?id=80542
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewLegacyPrivate::enableMouseEvents):
(QQuickWebViewLegacyPrivate::disableMouseEvents):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::enableMouseEvents):
(QQuickWebViewPrivate::disableMouseEvents):
(QQuickWebViewLegacyPrivate):
2012-03-26 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Make sure that purged directly composited images are re-created before a layer's sync.
https://bugs.webkit.org/show_bug.cgi?id=81771
Reviewed by Noam Rosenthal.
This fixes a regression in tst_qquickwebview introduced by r111567.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::updateContentBuffers):
2012-03-26 Simon Hausmann <simon.hausmann@nokia.com>
[WK2][Qt] Fix compilation without QtWidgets
https://bugs.webkit.org/show_bug.cgi?id=79458
Reviewed by Tor Arne Vestbø.
* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::WebEventFactory::createWebWheelEvent): Replace use of QApplication::wheelScrollLines()
with the constant that is actually used and usually not changed anyway.
* Target.pri: Remove widgets from Qt variable.
* UIProcess/qt/QtWebPageEventHandler.cpp: Remove unecessary include.
* WebProcess.pro: Use widgets for the process (for the time being).
* WebProcess/qt/WebProcessMainQt.cpp: Delegate QApplication creation to the caller.
(WebKit::WebProcessMainQt):
* qt/MainQt.cpp: Create QApplication here.
(WebKit):
(main):
2012-03-26 Andras Becsi <andras.becsi@nokia.com>
Be more careful with git gui usage
Unreviewed typo fix.
* UIProcess/qt/QtViewportInteractionEngine.cpp: Remove additional line committed by accident.
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):
2012-03-26 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Taps are sometimes not highlighted.
https://bugs.webkit.org/show_bug.cgi?id=82188
Reviewed by Kenneth Rohde Christiansen.
Highlight any focusable parent element, or if none is found at least
the element returned by bestClickableNodeForTouchPoint.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::highlightPotentialActivation):
2012-03-26 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r111993.
http://trac.webkit.org/changeset/111993
https://bugs.webkit.org/show_bug.cgi?id=82184
It broke layout and API tests and made WTR crash (Requested by
Ossy on #webkit).
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::isViewWindowActive):
2012-03-25 Hayato Ito <hayato@chromium.org>
[Shadow DOM] Add Reified DOM Tree traversal internal APIs.
https://bugs.webkit.org/show_bug.cgi?id=79197
Reviewed by Dimitri Glazkov.
Add internal APIs which can be used to traverse Reified DOM tree, which is
a result of node distribution algorithm explained in Shadow DOM spec.
https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
Every public functions defined in ReifiedTreeTraversal are static
functions and are named in a similar way to ones defined in WebCore::Node class.
The only difference is that ReifiedTreeTraversal APIs consider shadow
hosts and also traverse nodes is Shadow DOM subtrees, crossing shadow's upper and lower boundary
transparently.
There is no actual client which uses these APIs. Follow-up patches for FocusNavigation
and EventDispatcher will use the APIs so that they can traverse node in reified tree order.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-03-25 Alexander Færøy <alexander.faeroy@nokia.com>
Unreviewed build fix for QtWebKit on Mac OS X.
* UIProcess/API/qt/tests/bytearraytestdata.cpp:
(ByteArrayTestData::~ByteArrayTestData):
* UIProcess/API/qt/tests/bytearraytestdata.h:
2012-03-24 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Implement PageClient::isViewWindowActive()
https://bugs.webkit.org/show_bug.cgi?id=81143
Reviewed by Kenneth Rohde Christiansen.
This patch implements PageClient::isViewWindowActive()
now that QQuickCanvas::isActive() is available (from QWindow).
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::isViewWindowActive):
2012-03-23 Alexey Proskuryakov <ap@apple.com>
[Mac] No need for platform-specific ENABLE_BLOB values
https://bugs.webkit.org/show_bug.cgi?id=82102
Reviewed by David Kilzer.
* Configurations/FeatureDefines.xcconfig:
2012-03-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r108851.
http://trac.webkit.org/changeset/108851
https://bugs.webkit.org/show_bug.cgi?id=82098
"Revert the addition of unnecessary, deprecated functions in
WKPreferences.h" (Requested by estes on #webkit).
* UIProcess/API/C/WKPreferences.cpp:
* UIProcess/API/C/WKPreferences.h:
2012-03-23 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed build fix.
* win/WebKit2CFLite.def: Add missing export symbols so that other
tools can link properly.
2012-03-23 Dean Jackson <dino@apple.com>
Disable CSS_SHADERS in Apple builds
https://bugs.webkit.org/show_bug.cgi?id=81996
Reviewed by Simon Fraser.
Remove ENABLE_CSS_SHADERS from FeatureDefines. It's now in Platform.h.
* Configurations/FeatureDefines.xcconfig:
2012-03-23 Dave Michael <dmichael@chromium.org>
Relanding(r111754): HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
https://bugs.webkit.org/show_bug.cgi?id=80428
Reviewed by Eric Seidel and Ryosuke Niwa.
* win/WebKit2.def: Export a symbol for InspectorCounters::counterValue
* win/WebKit2CFLite.def: Export a symbol for InspectorCounters::counterValue
2012-03-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r111855.
http://trac.webkit.org/changeset/111855
https://bugs.webkit.org/show_bug.cgi?id=82053
It broke 30+ tests (Requested by Ossy on #webkit).
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::isViewWindowActive):
2012-03-23 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Implement PageClient::isViewWindowActive()
https://bugs.webkit.org/show_bug.cgi?id=81143
Reviewed by Kenneth Rohde Christiansen.
This patch implements PageClient::isViewWindowActive()
now that QQuickCanvas::isActive() is available (from QWindow).
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::isViewWindowActive):
2012-03-23 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Disable the flickable when pinching.
Reviewed by Kenneth Rohde Christiansen.
Set the interactivity of the internal flickable to false
when pinching so that it does not react to mouse events
which might break pinch zoom.
This is a temporal workaround and needed until the event
propagation in QtQuick is fixed.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):
2012-03-23 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r111754): plugins/reloadplugins-and-pages.html fails on all platforms
https://bugs.webkit.org/show_bug.cgi?id=82035
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-03-22 Anders Carlsson <andersca@apple.com>
Remove the Flash NPRuntime short-circuit hacks
https://bugs.webkit.org/show_bug.cgi?id=81997
<rdar://problem/10409289>
Reviewed by Sam Weinig.
This code was added to help speed up Flash plug-in instantiation by reducing the number of
synchronous API calls from the plug-in process to the web process during instantiation.
However, there was no real indication that this actually improved performance.
Furthermore, it seems to have introduced crashers when misbehaving plug-ins would make NPRuntime calls
after a plug-in had been destroyed. Since Flash is now 64-bit like the rest of WebKit launch time has
improved since we don't have to bring in all of the 32-bit system frameworks, so the time has come to
rip out this egregious hack.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::evaluate):
* PluginProcess/PluginControllerProxy.h:
(PluginControllerProxy):
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::determineQuirks):
* Shared/Plugins/PluginQuirks.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_Invoke):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
(NetscapePlugin):
* WebProcess/Plugins/Plugin.cpp:
(WebKit::Plugin::Parameters::encode):
(WebKit::Plugin::Parameters::decode):
* WebProcess/Plugins/Plugin.h:
(Parameters):
* WebProcess/Plugins/PluginController.h:
(PluginController):
* WebProcess/Plugins/PluginView.cpp:
* WebProcess/Plugins/PluginView.h:
(PluginView):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createPlugin):
2012-03-22 Raphael Kubo da Costa <rakuco@FreeBSD.org>
[CMake] Unreviewed build fix after r111778.
* CMakeLists.txt: Replace ${JAVASCRIPTCORE_DIR}/wtf includes with
${WTF_DIR}/wtf ones.
2012-03-22 Csaba Osztrogonác <ossy@webkit.org>
Actually move WTF files to their new home
https://bugs.webkit.org/show_bug.cgi?id=81844
[Qt] Unreviewed buildfix after r111778.
* UIProcess/API/qt/qquicknetworkrequest_p.h:
* WebKit2.pri:
2012-03-22 Dave Michael <dmichael@chromium.org>
HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
https://bugs.webkit.org/show_bug.cgi?id=80428
Reviewed by Eric Seidel.
Test: plugins/netscape-dom-access-and-reload.html
* win/WebKit2.def: Export a symbol for InspectorCounters::counterValue
* win/WebKit2CFLite.def: Export a symbol for InspectorCounters::counterValue
2012-03-22 Pierre Rossi <pierre.rossi@gmail.com>
Revert back the device DPI to 160.
This corresponds to a device pixel ratio of 1, which
is nicer on the eye in many cases.
Rubber-stamped by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::computeViewportConstraints):
2012-03-22 Alexander Færøy <alexander.faeroy@nokia.com>
[Qt][WK2] Remember to initialize databaseQuotaDialog
https://bugs.webkit.org/show_bug.cgi?id=81942
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
2012-03-22 Alexander Færøy <alexander.faeroy@nokia.com>
[Qt][WK2] Pass Origin information to the DatabaseQuotaDialogContextObject
https://bugs.webkit.org/show_bug.cgi?id=81910
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::exceededDatabaseQuota):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/qt/QtDialogRunner.cpp:
(DatabaseQuotaDialogContextObject):
(DatabaseQuotaDialogContextObject::DatabaseQuotaDialogContextObject):
(DatabaseQuotaDialogContextObject::securityOrigin):
(QtDialogRunner::initForDatabaseQuotaDialog):
* UIProcess/qt/QtDialogRunner.h:
(QtDialogRunner):
* UIProcess/qt/QtWebPageUIClient.cpp:
(QtWebPageUIClient::exceededDatabaseQuota):
* UIProcess/qt/QtWebPageUIClient.h:
2012-03-22 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Don't resume the suspended page if the user is continuously flicking.
https://bugs.webkit.org/show_bug.cgi?id=81895
Reviewed by Kenneth Rohde Christiansen.
Create an additional suspend deferrer between TouchBegin and TouchEnd to
relay with the one kept while the flick animation is running.
This allows the page to be suspended when a pan gesture starts and stay
that way until the last flick animation ends.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::touchBegin):
(WebKit):
(WebKit::QtViewportInteractionEngine::touchEnd):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::doneWithTouchEvent):
2012-03-22 Carlos Garcia Campos <cgarcia@bb-webkit-rel-64.local.igalia.com>
[GTK] Use the angle-bracket form to include wtf headers
https://bugs.webkit.org/show_bug.cgi?id=81884
Reviewed by Eric Seidel.
Use #include <wtf/foo> instead of #include <JavaScriptCore/foo>.
* UIProcess/API/gtk/tests/TestMain.h:
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
2012-03-22 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] The background appears to have one extra pixel from the contents
https://bugs.webkit.org/show_bug.cgi?id=81830
Reviewed by Kenneth Rohde Christiansen.
The clip-polygon from the scenegraph uses floats, not integers.
This could cause 1-offset clipping problems in some cases.
* UIProcess/qt/QtWebPageSGNode.cpp:
(WebKit::ContentsSGNode::clipRect):
2012-03-21 Alexander Færøy <alexander.faeroy@nokia.com>
[Qt][WK2] Add QML API for handling database quotas
https://bugs.webkit.org/show_bug.cgi?id=81827
Reviewed by Simon Hausmann.
Patch by Pierre Rossi and Alexander Færøy.
This patch adds a QML API for handling database quotas.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::exceededDatabaseQuota):
(QQuickWebViewExperimental::databaseQuotaDialog):
(QQuickWebViewExperimental::setDatabaseQuotaDialog):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/qt/QtDialogRunner.cpp:
(DatabaseQuotaDialogContextObject):
(DatabaseQuotaDialogContextObject::DatabaseQuotaDialogContextObject):
(DatabaseQuotaDialogContextObject::databaseName):
(DatabaseQuotaDialogContextObject::displayName):
(DatabaseQuotaDialogContextObject::currentQuota):
(DatabaseQuotaDialogContextObject::currentOriginUsage):
(DatabaseQuotaDialogContextObject::currentDatabaseUsage):
(DatabaseQuotaDialogContextObject::expectedUsage):
(DatabaseQuotaDialogContextObject::accept):
(DatabaseQuotaDialogContextObject::reject):
(QtDialogRunner::initForDatabaseQuotaDialog):
* UIProcess/qt/QtDialogRunner.h:
(QtDialogRunner):
(QtDialogRunner::databaseQuota):
(QtDialogRunner::onDatabaseQuotaAccepted):
* UIProcess/qt/QtWebPageUIClient.cpp:
(QtWebPageUIClient::QtWebPageUIClient):
(QtWebPageUIClient::exceededDatabaseQuota):
* UIProcess/qt/QtWebPageUIClient.h:
* UIProcess/qt/WebContextQt.cpp:
(WebKit::WebContext::platformDefaultDatabaseDirectory):
2012-03-21 Tim Horton <timothy_horton@apple.com>
Make use of CG rounded-rect primitives
https://bugs.webkit.org/show_bug.cgi?id=79932
<rdar://problem/9274953>
Reviewed by Simon Fraser.
Portions of patch by Nikolas Zimmermann and Mustafizur Rahaman.
Add wkCGPathAddRoundedRect.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2012-03-21 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] WebGraphicsLayer: Untie the layer updates and tile updates.
https://bugs.webkit.org/show_bug.cgi?id=81771
Reviewed by Kenneth Rohde Christiansen.
The DidRenderFrame message needs to be sent for every UpdateTileForLayer
message, but this currently has to be triggered by m_shouldSyncFrame which
is only set after sending a SyncCompositingLayerState message.
This patch makes sure that tile updates won't trigger sending the whole
layer info if it didn't change, and send the DidRenderFrame message directly.
It also makes sure that the layer info is sent before any tile update so that
the layer can be created on the UI process before any tile update is handled.
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::getBackingStore):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::tiledBackingStorePaint):
(WebCore::WebGraphicsLayer::createTile):
(WebCore::WebGraphicsLayer::updateTile):
(WebCore::WebGraphicsLayer::removeTile):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::createTile):
(WebKit::LayerTreeHostQt::updateTile):
(WebKit::LayerTreeHostQt::removeTile):
2012-03-21 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Don't clip the contents rendering to the contents size.
https://bugs.webkit.org/show_bug.cgi?id=81770
Reviewed by Kenneth Rohde Christiansen.
The original bug was caused by the contents size updates
having to go through the UI process before being applied
on the TiledBackingStore of the non composited contents layer.
With this bug being fixed, the clipping isn't necessary anymore.
* UIProcess/qt/LayerBackingStore.cpp:
(WebKit::LayerBackingStore::paintToTextureMapper):
2012-03-21 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Apply tile removals at the same time as update buffer swaps.
https://bugs.webkit.org/show_bug.cgi?id=81768
Reviewed by Kenneth Rohde Christiansen.
When committing the scale, we have to remove old tiles once the
tiles for the new scale are rendered. This should however wait
until those tiles gets their buffer swapped (following the DidRenderFrame
message) to make sure that there is no rendered gap between the removals
and updates swap.
This patch continues rendering the removed tiles until the DidRenderFrame
message is received to discard the old contents and show the new contents
at the same frame.
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::commitTileUpdates):
(WebKit::WebLayerTreeRenderer::flushLayerChanges):
* UIProcess/WebLayerTreeRenderer.h:
(WebLayerTreeRenderer):
* UIProcess/qt/LayerBackingStore.cpp:
(WebKit::LayerBackingStore::removeTile):
(WebKit::LayerBackingStore::commitTileUpdates):
* UIProcess/qt/LayerBackingStore.h:
(LayerBackingStore):
2012-03-21 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Trigger scene graph repaints only for relevant layer updates.
https://bugs.webkit.org/show_bug.cgi?id=81765
Reviewed by Kenneth Rohde Christiansen.
Tile updates and removal shouldn't re-render the scene all by themselves
since they need a buffer swap before having any effect on the framebuffer.
* UIProcess/LayerTreeHostProxy.cpp:
(WebKit::LayerTreeHostProxy::dispatchUpdate):
(WebKit::LayerTreeHostProxy::deleteCompositingLayer):
(WebKit::LayerTreeHostProxy::setRootCompositingLayer):
(WebKit::LayerTreeHostProxy::didRenderFrame):
2012-03-21 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Don't go through the UI process to update a layer's contents size.
https://bugs.webkit.org/show_bug.cgi?id=81764
Reviewed by Kenneth Rohde Christiansen.
It's happening when navigating pages that contents from the old page
is still present on the tiles until the contents size is shrunk to cut it out.
Since the contents size updates are asynchronous and go through the UI process,
this could occasionally show some glitch frames.
Even worse, the user could delay this update by starting to pan and keep
his finger on the screen.
This patch makes sure that changes to contents size are notifying the LayerTreeHost
immediately when in fixed layout mode, and remove the loop through the UI process.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::setContentsSize):
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::didRelaunchProcess):
(QQuickWebViewLegacyPrivate::updateViewportSize):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):
* WebProcess/WebPage/DrawingArea.h:
(WebKit):
(WebKit::DrawingArea::layerTreeHost):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::updateBackingStoreState):
* WebProcess/WebPage/DrawingAreaImpl.h:
(WebKit::DrawingAreaImpl::layerTreeHost):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::sizeDidChange):
2012-03-21 Kenneth Rohde Christiansen <kenneth@webkit.org>
The activation highlight does not always hide
https://bugs.webkit.org/show_bug.cgi?id=81767
Reviewed by Simon Hausmann.
The zero point used for hiding potential activations should
not be transformed.
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handlePotentialSingleTapEvent):
2012-03-21 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][WK2] Item cannot be selected from select list in touch webview
https://bugs.webkit.org/show_bug.cgi?id=81674
Reviewed by Simon Hausmann.
Activate flag to prevent QQuickWebView from accepting touch event when select
dialog is being displayed.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::execDialogRunner):
(QQuickWebView::touchEvent):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::setDialogActive):
(QQuickWebViewPrivate):
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
(WebKit::WebPopupMenuProxyQt::showPopupMenu):
(WebKit::WebPopupMenuProxyQt::hidePopupMenu):
2012-03-21 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Remove the PostTransitionState
https://bugs.webkit.org/show_bug.cgi?id=81751
Reviewed by Simon Hausmann.
As we are handling content size change event etc from the
WebProcess, that conflicts with the PostTransitionState handling
and we therefore need to handle this slightly differently.
Remove the code and make sure that we never resize the tiled
area to something smaller than the layout viewport.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
(QQuickWebViewFlickablePrivate::loadDidCommit):
(QQuickWebViewFlickablePrivate::didFinishFirstNonEmptyLayout):
(QQuickWebViewFlickablePrivate::didChangeViewportProperties):
(QQuickWebViewFlickablePrivate::_q_resume):
(QQuickWebViewFlickablePrivate::pageDidRequestScroll):
(QQuickWebViewFlickablePrivate::didChangeContentsSize):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewFlickablePrivate):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::applyConstraints):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::resizeToContentsIfNeeded):
2012-03-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add webkit_web_view_run_javascript() to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=75543
Reviewed by Martin Robinson.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitError.cpp:
(webkit_javascript_error_quark): Add new error domain for
Javascript errors.
* UIProcess/API/gtk/WebKitError.h:
* UIProcess/API/gtk/WebKitJavascriptResult.cpp: Added.
(webkitJavascriptResultCreate): Create a WebKitJavascriptResult
for the given WKSerializedScriptValueRef.
(webkit_javascript_result_ref): Increment reference count of
WebKitJavascriptResult.
(webkit_javascript_result_unref): Decrement reference count of
WebKitJavascriptResult.
(webkit_javascript_result_get_global_context): Get global
javascript context of the result.
(webkit_javascript_result_get_value): Get the JSValueRef of the
result.
* UIProcess/API/gtk/WebKitJavascriptResult.h: Added.
* UIProcess/API/gtk/WebKitJavascriptResultPrivate.h: Added.
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewFinalize): Release the global javascript context.
(webkit_web_view_get_javascript_global_context): Get or create the
global javascript context.
(webkitWebViewRunJavaScriptCallback): Callback called by C API when
javascript execution finishes.
(webkit_web_view_run_javascript): Asynchronously run a given
javascript.
(webkit_web_view_run_javascript_finish): Finish async operation
started by webkit_web_view_run_javascript().
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_javascript_result_get_type().
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewRunJavaScript):
(beforeAll):
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::WebViewTest):
(WebViewTest::~WebViewTest):
(runJavaScriptReadyCallback):
(WebViewTest::runJavaScriptAndWaitUntilFinished):
(jsValueToCString):
(WebViewTest::javascriptResultToCString):
(WebViewTest::javascriptResultToNumber):
(WebViewTest::javascriptResultToBoolean):
(WebViewTest::javascriptResultIsNull):
(WebViewTest::javascriptResultIsUndefined):
* UIProcess/API/gtk/tests/WebViewTest.h:
* UIProcess/API/gtk/webkit2.h:
2012-03-20 Eric Seidel <eric@webkit.org>
Move wtf/Platform.h from JavaScriptCore to Source/WTF/wtf
https://bugs.webkit.org/show_bug.cgi?id=80911
Reviewed by Adam Barth.
Update to not depend on "Foo.h" includes for WTF headers.
* Shared/qt/QtNetworkReplyData.h:
* Shared/qt/QtNetworkRequestData.cpp:
* Shared/qt/QtNetworkRequestData.h:
2012-03-20 Anders Carlsson <andersca@apple.com>
REGRESSION (r110780): Loading a PDF always makes the WKView layer backed
https://bugs.webkit.org/show_bug.cgi?id=81734
<rdar://problem/11088172>
Reviewed by Adele Peterson.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setPageHasCustomRepresentation:]):
Don't call -[NSView setWantsLayer:], the web process already takes care of entering and exiting
accelerated compositing mode for us.
2012-03-20 Jon Lee <jonlee@apple.com>
Restrict access to notifications for unique origins and file URLs with no local file access
https://bugs.webkit.org/show_bug.cgi?id=79704
<rdar://problem/10912430>
Reviewed by Adam Barth.
In the specific case where a file URL has restricted file access and is denied universal access,
SecurityOrigin::canShowNotifications() returns Ask, since it is not considered a unique origin.
The cached table of permissions held by the notification manager will typically not have an entry for
the toString() representation of these file URLs, which is "null", since that can also cover unique
origins, and it is possible that the client will want different permissions between the two types.
It is reasonable, however, for there to be an entry for "file://", so we use toRawString() to do the lookup.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::policyForOrigin):
2012-03-20 Alexey Proskuryakov <ap@apple.com>
Address review comment for WebProcess side, too.
* WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): There is no need for
path to be in static storage, setenv will copy the value.
2012-03-20 Alexey Proskuryakov <ap@apple.com>
Sandboxed PluginProcess should use private temporary and cache directories
https://bugs.webkit.org/show_bug.cgi?id=81702
<rdar://problem/10792047>
Reviewed by Anders Carlsson.
* Platform/Module.h:
* Platform/mac/ModuleMac.mm:
(WebKit::Module::bundleIdentifier):
Expose plug-in's bundle identifier.
* PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.in: Some unerlated fixes to make
networking functional on my testing platforms. These serveices are already allowed for
WebProcess.
* WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
(readSandboxProfile): Unrelated fix - I've been made to rename the profile file, but
didn't update where it's read from!
(WKN_EnterSandbox): Add a suffix to user directories.
2012-03-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r111445 and r111446.
http://trac.webkit.org/changeset/111445
http://trac.webkit.org/changeset/111446
https://bugs.webkit.org/show_bug.cgi?id=81708
It broke Qt and GTK build intentionally (Requested by Ossy on
#webkit).
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::policyForOrigin):
2012-03-20 Jon Lee <jonlee@apple.com>
Restrict access to notifications for unique origins and file URLs with no local file access
https://bugs.webkit.org/show_bug.cgi?id=79704
<rdar://problem/10912430>
Reviewed by Adam Barth.
In the specific case where a file URL has restricted file access and is denied universal access,
SecurityOrigin::canShowNotifications() returns Ask, since it is not considered a unique origin.
The cached table of permissions held by the notification manager will typically not have an entry for
the toString() representation of these file URLs, which is "null", since that can also cover unique
origins, and it is possible that the client will want different permissions between the two types.
It is reasonable, however, for there to be an entry for "file://", so we use toRawString() to do the lookup.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::policyForOrigin):
2012-03-20 Alexey Proskuryakov <ap@apple.com>
WebProcess should use private temporary and cache directories
https://bugs.webkit.org/show_bug.cgi?id=80876
Reviewed by Sam Weinig.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters):
* UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess):
Always pass uiProcessBundleIdentifier to WebProcess on Mac, it's now used for more than
CFURL sessions.
* WebProcess/com.apple.WebProcess.sb.in: Limit old workaround to platforms that need it.
* WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): Tell confstr to use a suffix
on user directories.
2012-03-20 Anders Carlsson <andersca@apple.com>
Graphic distortion effect when launching with empty page Safari after reset
https://bugs.webkit.org/show_bug.cgi?id=81677
<rdar://problem/11065904>
Reviewed by Sam Weinig.
Don't set the redraw policy to never, since that was causing the WKView layer to never be updated. Instead,
let AppKit decide which redraw policy to use.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Convert hasSpellingMarker to use Internals interface.
https://bugs.webkit.org/show_bug.cgi?id=81300
Reviewed by Ryosuke Niwa.
* win/WebKit2.def: Export a symbol for hasSpellingMarker.
2012-03-20 Antaryami Pandia <antaryami.pandia@motorola.com>
[GTK] [WK2] Add javascript clipboard functionality settings to WebKit2 GTK+ API.
https://bugs.webkit.org/show_bug.cgi?id=80981
Reviewed by Martin Robinson.
Add WebSettings to enable/disable javascript clipboard functionality.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_javascript_can_access_clipboard):
(webkit_settings_set_javascript_can_access_clipboard):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings):
2012-03-19 Adam Barth <abarth@webkit.org>
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-19 Gustavo Noronha Silva <gns@gnome.org>
[GTK] libWebCore.la has become too big for make
https://bugs.webkit.org/show_bug.cgi?id=81582
Unreviewed build fix.
* GNUmakefile.am: link-in the new libWebCoreModules.la
2012-03-19 Sam Weinig <sam@webkit.org>
Stop messing with the AppKit grow box on platforms that don't support it
<rdar://problem/10752048>
https://bugs.webkit.org/show_bug.cgi?id=81614
Reviewed by Dan Bernstein.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewWillMoveToWindow:]):
(-[WKView _didChangeScrollbarsForMainFrame]):
Snow Leopard was the last Mac OS to need a grow box.
2012-03-19 Enrica Casucci <enrica@apple.com>
WebKit2: create sandbox extensions for files that are dropped in an input control.
https://bugs.webkit.org/show_bug.cgi?id=81153
<rdar://problem/11031207>
Reviewed by Alexey Proskuryakov.
Now the pasteboard access is performed only in the UI process, it is
necessary to create sandbox extensions for each file that is dropped into
an input type=file element. The extensions are created at the time the files
are dropped and consumed immediately.
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction): Added template that takes 8 arguments.
* Shared/SandboxExtension.h:
(HandleArray): Added new class to handle an array of sandbox extension handles.
(WebKit::SandboxExtension::HandleArray::HandleArray):
(WebKit::SandboxExtension::HandleArray::~HandleArray):
(WebKit::SandboxExtension::HandleArray::resize):
(WebKit::SandboxExtension::HandleArray::operator[]):
(WebKit::SandboxExtension::HandleArray::size):
(WebKit::SandboxExtension::HandleArray::encode):
(WebKit::SandboxExtension::HandleArray::decode):
* Shared/mac/SandboxExtensionMac.mm: Added new class implementation.
(WebKit::SandboxExtension::HandleArray::HandleArray):
(WebKit::SandboxExtension::HandleArray::~HandleArray):
(WebKit::SandboxExtension::HandleArray::resize):
(WebKit::SandboxExtension::HandleArray::operator[]):
(WebKit::SandboxExtension::HandleArray::size):
(WebKit::SandboxExtension::HandleArray::encode):
(WebKit::SandboxExtension::HandleArray::decode):
* UIProcess/API/mac/WKView.mm:
(createSandboxExtensionsForFileUpload):
(-[WKView performDragOperation:]): Added logic to create the sandbox extensions for each
file/directory being dropped.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dragEntered):
(WebKit::WebPageProxy::dragUpdated):
(WebKit::WebPageProxy::dragExited):
(WebKit::WebPageProxy::performDrag):
(WebKit::WebPageProxy::performDragControllerAction): Added the handle array parameter.
* UIProcess/WebPageProxy.h:
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleDropEvent):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::Drop):
* WebProcess/WebCoreSupport/WebDragClient.cpp:
(WebKit::WebDragClient::willPerformDragDestinationAction): Added handling of the new DragActionUpload.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getPathnamesForType): Implemented using message to the UI process.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
(WebKit::WebPage::performUploadDragDestinationAction): Added method that consumes the received extensions.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2012-03-19 Alexey Proskuryakov <ap@apple.com>
Make WebFrameLoaderClient::createFrame more like WebKit1 version.
https://bugs.webkit.org/show_bug.cgi?id=81550
Covered by existing tests.
Reviewed by Jessie Berlin.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createFrame):
2012-03-19 Anders Carlsson <andersca@apple.com>
Find in page highlights get out of place when scrolling
https://bugs.webkit.org/show_bug.cgi?id=81543
<rdar://problem/10932590>
Reviewed by Sam Weinig.
When we have a page overlay layer, always force a full repaint of it whenever the page changes.
If this turns out to be a real performance problem (measurements suggest that it isn't), we could once
again try to figure out when a full page repaint is needed. Doing so could probably be more expensive than
simply repainting the page, given that a page overlay consists of a bunch of rect-fills mostly.
Also turn on accelerated drawing for the page overlay layer, since that cut CPU usage in half when scrolling
on a page that had a find overlay visible.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
2012-03-19 Anders Carlsson <andersca@apple.com>
When Find overlay first appears and the page scrolls, the scrolling happens through a fade
https://bugs.webkit.org/show_bug.cgi?id=81539
<rdar://problem/11031093>
Reviewed by Dan Bernstein.
Disable implicit animations when adding the page overlay layer to its superlayer.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
2012-03-19 Anders Carlsson <andersca@apple.com>
Crash when closing an inspected web page with tiled drawing enabled
https://bugs.webkit.org/show_bug.cgi?id=81524
<rdar://problem/11062396>
Reviewed by Sam Weinig.
Guard against the WebPage's underlying WebCore Page being null, which can happen
when the inspector highlight overlay is uninstalled by the inspector when the inspected
page goes away.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
2012-03-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
Merge _q_commitScaleChange and _q_commitPositionChange
https://bugs.webkit.org/show_bug.cgi?id=81511
Reviewed by Simon Hausmann.
Both methods were used for notifying WebCore of the new
viewport and re-tiling. The methods are merge into
_q_contentViewportChanged.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::onComponentComplete):
(QQuickWebViewFlickablePrivate::updateViewportSize):
(QQuickWebViewFlickablePrivate::_q_contentViewportChanged):
(QQuickWebViewFlickablePrivate::_q_resume):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::_q_contentViewportChanged):
(QQuickWebViewFlickablePrivate):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
(WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
(WebKit::QtViewportInteractionEngine::wheelEvent):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
2012-03-19 Allan Sandfeld Jensen <allan.jensen@nokia.com>
Select best target for tap gesture.
https://bugs.webkit.org/show_bug.cgi?id=78801
Reviewed by Kenneth Rohde Christiansen.
Send radius to handlePotentialSingleTapEvent so it can do the same hit
detection the tap gesture later does.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handlePotentialActivation):
* UIProcess/WebPageProxy.h:
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handlePotentialSingleTapEvent):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::highlightPotentialActivation):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2012-03-19 Alexander Færøy <alexander.faeroy@nokia.com>
[Qt] Add experimental API for dynamically changing the UA string
Reviewed by Simon Hausmann.
This patch adds a new property named userAgent to the
QQuickWebViewExperimental type which allows us to dynamically change
the user agent string from the QML API.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewExperimental::userAgent):
(QQuickWebViewExperimental::setUserAgent):
* UIProcess/API/qt/qquickwebview_p.h:
2012-03-18 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Avoid usage of manual scaling in the Qt scenegraph integration
https://bugs.webkit.org/show_bug.cgi?id=81368
Reviewed by Simon Hausmann.
Moved the QtScenegraph integration classes to a separate file,
QtWebPageSGNode. The nodes created for QQuickWebPage now include
a QSGTransformNode that controls the contentsScale, a
QSGSimpleRectNode that controls the background color, and a
QSGRenderNode subclass that renders the actual contents.
* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::updatePaintNode):
* UIProcess/qt/QtWebPageSGNode.cpp: Added.
* UIProcess/qt/QtWebPageSGNode.h: Added.
2012-03-18 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt] The background is visible for tiles inside the contents area which are not ready
https://bugs.webkit.org/show_bug.cgi?id=81349
Reviewed by Simon Hausmann.
Split PageProxyNode to BackgroundSGNode and ContentsSGNode.
BackgroundSGNode paints a solid background, either white or transparent
(depending on drawsTransparentBackground flag).
* UIProcess/API/qt/qquickwebpage.cpp:
(ContentsSGNode):
(ContentsSGNode::ContentsSGNode):
(ContentsSGNode::changedStates):
(ContentsSGNode::~ContentsSGNode):
(BackgroundSGNode):
(BackgroundSGNode::BackgroundSGNode):
(BackgroundSGNode::contentsNode):
(QQuickWebPage::updatePaintNode):
2012-03-17 Joe Thomas <joethomas@motorola.com>
move calc*Value functions out from Length (and platform)
https://bugs.webkit.org/show_bug.cgi?id=80897
Moving the Length calc*Value functions out from Length structure and also from /WebCore/platform/ folder.
This helps to avoid the layering violation while length calculation. Otherwise layer violation can be avoided only by adding a virtual interface(bug 27160).
Reviewed by Antti Koivisto.
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):
2012-03-17 Dan Bernstein <mitz@apple.com>
<rdar://problem/10263562> Crash in WebCore::Range::startPosition() when dismissing the Press and Hold panel by clicking in the menu bar
https://bugs.webkit.org/show_bug.cgi?id=81454
Reviewed by Ada Chan.
When the Press and Hold panel is dismissed by clicking in the menu bar,
-insertText:replacementRange: is called with an NSRange whose location is NSNotFound - 1
(see <rdar://problem/11069374>). Trying to convert this bogus range to a WebCore Range
returns 0, which leads to the crash.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::insertText): Added a null check, to protect the code from bogus ranges.
2012-03-16 Stephanie Lewis <slewis@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=81065
<rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142
Add some string function exports to Windows so the WebKitTestRunner can use them.
Reviewed by Geoff Garen.
* win/WebKit2.def:
2012-03-16 Brady Eidson <beidson@apple.com>
<rdar://problem/11027997> and https://bugs.webkit.org/show_bug.cgi?id=81412
REGRESSION (r107435) Copy a link and paste to Mail: Nothing is pasted
Reviewed by Geoff Garen.
Add new message so the WebProcess can ask the UIProcesses pasteboard for the URL:
* UIProcess/WebContext.h:
* UIProcess/WebContext.messages.in:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::getPasteboardURL):
Use that new message to implement the pasteboard strategy:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::url):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):
2012-03-16 Alexey Proskuryakov <ap@apple.com>
ASSERTION FAILED: m_loadState == LoadStateCommitted in WebFrameProxy::didFinishLoad causing
"crashes" on Lion Intel Debug WebKit2 Tests
https://bugs.webkit.org/show_bug.cgi?id=81184
<rdar://problem/11052462>
Rubber-stamped by Anders Carlsson.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::finishedLoading):
Don't leave a lingering m_pluginView after load is finished. When plug-in data was empty,
we would create the plug-in here, but failed to finalize the load.
2012-03-08 Jer Noble <jer.noble@apple.com>
Support W3C Full Screen API proposal
https://bugs.webkit.org/show_bug.cgi?id=80660
Reviewed by Alexey Proskuryakov.
Allow full screen elements to access the keyboard.
* UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::supportsFullScreen):
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::exitFullScreenForElement):
2012-03-16 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Fix bounce-back behaviour for panning
https://bugs.webkit.org/show_bug.cgi?id=81144
Reviewed by Kenneth Rohde Christiansen.
If the pan gesture recognizer receives a touch begin event
during an ongoing kinetic scroll animation of a previous
pan gesture, the animation is stopped and the content is
immediately positioned back to valid boundaries.
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::recognize):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
(WebKit):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
2012-03-16 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][Wk2] Assertion Failure and crash on file upload
https://bugs.webkit.org/show_bug.cgi?id=80854
Reviewed by Simon Hausmann.
Crash resulted from attempting to create QFileDialog, a QtWidget based dialog from a
QGuiApplication. Replace QFileDialog with a QML implementable component.
Added a new property 'filePicker' to WebView experimental to set the QML component for
file upload triggered by an input file element.
Co-authored with Kasthuri Nallappasoundararajan <kasthuri.n-s@nokia.com>
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::chooseFiles):
(QQuickWebViewExperimental::filePicker):
(QQuickWebViewExperimental::setFilePicker):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_singleFileUpload.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/singlefileupload.html: Added.
* UIProcess/qt/QtDialogRunner.cpp:
(FilePickerContextObject):
(FilePickerContextObject::FilePickerContextObject):
(FilePickerContextObject::fileList):
(FilePickerContextObject::reject):
(FilePickerContextObject::accept):
(QtDialogRunner::initForFilePicker):
* UIProcess/qt/QtDialogRunner.h:
(QtDialogRunner):
(QtDialogRunner::filePaths):
(QtDialogRunner::onFileSelected):
2012-03-16 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][WK2] Build failure when using --no-touch-events
https://bugs.webkit.org/show_bug.cgi?id=81241
Reviewed by Simon Hausmann.
Fixed inconsistency in the use of ENABLE_TOUCH_EVENTS flag that caused build
failure when using --no-touch-events option
* UIProcess/qt/QtPageClient.h:
(QtPageClient):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handlePotentialSingleTapEvent):
* UIProcess/qt/QtWebPageEventHandler.h:
(QtWebPageEventHandler):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:
2012-03-16 Kenneth Rohde Christiansen <kenneth@webkit.org>
Merge setVisibleContentsForScaling with setVisibleContentsRectForPanning
https://bugs.webkit.org/show_bug.cgi?id=81346
Reviewed by Simon Hausmann.
This cleans up the code path and is one step on the way to avoid
calling both methods in succession, for instance after ending pinch
zoom.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewLegacyPrivate::updateViewportSize):
(QQuickWebViewFlickablePrivate::_q_commitScaleChange):
(QQuickWebViewPrivate::_q_commitPositionChange):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::setVisibleContentsRect):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeHostProxy.cpp:
(WebKit::LayerTreeHostProxy::setVisibleContentsRect):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::setVisibleContentsRect):
* UIProcess/WebLayerTreeRenderer.h:
(WebLayerTreeRenderer):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::setVisibleContentsRect):
* WebProcess/WebPage/LayerTreeHost.messages.in:
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::setVisibleContentsRect):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
2012-03-16 YoungTaeck Song <youngtaeck.song@samsung.com>
[EFL][WK2] Add ProcessLauncherEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=75464
Reviewed by Hajime Morita.
Add first version of ProcessLauncherEfl.cpp including launchProcess() and terminateProcess().
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: Added.
(WebKit::ProcessLauncher::launchProcess):
(WebKit::ProcessLauncher::terminateProcess):
(WebKit::ProcessLauncher::platformInvalidate):
2012-03-15 Anders Carlsson <andersca@apple.com>
Try to fix the Snow Leopard build.
* UIProcess/API/mac/PDFViewController.mm:
(WebKit::PDFViewController::pdfKitBundle):
2012-03-07 Jon Lee <jonlee@apple.com>
Move NotificationContents into Notification
https://bugs.webkit.org/show_bug.cgi?id=80487
<rdar://problem/10965519>
Reviewed by Jian Li.
* UIProcess/Notifications/WebNotificationManagerProxy.cpp: Remove extraneous include.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show): Refactor to use accessor methods on Notification.
2012-03-15 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build correction. WinCairo export definitions
file was not updated when the main Apple file was changed.
* win/WebKit2CFLite.def: Revise export declarations to match
new symbol names.
2012-03-15 Anders Carlsson <andersca@apple.com>
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
<rdar://problem/11050423>
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-15 David Hyatt <hyatt@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=81258
Add a preference for enabling the new multi-column layout code that will be based on regions.
Reviewed by Beth Dakin.
* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetRegionBasedColumnsEnabled):
(WKPreferencesGetRegionBasedColumnsEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2012-03-14 Anders Carlsson <andersca@apple.com>
Can't swipe to go back/forward when the current page is a PDF document
https://bugs.webkit.org/show_bug.cgi?id=81194
<rdar://problem/6954125>
Reviewed by Sam Weinig.
Override -[PDFViewScrollView scrollWheel:] and have the new implementation call
-[WKPDFView forwardScrollWheelEvent:] when the PDF is pinned to either the left or right side.
WKPDFView will then call PDFController::forwardScrollWheelEvent which checks if we can go back or forward,
and passes the event along to the WKView which ends up triggering the swiping machinery in Safari.
* UIProcess/API/mac/PDFViewController.h:
* UIProcess/API/mac/PDFViewController.mm:
(-[WKPDFView forwardScrollWheelEvent:]):
(WebKit):
(WebKit::PDFViewController::forwardScrollWheelEvent):
(WebKit::findEnclosingWKPDFView):
(WebKit::PDFViewScrollView_scrollWheel):
(WebKit::PDFViewController::pdfKitBundle):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
2012-03-15 Brady Eidson <beidson@apple.com>
<rdar://problem/11036900> and https://bugs.webkit.org/show_bug.cgi?id=81079
REGRESSION(r107844): Clipboard API only remembers most recent data set on clipboard
Reviewed by Sam Weinig.
Add the non-destructive "addTypes" to supplement the destructive "setTypes"
* UIProcess/WebContext.h:
* UIProcess/WebContext.messages.in:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::addPasteboardTypes):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::addTypes):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2012-03-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Implement unicode submenu items
https://bugs.webkit.org/show_bug.cgi?id=81117
Reviewed by Martin Robinson.
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::shouldShowUnicodeMenu): Implement
shouldShowUnicodeMenu() returning always true. When ContextMenu
API is implemented for GTK+ the UI process will decide whether to
show the unicode menu or not.
2012-03-15 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Fix bounce-back behaviour for panning
https://bugs.webkit.org/show_bug.cgi?id=81144
Reviewed by Kenneth Rohde Christiansen.
Move the content back to boundaries immediately
in response to a tap gesture during the bounce-back
animation after panning.
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::recognize):
* UIProcess/qt/QtViewportInteractionEngine.h:
Make the ensureContentWithinViewportBoundary function public.
(QtViewportInteractionEngine):
2012-03-15 Carlos Garcia Campos <cgarcia@igalia.com>
[WK2] WebPageProxy::activeURL should return unreachableURL() when it's not empty
https://bugs.webkit.org/show_bug.cgi?id=75465
Reviewed by Philippe Normand.
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::replaceContent): Return the main frame
unreachableURL if it's not empty.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::activeURL):
2012-03-14 Anders Carlsson <andersca@apple.com>
java/java-and-plugins.html test failing
https://bugs.webkit.org/show_bug.cgi?id=81188
<rdar://problem/11048657>
Reviewed by Sam Weinig.
When we're marshaling NPObjects that wrap plug-in objects, make sure to check that the
current plug-in instance is the same as the plug-in instance the object came from and don't
pass the unwrapped object ID if that is the case.
* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::remoteNPObjectID):
(WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
2012-03-14 Matt Falkenhagen <falken@chromium.org>
Allow per-script font settings to be specified in layout tests
https://bugs.webkit.org/show_bug.cgi?id=78184
Reviewed by Hajime Morita.
This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of
the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented
for Chromium so far.
* win/WebKit2.def: Added symbols.
* win/WebKit2CFLite.def: Added symbols.
2012-03-14 Michael Saboff <msaboff@apple.com>
REGRESSION(r110383): ASSERTION failures in JSCell::finishCreation causing multiple tests to "crash" on the Lion Intel Debug Bots
https://bugs.webkit.org/show_bug.cgi?id=80993
Reviewed by Mark Rowe.
Moved $(BUILT_PRODUCTS_DIR)/usr/local/include to the front of HEADER_SEARCH_PATH
to fix builds given the wtf move.
* Configurations/BaseTarget.xcconfig:
2012-03-14 Andy Estes <aestes@apple.com>
Stop shadowing the argument to drawRect: with a local variable.
Reviewed by Sam Weinig.
* UIProcess/API/mac/WKView.mm:
(-[WKView drawRect:]):
2012-03-13 Jon Lee <jonlee@apple.com>
Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
https://bugs.webkit.org/show_bug.cgi?id=80922
<rdar://problem/11035082>
Reviewed by Jian Li.
You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
new API. Therefore, APIs that are common between the two will have:
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
(WebProcessCreationParameters):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess):
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit):
(WebKit::NotificationPermissionRequestManager::startRequest):
(WebKit::NotificationPermissionRequestManager::cancelRequest):
(WebKit::NotificationPermissionRequestManager::permissionLevel):
(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit):
(WebKit::WebNotificationManager::initialize):
(WebKit::WebNotificationManager::didUpdateNotificationDecision):
(WebKit::WebNotificationManager::didRemoveNotificationDecisions):
(WebKit::WebNotificationManager::policyForOrigin):
(WebKit::WebNotificationManager::show):
(WebKit::WebNotificationManager::cancel):
(WebKit::WebNotificationManager::clearNotifications):
(WebKit::WebNotificationManager::didDestroyNotification):
(WebKit::WebNotificationManager::didShowNotification):
(WebKit::WebNotificationManager::didClickNotification):
(WebKit::WebNotificationManager::didCloseNotifications):
* WebProcess/Notifications/WebNotificationManager.h:
(WebNotificationManager):
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
* WebProcess/WebCoreSupport/WebNotificationClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::updatePreferences):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::didReceiveMessage):
* WebProcess/WebProcess.h:
(WebProcess):
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2012-03-14 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][WK2] Move code common to both ProxyAuthentication and Authentication context objects into a base class
https://bugs.webkit.org/show_bug.cgi?id=80627
Reviewed by Kenneth Rohde Christiansen.
No impact to QML API.
* UIProcess/qt/QtDialogRunner.cpp:
(BaseAuthenticationContextObject):
(BaseAuthenticationContextObject::BaseAuthenticationContextObject):
(HttpAuthenticationDialogContextObject):
(HttpAuthenticationDialogContextObject::HttpAuthenticationDialogContextObject):
(HttpAuthenticationDialogContextObject::realm):
(ProxyAuthenticationDialogContextObject):
(ProxyAuthenticationDialogContextObject::ProxyAuthenticationDialogContextObject):
(QtDialogRunner::initForAuthentication):
2012-03-14 Anders Carlsson <andersca@apple.com>
With tiled drawing enabled, clicking a link to a PDF causes a cross-fade
https://bugs.webkit.org/show_bug.cgi?id=79247
<rdar://problem/10910808>
Reviewed by Sam Weinig.
Instead of creating a new CALayer for the WKView when we're in tiled mode, re-use the existing layer that AppKit makes for us.
This way, we won't get any implicit animations when we change layer properties (such as sublayers in this case).
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView wantsUpdateLayer]):
(-[WKView updateLayer]):
2012-03-14 Alexey Proskuryakov <ap@apple.com>
WebProcess sometimes hits an assertion in SandboxExtensionTracker::didCommitProvisionalLoad after running regression tests
https://bugs.webkit.org/show_bug.cgi?id=81150
<rdar://problem/11002254>
Reviewed by Anders Carlsson.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad):
(WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad):
It's not great, but for now we need to handle this case. Hopefully, some day we'll make
both WebKit2 processes better aware of what's going on with loading in WebCore.
2012-03-14 Anders Carlsson <andersca@apple.com>
Fix UI process crash when a plug-in process crashes with a modal dialog showing
https://bugs.webkit.org/show_bug.cgi?id=81139
<rdar://problem/9641197>
Reviewed by Dan Bernstein.
When a plug-in process crashes, its corresponding PluginProcessProxy object is deleted immediately,
which is bad if we're currently running a nested run loop.
Fix this by making PluginProcessProxy ref-counted and protecting it before the call to -[NSApp runModalForWindow:].
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::pluginProcessWithPath):
(WebKit::PluginProcessManager::getOrCreatePluginProcess):
* UIProcess/Plugins/PluginProcessManager.h:
(PluginProcessManager):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::create):
(WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
* UIProcess/Plugins/PluginProcessProxy.h:
(PluginProcessProxy):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::setModalWindowIsShowing):
(WebKit::PluginProcessProxy::beginModal):
2012-03-14 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Handle printing errors in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=77197
Reviewed by Gustavo Noronha Silva.
* UIProcess/API/gtk/WebKitError.cpp:
(webkit_print_error_quark): Add new error domain for print
errors.
* UIProcess/API/gtk/WebKitError.h: Ad print errors.
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(webkit_print_operation_class_init): Add
WebKitPrintOperation::failed signal.
(drawPagesForPrintingCompleted): Emit WebKitPrintOperation::failed
when the print operation failed with the given error.
(webkitPrintOperationPrintPagesForFrame): Use
PrintFinishedCallback instead of a VoidCallback.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/tests/TestPrinting.cpp:
(testPrintOperationPrint):
(testPrintOperationErrors): Test different print errors are
correctly reported.
(beforeAll):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close): Invalidate print finished callbacks
map.
(WebKit::WebPageProxy::printFinishedCallback): Callback called
when the print operation has finished in the web process.
(WebKit::WebPageProxy::processDidCrash): Invalidate print finished
callbacks map.
(WebKit::WebPageProxy::drawPagesForPrinting): Use a
PrintFinishedCallback instead of a VoidCallback.
* UIProcess/WebPageProxy.h:
(WebKit): Delcare PrintFinishedCallback as a generic callback.
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in: Use PrintFinishedCallback
instead of VoidCallback as callback argument of
DrawPagesForPrinting message.
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::PrintPagesData::PrintPagesData): Mark the data as invalid
when there are no pages to print.
(PrintPagesData): Add isValid parameter to mark the data struct as
invalid.
(WebKit::WebPrintOperationGtk::printPagesIdleDone): Call
printPagesDone() instead of printDone().
(WebKit::WebPrintOperationGtk::printPagesDone): Renamed.
(WebKit::WebPrintOperationGtk::printDone): Notify the UI process
that the print operation has finsihed.
(WebKit::WebPrintOperationGtk::print): Finish the print if the
PrintPagesData struct is not valid.
* WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
2012-03-13 Jer Noble <jer.noble@apple.com>
Lion Intel Debug WebKit2 Tests crashing under [WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]
https://bugs.webkit.org/show_bug.cgi?id=81056
Reviewed by Jessie Berlin.
Give the InjectedBundlePageFullScreenClient a first crack at beganEnterFullScreen and beganExitFullScreen:
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::willEnterFullScreen):
(WebKit::WebFullScreenManager::willExitFullScreen):
And call the client function if it exists; otherwise, continue to message the page:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
(WebKit::InjectedBundlePageFullScreenClient::beganEnterFullScreen):
(WebKit::InjectedBundlePageFullScreenClient::beganExitFullScreen):
* WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
Add a custom APIClientTraits for InjectedBundlePageFullScreenClient to handle the API number change.
* Shared/APIClientTraits.cpp:
* Shared/APIClientTraits.h:
2012-03-14 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: add didCancelFrame timeline event
https://bugs.webkit.org/show_bug.cgi?id=80994
Reviewed by Pavel Feldman.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-03-13 Anders Carlsson <andersca@apple.com>
Find bouncy doesn’t hide when a subframe is scrolled
https://bugs.webkit.org/show_bug.cgi?id=81060
<rdar://problem/9365329>
Reviewed by Andreas Kling.
Instead of hiding the find indicator when pageDidScroll is called, add a check to FindController::drawRect and hide
the find indicator there if the find selection bounds have changed since the last call to drawRect.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
(WebKit::FindController::drawRect):
* WebProcess/WebPage/FindController.h:
(FindController):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::pageDidScroll):
2012-03-13 Jeff Miller <jeffm@apple.com>
Support loading a WKPage from web archive data
https://bugs.webkit.org/show_bug.cgi?id=81044
This code was written by Jessie Berlin.
Reviewed by Brady Eidson.
* UIProcess/API/C/WKPage.cpp:
(WKPageLoadWebArchiveData): Added.
* UIProcess/API/C/WKPage.h: Added WKPageLoadWebArchiveData().
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadWebArchiveData): Added.
* UIProcess/WebPageProxy.h: Added loadWebArchiveData().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadWebArchiveData): Added.
* WebProcess/WebPage/WebPage.h: Added loadWebArchiveData().
* WebProcess/WebPage/WebPage.messages.in: Added LoadWebArchiveData message.
2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
https://bugs.webkit.org/show_bug.cgi?id=78853
Reviewed by Adam Barth.
* Configurations/FeatureDefines.xcconfig:
* WebProcess/Geolocation/WebGeolocationManager.cpp:
(WebKit::WebGeolocationManager::registerWebPage):
(WebKit::WebGeolocationManager::unregisterWebPage):
(WebKit::WebGeolocationManager::didChangePosition):
(WebKit::WebGeolocationManager::didFailToDeterminePosition):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setGeoLocationPermission):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient):
* WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
* WebProcess/WebCoreSupport/WebGeolocationClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* mac/WebKit2.order:
2012-03-13 Max Vujovic <mvujovic@adobe.com>
Add a method to window.internals to enable testing of inspector highlight rects
https://bugs.webkit.org/show_bug.cgi?id=80338
Reviewed by Pavel Feldman.
* win/WebKit2.def: Export symbols for win.
* win/WebKit2CFLite.def: Same as above.
2012-03-13 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Set correct device width and height.
https://bugs.webkit.org/show_bug.cgi?id=80980
Reviewed by Tor Arne Vestbø.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::computeViewportConstraints):
2012-03-12 Sam Weinig <sam@webkit.org>
Fix typo in PageClientImpl where we were overriding viewLayerHostingMode with
a function called layerHostingMode.
Reviewed by Anders Carlsson.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::viewLayerHostingMode):
Update name and add OVERRIDE to catch this in the future.
2012-03-12 Enrica Casucci <enrica@apple.com>
WebKit2: remove NSPasteboard access for promised data from the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=80073
Reviewed by Alexey Proskuryakov.
This patch removes the last remaining access to NSPasteboard from the WebProcess.
The code in WebDragClient::declareAndWriteDragImage now packages all the data
required for the drag and the promised drag types and sends one request to the UI
process that will place the data in the NSPasteboard when appropriate.
* UIProcess/API/mac/PageClientImpl.h: Added setPromisedData method.
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setPromisedData):
* UIProcess/API/mac/WKView.mm:
(matchesExtensionOrEquivalent): Added.
(fileExists): Added.
(pathWithUniqueFilenameForPath): Added.
(-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
(-[WKView pasteboardChangedOwner:]):
(-[WKView pasteboard:provideDataForType:]):
(-[WKView namesOfPromisedFilesDroppedAtDestination:]):
* UIProcess/API/mac/WKViewInternal.h: Added _setPromisedData.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h: Added method for the new message.
* UIProcess/WebPageProxy.messages.in: Added setPromisedData message.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setPromisedData):
* WebProcess/WebCoreSupport/WebDragClient.cpp:
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Added SetMetadataURL.
2012-03-12 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Add support for rudimentary scroll indicators in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=80832
Reviewed by Tor Arne Vestbø.
Since the ScrollDecorator QML component requires a Flickable in its API
we need to expose the Flickable in QML for now and we also need to add
a notifier because we instantiate the internal Flickable only when the
WebView component completes construction.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::onComponentComplete):
(QQuickWebViewExperimental::flickable):
* UIProcess/API/qt/qquickwebview_p.h:
2012-03-11 Timothy Hatcher <timothy@apple.com>
Update how the Web Inspector resources are loaded.
https://bugs.webkit.org/show_bug.cgi?id=80814
rdar://problem/10359959
Reviewed by John Sullivan.
* Shared/WebPreferencesStore.h:
(WebKit): Added InspectorUsesWebKitUserInterface.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Removed webInspectorLocalizedStringsPath.
(WebKit::WebProcessCreationParameters::decode): Ditto.
* Shared/WebProcessCreationParameters.h: Ditto.
(WebProcessCreationParameters): Ditto.
* UIProcess/API/C/WKContext.cpp:
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetInspectorUsesWebKitUserInterface): Added.
(WKPreferencesGetInspectorUsesWebKitUserInterface): Added.
* UIProcess/API/C/WKPreferencesPrivate.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess): Removed webInspectorLocalizedStringsPath.
* UIProcess/WebContext.h:
(WebContext): Ditto.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::inspectorReallyUsesWebKitUserInterface): Added.
(WebKit::WebInspectorProxy::createInspectorWindow): Use inspectorReallyUsesWebKitUserInterface
to determine if texture should be used.
(WebKit::WebInspectorProxy::inspectorPageURL): Choose the right path.
(WebKit::WebInspectorProxy::inspectorBaseURL): Ditto.
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/mac/WebInspectorMac.mm:
(WebKit::inspectorReallyUsesWebKitUserInterface):
(WebKit::WebInspector::setInspectorUsesWebKitUserInterface): Added.
(WebKit::WebInspector::localizedStringsURL):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformPreferencesDidChange): Call WebInspector::setInspectorUsesWebKitUserInterface.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Removed call to WebInspector::setLocalizedStringsPath.
2012-03-11 Andy Estes <aestes@apple.com>
Remove unnecessary call to NSSizeToCGSize().
https://bugs.webkit.org/show_bug.cgi?id=80817
Reviewed by Dan Bernstein.
There is no need to call NSSizeToCGSize() to convert an IntSize to a
CGSize. IntSize defines a conversion function to CGSize that will do
this for us implicitly.
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::backingStoreContext): Do not call NSSizeToCGSize().
2012-03-11 Dan Bernstein <mitz@apple.com>
WebKit2 lacks API for obtaining a representation of the RenderLayer tree of a page, like WebRenderLayer
<http://webkit.org/b/80791>
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* GNUmakefile.am:
* Shared/API/c/WKBase.h: Added a type definition of WKRenderLayerRef.
* Shared/API/c/WKRenderLayer.cpp: Added.
(WKRenderLayerGetTypeID): Added. Returns the WKRenderLayer type ID.
(WKRenderLayerCopyRendererName): Added this getter wrapper.
(WKRenderLayerCopyElementTagName): Ditto.
(WKRenderLayerCopyElementID): Ditto.
(WKRenderLayerGetElementClassNames): Ditto.
(WKRenderLayerGetAbsoluteBounds): Ditto.
(WKRenderLayerIsClipping): Ditto.
(WKRenderLayerIsClipped): Ditto.
(WKRenderLayerIsReflection): Ditto.
(WKRenderLayerGetCompositingLayerType): Ditto.
(WKRenderLayerGetNegativeZOrderList): Ditto.
(WKRenderLayerGetNormalFlowList): Ditto.
(WKRenderLayerGetPositiveZOrderList): Ditto.
* Shared/API/c/WKRenderLayer.h: Added.
* Shared/APIObject.h: Added TypeRenderLayer to the APIObject::Type enum.
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode): Added WebRenderLayer encoding.
(WebKit::UserMessageDecoder::baseDecode): Added WebRenderLayer decoding.
* Shared/WebRenderLayer.cpp: Added.
(WebKit::WebRenderLayer::create): Added. Creates a WebRenderLayer for the page’s main
frame’s root layer.
(WebKit::WebRenderLayer::createArrayFromLayerList): Added this helper function.
(WebKit::WebRenderLayer::WebRenderLayer): Added. Constructs a WebRenderLayer with the
renderer name, element tag, ID and class names, metrics, child lists, and compositing
layer properties of the given RenderLayer.
* Shared/WebRenderLayer.h: Added.
(WebKit::WebRenderLayer::create):
(WebKit::WebRenderLayer::negativeZOrderList):
(WebKit::WebRenderLayer::normalFlowList):
(WebKit::WebRenderLayer::positiveZOrderList):
(WebKit::WebRenderLayer::renderObjectName):
(WebKit::WebRenderLayer::elementTagName):
(WebKit::WebRenderLayer::elementID):
(WebKit::WebRenderLayer::elementClassNames):
(WebKit::WebRenderLayer::isReflection):
(WebKit::WebRenderLayer::isClipping):
(WebKit::WebRenderLayer::isClipped):
(WebKit::WebRenderLayer::compositingLayerType):
(WebKit::WebRenderLayer::absoluteBoundingBox):
(WebKit::WebRenderLayer::WebRenderLayer):
* Target.pri
* UIProcess/API/C/WKAPICast.h: Added a mapping between WKRenderLayerRef and WebRenderLayer.
* WebKit2.xcodeproj/project.pbxproj: Added WebRenderLayer.{cpp,h} and WKRenderLayer.{cpp,h}.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCopyRenderLayerTree): Added this bundle API for getting the layer tree.
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* win/WebKit2.vcproj:
2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
<http://webkit.org/b/80782> Web Inspector: Crash using released frontendClient when resizing window with closed inspector
The WebInspectorFrontendClient reference should be cleared when the
WebInspectorClient::closeInspectorFrontend is called. This adds a
destroyInspectorPage to mirror createInspectorPage and clear the weak
pointers that are no longer valid.
Reviewed by Pavel Feldman.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::closeInspectorFrontend):
(WebKit::WebInspectorClient::didResizeMainFrame):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::destroyInspectorPage):
* WebProcess/WebPage/WebInspector.h:
2012-03-11 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] Support threaded renderer in WK2
https://bugs.webkit.org/show_bug.cgi?id=76661
Reviewed by Noam Rosenthal.
Implement Qt5 threaded rendering support for Qt WebKit2.
Parts of LayerTreeHostProxy which contain layer tree and layer painting objects
are moved to separate class called WebLayerTreeRenderer. WebLayerTreeRenderer is
thread safe ref counted and referenced by LayerTreeHostProxy and paint node.
All layer tree and graphics objects are created, accessed and deallocated from Qt
Scenegraph's paint thread only.
Layer tree updates from render queue are fetched in updatePaintNode call stack when
main thread is locked.
Messages from paint thread to web process are passed through MainThreadGuardedInvoker
call gate (implemented by Noam Rosenthal and previously reviewed by Kenneth Rohde
Christiansen).
* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
(PageProxyNode::PageProxyNode):
(PageProxyNode::render):
(PageProxyNode::~PageProxyNode):
(PageProxyNode::layerTreeRenderer):
(PageProxyNode):
(PageProxyNode::setScale):
(QQuickWebPage::updatePaintNode):
(QQuickWebPagePrivate::~QQuickWebPagePrivate):
* UIProcess/LayerTreeHostProxy.cpp: Added.
(WebKit):
(WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
(WebKit::LayerTreeHostProxy::~LayerTreeHostProxy):
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit::LayerTreeHostProxy::paintToGraphicsContext):
(WebKit::LayerTreeHostProxy::updateViewport):
(WebKit::LayerTreeHostProxy::dispatchUpdate):
(WebKit::LayerTreeHostProxy::createTileForLayer):
(WebKit::LayerTreeHostProxy::updateTileForLayer):
(WebKit::LayerTreeHostProxy::removeTileForLayer):
(WebKit::LayerTreeHostProxy::deleteCompositingLayer):
(WebKit::LayerTreeHostProxy::setRootCompositingLayer):
(WebKit::LayerTreeHostProxy::syncCompositingLayerState):
(WebKit::LayerTreeHostProxy::didRenderFrame):
(WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
(WebKit::LayerTreeHostProxy::destroyDirectlyCompositedImage):
(WebKit::LayerTreeHostProxy::setVisibleContentsRectForPanning):
(WebKit::LayerTreeHostProxy::setVisibleContentsRectForScaling):
(WebKit::LayerTreeHostProxy::renderNextFrame):
(WebKit::LayerTreeHostProxy::purgeBackingStores):
* UIProcess/LayerTreeHostProxy.h:
(WebKit):
(LayerTreeHostProxy):
(WebKit::LayerTreeHostProxy::layerTreeRenderer):
* UIProcess/WebLayerTreeRenderer.cpp: Renamed from Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp.
(WebKit):
(MainThreadGuardedInvoker):
(WebKit::MainThreadGuardedInvoker::call):
(WebKit::MainThreadGuardedInvoker::MainThreadGuardedInvoker):
(WebKit::MainThreadGuardedInvoker::invoke):
(WebKit::WebLayerTreeRenderer::callOnMainTread):
(WebKit::WebLayerTreeRenderer::WebLayerTreeRenderer):
(WebKit::WebLayerTreeRenderer::~WebLayerTreeRenderer):
(WebKit::WebLayerTreeRenderer::createLayer):
(WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
(WebKit::WebLayerTreeRenderer::syncAnimations):
(WebKit::WebLayerTreeRenderer::paintToGraphicsContext):
(WebKit::WebLayerTreeRenderer::setVisibleContentsRectForScaling):
(WebKit::WebLayerTreeRenderer::updateViewport):
(WebKit::WebLayerTreeRenderer::syncLayerParameters):
(WebKit::WebLayerTreeRenderer::deleteLayer):
(WebKit::WebLayerTreeRenderer::ensureLayer):
(WebKit::WebLayerTreeRenderer::setRootLayerID):
(WebKit::WebLayerTreeRenderer::getBackingStore):
(WebKit::WebLayerTreeRenderer::createTile):
(WebKit::WebLayerTreeRenderer::removeTile):
(WebKit::WebLayerTreeRenderer::updateTile):
(WebKit::WebLayerTreeRenderer::createImage):
(WebKit::WebLayerTreeRenderer::destroyImage):
(WebKit::WebLayerTreeRenderer::assignImageToLayer):
(WebKit::WebLayerTreeRenderer::swapBuffers):
(WebKit::WebLayerTreeRenderer::flushLayerChanges):
(WebKit::WebLayerTreeRenderer::renderNextFrame):
(WebKit::WebLayerTreeRenderer::ensureRootLayer):
(WebKit::WebLayerTreeRenderer::syncRemoteContent):
(WebKit::WebLayerTreeRenderer::purgeGLResources):
(WebKit::WebLayerTreeRenderer::purgeBackingStores):
(WebKit::WebLayerTreeRenderer::detach):
(WebKit::WebLayerTreeRenderer::appendUpdate):
* UIProcess/WebLayerTreeRenderer.h: Copied from Source/WebKit2/UIProcess/LayerTreeHostProxy.h.
(WebKit):
(WebLayerTreeRenderer):
(WebKit::WebLayerTreeRenderer::layerByID):
(WebKit::WebLayerTreeRenderer::rootLayer):
(WebKit::WebLayerTreeRenderer::notifyAnimationStarted):
(WebKit::WebLayerTreeRenderer::notifySyncRequired):
(WebKit::WebLayerTreeRenderer::showDebugBorders):
(WebKit::WebLayerTreeRenderer::showRepaintCounter):
(WebKit::WebLayerTreeRenderer::paintContents):
2012-03-09 Jon Lee <jonlee@apple.com>
Rename NotificationPresenter to NotificationClient
https://bugs.webkit.org/show_bug.cgi?id=80488
<rdar://problem/10965558>
Reviewed by Kentaro Hara.
Refactor to use renamed WebCore::NotificationClient.
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::startRequest):
(WebKit::NotificationPermissionRequestManager::permissionLevel):
* WebProcess/Notifications/NotificationPermissionRequestManager.h:
(NotificationPermissionRequestManager):
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::policyForOrigin):
* WebProcess/Notifications/WebNotificationManager.h:
(WebNotificationManager):
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
(WebKit::WebNotificationClient::checkPermission):
* WebProcess/WebCoreSupport/WebNotificationClient.h:
(WebNotificationClient):
2012-03-09 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] Shouldn't use item for clipping rect calculation in paint node.
https://bugs.webkit.org/show_bug.cgi?id=80714
Reviewed by Noam Rosenthal.
Replace item based clip-rect calculation with clipping-nodes based calculation.
This is required for threaded rendering, since we don't have access to the QSGItems
from the render thread.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::QQuickWebPage):
(QQuickWebPagePrivate::paintToCurrentGLContext):
(PageProxyNode::render):
(PageProxyNode::clipRect):
(PageProxyNode):
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::QQuickWebView):
2012-03-09 Enrica Casucci <enrica@apple.com>
Move WebNSURLExtras code down to WebCore.
https://bugs.webkit.org/show_bug.cgi?id=80611
Reviewed by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2012-03-09 Jeff Miller <jeffm@apple.com>
Add WKPageEndPrinting() to balance WKPageBeginPrinting()
https://bugs.webkit.org/show_bug.cgi?id=80739
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKPage.cpp:
(WKPageEndPrinting): Added.
* UIProcess/API/C/WKPagePrivate.h: Added WKPageEndPrinting().
2012-03-09 Emil A Eklund <eae@chromium.org>
Add roundedPoint to HitTestResult and change platform code to use it
https://bugs.webkit.org/show_bug.cgi?id=80715
Reviewed by James Robinson.
Change ports to use roundedPoint to avoid exposing subpixel types to
platform code.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
2012-03-09 Alexey Proskuryakov <ap@apple.com>
[Mac] Pass sandbox profiles through preprocessor
https://bugs.webkit.org/show_bug.cgi?id=80651
Reviewed by Mark Rowe.
* DerivedSources.make: Preprocess sandbox profiles.
* PluginProcess/mac/com.apple.WebKit.PluginProcess.sb: Removed.
* PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.in: Copied from Source/WebKit2/PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.
* WebProcess/com.apple.WebProcess.sb: Removed.
* WebProcess/com.apple.WebProcess.sb.in: Copied from Source/WebKit2/WebProcess/com.apple.WebProcess.sb.
Renamed to avoid make finding the wrong original in default paths.
* WebKit2.xcodeproj/project.pbxproj: Copy preprocessed files to Resources, not originals.
Also, changed DerivedSources target to use BaseTarget.xcconfig to have correct include paths.
2012-03-09 Jon Lee <jonlee@apple.com>
Add support for ENABLE(LEGACY_NOTIFICATIONS)
https://bugs.webkit.org/show_bug.cgi?id=80497
Reviewed by Adam Barth.
Prep for b80472: Update API for Web Notifications
* Configurations/FeatureDefines.xcconfig:
2012-03-09 Ashod Nakashian <ashodnakashian@yahoo.com>
Bash scripts should support LF endings only
https://bugs.webkit.org/show_bug.cgi?id=79509
Reviewed by David Kilzer.
* win/build-generated-files.sh: Added properties svn:executable and svn:eol-style.
2012-03-08 Enrica Casucci <enrica@apple.com>
REGRESSION (r109022): Files dragged onto input controls cannot be read due to sandbox violation.
https://bugs.webkit.org/show_bug.cgi?id=80203
<rdar://problem/10976643>
Reviewed by Alexey Proskuryakov.
This patch reverts a small part fo r109022, leaving access to
NSPasteboard in the WebProcess when retrieving pathnames for
files being dragged. This avoid the sandbox violation until we
implement a mechanism to provide a sandbox extension to the WebProcess.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getPathnamesForType):
2012-03-09 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r110191, r110202, and r110279.
http://trac.webkit.org/changeset/110191
http://trac.webkit.org/changeset/110202
http://trac.webkit.org/changeset/110279
https://bugs.webkit.org/show_bug.cgi?id=80694
They broke !ENABLE(INSPECTOR) builds (Requested by Ossy on
#webkit).
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-03-08 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Use Qt's module system for install rules and depending on QtWebKit
Instead of rolling our own install rules we now use the same approach as
every other Qt module, by loading qt_module.prf and qt_module_config.prf.
This ensures that we follow the same semantics as the rest of Qt on
what sort of config options are enabled by default (create_cmake eg.).
It also allows us to use QT += webkit instead of the workaround we had
with CONFIG += qtwebkit.
We do however force Qt to always treat our build as a non-developer build,
so the libraries will end up in the WebKit lib directory instead of the
qtbase directory (as with a normal developer-build). This allows us to
keep the webkit-build self-contained. If Qt is a developer build we still
copy the module file manually to Qt, so that you don't have to install
WebKit to make it available.
For non-developer builds of Qt, it is still possible to use the built
WebKit libraries without having to install them, by having the variable
QMAKE_EXTRA_MODULE_FORWARDS set in the project's .qmake.cache file,
pointing to $WEBKITOUTUTDIR/$CONFIGURATION/modules.
https://bugs.webkit.org/show_bug.cgi?id=80590
Reviewed by Simon Hausmann.
* UIProcess/API/qt/tests/publicapi/publicapi.pro:
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
* UIProcess/API/qt/tests/qmltests/WebView.pro:
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
* UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
* UIProcess/API/qt/tests/tests.pri:
* UIProcess/API/qt/tests/util.cpp:
* WebProcess.pro:
2012-03-08 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Allow transparent WebViews
https://bugs.webkit.org/show_bug.cgi?id=80608
Reviewed by Tor Arne Vestbø.
Added support for transparentBackground in QQuickWebViewExperimental.
This uses the existing drawsTransparentBackground property in WebKit2.
Also, changed LayerTreeHostQt to set the contentsOpaque flag when the root layer changes,
otherwise the change doesn't take effect.
A new API test was added.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::setTransparentBackground):
(QQuickWebViewPrivate::transparentBackground):
(QQuickWebViewExperimental::transparentBackground):
(QQuickWebViewExperimental::setTransparentBackground):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView):
(tst_QQuickWebView::transparentWebViews):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::LayerTreeHostQt):
(WebKit::LayerTreeHostQt::setRootCompositingLayer):
2012-03-08 Gustavo Noronha Silva <gns@gnome.org>
GTK+ build fix. Only try to get the backing from the layer in when
ACCELERATED_COMPOSITING is enabled.
Rubber-stamped by Ryosuke Niwa.
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::screenRectOfContents):
2012-03-08 Ryosuke Niwa <rniwa@webkit.org>
Mac build fix for micro data API.
* Configurations/FeatureDefines.xcconfig:
2012-03-08 Jer Noble <jer.noble@apple.com>
Unreviewed Snow Leopard build fix.
On Leopard and Snow Leopard, provide an implementation for -[NSWindow convertRectToScreen:].
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[NSWindow convertRectToScreen:]):
2012-03-08 Jer Noble <jer.noble@apple.com>
Further unreviewed build fix.
Add in the WebCore namespace, so that IntRect is pulled in.
* UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
* UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
* UIProcess/win/WebFullScreenManagerProxyWin.cpp:
2012-03-08 Jer Noble <jer.noble@apple.com>
Unreviewed build fix.
Add stub implementations of beganEnterFullScreen and beganExitFullScreen
to platform-specific WebFullScreenManagerProxy implementations.
* UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
(WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
(WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
* UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
(WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
(WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
* UIProcess/win/WebFullScreenManagerProxyWin.cpp:
(WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
(WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
2012-03-08 Jer Noble <jer.noble@apple.com>
Full Screen Refactor Part 3: Animate into Full Screen mode using new animation classes.
https://bugs.webkit.org/show_bug.cgi?id=78928
Reviewed by Anders Carlsson.
Boilerplate changes to WebKit2 IPC messages and supporting functions.
* UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::setAnimatingFullScreen): Added boilerplate.
* UIProcess/WebFullScreenManagerProxy.h:
* UIProcess/WebFullScreenManagerProxy.messages.in:
* UIProcess/mac/WebFullScreenManagerProxyMac.mm:
(WebKit::WebFullScreenManagerProxy::beganEnterFullScreen): Added boilerplate.
(WebKit::WebFullScreenManagerProxy::beganExitFullScreen): Added boilerplate.
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::screenRectOfContents): Added. Calculates the screen rect of an element's contents.
(WebKit::WebFullScreenManager::enterFullScreenForElement): Use screenRectOfContents()
(WebKit::WebFullScreenManager::willEnterFullScreen): Ditto. Do not set the background color. Call new BeganEnterFullScreen
XPC message.
(WebKit::WebFullScreenManager::didEnterFullScreen): Do not set the background color.
(WebKit::WebFullScreenManager::willExitFullScreen): Use screenRectOfContents. Do not set the background color. Call new
BeganExitFullScreen XPC message.
(WebKit::WebFullScreenManager::didExitFullScreen): Do not set the background color.
(WebKit::WebFullScreenManager::setAnimatingFullScreen): Added boilerplate.
* WebProcess/FullScreen/WebFullScreenManager.h:
* WebProcess/FullScreen/WebFullScreenManager.messages.in:
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController cancelOperation:]): Renamed from _requestExitWithAnimation:.
(-[WKFullScreenWindowController applicationDidResignActive:]): Call cancelOperation: instead
of _requestExitWithAnimation.
(-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Set the frame of
both the full screen window and the background window.
(-[WKFullScreenWindowController enterFullScreen:]): Save a rendered image of the current
page to use in the placeholder.
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Renamed from
beganEnterFullScreenAnimation.
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): No need to swap
placeholder views here, as they were already swapped in beganEnter...:.
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Renamed from
beganExitFullScreenAnimation.
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Swap web view back into place.
(-[WKFullScreenWindowController close]):
(-[WKFullScreenWindowController animationDidEnd:]): Added.
(createBackgroundFullscreenWindow): Added.
(windowFrameFromApparentFrames): Added.
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Added.
(-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Added.
2012-03-08 Jer Noble <jer.noble@apple.com>
Full Screen Refactor Part 2: Remove unnecessary WebKit2 APIs for Full Screen made
https://bugs.webkit.org/show_bug.cgi?id=78926
Reviewed by John Sullivan.
The following functions (and also their Proxy versions) were removed completely:
WebFullScreenManager::enterAcceleratedCompositingMode(const LayerTreeContext&)
WebFullScreenManager::exitAcceleratedCompositingMode()
WebFullScreenManager::beganEnterFullScreenAnimation()
WebFullScreenManager::finishedEnterFullScreenAnimation(bool)
WebFullScreenManager::beganExitFullScreenAnimation()
WebFullScreenManager::finishedExitFullScreenAnimation(bool)
WebFullScreenManager::getFullScreenRect(WebCore::IntRect&)
* UIProcess/WebFullScreenManagerProxy.cpp:
* UIProcess/WebFullScreenManagerProxy.h:
(WebKit::WebFullScreenManagerProxy::beginEnterFullScreenAnimation):
(WebKit::WebFullScreenManagerProxy::beginExitFullScreenAnimation):
(WebKit::WebFullScreenManagerProxy::disposeOfLayerClient):
(WebFullScreenManagerProxy):
* UIProcess/WebFullScreenManagerProxy.messages.in:
* UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
* UIProcess/mac/WebFullScreenManagerProxyMac.mm:
* UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
* UIProcess/win/WebFullScreenManagerProxyWin.cpp:
(WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::create):
(WebKit::WebFullScreenManager::~WebFullScreenManager):
* WebProcess/FullScreen/WebFullScreenManager.h:
(WebFullScreenManager):
* WebProcess/FullScreen/WebFullScreenManager.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exitFullScreenForElement):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient):
Additionally, the platform-specific WebFullScreenManager subclasses were removed, as no
platform-specific implementations remained after the above functions were removed:
* GNUmakefile.am:
* Target.pri:
* win/WebKit2.vcproj:
* WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.cpp: Removed.
* WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.h: Removed.
* WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Removed.
* WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: Removed.
* WebProcess/FullScreen/qt/WebFullScreenManagerQt.cpp: Removed.
* WebProcess/FullScreen/qt/WebFullScreenManagerQt.h: Removed.
* WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp: Removed.
* WebProcess/FullScreen/win/WebFullScreenManagerWin.h: Removed.
2012-03-08 Matt Lilek <mrl@apple.com>
Don't enable VIDEO_TRACK on all OS X platforms
https://bugs.webkit.org/show_bug.cgi?id=80635
Reviewed by Eric Carlson.
* Configurations/FeatureDefines.xcconfig:
2012-03-08 Max Vujovic <mvujovic@adobe.com>
Add a method to window.internals to enable testing of inspector highlight rects
https://bugs.webkit.org/show_bug.cgi?id=80338
Reviewed by Pavel Feldman.
* win/WebKit2.def: Export symbols for win.
* win/WebKit2CFLite.def: Same as above.
2012-03-08 Dinu Jacob <dinu.jacob@nokia.com>
[Qt WK2] Remove duplicate code related to dialog handling in QQuickWebView
https://bugs.webkit.org/show_bug.cgi?id=80557
Reviewed by Simon Hausmann.
Move common code related to running QtDialogRunner into a separate function
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::runJavaScriptAlert):
(QQuickWebViewPrivate::runJavaScriptConfirm):
(QQuickWebViewPrivate::runJavaScriptPrompt):
(QQuickWebViewPrivate::handleAuthenticationRequiredRequest):
(QQuickWebViewPrivate::handleProxyAuthenticationRequiredRequest):
(QQuickWebViewPrivate::handleCertificateVerificationRequest):
(QQuickWebViewPrivate::execDialogRunner):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
2012-03-07 Dinu Jacob <dinu.jacob@nokia.com>
[Qt] Authentication dialog does not work
https://bugs.webkit.org/show_bug.cgi?id=79738
Reviewed by Simon Hausmann.
QQuickWebView should accept touch events only if there is
no active dialog.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::runJavaScriptAlert):
(QQuickWebViewPrivate::runJavaScriptConfirm):
(QQuickWebViewPrivate::runJavaScriptPrompt):
(QQuickWebViewPrivate::handleAuthenticationRequiredRequest):
(QQuickWebViewPrivate::handleProxyAuthenticationRequiredRequest):
(QQuickWebViewPrivate::handleCertificateVerificationRequest):
(QQuickWebView::touchEvent):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
2012-03-07 Dan Bernstein <mitz@apple.com>
<rdar://problem/8494396> WebKit2 lacks API for obtaining a representation of the render tree of a page, like WebRenderNode
https://bugs.webkit.org/show_bug.cgi?id=80230
Reviewed by Beth Dakin.
* CMakeLists.txt:
* GNUmakefile.am:
* Shared/API/c/WKBase.h: Added a type definition of WKRenderObjectRef.
* Shared/API/c/WKRenderObject.cpp: Added.
(WKRenderObjectGetTypeID): Added. Returns the WKRenderObject type ID.
(WKRenderObjectCopyName): Added this getter wrapper.
(WKRenderObjectGetAbsolutePosition): Ditto.
(WKRenderObjectGetFrameRect): Ditto.
(WKRenderObjectGetChildren): Ditto.
* Shared/API/c/WKRenderObject.h: Added.
* Shared/APIObject.h: Added TypeRenderObject to the APIObject::Type enum.
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode): Added WebRenderObject encoding.
(WebKit::UserMessageDecoder::baseDecode): Added WebRenderObject decoding.
* Shared/WebRenderObject.cpp: Added.
(WebKit::WebRenderObject::create): Added. Creates a WebRenderObject for the page’s main
frame content renderer.
(WebKit::WebRenderObject::WebRenderObject): Added. Constructs a WebRenderObject with the
name, metrics and children of the given RenderObject, following the rules used in WebKit1
WebRenderNode. In particular, a RenderWidget representing a frame gets the frame’s content
renderer as a child.
* Shared/WebRenderObject.h: Added.
(WebKit::WebRenderObject::create):
(WebKit::WebRenderObject::children):
(WebKit::WebRenderObject::name):
(WebKit::WebRenderObject::absolutePosition):
(WebKit::WebRenderObject::frameRect):
(WebKit::WebRenderObject::WebRenderObject):
* Target.pri:
* UIProcess/API/C/WKAPICast.h: Added a mapping between WKRenderObjectRef and WebRenderObject.
* WebKit2.xcodeproj/project.pbxproj: Added WebRenderObject.{cpp,h} and WKRenderObject.{cpp.h}.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCopyRenderTree): Added this bundle API for getting the render tree.
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* win/WebKit2.vcproj:
2012-03-07 Kenneth Rohde Christiansen <kenneth@webkit.org>
Pinch zoom acts weirdly on nytimes.com while loading
https://webkit.org/b/80508
Reviewed by Simon Hausmann.
Make sure to suspend the page while doing pinch zooming.
If the page is suspended (which happens while pinch zooming)
then do not send touch events to the page, even if it has
listeners.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleTouchEvent):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2012-03-05 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] QWebNavigationRequest 'action' property should have an enum type instead of int
https://bugs.webkit.org/show_bug.cgi?id=80164
Reviewed by Simon Hausmann.
Use the appropriate enum type instead of int. Make IgnoreRequest have a bigger
value that give some room for us to put Experimental values in the middle. This
way the Experimental values are in a valid range for the original enumeration. To
avoid confusion, the Experimental enumeration was renamed.
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebnavigationrequest.cpp:
(QWebNavigationRequestPrivate):
(QWebNavigationRequest::setAction):
(QWebNavigationRequest::action):
* UIProcess/API/qt/qwebnavigationrequest_p.h:
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
2012-03-07 Andras Becsi <andras.becsi@nokia.com>
[WK2] Make it possible to build without geolocation support
https://bugs.webkit.org/show_bug.cgi?id=80426
Reviewed by Simon Hausmann.
Add missing guards.
* UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
(WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::processDidCrash):
* WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:
2012-03-06 Raphael Kubo da Costa <kubo@profusion.mobi>
[CMake] Make the removal of transitive library dependencies work with CMake < 2.8.7.
https://bugs.webkit.org/show_bug.cgi?id=80469
Reviewed by Antonio Gomes.
* CMakeLists.txt: Manually set the LINK_INTERFACE_LIBRARIES target
property on the library being created.
2012-03-06 Hugo Parente Lima <hugo.lima@openbossa.org>
MiniBrowser --window-size 480x800 www.nytimes.com doesn't paint bottom tiles.
https://bugs.webkit.org/show_bug.cgi?id=80313
Reviewed by Kenneth Rohde Christiansen.
Fix the math to get the visible rectangle and add a method to get it.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::visibleContentsRect):
(QQuickWebViewFlickablePrivate::_q_commitScaleChange):
(QQuickWebViewPrivate::_q_commitPositionChange):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
2012-03-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Hide dock button when not allowed to dock
https://bugs.webkit.org/show_bug.cgi?id=78575
Reviewed by Pavel Feldman.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::didResizeMainFrame):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::updateDockingAvailability):
* WebProcess/WebPage/WebInspector.h:
2012-03-06 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Interaction Engine suspends content during pageload.
https://bugs.webkit.org/show_bug.cgi?id=80294
Only suspend content when viewport updates are deferred
for a non-instantanious interaction.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer):
(WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::flickableMoveStarted):
(WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
2012-03-06 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Make QQuickWebView's url property work with a flickable webview
Reviewed by Tor Arne Vestbø.
QQuickWebViewPrivate::onComponentComplete implements the deferred url loading
when the url property is set in the component instantiation. QQuickWebViewFlickablePrivate
is the private sub-class used for a flickable webview, which re-implemented onComponentComplete
but forgot to call the base implementation.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::onComponentComplete):
2012-03-06 Carlos Garcia Campos <cgarcia@igalia.com>
[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-06 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use a single signal for script dialogs in WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=80271
Reviewed by Martin Robinson.
Add a new signal WebKitWebView::script-dialog that passes a
WebKitScriptDialog boxed type that can be used to build the dialog
and set the responses. It simplifies the API and makes it bindings
friendly.
* GNUmakefile.am:
* UIProcess/API/gtk/WebKitScriptDialog.cpp: Added.
(webkitScriptDialogCopy): Copy method for boxed type.
(webkitScriptDialogFree): Free method for boxed type.
(webkit_script_dialog_get_dialog_type): Return the type of dialog:
alert, confirm or prompt.
(webkit_script_dialog_get_message): Return the message of the dialog.
(webkit_script_dialog_confirm_set_confirmed): Set whether user
confirmed the dialog, for confirm dialogs.
(webkit_script_dialog_prompt_get_default_text): Get the default
text of prompt dialogs.
(webkit_script_dialog_prompt_set_text): Set the text entered by
the user, for prompt dialogs.
* UIProcess/API/gtk/WebKitScriptDialog.h: Added.
* UIProcess/API/gtk/WebKitScriptDialogPrivate.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewScriptDialog): Default implementation of
WebKitWebView::script-dialog signal.
(webkit_web_view_class_init): Add WebKitWebView::script-dialog and
remove alert, confirm and propmpt.
(webkitWebViewRunJavaScriptAlert): Create a WebKitScriptDialog and
emit WebKitWebView::script-dialog signal.
(webkitWebViewRunJavaScriptConfirm): Ditto.
(webkitWebViewRunJavaScriptPrompt): Ditto.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new
symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_script_dialog_get_type().
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewJavaScriptDialogs): Update javascript dialog test to
use the new API.
* UIProcess/API/gtk/webkit2marshal.list:
* UIProcess/API/gtk/webkit2.h:
2012-03-05 Gavin Barraclough <barraclough@apple.com>
putByIndex should throw in strict mode
https://bugs.webkit.org/show_bug.cgi?id=80335
Reviewed by Filip Pizlo.
Make the MethodTable PutByIndex trap take a boolean 'shouldThrow' parameter.
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::setProperty):
2012-03-05 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed rollout of r109858 for restructuring.
2012-03-05 Joseph Pecoraro <pecoraro@apple.com>
<http://webkit.org/b/78575> Web Inspector: Hide dock button when not allowed to dock
Reviewed by Timothy Hatcher.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::updateDockingAvailability):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::updateDockingAvailability):
* WebProcess/WebPage/WebInspector.h:
2012-03-05 Anders Carlsson <andersca@apple.com>
pinch-to-zoom and double-tap flicker when using the new scrolling model
https://bugs.webkit.org/show_bug.cgi?id=80368
<rdar://problem/10866221>
Reviewed by Sam Weinig.
Add a way for drawing areas to respond to callback based force repaint requests asynchronously.
This is currently needed for the tiled drawing area when there might be outstanding scroll updates
that are sent from the scrolling thread to the main thread and we need to ensure that they're processed
before sending a message back.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::forceRepaintAsync):
Add new member function.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::forceRepaint):
Try forceRepaintAsync first.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::forceRepaintAndSendMessage):
Force the repaint and send the message.
(WebKit::dispatchBackToMainThread):
Dispatch a call to forceRepaintAndSendMessage to the main thread.
(WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
Dispatch a function on the scrolling thread. Its sole purpose is to dispatch a function back to the
main thread, ensuring that all previously dispatched functions have been executed.
2012-03-05 Enrica Casucci <enrica@apple.com>
Can't type on some websites (plug-ins steal key events).
<rdar://problem/10892291>
When the plugin is disabled, it is necessary to reset _pluginComplexTextInputIdentifier
in order to return the correct input context. Failure to do so results in the inputContext
method to return the plugin input context instead of the context of the browser view.
Reviewed by Sam Weinig.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setPluginComplexTextInputState:]):
(-[WKView _handlePluginComplexTextInputKeyDown:]):
2012-03-05 Anders Carlsson <andersca@apple.com>
Be more aggressive about repainting page overlays
https://bugs.webkit.org/show_bug.cgi?id=80336
<rdar://problem/10965943>
Reviewed by Simon Fraser.
Whenever we're flushing layers and we have a page overlay, check if the main frame
has scrolled or if the main frame root content layer needs to be repainted and force the
overlay layer to be repainted if either of those conditions are true.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::shouldRepaintPageOverlayLayer):
(WebKit):
2012-03-05 Sam Weinig <sam@webkit.org>
Add support for hosting layers in the window server in WebKit2
<rdar://problem/10400246>
https://bugs.webkit.org/show_bug.cgi?id=80310
Reviewed by Anders Carlsson.
This currently only works if you are using TiledCoreAnimation drawing model.
* Platform/mac/LayerHostingContext.h: Renamed from Source/WebKit2/Platform/mac/RemoteLayerClient.h.
* Platform/mac/LayerHostingContext.mm: Renamed from Source/WebKit2/Platform/mac/RemoteLayerClient.mm.
(WebKit::LayerHostingContext::createForPort):
(WebKit::LayerHostingContext::LayerHostingContext):
(WebKit::LayerHostingContext::createForWindowServer):
(WebKit::LayerHostingContext::~LayerHostingContext):
(WebKit::LayerHostingContext::setRootLayer):
(WebKit::LayerHostingContext::rootLayer):
(WebKit::LayerHostingContext::contextID):
(WebKit::LayerHostingContext::invalidate):
Renamed RemoteLayerClient to LayerHostingContext and add ability to use the window server
as the remote context.
* PluginProcess/PluginControllerProxy.cpp:
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/mac/PluginControllerProxyMac.mm:
Update for new names.
* Shared/LayerTreeContext.h:
Add LayerHostingMode enum.
* UIProcess/PageClient.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::layerHostingMode):
(WebKit::PageClientImpl::updateAcceleratedCompositingMode):
Add PageClient access points to get the current layer hosting mode,
and a hook to tell the underlying view that the layer hosting context
has changed.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateAcceleratedCompositingMode:WebKit::]):
Implement responding to a new layer hosting context as a simple
exit and re-entrance of compositing.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::layerHostingModeDidChange):
(WebKit::DrawingAreaProxy::updateAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxy.messages.in:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
(TiledCoreAnimationDrawingAreaProxy):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode):
Pipe layer hosting changes around.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::layerHostingMode):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::viewStateDidChange):
Cache the current layer hosting mode so we don't overzealously
tell the WebProcess to reset its context. Re-check layer hosting
mode each time we are added/removed from a window.
* WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
* WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
Update for new names.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setDeviceScaleFactor):
(WebKit::DrawingArea::setLayerHostingMode):
* WebProcess/WebPage/DrawingArea.messages.in:
Pipe layer hosting changes around.
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
(WebKit::LayerTreeHostCAMac::~LayerTreeHostCAMac):
(WebKit::LayerTreeHostCAMac::platformInitialize):
(WebKit::LayerTreeHostCAMac::invalidate):
Update for new names.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
Respond to a change in the layer hosting mode by invalidating our old context,
making a new one of the right type, and informing the UIProcess of our new context.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2012-03-05 Anders Carlsson <andersca@apple.com>
Always update the scroll layer position on the main thread when we have an overlay
https://bugs.webkit.org/show_bug.cgi?id=80324
Reviewed by Sam Weinig.
Call setForceMainThreadScrollLayerPositionUpdates when installing and uninstalling page overlays,
so we'll be able to synchronize painting between the tile cache and the page overlays.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
2012-03-05 Timothy Hatcher <timothy@apple.com>
Change how the Web Inspector Develop menu actions work.
This removes the methods used by Safari's Develop menu. They can now be implemented in Safari.
https://webkit.org/b/80308
Reviewed by John Sullivan.
* UIProcess/API/C/mac/WKInspectorPrivateMac.h: Renamed from Source/WebKit2/UIProcess/API/C/mac/WKInspectorMac.h.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter inspectorRef]): Added.
* WebKit2.xcodeproj/project.pbxproj: Renamed WKInspectorPrivateMac.h to better reflect its private nature.
2012-03-02 Jon Lee <jonlee@apple.com>
Add support for notification replaceId in Mac WebKit and WK2
https://bugs.webkit.org/show_bug.cgi?id=80206
<rdar://problem/10965574>
Reviewed by Sam Weinig.
* UIProcess/API/C/WKNotification.cpp: Add WK API.
(WKNotificationCopyReplaceID):
* UIProcess/API/C/WKNotification.h:
* UIProcess/Notifications/WebNotification.cpp:
(WebKit::WebNotification::WebNotification):
* UIProcess/Notifications/WebNotification.h: Add replaceID member.
(WebKit::WebNotification::create):
(WebKit::WebNotification::replaceID):
(WebNotification):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::show):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
(WebNotificationManagerProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showNotification):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in: Add replaceID to the showNotification message.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show):
2012-03-05 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r109748.
http://trac.webkit.org/changeset/109748
https://bugs.webkit.org/show_bug.cgi?id=80296
Made some tests crash, will fix and recommit (Requested by
noamr on #webkit).
* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paintToCurrentGLContext):
(PageProxyNode::PageProxyNode):
(PageProxyNode):
(PageProxyNode::changedStates):
(PageProxyNode::render):
(PageProxyNode::~PageProxyNode):
(QQuickWebPage::updatePaintNode):
(QQuickWebPagePrivate::updateSize):
(QQuickWebPagePrivate::resetPaintNode):
(QQuickWebPagePrivate::~QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
* UIProcess/DrawingAreaProxy.h:
(WebKit):
(WebKit::DrawingAreaProxy::layerTreeHostProxy):
(DrawingAreaProxy):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::syncAnimations):
(WebKit::LayerTreeHostProxy::updateViewport):
(WebKit::LayerTreeHostProxy::syncLayerParameters):
(WebKit::LayerTreeHostProxy::flushLayerChanges):
(WebKit::LayerTreeHostProxy::ensureRootLayer):
(WebKit::LayerTreeHostProxy::syncRemoteContent):
(WebKit::LayerTreeHostProxy::dispatchUpdate):
(WebKit):
(WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
(WebKit::LayerTreeHostProxy::purgeGLResources):
* UIProcess/qt/QtWebPageSGNode.cpp: Removed.
* UIProcess/qt/QtWebPageSGNode.h: Removed.
2012-03-05 Joone Hur <joone.hur@collabora.co.uk>
[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-05 Carlos Garcia Campos <cgarcia@igalia.com>
[WK2] WKPageGetContextMenuFromProposedContextMenuCallback should pass a HitTestResult
https://bugs.webkit.org/show_bug.cgi?id=77208
Reviewed by Anders Carlsson.
A HitTestResultData is now passed to ShowContextMenu WebPageProxy
message instead of the ContextMenuState. ContextMenu client has
been updated to pass the HitTestResult to the
getContextMenuFromProposedMenu callback.
* GNUmakefile.am: Remove ContextMenuState.h.
* Shared/APIClientTraits.h:
* Shared/ContextMenuState.h: Removed.
* Shared/WebHitTestResult.h:
(WebKit::WebHitTestResult::Data::Data): Add constructor that takes
a WebCore::HitTestResult.
* UIProcess/API/C/WKPage.h: Add HitTestResult parameter to
getContextMenuFromProposedMenu callback and deprecate the old
version.
* UIProcess/WebPageContextMenuClient.cpp:
(WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
Pass a HitTestResult to getContextMenuFromProposedMenu or use the
deprecated one if client version is an old one.
* UIProcess/WebPageContextMenuClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::internalShowContextMenu): Save the
WebHitTestResult::Data to use it for handling context menu actions.
(WebKit::WebPageProxy::contextMenuItemSelected): Use the saved
WebHitTestResult::Data.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj: Remove ContextMenuState.h.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mouseDidMoveOverElement): Use the new
WebHitTestResult::Data constructor that takes a WebCore::HitTestResult.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show): Create a WebHitTestResult::Data
instead of a ContextMenuState and pass it to ShowContextMenu message.
* win/WebKit2.vcproj: ContextMenuState.h.
2012-03-05 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt] [WK2] Support threaded renderer in WK2
https://bugs.webkit.org/show_bug.cgi?id=76661
Made the appropriate fixes in the UI process code to make rendering thread-safe.
- Separated the scenegraph node code to QtWebPageSGNode. QtWebPageSGNode has direct access
to LayerTreeHostProxy.
- Each function in LayerTreeHostProxy can be either called from the main thread (handling
messages from the web process), or from the renderer thread (handling the GL context).
The render-queue is locked with a mutex, and messages back to the web process are sent
via callOnMainThread.
- LayerTreeHostProxy is now ThreadSafeRefCounted. That is done to make sure that the GL
resources it creates are only freed when the QtWebPageSGNode is deleted, which can be
before or after the owning DrawingAreaProxy is deleted. This ensures that the class is
deleted only after its GL resources are freed, otherwise those resources may leak.
Based on a patch by Viatcheslav Ostapenko.
Reviewed by Kenneth Rohde Christiansen.
* Target.pri: Added new files.
* UIProcess/API/qt/qquickwebpage.cpp: Moved QtWebPageSGNode out.
(QQuickWebPage::updatePaintNode): Call QtWebPageSGNode
(QQuickWebPagePrivate::updateSize): Call QtWebPageSGNode
(QQuickWebPagePrivate::didDeleteSGWebPageNode): Override QtWebPageSGNode::Client
(QQuickWebPagePrivate::~QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
* UIProcess/DrawingAreaProxy.h:
(WebKit):
(WebKit::DrawingAreaProxy::layerTreeHostProxy): Made LayerTreeHostProxy ref-counted.
(DrawingAreaProxy):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
* UIProcess/LayerTreeHostProxy.h:
(WebKit):
(WebKit::LayerTreeHostProxy::create):
(LayerTreeHostProxy):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit):
(MainThreadGuardedInvoker):
A class that allows invoking functions in the main thread, while guarding a ref-
counted object.
(WebKit::MainThreadGuardedInvoker::call):
(WebKit::MainThreadGuardedInvoker::MainThreadGuardedInvoker):
(WebKit::MainThreadGuardedInvoker::invoke):
(WebKit::LayerTreeHostProxy::syncAnimations):
(WebKit::LayerTreeHostProxy::updateViewport):
(WebKit::LayerTreeHostProxy::detachDrawingArea):
(WebKit::LayerTreeHostProxy::syncLayerParameters):
(WebKit::LayerTreeHostProxy::setShouldRenderNextFrame):
(WebKit::LayerTreeHostProxy::flushLayerChanges):
(WebKit::LayerTreeHostProxy::ensureRootLayer):
(WebKit::LayerTreeHostProxy::syncRemoteContent):
(WebKit::LayerTreeHostProxy::dispatchUpdate):
(WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
(WebKit::LayerTreeHostProxy::purgeGLResources):
* UIProcess/qt/QtWebPageSGNode.cpp: Added.
* UIProcess/qt/QtWebPageSGNode.h: Added.
2012-03-04 Raphael Kubo da Costa <kubo@profusion.mobi>
[CMake] Libraries are installed to /usr/lib and not /usr/lib64 on x86_64
https://bugs.webkit.org/show_bug.cgi?id=71507
Reviewed by Antonio Gomes.
* CMakeLists.txt: Use ${LIB_INSTALL_DIR} instead of hardcoding "lib".
2012-03-03 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Fix static_libs_as_shared build
https://bugs.webkit.org/show_bug.cgi?id=80214
Reviewed by Tor Arne Vestbø.
Replace (static) link time dependency to WK1 with entrypoint
in the separate WebProcess for activating the QStyle theme if
necessary.
* Target.pri:
* UIProcess/Launcher/ProcessLauncher.h:
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):
* qt/MainQt.cpp:
(WebKit):
(main):
2012-03-03 Hans Wennborg <hans@chromium.org>
Implement Speech JavaScript API
https://bugs.webkit.org/show_bug.cgi?id=80019
Reviewed by Adam Barth.
Add ENABLE_SCRIPTED_SPEECH.
* Configurations/FeatureDefines.xcconfig:
2012-03-03 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt] Use the existing inheritedOpacity/matrix properties of QSGNode
https://bugs.webkit.org/show_bug.cgi?id=79543
Use QSGNode::inheritedOpacity() and QSGNode::matrix().
Also, remove flags from changedStates() that we don't actually touch.
This is covered by existing API tests.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paintToCurrentGLContext):
(PageProxyNode::changedStates):
(PageProxyNode::render):
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
2012-03-03 Anders Carlsson <andersca@apple.com>
Fix build with newer versions of clang.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
Cast the switch parameter to unsigned to prevent warnings about case values not being part of the enum type.
2012-03-02 Andy Estes <aestes@apple.com>
Move nsStringFromWebCoreString out of PageClientImpl
https://bugs.webkit.org/show_bug.cgi?id=80202
Reviewed by Sam Weinig.
nsStringFromWebCoreString() doesn't really belong in PageClientImpl.mm,
and it makes us include PageClientImpl.h in places where we shouldn't.
Move this function into StringUtilities.{h, mm}.
* Platform/mac/StringUtilities.h: Added.
* Platform/mac/StringUtilities.mm: Added.
(WebKit::nsStringFromWebCoreString):
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
* UIProcess/API/mac/WKView.mm:
* UIProcess/mac/WebContextMenuProxyMac.mm:
* UIProcess/mac/WebPageProxyMac.mm:
* UIProcess/mac/WebPopupMenuProxyMac.mm:
* UIProcess/mac/WebPreferencesMac.mm:
* WebKit2.xcodeproj/project.pbxproj:
2012-03-02 Andy Estes <aestes@apple.com>
Remove com.apple.WebKit.PluginProcess.sb from WebKit2.xcodeproj's Headers build phase
https://bugs.webkit.org/show_bug.cgi?id=80197
Reviewed by Alexey Proskuryakov.
It doesn't belong there, and it makes Xcode consider the project to be
invalid, triggering assertions in some builds of Xcode.
* WebKit2.xcodeproj/project.pbxproj:
2012-03-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Fix spelling mistake in header guard
Reviewed by Noam Rosenthal.
* UIProcess/API/qt/qwebviewportinfo_p.h:
2012-03-02 Carlos Garcia Campos <cgarcia@igalia.com>
[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-03-02 Allan Sandfeld Jensen <allan.jensen@nokia.com>
Fix build on AppleWebKit after 109548.
* mac/WebKit2.order:
2012-03-02 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Fix tests run with WTR not using QStyle theme
https://bugs.webkit.org/show_bug.cgi?id=80147
Reviewed by Csaba Osztrogonác.
Use an environment variable (set by WTR) to select the QStyle theme.
This is a temporary kludge until we rebase the layout tests to use the
QStyle independent "mobile" theme. This also temporarily breaks the
force_static_libs_as_shared build.
* Target.pri:
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):
2012-03-02 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Compile WebCore without QtWidgets
https://bugs.webkit.org/show_bug.cgi?id=80141
Reviewed by Tor Arne Vestbø.
* Shared/qt/WebEventFactoryQt.cpp: Removed unnecessary include.
* Target.pri: Require widgets for WK2 for the moment, until bug #79458
is fixed.
2012-03-02 Allan Sandfeld Jensen <allan.jensen@nokia.com>
Suspend/Resume API for pausing timers and animations.
https://bugs.webkit.org/show_bug.cgi?id=76063
Based on the initial work of Zalan Bujtas <zalan.bujtas@nokia.com>,
Adds suspend and resume API for WebKit2 and uses it in Qt to
suspend animations and DOM timers during panning and zoom.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::_q_suspend):
(QQuickWebViewFlickablePrivate::_q_resume):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::resumeActiveDOMObjectsAndAnimations):
(WebKit::WebPageProxy::suspendActiveDOMObjectsAndAnimations):
(WebKit::WebPageProxy::processDidCrash):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::suspendActiveDOMObjectsAndAnimations):
(WebKit::WebPage::resumeActiveDOMObjectsAndAnimations):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2012-03-02 Joone Hur <joone.hur@collabora.co.uk>
Unreviewed. Fix WebKit2 GTK+ build.
* GNUmakefile.am: allow WebKitWebProcess to link with zlib properly.
2012-03-01 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Make the interaction with the Flickable work on the N9
https://bugs.webkit.org/show_bug.cgi?id=80029
Reviewed by Simon Hausmann.
Because the WebView item accepts all touch events it receives and sends
them to the web process before propagating them to the gesture recognizers,
which is correct behaviour, we can not rely on the touch->mouse conversion
of Qt5 when controlling Flickable. Hence we need to convert the received
touch events to mouse events in the QtFlickProvider.
* UIProcess/qt/QtFlickProvider.cpp:
(QtFlickProvider::handleTouchFlickEvent):
Do the touch to mouse event conversion for the Flickable.
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::recognize):
A touch begin event should cancel the previous pan gesture
and stop the ongoing flick animation.
2012-03-01 Anders Carlsson <andersca@apple.com>
Assertion failure in pageContainsAnyHorizontalScrollbars() (scrollableArea->isOnActivePage()) when leaving pages with embedded PDFs
https://bugs.webkit.org/show_bug.cgi?id=80044
<rdar://problem/10919940>
Reviewed by Brady Eidson.
Remove the code that would add and remove wheel event handlers since that's not what we want to track.
Instead, dynamically add and remove the view as its scrollbars come and go.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::updateScrollbars):
(WebKit::BuiltInPDFView::initialize):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
(BuiltInPDFView):
2012-03-01 Kangil Han <kangil.han@samsung.com>
[DRT] Remove all PlainTextController usages in existing tests by adding internal API
https://bugs.webkit.org/show_bug.cgi?id=78570
Reviewed by Hajime Morita.
This patch will remove all PlainTextController usages
in existing DRT tests by adding internal API to WebCore/testing/Internals
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-03-01 Nikolas Zimmermann <nzimmermann@rim.com>
Unreviewed, rolling out r109255.
http://trac.webkit.org/changeset/109255
https://bugs.webkit.org/show_bug.cgi?id=79932
Breaks rounded rects with dashed strokes in SVG
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2012-03-01 Sergio Villar Senin <svillar@igalia.com>
[WK2] [GTK] [libsoup] SoupSession should use system CA
https://bugs.webkit.org/show_bug.cgi?id=79657
Reviewed by Martin Robinson.
SoupSession sould use system CA list to validate SSL
certificates. Do not use strict certificate validation though as
we want clients to decide whether or not accept/decline invalid
certificates (API to be added later).
No new tests required as current behaviour does not change at all
as we continue to accept invalid certificates by default.
* WebProcess/gtk/WebProcessMainGtk.cpp:
(WebKit::WebProcessMainGtk):
2012-03-01 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix WebKit2 GTK+ build.
* UIProcess/API/gtk/WebKitDefines.h:
* UIProcess/API/gtk/WebKitWebView.h:
2012-02-29 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][WK2] QQuickWebView::event should lookup faster which events QQuickWebPage can handle
https://bugs.webkit.org/show_bug.cgi?id=78047
Reviewed by Kenneth Rohde Christiansen.
Replaced double-dispatch of events with direct forwarding of events from QQuickWebView::*Event to
QtWebPageEventHandler::handle*Event.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::keyPressEvent):
(QQuickWebView::keyReleaseEvent):
(QQuickWebView::inputMethodEvent):
(QQuickWebView::focusInEvent):
(QQuickWebView::focusOutEvent):
(QQuickWebView::touchEvent):
(QQuickWebView::mousePressEvent):
(QQuickWebView::mouseMoveEvent):
(QQuickWebView::mouseReleaseEvent):
(QQuickWebView::mouseDoubleClickEvent):
(QQuickWebView::wheelEvent):
(QQuickWebView::hoverEnterEvent):
(QQuickWebView::hoverMoveEvent):
(QQuickWebView::hoverLeaveEvent):
(QQuickWebView::dragMoveEvent):
(QQuickWebView::dragEnterEvent):
(QQuickWebView::dragLeaveEvent):
(QQuickWebView::dropEvent):
(QQuickWebView::event):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleMouseMoveEvent):
(QtWebPageEventHandler::handleMousePressEvent):
(QtWebPageEventHandler::handleMouseReleaseEvent):
(QtWebPageEventHandler::handleWheelEvent):
(QtWebPageEventHandler::handleHoverLeaveEvent):
(QtWebPageEventHandler::handleHoverMoveEvent):
(QtWebPageEventHandler::handleDragEnterEvent):
(QtWebPageEventHandler::handleDragLeaveEvent):
(QtWebPageEventHandler::handleDragMoveEvent):
(QtWebPageEventHandler::handleDropEvent):
(QtWebPageEventHandler::handleKeyPressEvent):
(QtWebPageEventHandler::handleKeyReleaseEvent):
(QtWebPageEventHandler::handleFocusInEvent):
(QtWebPageEventHandler::handleFocusOutEvent):
(QtWebPageEventHandler::handleInputMethodEvent):
(QtWebPageEventHandler::handleTouchEvent):
* UIProcess/qt/QtWebPageEventHandler.h:
(QtWebPageEventHandler):
2012-03-01 Csaba Osztrogonác <ossy@webkit.org>
[Qt][WK2] Unreviewed buildfix after r109277.
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
2012-02-29 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Get rid of the #ifdef mess in LayerTreeHost[Proxy]
https://bugs.webkit.org/show_bug.cgi?id=79501
Use a new UI_SIDE_COMPOSITING flag instead of the several #ifdef flags we currently use.
Reviewed by Kenneth Rohde Christiansen.
* Shared/WebLayerTreeInfo.cpp:
* Shared/WebLayerTreeInfo.h:
* UIProcess/DrawingAreaProxy.cpp:
(WebKit):
* UIProcess/DrawingAreaProxy.h:
(DrawingAreaProxy):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit):
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
* UIProcess/qt/LayerBackingStore.cpp:
* UIProcess/qt/LayerBackingStore.h:
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
* WebProcess/WebPage/DrawingArea.h:
(DrawingArea):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit):
* WebProcess/WebPage/DrawingAreaImpl.h:
(DrawingAreaImpl):
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::purgeBackingStores):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
2012-02-28 Brian Weinstein <bweinstein@apple.com>
WebKit2: didNewFirstVisuallyNonEmptyLayout should be sent to injected bundle
https://bugs.webkit.org/show_bug.cgi?id=79849
Tell the injected bundle about didNewFirstVisuallyNonEmptyLayout (we currently
just tell the UI process).
Reviewed by Beth Dakin.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add didNewFirstVisuallyNonEmptyLayout to version 1.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didNewFirstVisuallyNonEmptyLayout): Call through to the
client.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
(InjectedBundlePageLoaderClient):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout): Tell the injected
bundle.
2012-02-29 Tim Horton <timothy_horton@apple.com>
Make use of CG rounded-rect primitives
https://bugs.webkit.org/show_bug.cgi?id=79932
<rdar://problem/9274953>
Reviewed by Simon Fraser.
Add wkCGPathAddRoundedRect.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2012-02-29 Andy Estes <aestes@apple.com>
CFURLDownloadScheduleWithCurrentMessageQueue only exists on Windows
https://bugs.webkit.org/show_bug.cgi?id=79936
Reviewed by Brady Eidson.
CFURLDownloadScheduleWithCurrentMessageQueue only exists on Windows
platforms. Non-Windows platforms that use CFNetwork-based downloads
should omit this call.
* WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
(WebKit::Download::start):
2012-02-29 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt][WK2] We should not add NetscapeBrowserFuncs.cpp as header
https://bugs.webkit.org/show_bug.cgi?id=79847
Reviewed by Alexey Proskuryakov.
* Target.pri: Fix typo, so we can add ".h" file instead.
2012-02-29 Sam Weinig <sam@webkit.org>
When invoking Lookup while zoomed in, the highlighted word renders out of line
<rdar://problem/10812527>
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForRange):
Make sure to scale the ascent when determining the origin for the overlay.
2012-02-29 Carlos Garcia Campos <cgarcia@igalia.com>
[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 <cgarcia@igalia.com>
[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 <svillar@igalia.com>
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 <svillar@igalia.com>
[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-28 Simon Fraser <simon.fraser@apple.com>
Update WebKitSystemInterface.
Reviewed by Sam Weinig.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2012-02-28 Hugo Parente Lima <hugo.lima@openbossa.org>
All mouse events after a right click are ignored when they came from WebkitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=77350
Reviewed by Chang Shu.
Never ignore mouse events when using sync events, even if the context menu is being
show but the Ui did replied the ShowContextMenu event with a ContextMenuHidden.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEventSyncForTesting):
2012-02-28 Alexey Proskuryakov <ap@apple.com>
More build fix.
* WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Check for build platform
properly.
2012-02-28 Alexey Proskuryakov <ap@apple.com>
Build fix.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue):
Check for build platform properly.
2012-02-28 Enrica Casucci <enrica@apple.com>
More Pasteboard code cleanup.
https://bugs.webkit.org/show_bug.cgi?id=79816
Removing the last references to NSPasteboard.
Reviewed by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::setInsertionPasteboard):
2012-02-28 Alexey Proskuryakov <ap@apple.com>
[Mac] Add an experimental SPI for plug-ins to enter sandbox
https://bugs.webkit.org/show_bug.cgi?id=79709
Reviewed by Anders Carlsson.
* PluginProcess/PluginProcess.h: (WebKit::PluginProcess::pluginPath): Exposed plugin path.
* PluginProcess/mac/com.apple.WebKit.PluginProcess.sb: Added.
* WebKit2.xcodeproj/project.pbxproj: Added new files.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Exposed
a function to access sandboxing functions when available.
* WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h: Added.
* WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Added.
2012-02-28 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
[Qt] Allow read/write to the WebView.url property
https://bugs.webkit.org/show_bug.cgi?id=77554
Reviewed by Tor Arne Vestbø.
Change QML API WebView.url to read/write to reflect either the url requested by the user.
Also removed WebView.load(url). Defers setting url (loading page) until onComponentComplete is triggered.
Fixed c++ and qml tests to reflect the new API.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::onComponentComplete):
(QQuickWebView::setUrl):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_origin.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::loadEmptyPageViewHidden):
(tst_QQuickWebView::loadNonexistentFileUrl):
2012-02-28 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Signal and property cleanup in QQuickWebView
https://bugs.webkit.org/show_bug.cgi?id=78820
Reviewed by Noam Rosenthal.
- Remove parameters from property change notify signals:
titleChanged, urlChanged, iconChanged, loadProgressChanged
- Rename the parameters of linkHovered to prevent shadoing properties of WebView
- Rename navigationStateChanged to navigationHistoryChanged
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::_q_onUrlChanged):
(QQuickWebViewPrivate::setIcon):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::loadProgress):
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::didCommitLoadForFrame):
(QtWebPageLoadClient::didSameDocumentNavigationForFrame):
(QtWebPageLoadClient::didReceiveTitleForFrame):
(QtWebPageLoadClient::setLoadProgress):
* UIProcess/qt/QtWebPageLoadClient.h:
(QtWebPageLoadClient):
2012-02-28 Mario Sanchez Prada <msanchez@igalia.com>
[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-02-28 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Initialize QtWebContext as much as we can in its constructor.
https://bugs.webkit.org/show_bug.cgi?id=79809
Reviewed by Tor Arne Vestbø.
The icon database wouldn't be initialized on the QtWebContext while in WebKitTestRunner
since it doesn't call the initialize method on it after creating it.
Remove the initialize method, move the download manager and icon database initialization
in the constructor and call initializeContextInjectedBundleClient directly in
defaultContext to prevent overriding WKTR's injected bundle client.
* UIProcess/qt/QtWebContext.cpp:
(WebKit::QtWebContext::QtWebContext):
(WebKit::QtWebContext::defaultContext):
* UIProcess/qt/QtWebContext.h:
(QtWebContext):
2012-02-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Inconsistent state of WebKitWebView when replacing content in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=79775
Reviewed by Martin Robinson.
Use an enum instead of a boolean to track the status of a
replace_content() load operation. We need to know when the load of
the replace content actually starts to not ignore valid load
events of a previous ongoing load operation.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewLoadChanged): Transit to new replace content state
when replacing content depending on the load event.
(webkitWebViewLoadFailed): Ignore load failed events when
replacing content.
(webkitWebViewSetEstimatedLoadProgress): Ignore load progress when
replacing content.
(webkit_web_view_replace_content): Set replace content status to
WillReplaceContent.
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(replaceContentLoadCallback):
(testWebViewReplaceContent):
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(titleChanged):
(WebViewTest::waitUntilTitleChanged): Convenient method to wait
until title changes. Use with replaceConent() since load events
are not emitted when replacing content.
* UIProcess/API/gtk/tests/WebViewTest.h:
2012-02-27 Anders Carlsson <andersca@apple.com>
Add basic page overlay support to TiledCoreAnimationDrawingArea
https://bugs.webkit.org/show_bug.cgi?id=79716
<rdar://problem/10923079>
Reviewed by Sam Weinig.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
Make TiledCoreAnimationDrawingArea a GraphicsLayerClient.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
Create the page overlay layer.
(WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
Destroy the page overlay layer.
(WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
Mark the page overlay layer as needing display.
(WebKit::TiledCoreAnimationDrawingArea::notifyAnimationStarted):
(WebKit::TiledCoreAnimationDrawingArea::notifySyncRequired):
Add empty GraphisLayerClient member function implementations.
(WebKit::TiledCoreAnimationDrawingArea::paintContents):
Ask the page overlay to paint itself.
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
Flush the page overlay layer.
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
Resize the page overlay layer.
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
If we have a page overlay layer, add it as a sublayer of the root layer.
(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
Create the page overlay layer and add it as a sublayer of the root layer.
(WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
Remove the page overlay layer and destroy it.
2012-02-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove virtual methods of WebKitDownload signals in WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=79804
Reviewed by Martin Robinson.
That comes from the first patch that followed the approach of the
first LoaderClient implementation. With current implementation
download signals, except decide-destination, don't need to be
true_handled, and they won't have a default handler
implementation. Also the download object is not supposed to be
inheritable, since instances are created privately by the
WebContext, so it's not possible to override the virtual methods
in derived classes.
* UIProcess/API/gtk/WebKitDownload.cpp:
(webkit_download_class_init):
(webkitDownloadNotifyProgress):
(webkitDownloadFailed):
(webkitDownloadFinished):
* UIProcess/API/gtk/WebKitDownload.h:
(_WebKitDownloadClass):
* UIProcess/API/gtk/webkit2marshal.list:
2012-02-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Fix build for WK2, do not use enum type if values can be outside the enum
https://bugs.webkit.org/show_bug.cgi?id=79800
Reviewed by Csaba Osztrogonác.
We have two different enums called NavigationRequestAction. If we use one of them
to store the variables, compilers can rightfully warn about comparison with
values from other enums.
We might revisit the strategy of exposing different enumerations in experimental,
but for now, fallback to using int for the 'action' property in
QWebNavigationRequest.
* UIProcess/API/qt/qwebnavigationrequest.cpp:
(QWebNavigationRequestPrivate):
(QWebNavigationRequest::setAction):
(QWebNavigationRequest::action):
* UIProcess/API/qt/qwebnavigationrequest_p.h:
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
2012-02-27 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] API changes to QWebNavigationRequest
https://bugs.webkit.org/show_bug.cgi?id=78821
Reviewed by Kenneth Rohde Christiansen.
Changes discussed in API review at Szeged: rename 'button' to 'mouseButton',
rename 'modifiers' to 'keyboardModifiers', remove 'originatingUrl' and
use the enum type for 'action'.
* UIProcess/API/qt/qwebnavigationrequest.cpp:
(QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
(QWebNavigationRequestPrivate):
(QWebNavigationRequest::QWebNavigationRequest):
(QWebNavigationRequest::setAction):
(QWebNavigationRequest::mouseButton):
(QWebNavigationRequest::keyboardModifiers):
(QWebNavigationRequest::action):
* UIProcess/API/qt/qwebnavigationrequest_p.h:
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
* UIProcess/qt/QtWebPagePolicyClient.cpp:
(QtWebPagePolicyClient::decidePolicyForNavigationAction):
* UIProcess/qt/QtWebPagePolicyClient.h:
(QtWebPagePolicyClient):
2012-02-28 Shinya Kawanaka <shinyak@chromium.org>
Element should be able to have multiple shadow roots.
https://bugs.webkit.org/show_bug.cgi?id=77931
Reviewed by Hajime Morita.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-02-28 Hugo Parente Lima <hugo.lima@openbossa.org>
[Qt][WK2] Use movementStarted/Ended signals instead of movingChanged on QtViewportInterationEngine
https://bugs.webkit.org/show_bug.cgi?id=79521
Reviewed by Kenneth Rohde Christiansen.
movingChanged() signal is emitted many times, so the use of movementStarted() and
movementEnded() is a better choice.
* UIProcess/qt/QtFlickProvider.cpp:
(QtFlickProvider::QtFlickProvider):
* UIProcess/qt/QtFlickProvider.h:
(QtFlickProvider):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
2012-02-27 Shinya Kawanaka <shinyak@chromium.org>
Element::removeShadowRoot() and setShadowRoot() should be moved into ShadowTree.
https://bugs.webkit.org/show_bug.cgi?id=78313
Reviewed by Hajime Morita.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-02-27 Brady Eidson <beidson@apple.com>
<rdar://problem/10924993> and https://bugs.webkit.org/show_bug.cgi?id=79725
<a ping> doesn't work in WebKit2
Reviewed by Alexey Proskuryakov.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Push the WK2 <a ping> setting to WebCore::Settings.
2012-02-27 Enrica Casucci <enrica@apple.com>
WebKit2: implement platform strategy to access Pasteboard in the UI process.
https://bugs.webkit.org/show_bug.cgi?id=79253
<rdar://problem/9971876>
Reviewed by Alexey Proskuryakov.
* UIProcess/WebContext.h:
* UIProcess/WebContext.messages.in: Added messages to access NSPasteboard
in the UI process.
* UIProcess/mac/WebContextMac.mm: Added methods corresponding to the
new messages.
(WebKit::WebContext::getPasteboardTypes):
(WebKit::WebContext::getPasteboardPathnamesForType):
(WebKit::WebContext::getPasteboardStringForType):
(WebKit::WebContext::getPasteboardBufferForType):
(WebKit::WebContext::pasteboardCopy):
(WebKit::WebContext::getPasteboardChangeCount):
(WebKit::WebContext::getPasteboardUniqueName):
(WebKit::WebContext::getPasteboardColor):
(WebKit::WebContext::setPasteboardTypes):
(WebKit::WebContext::setPasteboardPathnamesForType):
(WebKit::WebContext::setPasteboardStringForType):
(WebKit::WebContext::setPasteboardBufferForType):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: New implementation of the PasteboardStrategy using message exchange
with the UI process.
(WebKit::WebPlatformStrategies::getTypes):
(WebKit::WebPlatformStrategies::bufferForType):
(WebKit::WebPlatformStrategies::getPathnamesForType):
(WebKit::WebPlatformStrategies::stringForType):
(WebKit::WebPlatformStrategies::copy):
(WebKit::WebPlatformStrategies::changeCount):
(WebKit::WebPlatformStrategies::uniqueName):
(WebKit::WebPlatformStrategies::color):
(WebKit::WebPlatformStrategies::setTypes):
(WebKit::WebPlatformStrategies::setBufferForType):
(WebKit::WebPlatformStrategies::setPathnamesForType):
(WebKit::WebPlatformStrategies::setStringForType):
2012-02-27 Dan Bernstein <mitz@apple.com>
<rdar://problem/9557598> REGRESSION (WebKit2): Non-activating links sometimes don’t work
https://bugs.webkit.org/show_bug.cgi?id=79607
Reviewed by Adele Peterson.
Test: TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm
This was caused by not mapping the mouse event coordinates from window coordinates to
document coordinates.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation): Convert the point to main frame
coordinates when performing the hit test.
(WebKit::WebPage::shouldDelayWindowOrderingEvent): Convert the point to the main or focused
frame coordinates when perfomring the hit test.
(WebKit::WebPage::acceptsFirstMouse): Ditto.
2012-02-27 Timothy Hatcher <timothy@apple.com>
Add WKInspector API to know when the Web Inspector is the frontmost window.
Also makes the Safari Develop menu items work when the Web Inspector is frontmost.
https://webkit.org/b/79649
Reviewed by John Sullivan.
* UIProcess/API/C/WKInspector.cpp:
(WKInspectorIsFront): Added. Call WebInspectorProxy::isFront.
* UIProcess/API/C/WKInspector.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::isFront): Added. Call platformIsFront.
* UIProcess/WebInspectorProxy.h:
* UIProcess/efl/WebInspectorEfl.cpp:
(WebKit::WebInspectorProxy::platformIsFront): Added stub.
* UIProcess/gtk/WebInspectorGtk.cpp:
(WebKit::WebInspectorProxy::platformIsFront): Added stub.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter showWebInspector:]): Added. Makes the Develop menu items in Safari work when
the Web Inspector window is front.
(-[WKWebInspectorProxyObjCAdapter showErrorConsole:]): Added. Ditto.
(-[WKWebInspectorProxyObjCAdapter showResources:]): Added. Ditto.
(-[WKWebInspectorProxyObjCAdapter viewSource:]): Added. Ditto.
(-[WKWebInspectorProxyObjCAdapter toggleDebuggingJavaScript:]): Added. Ditto.
(-[WKWebInspectorProxyObjCAdapter toggleProfilingJavaScript:]): Added. Ditto.
(-[WKWebInspectorProxyObjCAdapter validateUserInterfaceItem:]): Added. Update the menu item titles.
(WebKit::WebInspectorProxy::platformIsFront): Added. Return if visible and the window is main.
* UIProcess/qt/WebInspectorProxyQt.cpp:
(WebKit::WebInspectorProxy::platformIsFront): Added stub.
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformIsFront): Added stub.
2012-02-26 YoungTaeck Song <youngtaeck.song@samsung.com>
[EFL][WK2] Add InjectedBundleEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=75463
Reviewed by Andreas Kling.
Add first version of InjectedBundleEfl.cpp including load() and placeholder for activateMacFontAscentHack().
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
(WebKit::InjectedBundle::load):
(WebKit::InjectedBundle::activateMacFontAscentHack):
2012-02-26 Shinya Kawanaka <shinyak@chromium.org>
Rename ShadowRootList to ShadowTree.
https://bugs.webkit.org/show_bug.cgi?id=79342
Reviewed by Hajime Morita.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-02-26 Hajime Morrita <morrita@chromium.org>
Move ChromeClient::showContextMenu() to ContextMenuClient
https://bugs.webkit.org/show_bug.cgi?id=79427
Reviewed by Adam Barth.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient):
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit):
(WebKit::WebContextMenuClient::showContextMenu): Moved from WebChromeClient
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
(WebContextMenuClient):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleContextMenuEvent):
(WebKit::handleMouseEvent):
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::mouseEventSyncForTesting):
2012-02-26 Huang Dongsung <luxtella@company100.net>
Use Functional instead of a MessageQueue for messages to the LayerTreeHostProxy
renderer.
https://bugs.webkit.org/show_bug.cgi?id=79478
This makes a lot of the broilerplate code for message-passing unnecessary, and
results in a much more succinct implementation.
Reviewed by Noam Rosenthal.
* UIProcess/LayerTreeHostProxy.h:
(WebKit):
(LayerTreeHostProxy):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit):
(WebKit::LayerTreeHostProxy::updateTile):
(WebKit::LayerTreeHostProxy::createImage):
(WebKit::LayerTreeHostProxy::syncRemoteContent):
(WebKit::LayerTreeHostProxy::dispatchUpdate):
(WebKit::LayerTreeHostProxy::createTileForLayer):
(WebKit::LayerTreeHostProxy::updateTileForLayer):
(WebKit::LayerTreeHostProxy::removeTileForLayer):
(WebKit::LayerTreeHostProxy::deleteCompositingLayer):
(WebKit::LayerTreeHostProxy::setRootCompositingLayer):
(WebKit::LayerTreeHostProxy::syncCompositingLayerState):
(WebKit::LayerTreeHostProxy::didRenderFrame):
(WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
(WebKit::LayerTreeHostProxy::destroyDirectlyCompositedImage):
2012-02-26 Filip Pizlo <fpizlo@apple.com>
Build fix for SL.
* Platform/mac/RemoteLayerClient.mm:
(WebKit::RemoteLayerClient::RemoteLayerClient):
2012-02-26 Sam Weinig <sam@webkit.org>
Encapsulate uses of WKSI to setup a remote layer into a new RemoteLayerClient class
https://bugs.webkit.org/show_bug.cgi?id=79612
Reviewed by Anders Carlsson.
* Platform/mac/RemoteLayerClient.h:
* Platform/mac/RemoteLayerClient.mm:
(WebKit::RemoteLayerClient::create):
(WebKit::RemoteLayerClient::RemoteLayerClient):
(WebKit::RemoteLayerClient::~RemoteLayerClient):
(WebKit::RemoteLayerClient::clientID):
(WebKit::RemoteLayerClient::invalidate):
New class that encapsulates calls to WKSI WKCARemoteLayerClient*. For platforms
where the use of WKSI is not necessary, due to CARemoteLayerClient being available,
stop using WKSI.
* PluginProcess/PluginControllerProxy.cpp:
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::platformInitialize):
(WebKit::PluginControllerProxy::platformDestroy):
(WebKit::PluginControllerProxy::remoteLayerClientID):
(WebKit::PluginControllerProxy::platformGeometryDidChange):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
* WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
(WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
(WebKit::WebFullScreenManagerMac::disposeOfLayerClient):
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
(LayerTreeHostCAMac):
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
(WebKit::LayerTreeHostCAMac::platformInitialize):
(WebKit::LayerTreeHostCAMac::invalidate):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
Switch to using RemoteLayerClient.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
Use CARemoteLayerServer directly if available.
2012-02-25 Anders Carlsson <andersca@apple.com>
Address review feedback from Andreas Kling.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformHandleMouseEvent):
2012-02-25 Anders Carlsson <andersca@apple.com>
Mouse tracking incorrect in Silverlight when using multi monitor with offset arrangement
https://bugs.webkit.org/show_bug.cgi?id=79589
<rdar://problem/9719592>
Reviewed by Sam Weinig.
In the Carbon event model, mouse event coordinates are flipped relative to the first screen,
whereas the coordinates we get from the WebMouseEvent are flipped relative to the screen where
the containing WKView is on.
Instead of passing the global coordinates to NPP_HandleEvent, convert them to the flipped screen coordinate
system that the plug-in expects.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformHandleMouseEvent):
2012-02-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r108900.
http://trac.webkit.org/changeset/108900
https://bugs.webkit.org/show_bug.cgi?id=79587
broke some API tests, will investigate and re-commit
(Requested by noamr on #webkit).
* UIProcess/API/qt/qquickwebpage.cpp:
(computeEffectiveOpacity):
(QQuickWebPagePrivate::paintToCurrentGLContext):
(PageProxyNode::changedStates):
(PageProxyNode::render):
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
2012-02-25 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt] Use the existing inheritedOpacity/matrix properties of QSGNode
https://bugs.webkit.org/show_bug.cgi?id=79543
Use QSGNode::inheritedOpacity() and QSGNode::matrix().
Also, remove flags from changedStates() that we don't actually touch.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paintToCurrentGLContext):
(PageProxyNode::changedStates):
(PageProxyNode::render):
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
2012-02-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r108816.
http://trac.webkit.org/changeset/108816
https://bugs.webkit.org/show_bug.cgi?id=79562
It made many tests crash and timeout on Qt-WK2 (Requested by
ossy__ on #webkit).
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::setIcon):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::loadProgress):
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::didCommitLoadForFrame):
(QtWebPageLoadClient::didSameDocumentNavigationForFrame):
(QtWebPageLoadClient::didReceiveTitleForFrame):
(QtWebPageLoadClient::setLoadProgress):
* UIProcess/qt/QtWebPageLoadClient.h:
(QtWebPageLoadClient):
2012-02-24 Andy Estes <aestes@apple.com>
REGRESSION (r108730): Webkit nightlies fails to start due to WKPreferencesGetSuppressIncrementalRendering renaming
https://bugs.webkit.org/show_bug.cgi?id=79515
Reviewed by Alexey Proskuryakov.
Some versions of Safari contain call sites to two functions in WebKit2
that were removed in r108730. Restore these two functions so that these
versions of Safari can be used with WebKit nightly builds.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetSuppressIncrementalRendering):
(WKPreferencesGetSuppressIncrementalRendering):
* UIProcess/API/C/WKPreferences.h:
2012-02-24 Jessie Berlin <jberlin@apple.com>
requestPermission callback not invoked if the WebProcess doesn't have to ask the UI Process
about the permission level.
https://bugs.webkit.org/show_bug.cgi?id=79494
Reviewed by Jon Honeycutt.
Invoke the callback in the case where the permission level is known and no message is sent
to the UI Process.
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::startRequest):
2012-02-24 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Signal and property cleanup in QQuickWebView
https://bugs.webkit.org/show_bug.cgi?id=78820
Reviewed by Simon Hausmann.
- Remove parameters from property change notify signals:
titleChanged, urlChanged, iconChanged, loadProgressChanged
- Rename the parameters of linkHovered to prevent shadoing properties of WebView
- Rename navigationStateChanged to navigationHistoryChanged
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::_q_onUrlChanged):
(QQuickWebViewPrivate::setIcon):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::loadProgress):
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::didCommitLoadForFrame):
(QtWebPageLoadClient::didSameDocumentNavigationForFrame):
(QtWebPageLoadClient::didReceiveTitleForFrame):
(QtWebPageLoadClient::setLoadProgress):
* UIProcess/qt/QtWebPageLoadClient.h:
(QtWebPageLoadClient):
2012-02-24 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] API: Unify the loading properties and signals.
https://bugs.webkit.org/show_bug.cgi?id=79486
Reviewed by Simon Hausmann.
- Remove the canReload signal, instead assume that calling reload in those cases
won't have any effect.
- Replace loadStarted, loadSucceeded and loadFailed by a single signal: loadingChanged.
The signal carries an argument with a status and error codes giving the intended context.
- Use loadingChanged as the notification signal for the property "loading" instead of
navigationStateChanged.
Also update all API tests to use the new loading signals and add some utility functions
to track the loading since the new API aims to be more adapted to declarative logic
and the auto tests are using an imperative logic.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::loadDidSucceed):
(QQuickWebViewPrivate::didChangeLoadingState):
(QQuickWebViewPrivate::processDidCrash):
(QQuickWebViewPrivate::didRelaunchProcess):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/API/qt/qwebloadrequest.cpp: Added.
(QWebLoadRequestPrivate):
(QWebLoadRequestPrivate::QWebLoadRequestPrivate):
(QWebLoadRequest::QWebLoadRequest):
(QWebLoadRequest::~QWebLoadRequest):
(QWebLoadRequest::url):
(QWebLoadRequest::status):
(QWebLoadRequest::errorString):
(QWebLoadRequest::errorDomain):
(QWebLoadRequest::errorCode):
* UIProcess/API/qt/qwebloadrequest_p.h: Added.
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadHtml.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml:
* UIProcess/API/qt/tests/qmltests/common/TestWebView.qml: Added.
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::navigationStatusAtStartup):
(LoadStartedCatcher::LoadStartedCatcher):
(LoadStartedCatcher::onLoadingChanged):
(tst_QQuickWebView::stopEnabledAfterLoadStarted):
(tst_QQuickWebView::loadEmptyPageViewHidden):
(tst_QQuickWebView::loadNonexistentFileUrl):
(tst_QQuickWebView::backAndForward):
(tst_QQuickWebView::reload):
(tst_QQuickWebView::stop):
(tst_QQuickWebView::loadProgress):
(tst_QQuickWebView::showWebView):
(tst_QQuickWebView::multipleWebViewWindows):
(tst_QQuickWebView::multipleWebViews):
(tst_QQuickWebView::scrollRequest):
* UIProcess/API/qt/tests/util.cpp:
(LoadSpy):
(LoadSpy::LoadSpy):
(LoadSpy::onLoadingChanged):
(waitForLoadSucceeded):
(waitForLoadFailed):
* UIProcess/API/qt/tests/util.h:
* UIProcess/qt/QtWebError.h:
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::didStartProvisionalLoadForFrame):
(QtWebPageLoadClient::dispatchLoadFailed):
* UIProcess/qt/QtWebPageLoadClient.h:
(QtWebPageLoadClient):
2012-02-24 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed, rolling out r108798.
http://trac.webkit.org/changeset/108798
https://bugs.webkit.org/show_bug.cgi?id=78047
Broke too many Qt WK2 tests.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::keyPressEvent):
(QQuickWebView::keyReleaseEvent):
(QQuickWebView::inputMethodEvent):
(QQuickWebView::focusInEvent):
(QQuickWebView::focusOutEvent):
(QQuickWebView::touchEvent):
(QQuickWebView::mousePressEvent):
(QQuickWebView::mouseMoveEvent):
(QQuickWebView::mouseReleaseEvent):
(QQuickWebView::mouseDoubleClickEvent):
(QQuickWebView::wheelEvent):
(QQuickWebView::hoverEnterEvent):
(QQuickWebView::hoverMoveEvent):
(QQuickWebView::hoverLeaveEvent):
(QQuickWebView::dragMoveEvent):
(QQuickWebView::dragEnterEvent):
(QQuickWebView::dragLeaveEvent):
(QQuickWebView::dropEvent):
(QQuickWebView::event):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleEvent):
(QtWebPageEventHandler::handleMouseMoveEvent):
(QtWebPageEventHandler::handleMousePressEvent):
(QtWebPageEventHandler::handleMouseReleaseEvent):
(QtWebPageEventHandler::handleWheelEvent):
(QtWebPageEventHandler::handleHoverLeaveEvent):
(QtWebPageEventHandler::handleHoverMoveEvent):
(QtWebPageEventHandler::handleDragEnterEvent):
(QtWebPageEventHandler::handleDragLeaveEvent):
(QtWebPageEventHandler::handleDragMoveEvent):
(QtWebPageEventHandler::handleDropEvent):
(QtWebPageEventHandler::handleKeyPressEvent):
(QtWebPageEventHandler::handleKeyReleaseEvent):
(QtWebPageEventHandler::handleFocusInEvent):
(QtWebPageEventHandler::handleFocusOutEvent):
(QtWebPageEventHandler::inputMethodEvent):
(QtWebPageEventHandler::touchEvent):
* UIProcess/qt/QtWebPageEventHandler.h:
(QtWebPageEventHandler):
2012-02-24 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][WK2] QQuickWebView::event should lookup faster which events QQuickWebPage can handle
https://bugs.webkit.org/show_bug.cgi?id=78047
Reviewed by Kenneth Rohde Christiansen.
Replaced double-dispatch of events with direct forwarding of events from QQuickWebView::*Event to
QtWebPageEventHandler::handle*Event.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::keyPressEvent):
(QQuickWebView::keyReleaseEvent):
(QQuickWebView::inputMethodEvent):
(QQuickWebView::focusInEvent):
(QQuickWebView::focusOutEvent):
(QQuickWebView::touchEvent):
(QQuickWebView::mousePressEvent):
(QQuickWebView::mouseMoveEvent):
(QQuickWebView::mouseReleaseEvent):
(QQuickWebView::mouseDoubleClickEvent):
(QQuickWebView::wheelEvent):
(QQuickWebView::hoverEnterEvent):
(QQuickWebView::hoverMoveEvent):
(QQuickWebView::hoverLeaveEvent):
(QQuickWebView::dragMoveEvent):
(QQuickWebView::dragEnterEvent):
(QQuickWebView::dragLeaveEvent):
(QQuickWebView::dropEvent):
(QQuickWebView::event):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleMouseMoveEvent):
(QtWebPageEventHandler::handleMousePressEvent):
(QtWebPageEventHandler::handleMouseReleaseEvent):
(QtWebPageEventHandler::handleWheelEvent):
(QtWebPageEventHandler::handleHoverLeaveEvent):
(QtWebPageEventHandler::handleHoverMoveEvent):
(QtWebPageEventHandler::handleDragEnterEvent):
(QtWebPageEventHandler::handleDragLeaveEvent):
(QtWebPageEventHandler::handleDragMoveEvent):
(QtWebPageEventHandler::handleDropEvent):
(QtWebPageEventHandler::handleKeyPressEvent):
(QtWebPageEventHandler::handleKeyReleaseEvent):
(QtWebPageEventHandler::handleFocusInEvent):
(QtWebPageEventHandler::handleFocusOutEvent):
(QtWebPageEventHandler::handleInputMethodEvent):
(QtWebPageEventHandler::handleTouchEvent):
* UIProcess/qt/QtWebPageEventHandler.h:
(QtWebPageEventHandler):
2012-02-24 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Use private QSGRenderNode in QQuickWebView for improved Qt Scene Graph integration
https://bugs.webkit.org/show_bug.cgi?id=79022
Reviewed by Csaba Osztrogonác.
* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
(PageProxyNode::PageProxyNode):
(PageProxyNode::changedStates):
(PageProxyNode::render):
(PageProxyNode):
2012-02-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Encode/decode Null ResourceResponse objects in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=79471
Reviewed by Philippe Normand.
* Shared/gtk/WebCoreArgumentCodersGtk.cpp:
(CoreIPC::::encode): Check whether ResourceResponse is Null before
encoding it.
(CoreIPC::::decode): Check whether response is Null and create a
Null ResourceResponse object in such case.
2012-02-24 Shinya Kawanaka <shinyak@chromium.org>
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-02-23 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Tiling: Improve the method names dealing with moving and scaling.
Rubberstamped by Simon Hausmann.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewLegacyPrivate::updateViewportSize):
(QQuickWebViewFlickablePrivate::onComponentComplete):
(QQuickWebViewFlickablePrivate::updateViewportSize):
(QQuickWebViewFlickablePrivate::_q_commitScaleChange):
(QQuickWebViewPrivate::_q_commitPositionChange):
(QQuickWebViewFlickablePrivate::_q_resume):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
(QQuickWebViewPrivate::_q_commitScaleChange):
(QQuickWebViewFlickablePrivate):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::setVisibleContentsRectForScaling):
(WebKit::DrawingAreaProxy::setVisibleContentsRectForPanning):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::setVisibleContentsRectForScaling):
(WebKit::DrawingAreaProxyImpl::setVisibleContentsRectForPanning):
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::setVisibleContentsRectForPanning):
(WebKit::LayerTreeHostProxy::setVisibleContentsRectForScaling):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
(WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
(WebKit::QtViewportInteractionEngine::wheelEvent):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::setVisibleContentsRectForScaling):
(WebKit::LayerTreeHost::setVisibleContentsRectForPanning):
(WebKit::LayerTreeHost::setVisibleContentsRectForLayer):
* WebProcess/WebPage/LayerTreeHost.messages.in:
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::setVisibleContentsRectForScaling):
(WebKit::LayerTreeHostQt::setVisibleContentsRectForPanning):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
2012-02-24 Sergio Villar Senin <svillar@igalia.com>
[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-02-23 Andy Estes <aestes@apple.com>
Rename [setS|s]uppressIncrementalRendering to [setS|s]uppressesIncrementalRendering and make it WebPreferences API.
https://bugs.webkit.org/show_bug.cgi?id=79433
Reviewed by Dan Bernstein.
* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetSuppressesIncrementalRendering):
(WKPreferencesGetSuppressesIncrementalRendering):
* UIProcess/API/C/WKPreferences.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::createInspectorPageGroup):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2012-02-23 Mario Sanchez Prada <msanchez@igalia.com>
[GTK] Wrong signal name on emission in WebKitWindowProperties.cpp
https://bugs.webkit.org/show_bug.cgi?id=79352
Reviewed by Philippe Normand.
Emit the signal 'resizable' instead of 'resizable-visible'.
* UIProcess/API/gtk/WebKitWindowProperties.cpp:
(webkitWindowPropertiesSetResizable): Use right signal name.
2012-02-23 Anders Carlsson <andersca@apple.com>
Flush layer changes after layout when resizing web page
https://bugs.webkit.org/show_bug.cgi?id=79399
<rdar://problem/10920157>
Reviewed by Andreas Kling.
Flush layer changes after layout, otherwise the scrollbars won't be updated
until sometime later which looks bad.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
2012-02-23 Daniel Bates <dbates@webkit.org>
Add missing "Reviewed by" line to change log entry for changeset r108631
(https://bugs.webkit.org/show_bug.cgi?id=79252)
The patch landed in changeset r108631 was reviewed by Martin Robinson.
* ChangeLog:
2012-02-23 Patrick Gansterer <paroga@webkit.org>
[CMake] Add WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS macro
https://bugs.webkit.org/show_bug.cgi?id=79371
Reviewed by Daniel Bates.
* CMakeLists.txt:
2012-02-23 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Add support for touch cancellation
https://bugs.webkit.org/show_bug.cgi?id=79348
Reviewed by Kenneth Rohde Christiansen.
Convert and forward incoming touch cancellation events
to the web process.
* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::webEventTypeForEvent):
(WebKit::WebEventFactory::createWebTouchEvent):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::event):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleEvent):
2012-02-23 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Build fix after r108428.
* win/WebKit2CFLite.def: Add missing export declaration.
2012-02-23 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed test fix after r108614: Adjust public API after changes.
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
2012-02-23 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Build fix. Qt WebKit2 can not be compiled due to QtWebPageEventHandler.
https://bugs.webkit.org/show_bug.cgi?id=79335
Reviewed by Kenneth Rohde Christiansen.
In the upcoming Qt 5 builds the convenient setInputMethodHints method on QQuickItem
will be removed. There's no need for us to use it, we can implement passing the hints
to the input method right away in our re-implementation of inputMethodQuery, which works
with old and newer Qt 5 builds.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::inputMethodQuery):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::updateTextInputState):
2012-02-23 Sergio Villar Senin <svillar@igalia.com>
[WK2][GTK] WebProcess SIGSEVs due to incorrect clipboard handling
https://bugs.webkit.org/show_bug.cgi?id=79252
Reviewed by Martin Robinson.
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-02-23 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Page doesn't get repainted while panning is in progress
https://bugs.webkit.org/show_bug.cgi?id=78602
Reviewed by Simon Hausmann.
The tiling code needed the current visibleContentsRect in order to be
able to create tiles, so we now make sure it gets it. We also needed
to make sure to set the trajectory vector while panning and while the
flicking engine was animating kinetic scrolling.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::_q_updateVisibleContentRectAndScale):
(QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::setVisibleContentRectTrajectoryVector):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::setVisibleContentRectTrajectoryVector):
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::setVisibleContentRectTrajectoryVector):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::flickableMovingStateChanged):
(WebKit):
(WebKit::QtViewportInteractionEngine::panMoveStarted):
(WebKit::QtViewportInteractionEngine::panMoveEnded):
(WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
(WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::setVisibleContentRectTrajectoryVector):
* WebProcess/WebPage/LayerTreeHost.messages.in:
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
(WebKit::LayerTreeHostQt::setVisibleContentRectTrajectoryVector):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
2012-02-23 Patrick Gansterer <paroga@webkit.org>
[CMAKE][WK2] Cleanup WebKit2/CMakeLists.txt.
https://bugs.webkit.org/show_bug.cgi?id=76122
Reviewed by Eric Seidel.
* CMakeLists.txt: Removed hardcoded WTF_USE_JSC preprocessor definition.
2012-02-23 Simon Hausmann <simon.hausmann@nokia.com>
[WK2] Trivial build fix after r108615.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2012-02-22 Michael Tyutyunik <michael.tyutyunik@nokia.com>
[Qt][WK2] navigationType is missing in new API
https://bugs.webkit.org/show_bug.cgi?id=78867
Reviewed by Simon Hausmann.
In QtWebPagePolicyClient::decidePolicyForNavigationAction()
navigationType argument is dropped by mistake. Adding it back
and make it available through NavigationRequest.
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebnavigationrequest.cpp:
(QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
(QWebNavigationRequestPrivate):
(QWebNavigationRequest::QWebNavigationRequest):
(QWebNavigationRequest::navigationType):
* UIProcess/API/qt/qwebnavigationrequest_p.h:
* UIProcess/qt/QtWebPagePolicyClient.cpp:
(QtWebPagePolicyClient::decidePolicyForNavigationAction):
(toQuickWebViewNavigationType):
* UIProcess/qt/QtWebPagePolicyClient.h:
(QtWebPagePolicyClient):
2012-02-22 Anders Carlsson <andersca@apple.com>
Implement TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange
https://bugs.webkit.org/show_bug.cgi?id=79297
<rdar://problem/10748510>
Reviewed by Beth Dakin.
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
Send a message to the web process.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setDeviceScaleFactor):
Add empty stub.
* WebProcess/WebPage/DrawingArea.messages.in:
Add SetDeviceScaleFactor message.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor):
Call WebPage::setDeviceScaleFactor.
2012-02-22 Brady Eidson <beidson@apple.com>
<rdar://problem/10406044> and https://bugs.webkit.org/show_bug.cgi?id=79279
Synchronous ShouldGoToBackForwardListItem causes lots of WebProcess hangs
Reviewed by Anders Carlsson.
Anytime the WebProcess sends a sync message up to the UI Process a hang can ensue.
In the case of shouldGoToBackForwardListItem it seems many clients want a back/forward
notification but don't actually want to make a policy decision.
Making it an asynchronous notification instead of a synchronous policy call will remove the
possibility of a hang here.
If clients later decide it is important to have a policy here we should implement a form of
shouldGoToBackForwardListItem in the bundle loader client.
Add a notification "willGoToBackForwardListItem" to the WKPageLoaderClient:
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeLoaderClient): Tell the WebProcess whether it should be
sending the shouldGoToBackForwardListItem or willGoToBackForwardListItem form of this message.
(WebKit::WebPageProxy::shouldGoToBackForwardListItem):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Add an asynchronous WillGoToBackForwardListItem message
Store a flag in the WebProcess - Sent from the UIProcess - to tell the FrameLoaderClient which form
of the callback should be used:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::willGoToBackForwardItemCallbackEnabled):
(WebKit::WebPage::setWillGoToBackForwardItemCallbackEnabled):
* WebProcess/WebPage/WebPage.messages.in:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::shouldGoToBackForwardListItem): Only consider calling this for
version 0 clients.
(WebKit::WebLoaderClient::willGoToBackForwardListItem): Later clients get this callback.
* UIProcess/WebLoaderClient.h:
(WebLoaderClient):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem): Send either the synchronous "should" message
or the asynchronous "will" message depending on which the WebProcess was last told that the
UIProcess expects. There is an edge case where the wrong one might be sent because the WebProcess
hasn't received the message about a change in the WKPageLoaderClient yet but that's probably okay;
It seems unlikely that a UIProcess client would ever rapidly change between v0 and other versions
of the loader client and the UIProcess of WebKit2 is equipped to handle that case if it comes up.
2012-02-16 Jon Lee <jonlee@apple.com>
[WK2] Clearing notifications does not clean up internal state
https://bugs.webkit.org/show_bug.cgi?id=78861
<rdar://problem/10881167>
Reviewed by Anders Carlsson.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::clearNotifications): This function was missing removing the notification
entries from the other maps.
(WebKit::WebNotificationManager::didDestroyNotification): When the notification is destroyed, it should
also be removed from the context map.
(WebKit::WebNotificationManager::didCloseNotifications): Refactor to pull out the code that removes
a provided notification from the context map.
(WebKit::WebNotificationManager::removeNotificationFromContextMap): Find the notification in the map, and
remove it. If the map is empty, get rid of the entry.
* WebProcess/Notifications/WebNotificationManager.h:
(WebNotificationManager):
2012-02-22 Jon Lee <jonlee@apple.com>
Code cleanup in WebNotificationManager (79285)
https://bugs.webkit.org/show_bug.cgi?id=79285
<rdar://problem/10914522>
Reviewed by Anders Carlsson.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show): Simplify adding a blank vector to the map using .add(),
similar to what is found in WebNotificationClient.mm in WebKit 1.
2012-02-21 Ryosuke Niwa <rniwa@webkit.org>
Remove the remaining uses of CSSStyleDeclaration in Editor
https://bugs.webkit.org/show_bug.cgi?id=78939
Reviewed by Enrica Casucci.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::shouldApplyStyle):
* WebProcess/WebCoreSupport/WebEditorClient.h:
(WebEditorClient):
2012-02-22 Martin Robinson <mrobinson@igalia.com>
[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-22 Antaryami Pandia <antaryami.pandia@motorola.com>
[GTK][WK2] Add WebGL WebSetting.
https://bugs.webkit.org/show_bug.cgi?id=79217
Reviewed by Martin Robinson.
Add a WebSetting to enable/disable Webgl.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_set_enable_webaudio):
(webkit_settings_get_enable_webgl):
(webkit_settings_set_enable_webgl):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings):
2012-02-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Disregard previous backing store as soon as possible
https://bugs.webkit.org/show_bug.cgi?id=79232
Reviewed by Simon Hausmann and No'am Rosenthal.
Between creating the new backing store and painting the content,
we do not want to drop the previous one as that might result in
briefly seeing flickering as the old tiles may be dropped before
something replaces them.
But we do need to drop it at some point and we need to make sure
to not spike the memory usage before of this.
What we now do, is to store the previous backing store as before,
but drop all tiles which are not visible and then drop it as soon
as the visible rect (which might change due if followed by a quick
panning) has been fully covered by tiles.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::setContentsScale):
(WebCore::WebGraphicsLayer::updateContentBuffers):
2012-02-22 Michael Brüning <michael.bruning@nokia.com>
[Qt][WK2] Implement proxy authentication handling.
https://bugs.webkit.org/show_bug.cgi?id=78792
Reviewed by Simon Hausmann.
This patch corrects two bugs with the previous implementation:
1. The signal proxyAuthenticationRequired was not connected to a
slot.
2. The slot onProxyAuthenticationRequired had the wrong parameters.
* WebProcess/qt/QtNetworkAccessManager.cpp:
(WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
(WebKit::QtNetworkAccessManager::onProxyAuthenticationRequired):
* WebProcess/qt/QtNetworkAccessManager.h: Added include.
(QtNetworkAccessManager):
2012-02-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
Merge setVisibleRectTrajectoryVector and adjustVisibleRect to
the more descriptive coverWithTilesIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=79230
Reviewed by Simon Hausmann.
Replace use by coverWithTilesIfNeeded().
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
(WebCore::WebGraphicsLayer::adjustVisibleRect):
(WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
2012-02-22 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Add frame flattening setting to QWebPreferences.
https://bugs.webkit.org/show_bug.cgi?id=79099
Reviewed by Simon Hausmann.
Frame flattening is enabled by default for Qt WebKit2.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
* UIProcess/API/qt/qwebpreferences.cpp:
(QWebPreferencesPrivate::testAttribute):
(QWebPreferencesPrivate::setAttribute):
(QWebPreferences::setNavigatorQtObjectEnabled):
(QWebPreferences::frameFlatteningEnabled):
(QWebPreferences::setFrameFlatteningEnabled):
* UIProcess/API/qt/qwebpreferences_p.h:
2012-02-22 Ryosuke Niwa <rniwa@webkit.org>
Remove the remaining uses of CSSStyleDeclaration in Editor
https://bugs.webkit.org/show_bug.cgi?id=78939
Reviewed by Enrica Casucci.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::shouldApplyStyle):
* WebProcess/WebCoreSupport/WebEditorClient.h:
(WebEditorClient):
2012-02-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Null ResourceErrors are encoded/decoded as empty ResourceErrors
https://bugs.webkit.org/show_bug.cgi?id=79120
Reviewed by Martin Robinson.
* Shared/gtk/WebCoreArgumentCodersGtk.cpp:
(CoreIPC::::encode): Encode a boolean to indicate whether it's a
Null error.
(CoreIPC::::decode): Check whether the error is Null and do not
continue decoding in such case.
2012-02-21 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Draw tiles of previous contents-scale for opaque layers if they don't intersect with previous tiles
https://bugs.webkit.org/show_bug.cgi?id=78962
Only avoid painting old-scale tiles in semi-transparent situtations if the old
tiles intersect with existing tiles.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/qt/LayerBackingStore.cpp:
(WebKit::LayerBackingStore::paintToTextureMapper):
2012-02-21 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt] Previous web page appears outside content rect
https://bugs.webkit.org/show_bug.cgi?id=78816
Apply a clip on painted tiles if some of the tiles fall outside of the target rect.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/qt/LayerBackingStore.cpp:
(WebKit::LayerBackingStore::paintToTextureMapper):
2012-02-21 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Accelerated animations don't work on Mac
https://bugs.webkit.org/show_bug.cgi?id=78963
Problem came from using a non-RunLoop timer.
Remove the unused viewportUpdateTimer, and use the existing animationTimer instead.
Use a continuous timer that we only stop when animations stop.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit):
(WebKit::LayerTreeHostProxy::syncAnimations):
2012-02-21 Sam Weinig <sam@webkit.org>
Attempt to fix the Snow Leopard build.
* Configurations/Base.xcconfig:
2012-02-21 Sam Weinig <sam@webkit.org>
Use libc++ when building with Clang on Mac
https://bugs.webkit.org/show_bug.cgi?id=78981
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
2012-02-21 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Get rid of the dependency to QtWidgets
https://bugs.webkit.org/show_bug.cgi?id=76276
Reviewed by Simon Hausmann.
* Target.pri:
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
(main):
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
* UIProcess/API/qt/tests/tests.pri:
* UIProcess/API/qt/tests/util.h:
2012-02-20 Martin Robinson <mrobinson@igalia.com>
[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 <cgarcia@igalia.com>
[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 Michael Brüning <michael.bruning@nokia.com>
[Qt][WK2] Implement proxy authentication handling.
https://bugs.webkit.org/show_bug.cgi?id=78792
Reviewed by Simon Hausmann.
This patch implements the proxy authentication handling
for the Qt port in a similar matter to the http authentication
implementation.
Since there is a need to pass the proxy port, which is of type uint16_t,
from the WebProcess to the UIProcess, an encoder and a decoder for
this type was added because it did not exist.
The message that was added to the WebPageProxy is called synchronously
as this is needed by the implementation of the network access manager
and has also been implemented this way already for the http
authentication.
* Platform/CoreIPC/ArgumentDecoder.cpp:
(CoreIPC::ArgumentDecoder::decodeUInt16):
(CoreIPC):
* Platform/CoreIPC/ArgumentDecoder.h:
(ArgumentDecoder):
(CoreIPC::ArgumentDecoder::decode):
(CoreIPC):
* Platform/CoreIPC/ArgumentEncoder.cpp:
(CoreIPC::ArgumentEncoder::encodeUInt16):
(CoreIPC):
* Platform/CoreIPC/ArgumentEncoder.h:
(ArgumentEncoder):
(CoreIPC::ArgumentEncoder::encode):
(CoreIPC):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::handleProxyAuthenticationRequiredRequest):
(QQuickWebViewExperimental::proxyAuthenticationDialog):
(QQuickWebViewExperimental::setProxyAuthenticationDialog):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/PageClient.h:
(PageClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::proxyAuthenticationRequiredRequest):
(WebKit):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtDialogRunner.cpp:
(ProxyAuthenticationDialogContextObject):
(ProxyAuthenticationDialogContextObject::ProxyAuthenticationDialogContextObject):
(ProxyAuthenticationDialogContextObject::hostname):
(ProxyAuthenticationDialogContextObject::port):
(ProxyAuthenticationDialogContextObject::prefilledUsername):
(ProxyAuthenticationDialogContextObject::accept):
(ProxyAuthenticationDialogContextObject::reject):
(QtDialogRunner::initForProxyAuthentication):
* UIProcess/qt/QtDialogRunner.h:
(QtDialogRunner):
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::handleProxyAuthenticationRequiredRequest):
* UIProcess/qt/QtPageClient.h:
(QtPageClient):
* WebProcess/WebPage/DecoderAdapter.cpp:
(WebKit::DecoderAdapter::decodeUInt16):
(WebKit):
* WebProcess/WebPage/DecoderAdapter.h:
(DecoderAdapter):
* WebProcess/WebPage/EncoderAdapter.cpp:
(WebKit::EncoderAdapter::encodeUInt16):
(WebKit):
* WebProcess/WebPage/EncoderAdapter.h:
(EncoderAdapter):
* WebProcess/qt/QtNetworkAccessManager.cpp:
(WebKit::QtNetworkAccessManager::onProxyAuthenticationRequired):
(WebKit):
* WebProcess/qt/QtNetworkAccessManager.h:
(QtNetworkAccessManager):
2012-02-20 Patrick Gansterer <paroga@webkit.org>
[CMake] Update and sort list of source files.
* CMakeLists.txt:
2012-02-20 Martin Robinson <mrobinson@igalia.com>
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 <mrobinson@igalia.com>
[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 <mitz@apple.com>
<rdar://problem/10891801> 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 <noam.rosenthal@nokia.com>
[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 <aroben@apple.com>
Clang build fix after r108119
* WebProcess/WebProcess.cpp:
(WebKit::randomCrashThread): Annotate this function with NO_RETURN_DUE_TO_CRASH.
2012-02-17 Kalev Lember <kalevlember@gmail.com>
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 <mihnea@adobe.com>
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 <enrica@apple.com>
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 <mrobinson@igalia.com>
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 <cgarcia@igalia.com>
[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 <cgarcia@igalia.com>
[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 <cgarcia@igalia.com>
[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 <cgarcia@igalia.com>
[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 <cgarcia@igalia.com>
[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 <cgarcia@igalia.com>
[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 <cgarcia@igalia.com>
[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 <noam.rosenthal@nokia.com>
[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 <cgarcia@igalia.com>
[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 <ggaren@apple.com>
Made Weak<T> single-owner, adding PassWeak<T>
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<T>, as required by our new hash map API.
2012-02-16 Sergio Villar Senin <svillar@igalia.com>
[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 <pnormand@igalia.com>
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 <noam.rosenthal@nokia.com>
[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 <cgarcia@igalia.com>
Unreviewed. Fix WebKit2 GTK+ build after r107947.
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(webkitPrintOperationRunDialogForFrame):
2012-02-16 Alexander Færøy <ahf@0x90.dk>
[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 <cgarcia@igalia.com>
[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 <cgarcia@igalia.com>
[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 <simon.hausmann@nokia.com>
[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 <noam.rosenthal@nokia.com>
[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 <svillar@igalia.com>
[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 <cavalcantii@gmail.com>
[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 <paroga@webkit.org>
[CMake] Add missing include directories.
* CMakeLists.txt:
2012-02-16 Carlos Garcia Campos <cgarcia@igalia.com>
[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 <andersca@apple.com>
Add TiledCoreAnimationDrawingArea::forceRepaint
https://bugs.webkit.org/show_bug.cgi?id=78749
<rdar://problem/10866221>
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 <enrica@apple.com>
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 <sadrul@chromium.org>
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 <paroga@webkit.org>
[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 <simon.hausmann@nokia.com>
[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 <rolandsteiner@chromium.org>
<style scoped>: Allow <style scoped> as a direct child of a ShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=77853
numberOfScopedHTMLStyleChildren got moved from Element into Node.
Reviewed by Dimitri Glazkov.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-02-15 No'am Rosenthal <noam.rosenthal@nokia.com>
[Texmap] Divide TextureMapperNode.cpp to 3 files.
https://bugs.webkit.org/show_bug.cgi?id=76660
Rename TextureMapperNode to TextureMapperLayer.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::createLayer):
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit::LayerTreeHostProxy::paintToGraphicsContext):
(WebKit::LayerTreeHostProxy::getBackingStore):
(WebKit::LayerTreeHostProxy::ensureRootLayer):
(WebKit::LayerTreeHostProxy::purgeGLResources):
2012-02-14 Anders Carlsson <andersca@apple.com>
Swipe gestures don't work if main frame has a horizontal scrollbar
https://bugs.webkit.org/show_bug.cgi?id=78650
<rdar://problem/10864993>
Reviewed by Sam Weinig.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
ScrollingTree::tryToHandleWheelEvent now returns a tri-state enum so handle the extra case.
(WebKit::EventDispatcher::sendDidReceiveEvent):
Rename this now that it takes a parameter indicating whether the event was handled or not.
2012-02-14 Brian Weinstein <bweinstein@apple.com>
Web Inspector: Add the ability to show the resources panel on launch
https://bugs.webkit.org/show_bug.cgi?id=78641
Add WebKit2 API for the ability to show the resources panel. This calls down
from the WK API all the way to InspectorFrontendClientLocal::showResources.
Reviewed by Timothy Hatcher.
* UIProcess/API/C/WKInspector.cpp:
(WKInspectorShowResources): Call WebInspectorProxy::showResources.
* UIProcess/API/C/WKInspector.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::showResources): Send a message to the web process.
* UIProcess/WebInspectorProxy.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::showResources): Call InspectorFrontendClientLocal::showResources.
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspector.messages.in: Add a ShowResources message.
2012-02-14 Matt Lilek <mrl@apple.com>
Don't ENABLE_DASHBOARD_SUPPORT unconditionally on all Mac platforms
https://bugs.webkit.org/show_bug.cgi?id=78629
Reviewed by David Kilzer.
* Configurations/FeatureDefines.xcconfig:
2012-02-13 Raphael Kubo da Costa <kubo@profusion.mobi>
[CMake] Merge WebKitEfl.cmake into FindEFL.cmake.
https://bugs.webkit.org/show_bug.cgi?id=78566
Reviewed by Daniel Bates.
* PlatformEfl.cmake: Do not include WebKitEfl.cmake.
2012-02-14 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][Texmap] Refactor backing-store code in TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=78305
Move the backing-store code to LayerTreeBackingStore, implementing the virtual functions
in TextureMapperBackingStore.
We save the double-buffered tile in the backing-store, and then convert them to regular
tiles in updateContents, based on the order of painting.
Use TextureMapperCompositedImage for images instead of saving our own composited image
registry.
Reviewed by Kenneth Rohde Christiansen.
* Target.pri:
* UIProcess/LayerTreeHostProxy.h:
(WebKit):
(LayerTreeHostProxy):
* UIProcess/qt/LayerBackingStore.cpp: Added.
* UIProcess/qt/LayerBackingStore.h: Added.
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::createLayer):
(WebKit::LayerTreeHostProxy::syncLayerParameters):
(WebKit::LayerTreeHostProxy::getBackingStore):
(WebKit::LayerTreeHostProxy::createTile):
(WebKit::LayerTreeHostProxy::removeTile):
(WebKit::LayerTreeHostProxy::updateTile):
(WebKit::LayerTreeHostProxy::createImage):
(WebKit::LayerTreeHostProxy::assignImageToLayer):
(WebKit::LayerTreeHostProxy::purgeGLResources):
* WebProcess.pro:
2012-02-14 Shinya Kawanaka <shinyak@google.com>
Use youngestShadowRoot and oldestShadowRoot instead of Element::shadowRoot().
https://bugs.webkit.org/show_bug.cgi?id=78455
Reviewed by Hajime Morita.
Exports necesarry symbols.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-02-14 Alexey Proskuryakov <ap@apple.com>
[Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets
https://bugs.webkit.org/show_bug.cgi?id=78541
<rdar://problem/10036695>
Reviewed by Kent Tamura.
* Shared/WebPreferencesStore.h: (WebKit): Changed default value of the preference.
2012-02-13 W. James MacLean <wjmaclean@chromium.org>
[chromium] Remove obsolete zoom animation pathway.
https://bugs.webkit.org/show_bug.cgi?id=78359
Reviewed by James Robinson.
This patch removes dead code from the previous incarnation of zoom animation for chromium.
WebProcess/Plugins/PDF/BuiltInPDFView.h:
(BuiltInPDFView):
2012-02-13 Enrica Casucci <enrica@apple.com>
Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies.
https://bugs.webkit.org/show_bug.cgi?id=78282
This patch removes any accesss to the NSPasteboard object from the Pasteboard class which
now makes use of a new pasteboardStrategy object that is implemented both in WebKit and
WebKit2. The actual access to NSPasteboard is now performed inside the PlatformPasteboard
class. Currently both WebKit and WebKit2 use the same implementation of the PasteboardStrategy
interface but this one more step in the direction of removing access to NSPasteboard from
the WebProcess.
As part of the refactoring the I've reduced to a minimum the use of OBJ-C classes.
Reviewed by Anders Carlsson.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added implementation of PasteboardStrategy
interface.
(WebKit::WebPlatformStrategies::createPasteboardStrategy):
(WebKit::WebPlatformStrategies::getTypes):
(WebKit::WebPlatformStrategies::bufferForType):
(WebKit::WebPlatformStrategies::getPathnamesForType):
(WebKit::WebPlatformStrategies::stringForType):
(WebKit::WebPlatformStrategies::copy):
(WebKit::WebPlatformStrategies::setTypes):
(WebKit::WebPlatformStrategies::setBufferForType):
(WebKit::WebPlatformStrategies::setPathnamesForType):
(WebKit::WebPlatformStrategies::setStringForType):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h: Added PasteboardStrategy.
2012-02-13 Anders Carlsson <andersca@apple.com>
The scrolling tree needs to know about the back forward state of the page
https://bugs.webkit.org/show_bug.cgi?id=78523
<rdar://problem/10756548>
Reviewed by Sam Weinig.
Pass the back/forward state in the WheelEvent message. This is pretty hacky but works well.
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC):
(CoreIPC::callMemberFunction):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::didReceiveEvent):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/EventDispatcher.h:
(EventDispatcher):
* WebProcess/WebPage/EventDispatcher.messages.in:
2012-02-13 Dan Bernstein <mitz@apple.com>
WebKit2 build emits a warning about not stripping code-signed PluginProcess.app when copying it into the framework
https://bugs.webkit.org/show_bug.cgi?id=78451
Reviewed by Sam Weinig.
* Configurations/Base.xcconfig: Set COPY_PHASE_STRIP to NO.
2012-02-13 Sam Weinig <sam@webkit.org>
Windows build fix.
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
2012-02-13 Zalan Bujtas <zbujtas@gmail.com>
Manage ShareableBitmap object lifecycle properly, when QImage is created
using the shared data.
https://bugs.webkit.org/show_bug.cgi?id=77546
Reviewed by Simon Hausmann.
* Shared/ShareableBitmap.h:
(ShareableBitmap):
* Shared/qt/ShareableBitmapQt.cpp:
(WebKit::ShareableBitmap::createQImage):
(WebKit):
(WebKit::ShareableBitmap::releaseSharedMemoryData):
2012-02-06 Raphael Kubo da Costa <kubo@profusion.mobi>
[EFL] Drop support for the Curl network backend.
https://bugs.webkit.org/show_bug.cgi?id=77874
Reviewed by Eric Seidel.
Nobody seems to be maintaining the Curl backend in WebCore, the
EFL port developers all seem to be using the Soup backend and the
port itself has many features which are only implemented for the
latter.
* PlatformEfl.cmake: Unconditionally build the glib/soup source
files and unconditionally add the required include directories and
libraries.
* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainEfl): Remove USE(SOUP) check.
2012-02-11 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r107435.
http://trac.webkit.org/changeset/107435
https://bugs.webkit.org/show_bug.cgi?id=78410
It broke the Qt build (Requested by Ossy on #webkit).
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):
2012-02-10 Brian Weinstein <bweinstein@apple.com>
Web Inspector: Add the ability to jump to the source for a given frame
https://bugs.webkit.org/show_bug.cgi?id=78396
Add WebKit2 API for the ability to show the source of a frame in the web inspector. This calls down
from the WK API all the way to InspectorFrontendClientLocal::showMainResourceForFrame.
Reviewed by Tim Hatcher.
* UIProcess/API/C/WKInspector.cpp:
(WKInspectorShowMainResourceForFrame): Call WebInspectorProxy::showMainResourceForFrame.
* UIProcess/API/C/WKInspector.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::showMainResourceForFrame): Send a message to the web process, passing
the frame ID of the frame we want to show the main resource of.
* UIProcess/WebInspectorProxy.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::showMainResourceForFrame): Get the WebFrame for the frame we want to show the
main resource of from its ID. If we found a frame, call InspectorFrontendClientLocal::showMainResourceForFrame.
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspector.messages.in: Add a new message.
2012-02-10 Adam Klein <adamk@chromium.org>
Enable MUTATION_OBSERVERS by default on all platforms
https://bugs.webkit.org/show_bug.cgi?id=78196
Reviewed by Ojan Vafai.
* Configurations/FeatureDefines.xcconfig:
2012-02-10 Enrica Casucci <enrica@apple.com>
Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies.
https://bugs.webkit.org/show_bug.cgi?id=78282
This patch removes any accesss to the NSPasteboard object from the Pasteboard class which
now makes use of a new pasteboardStrategy object that is implemented both in WebKit and
WebKit2. The actual access to NSPasteboard is now performed inside the PlatformPasteboard
class. Currently both WebKit and WebKit2 use the same implementation of the PasteboardStrategy
interface but this one more step in the direction of removing access to NSPasteboard from
the WebProcess.
As part of the refactoring the I've reduced to a minimum the use of OBJ-C classes.
Reviewed by Anders Carlsson.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added implementation of PasteboardStrategy
interface.
(WebKit::WebPlatformStrategies::createPasteboardStrategy):
(WebKit::WebPlatformStrategies::getTypes):
(WebKit::WebPlatformStrategies::bufferForType):
(WebKit::WebPlatformStrategies::getPathnamesForType):
(WebKit::WebPlatformStrategies::stringForType):
(WebKit::WebPlatformStrategies::copy):
(WebKit::WebPlatformStrategies::setTypes):
(WebKit::WebPlatformStrategies::setBufferForType):
(WebKit::WebPlatformStrategies::setPathnamesForType):
(WebKit::WebPlatformStrategies::setStringForType):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h: Added PasteboardStrategy.
2012-02-09 Timothy Hatcher <timothy@apple.com>
Prevent attaching when inspecting the Web Inspector.
Also adds some comments about keeping in sync with InspectorFrontendClientLocal::canAttachWindow
and why there are two implementations of the same function.
https://webkit.org/b/78304
Reviewed by Brian Weinstein.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::canAttach): Prevent attaching when the page is an inspector page.
Added comments about InspectorFrontendClientLocal::canAttachWindow.
* UIProcess/WebInspectorProxy.h:
(WebInspectorProxy): Added comment about keeping in sync with InspectorFrontendClientLocal.
2012-02-09 Alexey Proskuryakov <ap@apple.com>
Managed network proxy settings are not used in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=78288
<rdar://problem/9962116>
Reviewed by Anders Carlsson.
* WebProcess/com.apple.WebProcess.sb: Allow reading managed preferences.
2012-02-09 Alexey Proskuryakov <ap@apple.com>
ASSERTION FAILED: checkURLReceivedFromWebProcess(originalURL) loading a local file, if the WebProcess crashed
https://bugs.webkit.org/show_bug.cgi?id=70845
<rdar://problem/10269985>
Reviewed by Anders Carlsson.
This also fixes some case where WebProcess did not get a sandbox extension after a crash.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessWithItem): We no longer need to pass a sandbox
extension here, we're now passing it at b/f navigation bottleneck.
(WebKit::WebPageProxy::reload): Pass a sandbox extension - reload may mean reloading an error
page after a crash, so WebProcess may no longer have the extension.
(WebKit::WebPageProxy::goForward): We no longer need to pass a sandbox extension here,
we're now passing it at b/f navigation bottleneck. Also, fixed a bug where we first null checked
a WebBackForwardListItem pointer, and then used it anyway.
(WebKit::WebPageProxy::goBack): Ditto.
(WebKit::WebPageProxy::goToBackForwardItem): Ditto.
(WebKit::WebPageProxy::backForwardGoToItem): This is the bottleneck. We get here both for UI
actions like pressing the Back button, and for window.history.go() navigations. JS navigations
previously didn't open up the sandbox. URLs in UI process b/f list are trusted, so it's
always OK to grant a sandbox extension if one of them is a file: one.
* UIProcess/WebPageProxy.h: backForwardGoToItem() now returns a sandbox extension handle.
* UIProcess/WebPageProxy.messages.in: Ditto.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::checkURLReceivedFromWebProcess): If a URL is in UI process b/f
list, then it has been already vetted as something the Web process knows about. No need to
crash if it actually attempts going there.
(WebKit::WebProcessProxy::didReceiveInvalidMessage): Removed a useless comment (we have tons
of fprintfs besides this one). Fixed log message syntax.
* UIProcess/cf/WebPageProxyCF.cpp: (WebKit::WebPageProxy::restoreFromSessionStateData):
We no longer need to pass a sandbox extension here, we're now passing it at b/f navigation
bottleneck.
* WebProcess/WebPage/WebBackForwardListProxy.cpp: (WebKit::WebBackForwardListProxy::goToItem):
We now get an extension here, when telling UI process that we're navigating to a b/f list item.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reload): Use the extension we're getting.
(WebKit::WebPage::goForward): Don't use one we're not getting.
(WebKit::WebPage::goBack): Ditto.
(WebKit::WebPage::goToBackForwardItem): Ditto.
(WebKit::WebPage::restoreSessionAndNavigateToCurrentItem): Ditto.
* WebProcess/WebPage/WebPage.h: Adjusted signatures accordingly.
* WebProcess/WebPage/WebPage.messages.in: Ditto.
2012-02-09 Matthew Delaney <mdelaney@apple.com>
HiDPI: WebKit2's drag images are blurry
https://bugs.webkit.org/show_bug.cgi?id=67779
Use the proper deviceScaleFactor() instead of accessing _intrinsicDeviceScaleFactor
Reviewed by Beth Dakin.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setDragImage:at:linkDrag:]):
2012-02-09 Alexey Proskuryakov <ap@apple.com>
[WK2] Allow reading some debug-only preference files
https://bugs.webkit.org/show_bug.cgi?id=78255
<rdar://problem/9382382>
<rdar://problem/10830558>
Reviewed by Dan Bernstein.
* WebProcess/com.apple.WebProcess.sb:
2012-02-09 Matthew Delaney <mdelaney@apple.com>
HiDPI: WebKit2's link-dragging images are blurry
https://bugs.webkit.org/show_bug.cgi?id=67779
Reviewed by Beth Dakin.
Teach startDrag about the deviceScaleFactor so that it creates
an appropriately scaled bitmap image to ship over.
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::startDrag):
(WebKit::convertImageToBitmap):
Have setDragImage assume that it's receiving a bitmap image scaled
up by the deviceScaleFactor that it sees.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setDragImage:at:linkDrag:]):
2012-02-09 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add WebKitWebView::mouse-target-changed signal to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=78097
Reviewed by Martin Robinson.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitHitTestResult.cpp: Added.
(webkitHitTestResultFinalize):
(webkitHitTestResultGetProperty):
(webkitHitTestResultSetProperty):
(webkit_hit_test_result_init):
(webkit_hit_test_result_class_init):
(webkitHitTestResultCreate): Create a new WebKitHitTestResult for
the given WKHitTestResult.
(stringIsEqualToCString): Helper function to compare String and
CString considering String::isEmpty() == CString.isNull().
(webkitHitTestResultCompare): Helper function to check whether a
WebKitHitTestResult contains the same information than the given
WKHitTestResult.
(webkit_hit_test_result_get_context):
(webkit_hit_test_result_context_is_link):
(webkit_hit_test_result_context_is_image):
(webkit_hit_test_result_context_is_media):
(webkit_hit_test_result_get_link_uri):
(webkit_hit_test_result_get_link_title):
(webkit_hit_test_result_get_link_label):
(webkit_hit_test_result_get_image_uri):
(webkit_hit_test_result_get_media_uri):
* UIProcess/API/gtk/WebKitHitTestResult.h: Added.
* UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
(webkitNavigationPolicyDecisionCreate): Use
wkEventModifiersToGdkModifiers.
* UIProcess/API/gtk/WebKitPrivate.cpp:
(wkEventModifiersToGdkModifiers): Moved from
WebKitNavigationPolicyDecision and renamed to wkEventModifiersToGdkModifiers.
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitUIClient.cpp:
(mouseDidMoveOverElement): UI client callback that calls
webkitWebViewMouseTargetChanged().
(attachUIClientToView): Add implementation for callback
mouseDidMoveOverElement.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init): Add
WebKitWebView::mouse-target-changed signal.
(webkitWebViewMouseTargetChanged): Emit
WebKitWebView::mouse-target-changed signal.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
WebKitHitTestResult.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewMouseTarget):
(beforeAll):
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::WebViewTest):
(WebViewTest::~WebViewTest):
(parentWindowMapped):
(WebViewTest::showInWindowAndWaitUntilMapped): Method to add the
view into a popup window and show it running the main loop until
the window is mapped.
(WebViewTest::mouseMoveTo): Method to synthesize a
GDK_MOTION_EVENT on the given coordinates and using the given
modifiers.
* UIProcess/API/gtk/tests/WebViewTest.h:
* UIProcess/API/gtk/webkit2.h: Include WebKitHitTestResult.h.
* UIProcess/API/gtk/webkit2marshal.list:
2012-02-07 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Fetch the visible rect from LayerTreeHost instead of keeping a copy in each layer.
https://bugs.webkit.org/show_bug.cgi?id=78009
Reviewed by Noam Rosenthal.
Since WebGraphicsLayers are now accessed directly from LayerTreeHost, they don't
need to keep the visible rect to pass it down their child layers anymore.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::setContentsScale):
(WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
(WebCore::WebGraphicsLayer::adjustVisibleRect):
(WebCore):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayerClient):
(WebGraphicsLayer):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::registerLayer):
(WebKit::LayerTreeHostQt::visibleContentsRect):
(WebKit):
(WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
2012-02-09 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Control the lifetime of TiledBackingStores in WebGraphicsLayer.
https://bugs.webkit.org/show_bug.cgi?id=78005
Reviewed by Noam Rosenthal.
This makes sure that no empty tiles are generated for layers without contents and that
no interaction is made with the TiledBackingStore until we got a WebGraphicsLayerClient.
- Create the main TiledBackingStore only when the layer has drawsContent and has no
directly composited image
- Removed recreateBackingStoreIfNeeded and do the (re)creation of the backing stores
in updateContentBuffers
- Call purgeBackingStores on registered layers instead of passing it down the layer tree
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
(WebCore::WebGraphicsLayer::~WebGraphicsLayer):
(WebCore::WebGraphicsLayer::setDrawsContent):
(WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
(WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
(WebCore::WebGraphicsLayer::updateContentBuffers):
(WebCore::WebGraphicsLayer::purgeBackingStores):
(WebCore::WebGraphicsLayer::setWebGraphicsLayerClient):
(WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayer):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::LayerTreeHostQt):
(WebKit::LayerTreeHostQt::flushPendingLayerChanges):
(WebKit):
(WebKit::LayerTreeHostQt::purgeBackingStores):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
2012-02-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Remove WebGraphicsLayer::updateTileBuffersRecursively
https://bugs.webkit.org/show_bug.cgi?id=78105
Reviewed by Kenneth Rohde Christiansen.
The method is unused.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayer):
2012-02-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Register individual WebGraphicsLayers to LayerTreeHost instead of handling the tree as a whole.
https://bugs.webkit.org/show_bug.cgi?id=77976
Reviewed by Kenneth Rohde Christiansen.
The LayerTreeHost association had to be maintained between re-parented layers and it would be
impossible to know if the layer would be disconnected from the LayerTreeHost only for reparenting
or disconnected for good (in other words, that the LayerTreeHost could be deleted meanwhile).
Instead, this patch assumes that graphics layers will only be in contact with one instance of
LayerTreeHost, and that this association can be kept until either the graphics layer or the layer
tree host gets deleted.
The registered layers are kept in a set and the visible rect and scales are passed directly
to layers instead of down the tree, through the root layer.
This also fixes the !m_layerInfo.imageBackingStoreID ASSERT that was popping in unit tests.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
(WebCore::WebGraphicsLayer::~WebGraphicsLayer):
(WebCore::WebGraphicsLayer::setChildren):
(WebCore::WebGraphicsLayer::addChild):
(WebCore::WebGraphicsLayer::addChildAtIndex):
(WebCore::WebGraphicsLayer::addChildAbove):
(WebCore::WebGraphicsLayer::addChildBelow):
(WebCore::WebGraphicsLayer::replaceChild):
(WebCore::WebGraphicsLayer::removeFromParent):
(WebCore::WebGraphicsLayer::setContentsToImage):
(WebCore::WebGraphicsLayer::setMaskLayer):
(WebCore::WebGraphicsLayer::setReplicatedByLayer):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::setVisibleContentRectAndScale):
(WebCore::WebGraphicsLayer::tiledBackingStoreUpdatesAllowed):
(WebCore::WebGraphicsLayer::createTile):
(WebCore::WebGraphicsLayer::updateTile):
(WebCore::WebGraphicsLayer::removeTile):
(WebCore::WebGraphicsLayer::updateContentBuffers):
(WebCore::WebGraphicsLayer::purgeBackingStores):
(WebCore::WebGraphicsLayer::setWebGraphicsLayerClient):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebCore):
(WebGraphicsLayerClient):
(WebGraphicsLayer):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::~LayerTreeHostQt):
(WebKit::LayerTreeHostQt::LayerTreeHostQt):
(WebKit::LayerTreeHostQt::attachLayer):
(WebKit):
(WebKit::LayerTreeHostQt::detachLayer):
(WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
(LayerTreeHostQt):
2012-02-07 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] WebView should use Flickable instead of QScroller to handle positioning
https://bugs.webkit.org/show_bug.cgi?id=76275
Reviewed by Simon Hausmann and Kenneth Rohde Christiansen.
The current WebView implementation uses QScroller to manage positioning but other
similar items in QML (ie. ListView, GridView) use Flickable as their base class.
Since QScroller will be dropped from Qt5 this patch removes the QScroller code
and redirects pan gestures to a dynamically created encapsulated Flickable instance
(QtFlickProvider) which handles the positioning.
This implementation only uses public QML API and does not depend on declarative-private.
It propagates a small subset of the Flickable API as the public API of the WebView.
This minimalistic API is accessible via the experimental extension and makes it possible
in QML to place additional items (such as toolbars, scroll indicators and floating menus)
aroud the page.
These items can use anchoring and binding for positioning on the flickable contentItem.
The patch depends however on the automatic touch->mouse event synthetization of Qt5.
The touch events sent to the flickProvider are translated to mouse events automatically
as long as the Flickable does not handle touch events directly.
After this change QtWebKit2 does no longer depend on QtWidgets and this dependency can be
removed in a follow-up patch.
* Target.pri: Added QtFlickProvider source.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paintToCurrentGLContext):
(QQuickWebPage::transformToItem):
(QQuickWebPagePrivate::updateSize):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::pageItemPos):
(QQuickWebViewFlickablePrivate::pageItemPos):
(QQuickWebViewFlickablePrivate::updateContentsSize):
(QQuickWebViewFlickablePrivate::onComponentComplete):
(QQuickWebViewFlickablePrivate::updateViewportSize):
(QQuickWebViewExperimental::flickableData):
(QQuickWebViewExperimental::contentItem):
(QQuickWebViewExperimental::contentWidth):
(QQuickWebViewExperimental::setContentWidth):
(QQuickWebViewExperimental::contentHeight):
(QQuickWebViewExperimental::setContentHeight):
(QQuickWebViewExperimental::contentX):
(QQuickWebViewExperimental::setContentX):
(QQuickWebViewExperimental::contentY):
(QQuickWebViewExperimental::setContentY):
(QQuickWebView::pageItemPos):
(QQuickWebView::updateContentsSize):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
(QQuickWebViewPrivate::updateContentsSize):
(QQuickWebViewFlickablePrivate):
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::scrollRequest):
* UIProcess/qt/QtFlickProvider.cpp: Added.
(QtFlickProvider::QtFlickProvider):
(QtFlickProvider::handleTouchFlickEvent):
(QtFlickProvider::contentItem):
(QtFlickProvider::flickableData):
(QtFlickProvider::contentPos):
(QtFlickProvider::setContentPos):
(QtFlickProvider::viewportSize):
(QtFlickProvider::setViewportSize):
(QtFlickProvider::returnToBounds):
(QtFlickProvider::cancelFlick):
(QtFlickProvider::isMoving):
(QtFlickProvider::isDragging):
(QtFlickProvider::isFlicking):
(QtFlickProvider::contentWidth):
(QtFlickProvider::setContentWidth):
(QtFlickProvider::contentHeight):
(QtFlickProvider::setContentHeight):
(QtFlickProvider::contentX):
(QtFlickProvider::setContentX):
(QtFlickProvider::contentY):
(QtFlickProvider::setContentY):
* UIProcess/qt/QtFlickProvider.h: Added.
(QtFlickProvider):
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::recognize):
* UIProcess/qt/QtPanGestureRecognizer.h:
(QtPanGestureRecognizer):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::setItemRectVisible):
(WebKit::QtViewportInteractionEngine::scrollStateChanged):
(WebKit):
(WebKit::QtViewportInteractionEngine::wheelEvent):
(WebKit::QtViewportInteractionEngine::reset):
(WebKit::QtViewportInteractionEngine::applyConstraints):
(WebKit::QtViewportInteractionEngine::scrollAnimationActive):
(WebKit::QtViewportInteractionEngine::panGestureActive):
(WebKit::QtViewportInteractionEngine::panGestureStarted):
(WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::panGestureCancelled):
(WebKit::QtViewportInteractionEngine::panGestureEnded):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::scaleContent):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::doneWithTouchEvent):
2012-02-08 Keunsoon Lee <keunsoon.lee@samsung.com>
[WK2][EFL] creating dummy class derived from ResourceHandleClient for Efl download module.
https://bugs.webkit.org/show_bug.cgi?id=76171
Reviewed by Andreas Kling.
FileDownloaderEfl is a practical class to operate file download.
It communicates with Download class to start download
and to notify downloading states to user(e.g. client application).
Besides FileDownloaderEfl derives from ResourceHandleClient
and receives chunked data from ResourceHandle directly
or redirects data flow which is started from MainResourceLoader
by mean of exchanging ResourceHandle's existing client for FileDownloaderEfl.
This patch has only dummy functions to make easy to review.
Working patch will be uploaded on another bug thread.
* PlatformEfl.cmake: added new file to compile.
* WebProcess/Downloads/Download.h: added FileDownloaderEfl's instance as a form of OwnPtr<FileDownloaderEfl>.
(WebKit):
(Download):
* WebProcess/Downloads/efl/DownloadEfl.cpp:
(WebKit::Download::start): calling to FileDownloaderEfl::start() to start download for passing ResourceRequest.
* WebProcess/Downloads/efl/FileDownloaderEfl.cpp: Added. a practical class to operate file download.
(WebKit):
(WebKit::FileDownloaderEfl::create): create function, which returns PassOwnPtr<FileDownloaderEfl>.
(WebKit::FileDownloaderEfl::FileDownloaderEfl): constructor, which receives Download* as a parameter.
(WebKit::FileDownloaderEfl::~FileDownloaderEfl): deconstructor.
(WebKit::FileDownloaderEfl::start): a function to start downloading for passed ResourceRequest.
It does nothing for now, but shows how Download class can call FileDownloaderEfl's function.
(WebKit::FileDownloaderEfl::didReceiveResponse): virtual function for ResourceHandleClient.
It will receive response header information from ResourceHandle.
(WebKit::FileDownloaderEfl::didReceiveData): virtual function for ResourceHandleClient.
It will receive chunk data from ResourceHandle.
(WebKit::FileDownloaderEfl::didFinishLoading): virtual function for ResourceHandleClient.
It will be notified loading is finished from ResourceHandle.
(WebKit::FileDownloaderEfl::didFail): virtual function for ResourceHandleClient.
It will be notified loading is fail with ResourceError from ResourceHandle.
(WebKit::FileDownloaderEfl::shouldUseCredentialStorage): virtual function for ResourceHandleClient.
It returns whether to use credential storage or not.
(WebKit::FileDownloaderEfl::didReceiveAuthenticationChallenge): virtual function for ResourceHandleClient.
It will receive AuthenticationChallenge.
(WebKit::FileDownloaderEfl::didCancelAuthenticationChallenge): virtual function for ResourceHandleClient.
It will be notified AuthenticationChallenge is canceled.
(WebKit::FileDownloaderEfl::receivedCancellation): virtual function for ResourceHandleClient.
* WebProcess/Downloads/efl/FileDownloaderEfl.h: Added.
(WebCore):
(WebKit):
(FileDownloaderEfl):
2012-02-07 MORITA Hajime <morrita@google.com>
Replacement text should be available from the marker.
https://bugs.webkit.org/show_bug.cgi?id=77934
Reviewed by Kent Tamura.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-02-08 Anders Carlsson <andersca@apple.com>
Don't use the wheel event handler count to track if a page has horizontal scrollbars
https://bugs.webkit.org/show_bug.cgi?id=78192
Reviewed by Andreas Kling.
Prior to this change, we were incrementing and decrementing the wheel event handler count
whenever a scrollable area gained or lost a horizontal scrollbar, so we could use the count
to determine if Safari can handle horizontal wheel events directly or whether they have to be sent
to the web process first.
What this meant was that whenever a page had horizontal scrollbars we'd have to send all scroll wheel events
to the main thread instead of the scrolling thread, regardless of whether there were any wheel event handlers.
After this change, we traverse the tree of scrollable areas after every layout and check if any of them
have a horizontal scrollbar. (We still also check if there are wheel event handlers).
If traversing the tree after every layout is deemed to slow we can go back to caching the number of horizontal scrollbars
in a page, but the number of subframes in a page is usually very small and the number of other scrollable areas is even smaller.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::willHandleHorizontalScrollEvents):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::setCanShortCircuitHorizontalWheelEvents):
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::numWheelEventHandlersChanged):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::numWheelEventHandlersChanged):
(WebKit):
(WebKit::hasEnabledHorizontalScrollbar):
(WebKit::pageContainsAnyHorizontalScrollbars):
(WebKit::WebPage::recomputeShortCircuitHorizontalWheelEventsState):
* WebProcess/WebPage/WebPage.h:
(WebPage):
2012-02-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r106920, r106924, r106933, r106939,
and r107090.
http://trac.webkit.org/changeset/106920
http://trac.webkit.org/changeset/106924
http://trac.webkit.org/changeset/106933
http://trac.webkit.org/changeset/106939
http://trac.webkit.org/changeset/107090
https://bugs.webkit.org/show_bug.cgi?id=78124
Something is completely wrong this change (Requested by
Ossy_gardener on #webkit).
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
(WebProcessCreationParameters):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
* UIProcess/qt/WebContextQt.cpp:
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/qt/WebProcessQt.cpp:
(WebKit):
(WebKit::WebProcess::platformSetCacheModel):
(WebKit::WebProcess::platformInitializeWebProcess):
2012-02-08 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix a crash when WebKitWebView is created without a WebContext
https://bugs.webkit.org/show_bug.cgi?id=78104
Reviewed by Philippe Normand.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewSetProperty): Make sure WebKitWebView:web-context
property is initialized to the default web context when a web
context is not passed to g_object_new().
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewDefaultContext): Check that a web view created with
g_object_new has the default context.
2012-02-08 Michael Brüning <michael.bruning@nokia.com>
[Qt][WK2] Compute and set cache capacities using the current CacheModel
https://bugs.webkit.org/show_bug.cgi?id=73918
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext): Set default cacheModel for Qt platform to
CacheModelPrimaryWebBrowser.
2012-02-08 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix WebKitWebView::decide-policy API documentation
https://bugs.webkit.org/show_bug.cgi?id=78101
Reviewed by Martin Robinson.
- It refers to WebKitPolicyClient instead of WebKitWebView
- Trailing ':' is missing
- References @decision as WebKitNavigationPolicyDecision instead
of WebKitPolicyDecision
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):
2012-02-08 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
[Qt] Build broken if qt missing openssl
https://bugs.webkit.org/show_bug.cgi?id=77894
Reviewed by Chang Shu.
Build fix. No new test content.
* WebProcess/qt/QtNetworkAccessManager.cpp:
(WebKit::QtNetworkAccessManager::onSslErrors):
2012-02-08 Yael Aharon <yael.aharon@nokia.com>
[WK2] Text notifications should have an iconURL
https://bugs.webkit.org/show_bug.cgi?id=77968
Reviewed by Simon Hausmann.
Per http://www.w3.org/TR/notifications simple text notifications should have an iconURL.
Add an iconURL to WebNotification and add a public API to access it.
* UIProcess/API/C/WKNotification.cpp:
(WKNotificationCopyiconURL):
* UIProcess/API/C/WKNotification.h:
* UIProcess/Notifications/WebNotification.cpp:
(WebKit::WebNotification::WebNotification):
* UIProcess/Notifications/WebNotification.h:
(WebKit::WebNotification::create):
(WebKit::WebNotification::iconURL):
(WebNotification):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::show):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
(WebNotificationManagerProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showNotification):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show):
2012-02-08 Philippe Normand <pnormand@igalia.com>
[GTK][WK2] enable-webaudio WebSetting
https://bugs.webkit.org/show_bug.cgi?id=77959
Reviewed by Martin Robinson.
Add a new WebKitGTK WebSetting to enable/disable WebAudio at
runtime.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_enable_webaudio):
(webkit_settings_set_enable_webaudio):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings):
2012-02-07 Martin Robinson <mrobinson@igalia.com>
[GTK] [WK2] Add WebKitResponsePolicyDecision
https://bugs.webkit.org/show_bug.cgi?id=76789
Reviewed by Philippe Normand.
Add a WebKitResponsePolicyDecision GObject, use it for response
policy decisions and add a test.
* GNUmakefile.am: Added new source files to the list.
* UIProcess/API/gtk/WebKitPolicyClient.cpp:
(decidePolicyForResponseCallback): Added this callback which creates the request
and fires the signal.
(attachPolicyClientToPage): Added new callback to the C API policy client.
* UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp: Added.
* UIProcess/API/gtk/WebKitResponsePolicyDecision.h: Added.
* UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h: Added.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Added new docs.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
* UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp:
(testResponsePolicy): Added this test for response policy decisions.
(serverCallback): Added a SoupServer to test policy response policy decisions.
(beforeAll): Ditto.
(afterAll): Ditto.
2012-02-07 Timothy Hatcher <timothy@apple.com>
Avoid making a window for the Web Inspector when it is docked.
This also makes sure the inspector WKView is in a window before the page is loaded.
This avoids some redundant work caused by moving it to a window later.
https://webkit.org/b/78064
Reviewed by Brian Weinstein.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage): Set m_isAttached here...
(WebKit::WebInspectorProxy::didLoadInspectorPage): ... instead of here.
* UIProcess/WebInspectorProxy.h:
(WebInspectorProxy):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow): Added. Factored out of platformOpen.
(WebKit::WebInspectorProxy::updateInspectorWindowTitle): Added. Factored out of platformInspectedURLChanged.
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Call platformAttach or createInspectorWindow.
(WebKit::WebInspectorProxy::platformOpen): Make the view or window visible.
(WebKit::WebInspectorProxy::platformDidClose): Only message m_inspectorWindow if it isn't nil.
(WebKit::WebInspectorProxy::platformInspectedURLChanged): Store the urlString and call updateInspectorWindowTitle.
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Return early if not visible.
(WebKit::WebInspectorProxy::platformAttach): Start out hidden if we are not visible yet. Destroy the window.
(WebKit::WebInspectorProxy::platformDetach): Use createInspectorWindow to create it again.
2012-02-07 Tony Chang <tony@chromium.org>
merge DashboardSupportCSSPropertyNames.in into CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=78036
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig: Add ENABLE_DASHBOARD_SUPPORT to FEATURE_DEFINES.
2012-02-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[CMAKE] Use *bin* and *lib* directories for executable and libraries.
https://bugs.webkit.org/show_bug.cgi?id=77928
Reviewed by Daniel Bates.
CMake has used *Programs* directory for executable. In addition, shared libraries are being
built in source directory. It is better to set common places in order to maintain executable
and libraries. *bin* is for executable and *lib* is for library.
* CMakeLists.txt:
2012-02-07 Timothy Hatcher <timothy@apple.com>
Initilize the WebPageProxy intrinsicDeviceScaleFactor on creation of the WKView.
If WKView was created and loaded a page with canvas elements before beinging moved
to a window, the canvas elements would be locked in at a pixel ratio of 1. With this
change the WKView will use the main screen's pixel ratio until it moves to a window.
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]): Call setIntrinsicDeviceScaleFactor.
2012-02-07 Alexey Proskuryakov <ap@apple.com>
Keep a reference in didReceiveInvalidMessage.
https://bugs.webkit.org/show_bug.cgi?id=78024
Reviewed by Anders Carlsson.
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::didReceiveInvalidMessage):
2012-02-06 Anders Carlsson <andersca@apple.com>
ScrollableAreaSet should be moved from Page to FrameView
https://bugs.webkit.org/show_bug.cgi?id=62762
Reviewed by Beth Dakin.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::initialize):
Call FrameView::addScrollableArea instead.
(WebKit::BuiltInPDFView::destroy):
Call FrameView::removeScrollableArea instead.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
Remove disconnectFromPage since it no longer exists on ScrollableArea.
2012-02-07 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add cut, copy and paste methods to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=76998
Reviewed by Martin Robinson.
* GNUmakefile.am: Add WebKitEditingCommands.h.
* UIProcess/API/gtk/WebKitEditingCommands.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(didValidateCommand): Callback called by the C API when an editor
command has been validated.
(webkit_web_view_can_execute_editing_command): Asynchronously
validate the given editing command.
(webkit_web_view_can_execute_editing_command_finish): Finish async
operation started by webkit_web_view_can_execute_editing_command().
(webkit_web_view_execute_editing_command): Execute the given
command.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/tests/GNUmakefile.am:
* UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
(LoadTrackingTest::provisionalLoadFailed): Do not finish the main
loop on load failure, now finished is always called.
* UIProcess/API/gtk/tests/TestBackForwardList.cpp: Use WebViewTest
instead of LoadTrackingTest.
* UIProcess/API/gtk/tests/TestWebViewEditor.cpp: Added.
(testWebViewEditorCutCopyPasteNonEditable):
(testWebViewEditorCutCopyPasteEditable):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(loadChanged):
(WebViewTest::waitUntilLoadFinished): Run a main loop until load
finished.
* UIProcess/API/gtk/tests/WebViewTest.h: Add waitUntilLoadFinished().
* UIProcess/API/gtk/webkit2.h: Include WebKitEditingCommands.h.
2012-02-07 Allan Sandfeld Jensen <allan.jensen@nokia.com>
Encode radius, force and rotationAngle in WebPlatformTouchPoint.
https://bugs.webkit.org/show_bug.cgi?id=77986
Reviewed by Kenneth Rohde Christiansen.
* Shared/WebEvent.h:
(WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
(WebPlatformTouchPoint):
(WebKit::WebPlatformTouchPoint::radius):
(WebKit::WebPlatformTouchPoint::rotationAngle):
(WebKit::WebPlatformTouchPoint::force):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
* Shared/WebPlatformTouchPoint.cpp:
(WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
(WebKit::WebPlatformTouchPoint::encode):
(WebKit::WebPlatformTouchPoint::decode):
2012-02-07 Andras Becsi <andras.becsi@nokia.com>
[Qt] [WK2] Fix the debug build after r106920
* WebProcess/qt/WebProcessQt.cpp:
(WebKit::WebProcess::platformSetCacheModel):
Remove unnecessary assert.
2012-02-03 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Add the componentComplete method to WebView
https://bugs.webkit.org/show_bug.cgi?id=77111
Reviewed by Simon Hausmann.
Move the initialization of the interaction engine to componentComplete
in preparation of switching to a Flickable based content positioning
for the touch based WebView.
Suspend the page and delay the dispatch of load success on startup until
the component finished initialization. With this patch instantiating the
WebView in C++ is only possible by creating a QDeclarativeComponent as
the initialization depends on the componentComplete method being called.
Also return valid default values in the viewport info functions if the
interaction engine is not yet initialized because the viewport info
component could finish initialization earlier than the WebView, which
results in QML warnings during MiniBrowser startup.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::loadDidSucceed):
(QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
(QQuickWebViewFlickablePrivate::initialize):
(QQuickWebViewFlickablePrivate::onComponentComplete):
(QQuickWebViewFlickablePrivate::loadDidSucceed):
(QQuickWebViewFlickablePrivate::updateViewportSize):
(QQuickWebViewFlickablePrivate::_q_resume):
(QQuickWebView::geometryChanged):
(QQuickWebView::componentComplete):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::onComponentComplete):
(QQuickWebViewPrivate):
(QQuickWebViewFlickablePrivate):
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::currentScale):
(QWebViewportInfo::devicePixelRatio):
(QWebViewportInfo::initialScale):
(QWebViewportInfo::minimumScale):
(QWebViewportInfo::maximumScale):
(QWebViewportInfo::isScalable):
(QWebViewportInfo::layoutSize):
* UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::tst_QQuickWebView):
(tst_QQuickWebView::init):
(tst_QQuickWebView::multipleWebViewWindows):
(tst_QQuickWebView::multipleWebViews):
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::dispatchLoadSucceeded):
2012-02-07 YoungTaeck Song <youngtaeck.song@samsung.com>
[EFL][WK2] Add ModuleEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=63608
Reviewed by Andreas Kling.
Add first version of ModuleEfl.cpp including load(), unload() and platformFunctionPointer().
* Platform/Module.h:
* Platform/efl/ModuleEfl.cpp: Added.
(WebKit::Module::load):
(WebKit::Module::unload):
(WebKit::Module::platformFunctionPointer):
2012-02-07 Michael Brüning <michael.bruning@nokia.com>
[Qt][WK2] Compute and set cache capacities using the current CacheModel
https://bugs.webkit.org/show_bug.cgi?id=73918
Reviewed by Kenneth Rohde Christiansen.
First part of the implementation. The next steps are the implementation
of the API for the Qt WebKit 2 port and the hybrid memory and disk cache.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
(WebProcessCreationParameters):
* UIProcess/qt/WebContextQt.cpp:
(WebKit::defaultDiskCacheDirectory):
(WebKit):
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/qt/WebProcessQt.cpp:
(WebKit::physicalMemorySizeInBytes):
(WebKit):
(WebKit::WebProcess::platformSetCacheModel):
(WebKit::WebProcess::platformInitializeWebProcess):
2012-02-06 Shinya Kawanaka <shinyak@google.com>
Remove Element::ensureShadowRoot export.
https://bugs.webkit.org/show_bug.cgi?id=77932
Reviewed by Hajime Morita.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-02-06 Martin Robinson <mrobinson@igalia.com>
[GTK] Add TextureMapperGL implementation
https://bugs.webkit.org/show_bug.cgi?id=75308
Reviewed by Alejandro G. Castro.
Fix the WebKit2 + AC build for GTK+.
* GNUmakefile.am: Add some missing source files.
* UIProcess/DrawingAreaProxy.cpp:
(WebKit): Add USE(TILED_BACKING_STORE) to the guard.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage): Ditto.
* WebProcess/WebPage/DrawingArea.h:
(DrawingArea): Ditto.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit): Ditto.
* WebProcess/WebPage/DrawingAreaImpl.h:
(DrawingAreaImpl): Ditto.
2012-02-06 Martin Robinson <mrobinson@igalia.com>
Fix some miscellaneous 'make dist' error for WebKitGTK+.
* GNUmakefile.am: Do not distribute generated files.
2012-02-06 Anders Carlsson <andersca@apple.com>
Overlay scrollbars flash when window is simply activated
https://bugs.webkit.org/show_bug.cgi?id=77911
Reviewed by Kenneth Russell.
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateWindowVisibility]):
Use -[NSWindow isVisible] here, since we also want to consider the window hidden if the application itself is hidden.
(-[WKView _windowDidOrderOffScreen:]):
(-[WKView _windowDidOrderOnScreen:]):
Call -[WKView updateWindowVisibility].
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setWindowIsVisible):
Call FocusController::setContainingWindowIsVisible.
2012-02-06 Martin Robinson <mrobinson@igalia.com>
[GTK] Fix remaining errors in GTK+ WebKit2 API
https://bugs.webkit.org/show_bug.cgi?id=77890
Reviewed by Gustavo Noronha Silva.
Fix some style issues in the GTK+ WebKit2 API section of the source code.
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
* UIProcess/API/gtk/tests/TestMain.h:
2012-02-06 Matthew Delaney <mdelaney@apple.com>
toDataURL() uses stale data after putImageData()
https://bugs.webkit.org/show_bug.cgi?id=65767
Reviewed by Chris Marrin.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2012-02-06 Ryosuke Niwa <rniwa@webkit.org>
gcc build fix after r106749.
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::WebPreferences):
2012-02-06 Martin Robinson <mrobinson@igalia.com>
[GTK] WebKitWebView does a lot of work during size_allocate when not mapped
https://bugs.webkit.org/show_bug.cgi?id=77743
Reviewed by Gustavo Noronha Silva.
Instead of resizing the guts of a WebView when it's not mapped, wait
until it's mapped and do one resize. This prevents unmapped WebViews
from adding to a container's resize cost.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(_WebKitWebViewBasePrivate): Added a new member needsResizeOnMap.
(resizeWebKitWebViewBaseFromAllocation): Abstracted out this helper.
(webkitWebViewBaseSizeAllocate): Wait until map to resize unmapped WebViews.
(webkitWebViewBaseMap): Added this vmethod implementation.
(webkit_web_view_base_class_init): Added vmethod.
2012-02-06 Allan Sandfeld Jensen <allan.jensen@nokia.com>
WebGestureEvent can not encode delta and area.
https://bugs.webkit.org/show_bug.cgi?id=77728
Support delta and area fields in WebGestureEvent, and send area with Qt tap gesture.
Reviewed by Kenneth Rohde Christiansen.
* Shared/WebEvent.h:
(WebKit::WebGestureEvent::area):
(WebKit::WebGestureEvent::delta):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
* Shared/WebGestureEvent.cpp:
(WebKit::WebGestureEvent::WebGestureEvent):
(WebKit::WebGestureEvent::encode):
(WebKit::WebGestureEvent::decode):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleSingleTapEvent):
2012-02-03 Zalan Bujtas <zbujtas@gmail.com> and Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt][WK2] Remove TiledDrawingArea and dependencies.
https://bugs.webkit.org/show_bug.cgi?id=71681
Reviewed by Kenneth Rohde Christiansen.
Tiled drawing surface functionality got converted to LayerTree.
TiledDrawingArea and its dependencies are not used by any port anymore.
* CMakeLists.txt:
* GNUmakefile.am:
* Shared/DrawingAreaInfo.h:
* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxy.messages.in:
* UIProcess/TiledDrawingAreaProxy.cpp: Removed.
* UIProcess/TiledDrawingAreaProxy.h: Removed.
* UIProcess/qt/QtSGTileNode.cpp: Removed.
* UIProcess/qt/QtSGTileNode.h: Removed.
* UIProcess/qt/QtSGUpdateQueue.cpp: Removed.
* UIProcess/qt/QtSGUpdateQueue.h: Removed.
* UIProcess/qt/TiledDrawingAreaProxyQt.cpp: Removed.
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/TiledDrawingArea.cpp: Removed.
* WebProcess/WebPage/TiledDrawingArea.h: Removed.
* WebProcess/WebPage/WebPage.h:
(WebPage):
2012-02-03 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Don't version QtWebKit.experimental.
https://bugs.webkit.org/show_bug.cgi?id=77739
Reviewed by Tor Arne Vestbø.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
2012-02-06 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix several gtkdoc-fixxref warnings
https://bugs.webkit.org/show_bug.cgi?id=77613
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWindowProperties.cpp: Fix a typo, a
colon was missing in WebKitWebView::ready-to-show.
2012-02-05 Dan Bernstein <mitz@apple.com>
<rdar://problem/10809525> WebKit2’s WebFrameLoaderClient::shouldUseCredentialStorage() always returns true
https://bugs.webkit.org/show_bug.cgi?id=77823
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
(WebKit::InjectedBundlePageResourceLoadClient::shouldUseCredentialStorage): Added. Calls
through to the client if it implements shouldUseCredentialStorage. Returns true otherwise.
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Changed to call the injected
bundle resource load client.
2012-02-04 Dan Bernstein <mitz@apple.com>
<rdar://problem/10660698> Clients cannot prevent caching of individual responses
https://bugs.webkit.org/show_bug.cgi?id=77822
Reviewed by Sam Weinig.
* Shared/APIClientTraits.cpp: Added definition of interfaceSizesByVersion for
WKBundlePageResourceLoadClient.
* Shared/APIClientTraits.h: Added APIClientTraits specialization for WKBundlePageResourceLoadClient.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h: Added WKBundlePageShouldCacheResponseCallback
typedef, added shouldCacheResponse member to WKBundlePageResourceLoadClient, and bumped
kWKBundlePageResourceLoadClientCurrentVersion to 1.
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
(WebKit::InjectedBundlePageResourceLoadClient::shouldCacheResponse): Added. Calls through
to the client if it implements shouldCacheResponse. Returns true otherwise.
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::willCacheResponse): Changed to call
InjectedBundlePageResourceLoadClient::shouldCacheResponse() and return nil if the former
returns false.
(WebKit::WebFrameLoaderClient::shouldCacheResponse): Changed to call
InjectedBundlePageResourceLoadClient::shouldCacheResponse().
2012-02-04 Sam Weinig <sam@webkit.org>
Add ability to send WKURLRequests in WebKit2 API user messages
https://bugs.webkit.org/show_bug.cgi?id=77819
Reviewed by Anders Carlsson.
Test: WebKit2UserMessageRoundTripTest API test.
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):
Add encode/decode for WebURLRequest.
2012-02-04 Dan Bernstein <mitz@apple.com>
<rdar://problem/10772406> WKPreferences instances cannot be copied
https://bugs.webkit.org/show_bug.cgi?id=77816
Reviewed by Sam Weinig.
Test added in TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesCreateCopy): Added.
* UIProcess/API/C/WKPreferencesPrivate.h:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::WebPreferences): Added this constructor that copies the
WebPreferencesStore of the given WebPreferences.
* UIProcess/WebPreferences.h:
(WebKit::WebPreferences::create): Added this create function that takes a WebPreferences
instance and creates a new instance with a copy of the given instance’s store.
2012-02-03 Anders Carlsson <andersca@apple.com>
WebKit2 should dispatch wheel events to the new ScrollingTree class
https://bugs.webkit.org/show_bug.cgi?id=77795
Reviewed by Andreas Kling.
Replace all uses of ScrollingCoordinator with ScrollingTree instead.
Also, don't try to handle gesture events on the scrolling thread anymore;
we don't need to to that right now.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::addScrollingTreeForPage):
(WebKit::EventDispatcher::removeScrollingTreeForPage):
(WebKit::EventDispatcher::wheelEvent):
(WebKit::EventDispatcher::gestureEvent):
* WebProcess/WebPage/EventDispatcher.h:
(WebCore):
(EventDispatcher):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
2012-02-03 Alexey Proskuryakov <ap@apple.com>
[WK2 Mac] No need to allow access to input methods or keyboard layouts
https://bugs.webkit.org/show_bug.cgi?id=77775
<rdar://problem/9276253>
<rdar://problem/9276268>
Reviewed by Dan Bernstein.
* WebProcess/com.apple.WebProcess.sb: These rules were likely only necessary in early days
of WebKit2. If there are cases when this happens, that's likely wrong, and we need to know
about that.
2012-02-03 Alexey Proskuryakov <ap@apple.com>
[WK2] Use properly quoted string literals
https://bugs.webkit.org/show_bug.cgi?id=77583
Reviewed by Darin Adler.
Also added some FIXMEs.
* WebProcess/com.apple.WebProcess.sb:
2012-02-03 Brady Eidson <beidson@apple.com>
<rdar://problem/10742441> and https://bugs.webkit.org/show_bug.cgi?id=77766
Need a WK2 API to filter which subframes go into WebArchives as they are created.
Reviewed by Darin Adler.
Add a new WKBundleFrame API that takes a filter callback object to allow or reject
subframes from a WebArchive:
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameCopyWebArchive):
(WKBundleFrameCopyWebArchiveFilteringSubframes):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
Implement the above API by calling through to WebCore:
* WebProcess/WebPage/WebFrame.cpp:
(WebFrameFilter):
(WebKit::WebFrameFilter::WebFrameFilter):
(WebKit::WebFrameFilter::shouldIncludeSubframe):
(WebKit::WebFrame::webArchiveData):
* WebProcess/WebPage/WebFrame.h:
(WebFrame):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getWebArchiveOfFrame):
2012-02-03 Alexey Proskuryakov <ap@apple.com>
[Mac WK2] Use a minimally invasive way to fake plug-in process name
https://bugs.webkit.org/show_bug.cgi?id=77682
Reviewed by Darin Adler.
* PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::netscapePluginModule):
Only change the name as it's seen from within the process.
* Shared/Plugins/PluginQuirks.h: Fixed a typo.
2012-02-03 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=77691
Fix PlatformScreen layering violation and PlatformScreenMac's incorrect use
of device scale
Reviewed by Andy Estes.
toUserSpace() and toDeviceSpace() don't need to take device scale.
* UIProcess/API/mac/WKView.mm:
(-[WKView _convertToDeviceSpace:]):
(-[WKView _convertToUserSpace:]):
2012-02-03 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][Texmap] Refactor TextureMapper API to use ImageBuffers when possible.
https://bugs.webkit.org/show_bug.cgi?id=77148
Reviewed by Martin Robinson.
Use TextureMapper::create instead of creating TextureMapperGL/TextureMapperQt directly.
Remove calls to unused API.
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit::LayerTreeHostProxy::paintToGraphicsContext):
(WebKit::LayerTreeHostProxy::createImage):
(WebKit::LayerTreeHostProxy::ensureRootLayer):
2012-02-03 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Split QQuickWebViewPrivate in two classes, for desktop and touch behavior.
https://bugs.webkit.org/show_bug.cgi?id=77632
Reviewed by Kenneth Rohde Christiansen.
Replace the runtime property setting the desktop behavior on each instance
by a static boolean controlling the behavior used by future created WebViews.
* UIProcess/API/qt/qquickwebpage.cpp:
Let only setContentsSize control the size of the drawing area instead of deferring
it until geometryChanged is called.
(QQuickWebPagePrivate::QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebview.cpp:
(createPrivateObject):
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::~QQuickWebViewPrivate):
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::processDidCrash):
(QQuickWebViewLegacyPrivate::QQuickWebViewLegacyPrivate):
(QQuickWebViewLegacyPrivate::initialize):
(QQuickWebViewLegacyPrivate::updateViewportSize):
(QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
(QQuickWebViewFlickablePrivate::~QQuickWebViewFlickablePrivate):
(QQuickWebViewFlickablePrivate::initialize):
(QQuickWebViewFlickablePrivate::loadDidCommit):
(QQuickWebViewFlickablePrivate::didFinishFirstNonEmptyLayout):
(QQuickWebViewFlickablePrivate::didChangeViewportProperties):
(QQuickWebViewFlickablePrivate::updateViewportSize):
(QQuickWebViewFlickablePrivate::_q_updateVisibleContentRectAndScale):
(QQuickWebViewFlickablePrivate::_q_suspend):
(QQuickWebViewFlickablePrivate::_q_resume):
(QQuickWebViewFlickablePrivate::pageDidRequestScroll):
(QQuickWebViewFlickablePrivate::didChangeContentsSize):
(QQuickWebViewFlickablePrivate::computeViewportConstraints):
(QQuickWebViewFlickablePrivate::PostTransitionState::apply):
(QQuickWebViewExperimental::setFlickableViewportEnabled):
The switch is now a static function that has to be called before a WebView
is created. The switch can have it's default defined by the deploying platform.
(QQuickWebViewExperimental::flickableViewportEnabled):
(QQuickWebView::QQuickWebView):
On creation of QQuickWebView, the static boolean is read to know if we want
a QQuickWebViewTouchPrivate or a QQuickWebViewDesktopPrivate.
(QQuickWebView::geometryChanged):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
(QQuickWebViewPrivate::loadDidCommit):
(QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
(QQuickWebViewPrivate::didChangeViewportProperties):
(QQuickWebViewPrivate::viewportInteractionEngine):
(QQuickWebViewPrivate::updateViewportSize):
(QQuickWebViewPrivate::_q_updateVisibleContentRectAndScale):
(QQuickWebViewPrivate::_q_suspend):
(QQuickWebViewPrivate::_q_resume):
(QQuickWebViewPrivate::pageDidRequestScroll):
(QQuickWebViewPrivate::didChangeContentsSize):
(QQuickWebViewLegacyPrivate):
(QQuickWebViewFlickablePrivate):
(QQuickWebViewFlickablePrivate::viewportInteractionEngine):
(PostTransitionState):
(QQuickWebViewFlickablePrivate::PostTransitionState::PostTransitionState):
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::currentScale):
(QWebViewportInfo::devicePixelRatio):
(QWebViewportInfo::initialScale):
(QWebViewportInfo::minimumScale):
(QWebViewportInfo::maximumScale):
(QWebViewportInfo::isScalable):
(QWebViewportInfo::layoutSize):
* UIProcess/API/qt/tests/publicapi/publicapi.pro:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: Added.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/DesktopWebView.qml: Removed.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml: Renamed
from Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_itemSelector.qml.
Moved to DesktopBehavior instead of using a DesktopWebView to workaround the touch event limitation.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
* UIProcess/API/qt/tests/qmltests/WebView.pro: Copied
from Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
Split qmltests in two executables, tst_qmltests_DesktopBehavior and tst_qmltests_WebView.
The former runs without setFlickableViewportEnabled and the later does.
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
(main):
* UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
* UIProcess/API/qt/tests/tests.pri:
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::QtWebPageEventHandler):
2012-02-02 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Rename content* to contents* in QQuickWebPage.
https://bugs.webkit.org/show_bug.cgi?id=77629
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::QQuickWebPagePrivate):
(QQuickWebPagePrivate::paintToCurrentGLContext):
(QQuickWebPage::setContentsSize):
(QQuickWebPage::contentsSize):
(QQuickWebPage::setContentsScale):
(QQuickWebPage::contentsScale):
(QQuickWebPage::transformToItem):
(QQuickWebPagePrivate::updateSize):
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::didChangeContentsSize):
(QQuickWebViewPrivate::updateVisibleContentRectAndScale):
(QQuickWebViewPrivate::PostTransitionState::apply):
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::contentsSize):
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::scrollRequest):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::setItemRectVisible):
(WebKit::QtViewportInteractionEngine::event):
(WebKit::QtViewportInteractionEngine::wheelEvent):
(WebKit::QtViewportInteractionEngine::pagePositionRequest):
(WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
(WebKit::QtViewportInteractionEngine::applyConstraints):
(WebKit::QtViewportInteractionEngine::currentCSSScale):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::scaleContent):
2012-02-03 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Fix build when cross-compiling
https://bugs.webkit.org/show_bug.cgi?id=77634
Reviewed by Tor Arne Vestbø.
* WebKit2.pri: Link in -lrt on linux mkspecs, regardless of whether gcc
is in use or not. More specifically this fixes the case where the makespace
is not linux-g++* but for a cross-compiling one like linux-arm-gnueabi-g++.
2012-02-03 Shinya Kawanaka <shinyak@google.com>
Stop calling Element::ensureShadowRoot in Internals.
https://bugs.webkit.org/show_bug.cgi?id=77612
Reviewed by Hajime Morita.
Exports symbols.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-02-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r106620.
http://trac.webkit.org/changeset/106620
https://bugs.webkit.org/show_bug.cgi?id=77716
It broke non ENABLE(3D_RENDERING) builds (Requested by
Ossy_morning on #webkit).
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit::LayerTreeHostProxy::paintToGraphicsContext):
(WebKit::LayerTreeHostProxy::createImage):
(WebKit::LayerTreeHostProxy::ensureRootLayer):
2012-02-02 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][Texmap] Refactor TextureMapper API to use ImageBuffers when possible.
https://bugs.webkit.org/show_bug.cgi?id=77148
Reviewed by Martin Robinson.
Use TextureMapper::create instead of creating TextureMapperGL/TextureMapperQt directly.
Remove calls to unused API.
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit::LayerTreeHostProxy::paintToGraphicsContext):
(WebKit::LayerTreeHostProxy::createImage):
(WebKit::LayerTreeHostProxy::ensureRootLayer):
2012-02-02 Jon Lee <jonlee@apple.com>
Clear shown notifications when context is no longer active
https://bugs.webkit.org/show_bug.cgi?id=77363
<rdar://problem/10568907>
Reviewed by Darin Adler.
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
(WebKit::WebNotificationClient::clearNotifications): Forward the call to
WebNotificationManager.
* WebProcess/WebCoreSupport/WebNotificationClient.h:
(WebNotificationClient):
* WebProcess/Notifications/WebNotificationManager.h: Add an additional map that maps
all notifications associated with a given ScriptExecutionContext instance.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show): Create a map entry for the notification's
context if it doesn't exist already, and note that notification's ID. Also, correct
the return value of show() if notifications are not enabled, to return false.
(WebKit::WebNotificationManager::didCloseNotifications): When the notification is closed,
we remove that notification from the map.
(WebKit::WebNotificationManager::clearNotifications): Use the map entry for the given
context, and pass that along to the proxy so that all of the notifications with those IDs
can be cleared. In the meantime, we remove that context's map entry.
* UIProcess/Notifications/WebNotificationManagerProxy.messages.in: New ClearNotifications()
message.
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::clearNotifications): Forward the call to the provider.
Then remove this proxy's entries for the given notification IDs.
* UIProcess/Notifications/WebNotificationProvider.cpp:
(WebKit::WebNotificationProvider::clearNotifications): Convert the vector of IDs to a mutable
array.
* UIProcess/Notifications/WebNotificationProvider.h:
(WebNotificationProvider):
* UIProcess/API/C/WKNotificationProvider.h: Add WK API to tell the platform to clear the notifications.
Remove the #if guard since they already exist in WebNotificationManager functions:
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
(WebKit::WebNotificationClient::show):
(WebKit::WebNotificationClient::cancel):
(WebKit::WebNotificationClient::notificationObjectDestroyed):
2012-02-02 Anders Carlsson <andersca@apple.com>
NPAPI will not send mouse up events when mouse is outside plugin area
https://bugs.webkit.org/show_bug.cgi?id=77657
<rdar://problem/10160674>
Reviewed by Andreas Kling.
Use EventHandler::setCapturingMouseEventsNode to ensure we get all the mouse events when the mouse is down.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):
2012-02-02 Claudio Saavedra <csaavedra@igalia.com> and Martin Robinson <mrobinson@igalia.com>
[GTK] WebKitWebView won't work in a GtkOffscreenWindow
https://bugs.webkit.org/show_bug.cgi?id=76911
Reviewed by Philippe Normand.
* UIProcess/API/gtk/WebKitUIClient.cpp:
(getWindowFrame): Use the new helper.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewCreateJavaScriptDialog): Ditto
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize): Ditto.
(webkitWebViewBaseSizeAllocate): Ditto.
(webkitWebViewBaseFocusInEvent): Ditto.
2012-02-01 Philippe Normand <pnormand@igalia.com>
[GStreamer] FFTFrame implementation
https://bugs.webkit.org/show_bug.cgi?id=73545
Reviewed by Chris Rogers.
* GNUmakefile.am: Remove libfftw compilation flags.
2012-02-01 No'am Rosenthal <noam.rosenthal@nokia.com>
[Texmap] Use glScissors for clipping in TextureMapperGL when possible
https://bugs.webkit.org/show_bug.cgi?id=77575
Reviewed by Martin Robinson.
Instead of applying the scissor clip in QQuickWebPage, we trickle it down to
TextureMapperGL, and apply it there as part of beginClip(). All direct GL operations are
now cleaned out of QQuickWebPage.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paintToCurrentGLContext):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::paintToCurrentGLContext):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::paintToCurrentGLContext):
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
2012-02-01 Dan Bernstein <mitz@apple.com>
WebKit2 part of <rdar://problem/10442663> Paginated display does not respect page-break-{before,after}
https://bugs.webkit.org/show_bug.cgi?id=77505
Reviewed by Darin Adler.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Encode paginationBehavesLikeColumns.
(WebKit::WebPageCreationParameters::decode): Decode paginationBehavesLikeColumns.
* Shared/WebPageCreationParameters.h:
(WebPageCreationParameters): Added paginationBehavesLikeColumns boolean.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPaginationBehavesLikeColumns): Added this setter.
(WKPageGetPaginationBehavesLikeColumns): Added this getter.
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController setPaginationBehavesLikeColumns:]): Added this Objective-C
wrapper around WKPageSetPaginationBehavesLikeColumns.
(-[WKBrowsingContextController paginationBehavesLikeColumns]): Added this Objective-C wrapper
around WKPageGetPaginationBehavesLikeColumns.
* UIProcess/API/mac/WKBrowsingContextControllerPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Added call to setPaginationBehavesLikeColumns() with
the value from the creation parameters.
(WebKit::WebPageProxy::setPaginationBehavesLikeColumns): Added this setter.
(WebKit::WebPageProxy::creationParameters): Populate paginationBehavesLikeColumns.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::paginationBehavesLikeColumns): Added this getter.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setPaginationBehavesLikeColumns): Added this setter.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added SetPaginationBehavesLikeColumns message.
2012-02-01 Anders Carlsson <andersca@apple.com>
REGRESSION (r104727): Strange graphics corruption opening a new tab in Safari
https://bugs.webkit.org/show_bug.cgi?id=77578
<rdar://problem/10767174>
Reviewed by Dan Bernstein.
Resizing a window will always invalidate the window backing store, so make sure to set
_data->_windowHasValidBackingStore to NO whenever that happens.
* UIProcess/API/mac/WKView.mm:
(-[WKView addWindowObserversForWindow:]):
Use separate methods for the NSWindowDidMoveNotification and NSWindowDidResizeNotification notifications.
(-[WKView _windowDidMove:]):
Call -[WKView _updateWindowAndViewFrames].
(-[WKView _windowDidResize:]):
Call -[WKView _updateWindowAndViewFrames] and mark the window backing store as invalid.
2012-02-01 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=77383
Add a different didFirstVisuallNonEmptyLayout heuristic to experiment with
-and corresponding-
<rdar://problem/10709560>
Reviewed by Sam Weinig.
Machinery for didNewFirstVisuallNonEmptyLayout.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didNewFirstVisuallyNonEmptyLayout):
(WebKit):
* UIProcess/WebLoaderClient.h:
(WebLoaderClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didNewFirstVisuallyNonEmptyLayout):
(WebKit):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout):
(WebKit):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
(WebFrameLoaderClient):
This temporary API allows the client to specify the threshold for the painted
objects counter on Page. This is temporary.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetPaintedObjectsCounterThreshold):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setPaintedObjectsCounterThreshold):
(WebKit):
* WebProcess/WebPage/WebPage.h:
(WebPage):
2012-01-31 Alexey Proskuryakov <ap@apple.com>
REGRESSION (WebKit2): event.keyCode is always zero when typing in Russian
https://bugs.webkit.org/show_bug.cgi?id=77473
<rdar://problem/10751357>
Reviewed by Darin Adler.
* Shared/mac/WebEventFactory.mm: Removed broken copy/pasted implementation in favor of
WebCore ones.
2012-01-31 Alexey Proskuryakov <ap@apple.com>
PluginProcess should be able to use remote open and save panels
https://bugs.webkit.org/show_bug.cgi?id=77461
<rdar://problem/10783615>
Reviewed by Mark Rowe.
* PluginProcess/mac/PluginProcess.entitlements: Added.
* PluginProcess/mac/add-entitlements.sh: Added.
* WebKit2.xcodeproj/project.pbxproj:
Add appropriate entitlement, plus ad hoc binary signing for it to work.
2012-01-31 Allan Sandfeld Jensen <allan.jensen@nokia.com>
Ensure tiles are repainted when scrolling using mouse wheel.
https://bugs.webkit.org/show_bug.cgi?id=77339
A new slot visibleContentRectAndScaleChanged has been added
that is emited by non-animated scrolling code in the
QtViewportInteractionEngine.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initializeDesktop):
(QQuickWebViewPrivate::initializeTouch):
(QQuickWebViewPrivate::_q_resume):
(QQuickWebViewPrivate::_q_updateVisibleContentRectAndScale):
(QQuickWebViewPrivate::updateTouchViewportSize):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::wheelEvent):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
2012-01-31 Zeno Albisser <zeno@webkit.org>
[Qt][WK2] Make UIProcess decide about encoding of input data for application URL schemes.
https://bugs.webkit.org/show_bug.cgi?id=77417
Make the UIProcess decide about the encoding and display
a warning in case no encoding was defined.
Make the QQuickNetworkReply store a QWeakPointer to the
QQuickWebViewExperimental to get rid of hackish chain of parental queries.
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquicknetworkreply.cpp:
(QQuickNetworkReply::send):
(QQuickNetworkReply::setWebViewExperimental):
* UIProcess/API/qt/qquicknetworkreply_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewExperimental::schemeDelegates_Append):
* WebProcess/qt/QtNetworkReply.cpp:
(WebKit::QtNetworkReply::QtNetworkReply):
(WebKit::QtNetworkReply::setReplyData):
2012-01-30 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Disconnect the LayerTreeHost from layers when they get removed from their parent.
https://bugs.webkit.org/show_bug.cgi?id=77362
Reviewed by Noam Rosenthal.
This fixes crashes seen in layout tests under certain timing circumstances
that appeared after r106109 was landed.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::replaceChild):
(WebCore::WebGraphicsLayer::removeFromParent):
2012-01-30 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=77263
PlatformScreenMac should not rely on NSWindow for important bits of data
Reviewed by Geoff Garen.
toUserSpace() and toDeviceSpace() now take a parameter for the
deviceScaleFactor.
* UIProcess/API/mac/WKView.mm:
(-[WKView _convertToDeviceSpace:]):
(-[WKView _convertToUserSpace:]):
2012-01-26 No'am Rosenthal <noam.rosenthal@nokia.com> and Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] WKTR: Use a software rendering pipiline when running tests.
https://bugs.webkit.org/show_bug.cgi?id=76708
Reviewed by Kenneth Rohde Christiansen.
Animation layout tests require the graphics layers tree to be updated
to pass. WebkitTestRunner doesn't show its wrapping QQuickView, which
prevents the rendering pipeline to run and then in turn blocks the web
process from processing further graphics layer updates.
This allows the tests to use a TextureMapperQt to empty the LayerTreeHost's
message queue and render the layers in software on an offscreen buffer.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paint):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::setNeedsDisplay):
(QQuickWebViewExperimental::setRenderToOffscreenBuffer):
(QQuickWebViewExperimental::renderToOffscreenBuffer):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::setRenderToOffscreenBuffer):
(QQuickWebViewPrivate::renderToOffscreenBuffer):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::paintToGraphicsContext):
2012-01-30 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Render layers do not get flushed when the scroll animation finishes
https://bugs.webkit.org/show_bug.cgi?id=77338
Reviewed by Noam Rosenthal.
Schedule a layer flush when setting the visible content rect and scale.
Fixed with the help of Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
2012-01-30 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.am: Add missing files.
* WebProcess/WebPage/TapHighlightController.cpp: Add #if
ENABLE(TOUCH_EVENTS).
2012-01-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r106022.
http://trac.webkit.org/changeset/106022
https://bugs.webkit.org/show_bug.cgi?id=77305
It broke Qt-WK2 API tests (Requested by Ossy_weekend on
#webkit).
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
(QQuickWebView::geometryChanged):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::currentScale):
(QWebViewportInfo::devicePixelRatio):
(QWebViewportInfo::initialScale):
(QWebViewportInfo::minimumScale):
(QWebViewportInfo::maximumScale):
(QWebViewportInfo::isScalable):
(QWebViewportInfo::layoutSize):
2012-01-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r106109.
http://trac.webkit.org/changeset/106109
https://bugs.webkit.org/show_bug.cgi?id=77302
It made tests crash (Requested by Ossy_weekend on #webkit).
* UIProcess/API/qt/qquickwebpage.cpp:
* UIProcess/API/qt/qquickwebpage_p_p.h:
(QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::setViewNeedsDisplay):
2012-01-27 Fady Samuel <fsamuel@chromium.org>
Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting
https://bugs.webkit.org/show_bug.cgi?id=76459
Reviewed by Darin Fisher.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-01-27 Martin Robinson <mrobinson@igalia.com>
Fix a compilation warning in a WebKit2 GTK+ API test.
Reviewed by Gustavo Noronha Silva.
* UIProcess/API/gtk/tests/TestBackForwardList.cpp:
(testBackForwardListLimitAndCache): Use an int instead of size_t
because we want to print them as ints and do subtraction on them.
2012-01-27 Martin Robinson <mrobinson@igalia.com>
[GTK] [WK2] Implement the policy client
https://bugs.webkit.org/show_bug.cgi?id=76343
Reviewed by Gustavo Noronha Silva.
Implement the abstract WebKitPolicyDecision, WebKitNavigationPolicyDecision,
and add the decide-policy signal to WebKitWebView.
* GNUmakefile.am: Add new files to the source list.
* UIProcess/API/gtk/WebKitError.cpp: Use the WebCore namespace because
of changes to ASSERT_MATCHING_ENUMS.
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp: Added.
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.h: Added.
* UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h: Added.
* UIProcess/API/gtk/WebKitPolicyClient.cpp: Added.
* UIProcess/API/gtk/WebKitPolicyClientPrivate.h: Added.
* UIProcess/API/gtk/WebKitPolicyDecision.cpp: Added.
* UIProcess/API/gtk/WebKitPolicyDecision.h: Added.
* UIProcess/API/gtk/WebKitPolicyDecisionPrivate.h: Added.
* UIProcess/API/gtk/WebKitPrivate.h: Modify ASSERT_MATCHING_ENUMS to make
it useful for non-WebCore enums.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed): Attach the policy client callbacks to the page.
(webkit_web_view_class_init): Add the decide-policy signal definition.
(webkitWebViewMakePolicyDecision): Added this private method to fire the signal.
* UIProcess/API/gtk/WebKitWebView.h: Added new signal to the list.
* UIProcess/API/gtk/WebKitWebViewPrivate.h: Added new method declaration.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Added new classes to the docs.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
* UIProcess/API/gtk/tests/GNUmakefile.am: Added new test to the source list.
* UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp: Added.
* UIProcess/API/gtk/webkit2marshal.list: decide-policy has a new signature.
2012-01-27 Ada Chan <adachan@apple.com>
Add API to get the parent frame in WKBundleFrameRef
https://bugs.webkit.org/show_bug.cgi?id=77161
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetParentFrame): Get the parent frame by calling WebFrame::parentFrame().
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::parentFrame): Return null if the frame does not have an owner element.
Otherwise, return the owner element's frame.
* WebProcess/WebPage/WebFrame.h:
2012-01-27 Gustavo Noronha Silva <gns@gnome.org>
[GTK] Sometimes fails to build when using make -j
https://bugs.webkit.org/show_bug.cgi?id=77226
Reviewed by Martin Robinson.
* GNUmakefile.am: use a different name for the scripts used to
generate enum files for WebKitGTK+ and WebKit2GTK+, so they do not
clash;
2012-01-27 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Fix overridePreference for WebKitHixie76WebSocketProtocolEnabled in WebKitTestRunner.
https://bugs.webkit.org/show_bug.cgi?id=77220
Reviewed by Noam Rosenthal.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): The macro already stringify TestRunnerName.
2012-01-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add a GKeyFile especialization to GOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=77191
Reviewed by Martin Robinson.
* Shared/gtk/ArgumentCodersGtk.cpp:
(CoreIPC::decodeGKeyFile): Use GOwnPtr for GKeyFile.
(CoreIPC::encode): Ditto.
(CoreIPC::decode): Ditto.
2012-01-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Fade out tap highlighting when starting to pan
https://bugs.webkit.org/show_bug.cgi?id=77202
Reviewed by Simon Hausmann.
Basically we need to fade out the potential tap highlighting
when ever the gesture recognition fails or another gesture
is recognized. We do that with this change.
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
(WebKit::QtTapGestureRecognizer::recognize):
(WebKit::QtTapGestureRecognizer::reset):
Remove reset as it does nothing but call code before the
event handler is installed.
2012-01-26 No'am Rosenthal <noam.rosenthal@nokia.com> and Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] WKTR: Use a software rendering pipiline when running tests.
https://bugs.webkit.org/show_bug.cgi?id=76708
Reviewed by Kenneth Rohde Christiansen.
Animation layout tests require the graphics layers tree to be updated
to pass. WebkitTestRunner doesn't show its wrapping QQuickView, which
prevents the rendering pipeline to run and then in turn blocks the web
process from processing further graphics layer updates.
This allows the tests to use a TextureMapperQt to empty the LayerTreeHost's
message queue and render the layers in software on an offscreen buffer.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paint):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::setNeedsDisplay):
(QQuickWebViewExperimental::setRenderToOffscreenBuffer):
(QQuickWebViewExperimental::renderToOffscreenBuffer):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::setRenderToOffscreenBuffer):
(QQuickWebViewPrivate::renderToOffscreenBuffer):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::paintToGraphicsContext):
2012-01-27 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Re-creating QQuickWebView starts new web process every time
https://bugs.webkit.org/show_bug.cgi?id=77194
Reviewed by Kenneth Rohde Christiansen.
Since the WebKit::WebContext is never fully destructed due to circular
references, we should use the real shared context instead of re-creating
a new WebContext every time.
* UIProcess/qt/QtWebContext.cpp:
(WebKit::QtWebContext::defaultContext):
2012-01-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add basic printing support to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=76172
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Add new files to compilation.
* Shared/PrintInfo.cpp:
(WebKit::PrintInfo::encode): Encode also GtkPrintSettings and
GtkPageSetup for the GTK+ port.
(WebKit::PrintInfo::decode): Decode also GtkPrintSettings and
GtkPageSetup for the GTK+ port.
* Shared/PrintInfo.h: Add GtkPrintSettings and GtkPageSetup member
for the GTK+ port.
* Shared/gtk/ArgumentCodersGtk.cpp:
(CoreIPC::encodeGKeyFile): Helper function to encode a GKeyFile as
a DataReference object.
(CoreIPC::decodeGKeyFile): Helper function to decode a GKeyFile to
a DataReference object.
(CoreIPC::encode): Encode GtkPrintSettings and GtkPageSetup using
the GKeyFile representation.
(CoreIPC::decode): Decode GtkPrintSettings and GtkPageSetup using
the GKeyFile representation.
* Shared/gtk/ArgumentCodersGtk.h:
* Shared/gtk/PrintInfoGtk.cpp: Copied from Source/WebKit2/Shared/PrintInfo.cpp.
(WebKit::PrintInfo::PrintInfo): Add PrintInfo constructor that
takes GtkPrintSettings and GtkPageSetup instances.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::drawPagesForPrinting): Send
DrawPagesForPrinting message to Web process to start printing.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::beginPrinting): Create a WebPrintOperationGtk.
(WebKit::WebPage::endPrinting): Delete the WebPrintOperationGtk
object.
(WebKit::WebPage::drawPagesForPrinting): Start printing pages.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add DrawPagesForPrinting message.
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Added.
(WebKit::PrintPagesData::PrintPagesData): Struct to store all data
used to render pages for printing.
(WebKit::PrintPagesData::incrementPageSequence): Helper function
to increment the page sequence.
(WebKit::WebPrintOperationGtk::create): Create a
WebPrintOperationGtkUnix or WebPrintOperationGtkWin32 depending on
the platform.
(WebKit::WebPrintOperationGtk::WebPrintOperationGtk):
(WebKit::WebPrintOperationGtk::~WebPrintOperationGtk):
(WebKit::WebPrintOperationGtk::pageCount): Return the total pages
of the document to print.
(WebKit::WebPrintOperationGtk::rotatePage): Helper function to
transform the context according to orientation.
(WebKit::WebPrintOperationGtk::renderPage): Render the given page
into the printing context.
(WebKit::WebPrintOperationGtk::printPagesIdle): Idle function used
to print pages.
(WebKit::WebPrintOperationGtk::printPagesIdleDone): Callback
called when printPagesIdle finishes.
(WebKit::WebPrintOperationGtk::printDone): Helper function to
finish the print operation, called when all pages have been rendered.
(WebKit::WebPrintOperationGtk::print): Start printing the document
using the given cairo surface.
* WebProcess/WebPage/gtk/WebPrintOperationGtk.h: Added.
(WebKit::WebPrintOperationGtk::printSettings):
(WebKit::WebPrintOperationGtk::pageSetup):
(WebKit::WebPrintOperationGtk::pagesToPrint):
(WebKit::WebPrintOperationGtk::pageRanges):
(WebKit::WebPrintOperationGtk::pageRangesCount):
2012-01-26 Tim Horton <hortont424@gmail.com>
3D transformed elements hide when showing the print dialog
https://bugs.webkit.org/show_bug.cgi?id=45894
<rdar://problem/7441593>
Reviewed by Andy Estes.
Suspend updates of the compositing layer tree while printing is taking place,
preventing on-screen layers from moving to their print-mode positions.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::beginPrinting):
(WebKit::WebPage::endPrinting):
* WebProcess/WebPage/ca/LayerTreeHostCA.h:
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
(WebKit::LayerTreeHostCAMac::forceRepaint):
(WebKit::LayerTreeHostCAMac::flushPendingLayerChanges):
2012-01-26 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Add the componentComplete method to WebView
https://bugs.webkit.org/show_bug.cgi?id=77111
Reviewed by Kenneth Rohde Christiansen.
Move the touch/desktop initialization to componentComplete.
Also return valid default values in the viewport info functions
if the interaction engine is not yet initialized because the
viewport info component could finish initialization earlier
than the WebView, which results in QML warnings during MiniBrowser
startup.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
(QQuickWebView::geometryChanged):
(QQuickWebView::componentComplete):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::currentScale):
(QWebViewportInfo::devicePixelRatio):
(QWebViewportInfo::initialScale):
(QWebViewportInfo::minimumScale):
(QWebViewportInfo::maximumScale):
(QWebViewportInfo::isScalable):
(QWebViewportInfo::layoutSize):
2012-01-26 Anders Carlsson <andersca@apple.com>
WebWheelEvent::Phase and PlatformWheelEvent::Phase declarations should match AppKit
https://bugs.webkit.org/show_bug.cgi?id=77123
Reviewed by Beth Dakin.
* Shared/WebEvent.h:
():
* Shared/mac/WebEventFactory.mm:
(WebKit::phaseForEvent):
2012-01-26 Andras Becsi <andras.becsi@nokia.com>
ASSERT(!m_overlay) reached in TapHighlightController.cpp:73
https://bugs.webkit.org/show_bug.cgi?id=77117
Reviewed by Tor Arne Vestbø.
The PageOverlay does only get uninstalled after the fade-out animation finishes,
so do not assert on !m_overlay after the uninstallPageOverlay call.
* WebProcess/WebPage/TapHighlightController.cpp:
(WebKit::TapHighlightController::hideHighlight):
2012-01-26 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
WebPreferencesStore: use DEFINE_STATIC_LOCAL for overrides HashMap
https://bugs.webkit.org/show_bug.cgi?id=77109
Reviewed by Andreas Kling.
Fix build for Clang.
* Shared/WebPreferencesStore.cpp:
(WebKit):
(WebKit::boolTestRunnerOverridesMap):
(WebKit::WebPreferencesStore::overrideBoolValueForKey):
(WebKit::WebPreferencesStore::removeTestRunnerOverrides):
(WebKit::WebPreferencesStore::getBoolValueForKey):
2012-01-26 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Implement overridePreference for boolean preferences in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=77033
Reviewed by Alexey Proskuryakov.
Implement a way to WebKitTestRunner override preferences for the pages
loaded. Follows the same approach taken by
overrideXSSAuditorEnabledForTestRunner() from r66551, but generalizing to many
preferences.
Preferences are stored in the UI process using WebPreferencesStore, and when
there's a change, this data is sent to Web process, triggering
WebPage::preferencesDidChange(), which take a WebPreferencesStore and apply it's
data to the WebCore::Settings object.
The overridePreference() is executed on the Web process, and set the preferences
without communicating to the UI process. The overriden preferences are stored in
a static map and WebPreferencesStore query this map before returning the values
of each preference. This static map is used only on the Web process.
To clear the overrides we need to clear the map. Since WTR only sets preferences
when resetting the page, we hook the clearing at WebPage::preferencesDidChange().
A WKPreferences private function was exposed to WTR force the update, in case
there's no effective change at UI process (all the properties remains the same).
This clearing could be improved by creating a proper message instead of hooking
at WebPage::preferencesDidChange().
* Shared/WebPreferencesStore.cpp:
(WebKit::WebPreferencesStore::decode):
(WebKit::WebPreferencesStore::overrideBoolValueForKey):
(WebKit::WebPreferencesStore::removeTestRunnerOverrides):
(WebKit::WebPreferencesStore::getBoolValueForKey):
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesResetTestRunnerOverrides):
* UIProcess/API/C/WKPreferencesPrivate.h:
* UIProcess/WebPreferences.h:
(WebKit::WebPreferences::forceUpdate):
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleOverrideBoolPreferenceForTestRunner):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
(WebKit::InjectedBundle::overrideXSSAuditorEnabledForTestRunner):
* WebProcess/InjectedBundle/InjectedBundle.h:
2012-01-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WK2] Primary clipboard should be updated with the current selection in X11 platforms
https://bugs.webkit.org/show_bug.cgi?id=77097
Reviewed by Martin Robinson.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::respondToChangedSelection): Call
setSelectionPrimaryClipboardIfNeeded() to update primary clipboard
in X11 platforms.
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::collapseSelection): Callback called when clearing
clipboard contents.
(WebKit::WebEditorClient::setSelectionPrimaryClipboardIfNeeded):
Updaye primary clipboard with the current selection.
2012-01-26 Zeno Albisser <zeno@webkit.org>
[Qt][WK2] Use QVariant for payload data in application URL schemes.
https://bugs.webkit.org/show_bug.cgi?id=77007
Make application schemes use QVariant for payload data.
This allows passing QByteArrays as well as simple String data.
Remove unneeded http header parts that were exposed in
QQuickNetworkReply.
Add ByteArrayTestData class to allow injecting QByteArray
data into an application scheme handler for testing.
Reviewed by Simon Hausmann.
* Shared/qt/QtNetworkReplyData.cpp:
(WebKit::QtNetworkReplyData::QtNetworkReplyData):
(WebKit::QtNetworkReplyData::encode):
(WebKit::QtNetworkReplyData::decode):
* Shared/qt/QtNetworkReplyData.h:
* UIProcess/API/qt/qquicknetworkreply.cpp:
(QQuickNetworkReply::QQuickNetworkReply):
(QQuickNetworkReply::data):
(QQuickNetworkReply::setData):
(QQuickNetworkReply::send):
* UIProcess/API/qt/qquicknetworkreply_p.h:
* UIProcess/API/qt/tests/bytearraytestdata.cpp: Added.
(ByteArrayTestData::ByteArrayTestData):
(ByteArrayTestData::latin1Data):
(ByteArrayTestData::utf8Data):
* UIProcess/API/qt/tests/bytearraytestdata.h: Added.
* UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
(main):
* UIProcess/API/qt/tests/tests.pri:
* WebProcess/qt/QtNetworkReply.cpp:
(WebKit::QtNetworkReply::setReplyData):
* WebProcess/qt/QtNetworkReply.h:
2012-01-26 Thiago Marcos P. Santos <tmpsantos@gmail.com>
[Qt] Fixed build when using force_static_libs_as_shared
https://bugs.webkit.org/attachment.cgi?bugid=77082
Reviewed by Simon Hausmann.
* Target.pri:
2012-01-26 Nándor Huszka <huszka.nandor@stud.u-szeged.hu>
[WK2] WebKitTestRunner needs layoutTestController.setGeolocationPermission
https://bugs.webkit.org/show_bug.cgi?id=42545
Reviewed by Zoltan Herczeg.
Implement the setGeolocationPermission method.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetGeolocationPermission):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setGeoLocationPermission):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):
2012-01-25 Mark Rowe <mrowe@apple.com>
Build in to an alternate location when USE_STAGING_INSTALL_PATH is set.
<rdar://problem/10609417> Adopt USE_STAGING_INSTALL_PATH
Reviewed by David Kilzer.
* Configurations/BaseTarget.xcconfig: Define NORMAL_WEBKIT2_FRAMEWORKS_DIR, which contains
the path where WebKit is normally installed. Update WEBKIT2_FRAMEWORKS_DIR to point to
the staged frameworks directory when USE_STAGING_INSTALL_PATH is set. Update
UMBRELLA_FRAMEWORKS_DIR so we can find WebCore at the top level of the staged frameworks
directory when USE_STAGING_INSTALL_PATH is set, rather than finding it embedded inside of
WebKit.framework.
* Configurations/PluginProcess.xcconfig: Set our install path based on WEBKIT2_FRAMEWORKS_DIR.
* Configurations/WebKit2.xcconfig: Set our install path based on WEBKIT2_FRAMEWORKS_DIR.
Always set the framework's install name based on the normal framework location. This prevents
an incorrect install name from being used when installing in to the staged frameworks directory.
* Configurations/WebProcess.xcconfig: Set our install path based on WEBKIT2_FRAMEWORKS_DIR.
2012-01-25 No'am Rosenthal <noam.rosenthal@nokia.com>
[WK2][Qt] REGRESSION: Pages with transform animations sometimes omit some of the layers since r105413
https://bugs.webkit.org/show_bug.cgi?id=76886
Reviewed by Kenneth Rohde Christiansen.
We now render the whole layer if it or one if its ancestors has an active transform
animations. It's possible to optimize further in the future, but not currently necessary.
Also, we make sure that when a WebGraphicsLayer's property that affects transformation is
changed, all its descandants layers are marked as modified so that we re-adjust their
visible rect in the next pass.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::notifyChangeRecursively):
(WebCore):
(WebCore::WebGraphicsLayer::setPosition):
(WebCore::WebGraphicsLayer::setAnchorPoint):
(WebCore::WebGraphicsLayer::setSize):
(WebCore::WebGraphicsLayer::setTransform):
(WebCore::WebGraphicsLayer::setChildrenTransform):
(WebCore::WebGraphicsLayer::setPreserves3D):
(WebCore::WebGraphicsLayer::setMasksToBounds):
(WebCore::WebGraphicsLayer::addAnimation):
(WebCore::WebGraphicsLayer::removeAnimation):
(WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
(WebCore::WebGraphicsLayer::selfOrAncestorHasActiveTransformAnimations):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebGraphicsLayer):
2012-01-25 Hajime Morita <morrita@google.com>
ENABLE_SHADOW_DOM should be available via build-webkit --shadow-dom
https://bugs.webkit.org/show_bug.cgi?id=76863
Reviewed by Dimitri Glazkov.
Added a feature flag.
* Configurations/FeatureDefines.xcconfig:
2012-01-25 Martin Robinson <mrobinson@igalia.com>
[WK2] Navigation events not triggered by a mouse event claim to be triggered by the left mouse button during policy decisions
https://bugs.webkit.org/show_bug.cgi?id=76344
Reviewed by Sam Weinig.
When creating InjectedBundleNavigationActions, initialize the mouse button to NoButton.
This ensures that when there is no mouse event associated with the action, when the event
hits the client-API layer, the button is still NoButton.
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): Initialize m_mouseButton
to WebMouseEvent::NoButton.
2012-01-25 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Implement tap feedback respecting -webkit-tap-highlight-color
https://bugs.webkit.org/show_bug.cgi?id=76914
Reviewed by Simon Hausmann.
Implement tap highlighting for Qt. When a touch press is issued,
which is not handled by the web page, then we highlight any
activatable node below. In all otehr cases, we hide any highlights.
The highlighting itself is painted on an accelerated PageOverlay,
on the web process side.
* Target.pri:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handlePotentialActivation):
* UIProcess/WebPageProxy.h:
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::recognize):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handlePotentialSingleTapEvent):
* UIProcess/qt/QtWebPageEventHandler.h:
* WebProcess/WebPage/TapHighlightController.cpp: Added.
(WebKit::TapHighlightController::TapHighlightController):
(WebKit::TapHighlightController::~TapHighlightController):
(WebKit::TapHighlightController::highlight):
(WebKit::TapHighlightController::hideHighlight):
(WebKit::TapHighlightController::pageOverlayDestroyed):
(WebKit::TapHighlightController::willMoveToWebPage):
(WebKit::TapHighlightController::didMoveToWebPage):
(WebKit::highlightColor):
(WebKit::TapHighlightController::drawRect):
(WebKit::TapHighlightController::mouseEvent):
* WebProcess/WebPage/TapHighlightController.h: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::highlightPotentialActivation):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::tapHighlightController):
* WebProcess/WebPage/WebPage.messages.in:
2012-01-25 Nándor Huszka <huszka.nandor@stud.u-szeged.hu>
[WK2] WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled
https://bugs.webkit.org/show_bug.cgi?id=63458
Reviewed by Adam Roben.
Implement the setPopupBlockingEnabled method.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetPrivateBrowsingEnabled):
(WKBundleSetPopupBlockingEnabled):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPopupBlockingEnabled):
* WebProcess/InjectedBundle/InjectedBundle.h:
2012-01-25 Yael Aharon <yael.aharon@nokia.com>
[Qt] Build fix when using force_static_libs_as_shared
https://bugs.webkit.org/show_bug.cgi?id=76832
Reviewed by Simon Hausmann.
Add a dependency on QtWidgets.
* Target.pri:
2012-01-24 Sergio Villar Senin <svillar@igalia.com>
[WK2] FindController should not assume that ports do not want to highlight text matches
https://bugs.webkit.org/show_bug.cgi?id=76921
Reviewed by Darin Adler.
FindController must obey the FindOptionsShowHighlight flag instead
of assuming that ports do not want to highlight search matches.
* Shared/API/c/WKFindOptions.h: added kWKFindOptionsShowHighlight.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toFindOptions): Ditto.
* Shared/WebFindOptions.h: added FindOptionsShowHighlight.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):
2012-01-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Page clients don't need to be GObjects anymore in WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=76899
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitLoaderClient.cpp: Renamed from
Source/WebKit2/UIProcess/API/gtk/WebKitWebLoaderClient.cpp.
(didStartProvisionalLoadForFrame): Use clientInfo instead fo
getting the view from the page.
(didReceiveServerRedirectForProvisionalLoadForFrame): Ditto.
(didFailProvisionalLoadWithErrorForFrame): Ditto.
(didCommitLoadForFrame): Ditto.
(didFinishLoadForFrame): Ditto.
(didFailLoadWithErrorForFrame): Ditto.
(didSameDocumentNavigationForFrame): Ditto.
(didReceiveTitleForFrame): Ditto.
(didChangeProgress): Ditto.
(didChangeBackForwardList): Ditto.
(attachLoaderClientToView): Pass WebKitWebView as clientInfo to
callbacks.
* UIProcess/API/gtk/WebKitLoaderClient.h: Added.
* UIProcess/API/gtk/WebKitUIClient.cpp:
(createNewPage): Use clientInfo instead fo getting the view from
the page.
(showPage): Ditto.
(closePage): Ditto.
(runJavaScriptAlert): Ditto.
(runJavaScriptConfirm): Ditto.
(runJavaScriptPrompt): Ditto.
(toolbarsAreVisible): Ditto.
(setToolbarsAreVisible): Ditto.
(menuBarIsVisible): Ditto.
(setMenuBarIsVisible): Ditto.
(statusBarIsVisible): Ditto.
(setStatusBarIsVisible): Ditto.
(isResizable): Ditto.
(setIsResizable): Ditto.
(getWindowFrame): Ditto.
(setWindowFrame): Ditto.
(attachUIClientToView): Pass WebKitWebView as clientInfo to
callbacks.
* UIProcess/API/gtk/WebKitUIClient.h: Remove GObject boilerplate.
* UIProcess/API/gtk/WebKitWebLoaderClient.h: Removed.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed): Remove UIClient and LoaderClient
objects and call attachUIClientToView() and attachLoaderClientToView().
* UIProcess/API/gtk/tests/GNUmakefile.am: Rename
WebKitWebLoaderClient to WebKitLoaderClient.
* UIProcess/API/gtk/tests/TestLoaderClient.cpp: Renamed from
Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp.
2012-01-25 Roland Steiner <rolandsteiner@chromium.org>
<style scoped>: Implement registering of <style scoped> with the scoping element
https://bugs.webkit.org/show_bug.cgi?id=67790
Add symbols for windows.internals.numberOfScopedHTMLStyleChildren
Reviewed by Dimitri Glazkov.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-01-24 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=76928
Accelerated drawing should force compositing mode
-and corresponding-
<rdar://problem/10697417>
Reviewed by Simon Fraser.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2012-01-24 Alexis Menard <alexis.menard@openbossa.org>
Unreviewed build fix for Qt.
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::showDebugBorders):
(WebKit::LayerTreeHostQt::showRepaintCounter):
2012-01-23 Simon Fraser <simon.fraser@apple.com>
Show layer borders for scrollbar layers
https://bugs.webkit.org/show_bug.cgi?id=76888
Reviewed by Beth Dakin.
Update for new signatures of GraphicsLayerClient::showDebugBorders()
and GraphicsLayerClient::showRepaintCounter().
* UIProcess/LayerTreeHostProxy.h:
(WebKit::LayerTreeHostProxy::showDebugBorders):
(WebKit::LayerTreeHostProxy::showRepaintCounter):
* WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
(WebKit::LayerTreeHostCA::showDebugBorders):
(WebKit::LayerTreeHostCA::showRepaintCounter):
* WebProcess/WebPage/ca/LayerTreeHostCA.h:
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
2012-01-24 David Levin <levin@chromium.org>
[windows] Convert usage of GetDC to HWndDC Part 3.
https://bugs.webkit.org/show_bug.cgi?id=76889
Reviewed by Adam Roben.
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::paint): Fix a dc leak and use the dellayed allocation.
2012-01-24 Sergio Villar Senin <svillar@igalia.com>
[WK2] [GTK] TestDownloads hitting an assertion in Debug builds
https://bugs.webkit.org/show_bug.cgi?id=76915
Reviewed by Martin Robinson.
No new tests required as it fixes some assertions in a unit test.
* WebProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
2012-01-24 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Qt's cross-process AC copies images excessively when updating tiles.
https://bugs.webkit.org/show_bug.cgi?id=76877
Reviewed by Kenneth Rohde Christiansen.
Instead of copying QImages, pass a reference to the ShareableBitmap that was originally
created by the web process. Also, swizzle the image's RGB in the web process, before it's
transferred to the UI process.
Data flow before change:
(Web Process) Render to image -> IPC -> (UI Process) Copy (render queue) -> Copy Swizzled RGB -> Upload
Data flow after change:
(Web Process) Render to image -> swizzle RGB -> IPC -> (UI Process) -> Upload
* Shared/ShareableBitmap.h:
* Shared/qt/ShareableBitmapQt.cpp:
(WebKit::ShareableBitmap::swizzleRGB):
* UIProcess/LayerTreeHostProxy.h:
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::updateTile):
(WebKit::LayerTreeHostProxy::createImage):
(WebKit::LayerTreeHostProxy::syncRemoteContent):
(WebKit::LayerTreeHostProxy::updateTileForLayer):
(WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
(WebKit::LayerTreeHostProxy::purgeGLResources):
* WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
(WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::adoptImageBackingStore):
2012-01-24 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt][WK2] QtWebIconDatabaseClient leaves a dangling pointer on WebIconDatabase after its destruction
https://bugs.webkit.org/show_bug.cgi?id=76399
Reviewed by Simon Hausmann.
Due a circular dependency between WebContext and WebProcessProxy, WebContext it not
being destroyed, neither WebIconDatabase. As QtWebIconDatabaseClient's life time is the same
as QtWebContext and this one is being destroyed, the remaining reference to our client
on WebIconDatabase should be cleaned upon its destruction.
* UIProcess/qt/QtWebIconDatabaseClient.cpp:
(QtWebIconDatabaseClient::QtWebIconDatabaseClient):
(QtWebIconDatabaseClient::~QtWebIconDatabaseClient): Clear client pointer on WebIconDatabase.
* UIProcess/qt/QtWebIconDatabaseClient.h: Make this client hold a reference to WebIconDatabase.
2012-01-24 Zeno Albisser <zeno@webkit.org>
[Qt][WK2] Add test for application URL schemes.
https://bugs.webkit.org/show_bug.cgi?id=74933
Add a test that checks handling of url strings.
Add a test that verifies replies in case of multiple
available application url schemes.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
2012-01-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix /webkit2/WebKitWebView/reload after r105688
https://bugs.webkit.org/show_bug.cgi?id=76898
Reviewed by Alejandro G. Castro.
* UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
(LoadTrackingTest::reload): Add reload method that clears events
and initializes progress.
* UIProcess/API/gtk/tests/LoadTrackingTest.h:
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
(testWebViewReload): Use LoadTrackingTest::reload() instead of
webkit_web_view_reload().
2012-01-24 Simon Hausmann <simon.hausmann@nokia.com>
Some qmake build files must include Qt5's "quick" module.
https://bugs.webkit.org/show_bug.cgi?id=76671
Unreviewed build fix.
* UIProcess/API/qt/tests/tests.pri:
2012-01-24 Zeno Albisser <zeno@webkit.org>
[Qt][WK2] Application URL schemes cause asserts when using debug.
https://bugs.webkit.org/show_bug.cgi?id=76700
Instances of QtNetworkRequestData / QtNetworkReplyData are meant
to be used for transfering data over IPC. To allow transferring
instances of these classes over IPC they need to be copyable,
and it must be possible to create such instances on the stack.
Because classes that inherit from RefCounted always need to be
used in connection with RefPtr, QtNetworkRequestData and
QtNetworkReplyData cannot inherit directly from RefCounted.
Deleting an object that inherits from RefCounted, without
the proper sequence of ref()/deref() being called by it's
RefPtr, causes asserts when running a debug version.
Reviewed by Simon Hausmann.
* Shared/qt/QtNetworkReplyData.h:
(WebKit::QtRefCountedNetworkReplyData::data):
* Shared/qt/QtNetworkRequestData.cpp:
(WebKit::QtRefCountedNetworkRequestData::QtRefCountedNetworkRequestData):
* Shared/qt/QtNetworkRequestData.h:
(WebKit::QtRefCountedNetworkRequestData::data):
* Target.pri:
* UIProcess/API/qt/qquicknetworkreply.cpp:
(QQuickNetworkReply::QQuickNetworkReply):
(QQuickNetworkReply::contentType):
(QQuickNetworkReply::setContentType):
(QQuickNetworkReply::operation):
(QQuickNetworkReply::setOperation):
(QQuickNetworkReply::contentDisposition):
(QQuickNetworkReply::setContentDisposition):
(QQuickNetworkReply::location):
(QQuickNetworkReply::setLocation):
(QQuickNetworkReply::lastModified):
(QQuickNetworkReply::setLastModified):
(QQuickNetworkReply::cookie):
(QQuickNetworkReply::setCookie):
(QQuickNetworkReply::userAgent):
(QQuickNetworkReply::setUserAgent):
(QQuickNetworkReply::server):
(QQuickNetworkReply::setServer):
(QQuickNetworkReply::data):
(QQuickNetworkReply::setData):
(QQuickNetworkReply::send):
(QQuickNetworkReply::networkRequestData):
(QQuickNetworkReply::setNetworkRequestData):
(QQuickNetworkReply::networkReplyData):
* UIProcess/API/qt/qquicknetworkreply_p.h:
* UIProcess/API/qt/qquicknetworkrequest.cpp:
(QQuickNetworkRequest::QQuickNetworkRequest):
(QQuickNetworkRequest::setNetworkRequestData):
(QQuickNetworkRequest::url):
* UIProcess/API/qt/qquicknetworkrequest_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewExperimental::invokeApplicationSchemeHandler):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/WebPageProxy.h:
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::handleApplicationSchemeRequest):
* UIProcess/qt/QtPageClient.h:
* UIProcess/qt/WebPageProxyQt.cpp:
(WebKit::WebPageProxy::resolveApplicationSchemeRequest):
(WebKit::WebPageProxy::sendApplicationSchemeReply):
* WebProcess/qt/QtNetworkReply.cpp:
(WebKit::QtNetworkReply::setData):
(WebKit::QtNetworkReply::readData):
2012-01-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Implement DownloadClient in WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=72952
Reviewed by Martin Robinson.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitDownloadClient.cpp: Added.
(didStart): Call webkitWebContextDownloadStarted().
(didReceiveResponse): Call webkitDownloadSetResponse() with the
received response.
(didReceiveData): Call webkitDownloadNotifyProgress().
(decideDestinationWithSuggestedFilename): Call
webkitDownloadDecideDestinationWithSuggestedFilename().
(didCreateDestination): Call webkitDownloadDestinationCreated().
(didFail): Call webkitDownloadFailed() or
webkitDownloadCancelled() if the download was cancelled before
failing.
(didCancel): Call webkitDownloadCancelled().
(didFinish): Call webkitDownloadFinished().
(attachDownloadClientToContext): Add
implementation for download client callbacks.
* UIProcess/API/gtk/WebKitDownloadClient.h: Added.
* UIProcess/API/gtk/WebKitError.cpp:
(webkit_download_error_quark): Add quark for download errors.
* UIProcess/API/gtk/WebKitError.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_class_init): Add download-started signal.
(createDefaultWebContext): Initialize the download client.
(downloadsMap): HashMap containing download objects for all
ongoing download operations.
(webkit_web_context_download_uri): Start a new download for the
given URI.
(webkitWebContextGetOrCreateDownload): Helper function to create a
new download object or return the existing one from the downloads map.
(webkitWebContextRemoveDownload): Remove the download object from
the downloads map.
(webkitWebContextDownloadStarted): Emit
WebKitWebContext::download-started for the given download object.
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/WebKitWebContextPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/tests/GNUmakefile.am: Add new test for downloads.
* UIProcess/API/gtk/tests/TestDownloads.cpp: Added.
(getWebKit1TestResoucesDir):
(testDownloadLocalFile):
(testDownloadLocalFileError):
(serverCallback):
(testDownloadRemoteFile):
(testDownloadRemoteFileError):
(beforeAll):
(afterAll):
2012-01-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add WebKitDownload to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=72949
Reviewed by Martin Robinson.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitDownload.cpp: Added.
(webkitDownloadFinalize):
(webkitDownloadGetProperty):
(webkitDownloadDecideDestination):
(webkit_download_init):
(webkit_download_class_init):
(webkitDownloadCreate): Create a new WebKitDownload for a given
WKDownloadRef.
(webkitDownloadSetResponse): Set the network response of the
download.
(webkitDownloadIsCancelled): Whether the download has been
cancelled by the user.
(webkitDownloadNotifyProgress): Emit notify::estimated-progress if
needed.
(webkitDownloadFailed): Emit WebKitDownload::failed with the given
error.
(webkitDownloadCancelled): Emit WebKitDownload::failed with
cancelled error.
(webkitDownloadFinished): Emit WebKitDownload::finished.
(webkitDownloadDecideDestinationWithSuggestedFilename): Emit
WebKitDownload::decide-destination.
(webkitDownloadDestinationCreated): Emit
WebKitDownload::created-destination.
(webkit_download_get_destination): Return the destination URI of
the download.
(webkit_download_set_destination): Set the destination URI of the
download.
(webkit_download_get_response): Return the response received by
the server.
(webkit_download_cancel): Cancel the download.
(webkit_download_get_estimated_progress): Return the estimated
progress.
(webkit_download_get_elapsed_time): Return the time elapsed since
the download started.
* UIProcess/API/gtk/WebKitDownload.h: Added.
* UIProcess/API/gtk/WebKitDownloadPrivate.h: Added.
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitURIResponse.cpp:
(webkitURIResponseGetResourceResponse):
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_download_get_type().
* UIProcess/API/gtk/webkit2.h: Include WebKitDownload.h.
* UIProcess/API/gtk/webkit2marshal.list:
2012-01-23 Geoffrey Garen <ggaren@apple.com>
JSValue::toString() should return a JSString* instead of a UString
https://bugs.webkit.org/show_bug.cgi?id=76861
Reviewed by Gavin Barraclough.
Mechanical changes to call value() after calling toString(), to
convert from "JS string" (JSString*) to "C++ string" (UString), since
toString() no longer returns a "C++ string".
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
2012-01-23 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] QQuickWebView is initializing touch mode twice while being constructed
https://bugs.webkit.org/show_bug.cgi?id=76859
Reviewed by Kenneth Rohde Christiansen.
Removing d->initializeTouch() from QQuickWebView::QQuickWebView()
since in QQuickWebViewPrivate::initialize() there is a call for
setUseTraditionalDesktopBehaviour(false), which will call initializeTouch.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::QQuickWebView):
2012-01-23 Martin Robinson <mrobinson@igalia.com>
[GTK][WK2] Make the LoadTracking and WebView test fixtures more flexible
https://bugs.webkit.org/show_bug.cgi?id=76755
Reviewed by Alejandro G. Castro.
Always clear the loading events when loading new content in the load tracking
test. In the WebView test correctly handle loading HTML with a URL that isn't
"about:blank."
* UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
(LoadTrackingTest::loadURI): Reset the class state when starting a new load.
(LoadTrackingTest::loadHtml): Ditto.
(LoadTrackingTest::loadPlainText): Ditto.
(LoadTrackingTest::loadRequest): Ditto.
* UIProcess/API/gtk/tests/LoadTrackingTest.h: Added new method definitions.
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
(assertNormalLoadHappened): No longer clear loading events. The fixture handles that now.
(testLoadHtml): Update to reflect new method name.
(testLoadPlainText): Ditto.
(testLoadRequest): Ditto.
(testWebViewReload): Ditto.
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::loadHtml): Properly interpret the baseURL parameter.
* UIProcess/API/gtk/tests/WebViewTest.h: Make loading methods virtual.
2012-01-23 Alexander Færøy <alexander.faeroy@nokia.com>
[Qt] Implement SSL error handling QML API.
https://bugs.webkit.org/show_bug.cgi?id=76793
Reviewed by Simon Hausmann.
This patch implements support for accepting or rejecting invalid SSL
certificates from the QML API.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::handleCertificateVerificationRequest):
(QQuickWebViewExperimental::certificateVerificationDialog):
(QQuickWebViewExperimental::setCertificateVerificationDialog):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::certificateVerificationRequest):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtDialogRunner.cpp:
(CertificateVerificationDialogContextObject::CertificateVerificationDialogContextObject):
(CertificateVerificationDialogContextObject::hostname):
(CertificateVerificationDialogContextObject::accept):
(CertificateVerificationDialogContextObject::reject):
(QtDialogRunner::initForCertificateVerification):
* UIProcess/qt/QtDialogRunner.h:
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::handleCertificateVerificationRequest):
* UIProcess/qt/QtPageClient.h:
* WebProcess/qt/QtNetworkAccessManager.cpp:
(WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
(WebKit::QtNetworkAccessManager::onSslErrors):
* WebProcess/qt/QtNetworkAccessManager.h:
2012-01-23 David Levin <levin@chromium.org>
[windows] Convert usages of GetDC to HWndDC Part 2.
https://bugs.webkit.org/show_bug.cgi?id=76750
Reviewed by Adam Roben.
* Shared/win/ShareableBitmapWin.cpp:
(WebKit::ShareableBitmap::windowsContext): Fix incorrect usage of OwnPtr<HDC> which
would do a DeleteDC instead of a ReleaseDC.
2012-01-23 David Levin <levin@chromium.org>
[windows] Convert usages of GetDC to HWndDC Part 1.
https://bugs.webkit.org/show_bug.cgi?id=76744
Reviewed by Adam Roben.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::flashBackingStoreUpdates): Typical conversion.
2012-01-21 Timothy Hatcher <timothy@apple.com>
Make WebKit2 remember the height of the Web Inspector when it is docked.
https://webkit.org/b/76769
Reviewed by Dan Bernstein.
* Shared/WebPreferencesStore.h: Added InspectorAttachedHeight.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::setAttachedWindowHeight): Call WebPreferencesStore::setInspectorAttachedHeight.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformAttach): Set the height of the inspector's WKView to inspectorAttachedHeight.
(WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Remove unneeded setNeedsDisplay: calls.
2012-01-20 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] Division by zero error in QtViewportInteractionEngine::setItemRectVisible
https://bugs.webkit.org/show_bug.cgi?id=76674
Reviewed by Kenneth Rohde Christiansen.
Make sure that itemRect is not empty.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::setItemRectVisible):
2012-01-20 Steve Falkenburg <sfalken@apple.com>
Reviewed by Alexey Proskuryakov.
Drag/drop of a file into a WebView on Windows needs to allow access to that file
https://bugs.webkit.org/show_bug.cgi?id=76753
<rdar://problem/10731719>
The Windows drag/drop code path was missing the code to open a file read exception.
Added code to match the Mac version, while allowing directories and multiple files to
also be dragged (matching our previous behavior).
* UIProcess/win/WebView.cpp:
(WebKit::maybeCreateSandboxExtensionFromDragData): Added.
(WebKit::WebView::Drop): Add a universal read exception if we're dragging a file into a WebView to open it.
2012-01-20 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Trigger forcing accelerated compositing from the UI process side.
https://bugs.webkit.org/show_bug.cgi?id=76296
Reviewed by Noam Rosenthal.
Some messages can be sent from the web view to the LayerTreeHost before
accelerated compositing is entered on the web process and signaled back.
By letting the UI process decide if AC has to be forced, we can create
the LayerTreeHostProxy earlier to send messages to the web process while
AC is being entered there.
This patch also fixes the flow of DidRenderFrame and RenderNextFrame messages
by setting the m_waitingForUIProcess flag properly and only send the
RenderNextFrame once the painting thread on the UI process is ready to paint.
This fixes the first visible content rect message not being received when
loading pages from the disk.
* Shared/WebPreferencesStore.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::flushLayerChanges):
(WebKit::LayerTreeHostProxy::didRenderFrame):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::performScheduledLayerFlush):
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::platformInitialize):
2012-01-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r105497.
http://trac.webkit.org/changeset/105497
https://bugs.webkit.org/show_bug.cgi?id=76696
Leaking in Qt layout tests and timing out in GTK API tests.
(Requested by jturcotte on #webkit).
* Shared/WebPreferencesStore.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::platformInitialize):
2012-01-20 Mario Sanchez Prada <msanchez@igalia.com>
[GTK] Expose accessibility hierarchy in WebKit2 to ATK/AT-SPI based ATs
https://bugs.webkit.org/show_bug.cgi?id=72589
Reviewed by Martin Robinson.
Expose the accessibility hierarchy in the multi-process
architecture of WK2 through AtkSocket and AtkPlug.
Make the WebView widget return an AtkSocket when calling to
gtk_widget_get_accessible().
* GNUmakefile.am: Add new files.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkit_web_view_base_init):
(webkitWebViewBaseGetAccessible):
(webkit_web_view_base_class_init):
* UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: Added.
(webkitWebViewBaseAccessibleWidgetFinalize):
(webkitWebViewBaseAccessibleWidgetDestroyed):
(webkitWebViewBaseAccessibleInitialize):
(webkitWebViewBaseAccessibleRefStateSet):
(webkitWebViewBaseAccessibleGetIndexInParent):
(webkit_web_view_base_accessible_init):
(webkit_web_view_base_accessible_class_init):
(webkitWebViewBaseAccessibleNew):
* UIProcess/API/gtk/WebKitWebViewBaseAccessible.h: Added.
Make the WebPage create an AtkPlug on its initialization and
sending the ID of that plug to the UI process, so it can embed the
plug in the socket.
Also, take care of all the needed wrapping around the WebCore's
accessibility objects, exposing them in the UI process's
accessibility hierarchy thanks to the socket-plug connection.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::accessibilityPlugID):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::bindAccessibilityTree):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/gtk/WebPageAccessibilityObject.cpp: Added.
(accessibilityRootObjectWrapper):
(webPageAccessibilityObjectInitialize):
(webPageAccessibilityObjectGetIndexInParent):
(webPageAccessibilityObjectGetNChildren):
(webPageAccessibilityObjectRefChild):
(web_page_accessibility_object_init):
(web_page_accessibility_object_class_init):
(webPageAccessibilityObjectNew):
(webPageAccessibilityObjectRefresh):
* WebProcess/WebPage/gtk/WebPageAccessibilityObject.h: Added.
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::updateAccessibilityTree):
New unit test for checking accessibility support in WK2GTK.
* UIProcess/API/gtk/tests/AccessibilityTestServer.cpp: Added.
(loadChangedCallback): Notify the parent process (the test)
when ready.
(main):
* UIProcess/API/gtk/tests/GNUmakefile.am:
* UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp: Added.
(stopTestServer):
(sigAbortHandler):
(testServerMonitorThreadFunc):
(startTestServerMonitor):
(startTestServer):
(checkAtspiAccessible):
(findTestServerApplication):
(testAtspiBasicHierarchy):
(beforeAll):
(afterAll):
2012-01-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Public API watch dog auto test.
https://bugs.webkit.org/show_bug.cgi?id=73922
Reviewed by Simon Hausmann.
This test aims to prevent unintended/unapproved
modifications to the public QML API.
* UIProcess/API/qt/tests/publicapi/publicapi.pro: Added.
* UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: Added.
(isCheckedEnum):
(isCheckedClass):
(checkKnownType):
(gatherAPI):
(tst_publicapi::publicAPI):
2012-01-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Trigger forcing accelerated compositing from the UI process side.
https://bugs.webkit.org/show_bug.cgi?id=76296
Reviewed by Noam Rosenthal.
Some messages can be sent from the web view to the LayerTreeHost before
accelerated compositing is entered on the web process and signaled back.
By letting the UI process decide if AC has to be forced, we can create
the LayerTreeHostProxy earlier to send messages to the web process while
AC is being entered there.
This fixes the first visible content rect message not being received when
loading pages from the disk.
* Shared/WebPreferencesStore.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::platformInitialize):
2012-01-20 Alexandru Chiculita <achicu@adobe.com>
CSS Shaders: Add a Settings flag to enable/disable CSS Shaders at runtime
https://bugs.webkit.org/show_bug.cgi?id=76444
Reviewed by Nikolas Zimmermann.
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCSSCustomFilterEnabled):
(WKPreferencesGetCSSCustomFilterEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2012-01-19 Sam Weinig <sam@webkit.org>
Replace improper #import with an #include.
* UIProcess/Plugins/PluginProcessProxy.cpp:
Fixes warnings.
2012-01-18 Sam Weinig <sam@webkit.org>
Move RunLoop to WebCore/platform
https://bugs.webkit.org/show_bug.cgi?id=76471
Reviewed by Anders Carlsson.
* GNUmakefile.am:
* Platform/CoreIPC/Connection.cpp:
* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/mac/ConnectionMac.cpp:
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginProcess.cpp:
* PluginProcess/PluginProcess.h:
* PluginProcess/WebProcessConnection.cpp:
* PluginProcess/mac/PluginProcessMainMac.mm:
* PluginProcess/qt/PluginProcessMainQt.cpp:
* Shared/ChildProcess.cpp:
* Shared/ChildProcess.h:
* Target.pri:
* UIProcess/API/mac/FindIndicatorWindow.h:
* UIProcess/API/mac/WKView.mm:
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/Launcher/ThreadLauncher.cpp:
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
* UIProcess/Launcher/mac/ThreadLauncherMac.mm:
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
* UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
* UIProcess/Launcher/win/ProcessLauncherWin.cpp:
* UIProcess/Launcher/win/ThreadLauncherWin.cpp:
* UIProcess/LayerTreeHostProxy.h:
* UIProcess/Plugins/PluginProcessProxy.cpp:
* UIProcess/ResponsivenessTimer.cpp:
* UIProcess/ResponsivenessTimer.h:
* UIProcess/TiledDrawingAreaProxy.h:
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebConnectionToWebProcess.cpp:
* UIProcess/WebConnectionToWebProcess.h:
* UIProcess/WebContext.cpp:
* UIProcess/win/WebView.cpp:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebConnectionToUIProcess.cpp:
* WebProcess/WebConnectionToUIProcess.h:
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/EventDispatcher.cpp:
* WebProcess/WebPage/PageOverlay.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebProcess.cpp:
* WebProcess/WebProcess.h:
(WebKit::WebProcess::runLoop):
* WebProcess/gtk/WebProcessMainGtk.cpp:
* WebProcess/mac/WebProcessMainMac.mm:
* WebProcess/qt/WebProcessMainQt.cpp:
* WebProcess/win/WebProcessMainWin.cpp:
* win/WebKit2.vcproj:
Remove RunLoop code and update #includes.
2012-01-18 Ada Chan <adachan@apple.com>
Need a WebKit2 API for setting media volume
https://bugs.webkit.org/show_bug.cgi?id=76560
Reviewed by Dan Bernstein.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Encode the mediaVolume parameter.
(WebKit::WebPageCreationParameters::decode): Decode the mediaVolume parameter.
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetMediaVolume): Call WebPageProxy::setMediaVolume().
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize new data member m_mediaVolume.
(WebKit::WebPageProxy::setMediaVolume): Bail if the volume hasn't changed. Update m_mediaVolume
and bail if the page is no longer valid. Otherwise, send a WebPage::SetMediaVolume message to
the web process.
(WebKit::WebPageProxy::creationParameters): Add media volume to the creation parameters.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize media volume from the WebPageCreationParameters.
(WebKit::WebPage::setMediaVolume): Call Page::setMediaVolume().
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add the SetMediaVolume message.
2012-01-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebKit2 GTK+ API public headers are not installed
https://bugs.webkit.org/show_bug.cgi?id=76626
Reviewed by Martin Robinson.
* GNUmakefile.am: Rename webkit2gtk_headers as
libwebkit2gtkinclude_HEADERS to match libwebkit2gtkincludedir so
that headers are installed during make install.
2012-01-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add print-backgrounds setting to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=76616
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_print_backgrounds):
(webkit_settings_set_print_backgrounds):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings):
2012-01-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Handle the layers visible rect calculation on the web process.
https://bugs.webkit.org/show_bug.cgi?id=74720
Reviewed by Noam Rosenthal.
The layers now get their visible rect on the web process through the
root layer when the UI process call setVisibleContentRectAndScale,
previously only used for the non-composited content layer.
The rect is then carried down the layers in the tree which apply it the inverse
of their transform before handing it to their tiled backing store.
This ensures that new layers get a proper visible rect right on creation,
and also that simultaneous visible rect and scale changes are applied synchronously.
This patch also uses clampedBoundsOfProjectedQuad instead of mapRect
to transform the visible rect correctly for 3D transformed layers.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initializeDesktop):
(QQuickWebViewPrivate::initializeTouch):
(QQuickWebViewPrivate::updateDesktopViewportSize):
(QQuickWebViewPrivate::updateTouchViewportSize):
(QQuickWebView::geometryChanged):
Make sure that the visible rect is updated for the desktop view as well.
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/LayerTreeHostProxy.h:
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::setChildren):
(WebCore::WebGraphicsLayer::addChild):
(WebCore::WebGraphicsLayer::addChildAtIndex):
(WebCore::WebGraphicsLayer::addChildAbove):
(WebCore::WebGraphicsLayer::addChildBelow):
(WebCore::WebGraphicsLayer::replaceChild):
(WebCore::WebGraphicsLayer::setMaskLayer):
(WebCore::WebGraphicsLayer::syncCompositingState):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::setVisibleContentRectAndScale):
(WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
(WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
* WebProcess/WebPage/LayerTreeHost.messages.in:
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
2012-01-18 Jon Lee <jonlee@apple.com>
Another build fix for r105364.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Missing #if.
2012-01-18 Jon Lee <jonlee@apple.com>
Build fix for r105364. Unreviewed.
* WebProcess/Notifications/WebNotificationManager.cpp: Wrap methods in #if ENABLE(NOTIFICATIONS)
(WebKit::WebNotificationManager::initialize):
(WebKit::WebNotificationManager::didUpdateNotificationDecision):
(WebKit::WebNotificationManager::didRemoveNotificationDecisions):
(WebKit::WebNotificationManager::policyForOrigin):
2012-01-18 Jon Lee <jonlee@apple.com>
[WK2] Sync call for notifications permissions causes flashes on gmail.com
https://bugs.webkit.org/show_bug.cgi?id=76570
<rdar://problem/10647155>
Reviewed by Anders Carlsson and Sam Weinig.
The website code figures out the permission level for its security origin by making a JS call (called
checkPermission()) that is synchronous. The way this was implemented was to make a synchronous call from
the WebNotificationManager to its proxy. That call goes to the WK API layer to find the policy, and
returns that policy back to the JS.
The synchronous nature of this call causes the white flash to appear in certain cases.
To fix this, the checkPermission() call is handled all within the web process, instead of going up into
the UI process. To do this, the web process initializes the WebNotificationManager with a copy of the
notification permissions. Any time the WK client makes a change to the permissions, that gets sent down
asynchronously, and the cached copy in WebNotificationManager gets updated.
A page's settings may disable notifications altogether. Before, this would have been handled by the WK
client, since retrieving the permissions were also handled there. Now that the lookup happens in the web
process, we need to add that setting in WebCore.
== Update notification permissions to use the security origin's string representation, rather than its
database identifier.
* UIProcess/Notifications/WebNotification.cpp:
(WebKit::WebNotification::WebNotification):
* UIProcess/Notifications/WebNotification.h:
(WebKit::WebNotification::create):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::show): Registering the provider with the manager is handled in
initialize() now.
(WebKit::WebNotificationManagerProxy::cancel): Registering the provider with the manager is handled in
initialize() now.
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestNotificationPermission):
(WebKit::WebPageProxy::showNotification):
* UIProcess/WebPageProxy.h:
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::startRequest): Only start the request if notifications
are enabled.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show): Only show notification is they are enabled.
(WebKit::WebNotificationManager::cancel): Only cancel if notifications are enabled.
== Remove synchronous message to get policy for a given origin. Instead, use the cached copy in
WebNotificationManager.
* WebProcess/Notifications/WebNotificationManager.h:
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::policyForOrigin): Looks for the permission in the cached copy.
If it doesn't exist, return NotificationPresenter::PermissionNotAllowed.
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::permissionLevel): Update permissionLevel to use
policyForOrigin().
Remove old WK API function to get the policy. Because this function was the only synchronous message,
we remove the sync-message-related functions also. Also, add in some #includes that might have been
omitted in prior patches.
* UIProcess/API/C/WKNotificationProvider.h:
* UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove NotificationPermissionLevel.
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
* UIProcess/Notifications/WebNotificationProvider.h: Remove policyForNotificationPermissionAtOrigin().
* UIProcess/Notifications/WebNotificationProvider.cpp:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveSyncMessage): Remove conditional to forward sync messages to the
notification manager proxy.
== Mechanism for client to update the permissions copy in WebNotificationManager.
* WebProcess/Notifications/WebNotificationManager.messages.in: Add new messages
didUpdateNotificationDecision and didRemoveNotificationDecisions.
* WebProcess/Notifications/WebNotificationManager.h:
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::initialize):
(WebKit::WebNotificationManager::didUpdateNotificationDecision): Update the entry.
(WebKit::WebNotificationManager::didRemoveNotificationDecisions): Remove the entry.
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
(WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies): Convert the array of
origins to remove, and send it to the WebNotificationManager.
* UIProcess/API/C/WKNotificationManager.h: Expose these update functions as WK API.
* UIProcess/API/C/WKNotificationManager.cpp:
(WKNotificationManagerProviderDidUpdateNotificationPolicy):
(WKNotificationManagerProviderDidRemoveNotificationPolicies):
== Initialize WebNotificationManager with permissions. Initialize WebPage with notifications enabled bit
from settings.
* Shared/WebProcessCreationParameters.h: Add map of notification permissions as part of the
parameters.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* UIProcess/Notifications/WebNotificationProvider.h: Retrieve copy of existing notification permissions.
* UIProcess/Notifications/WebNotificationProvider.cpp:
* UIProcess/API/C/WKNotificationProvider.h: Add WK API to get a copy of the permissions.
* UIProcess/Notifications/WebNotificationManagerProxy.h: Add populateCopyOfNotificationPermissions().
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::initializeProvider): Add the manager at the time of initialization.
Similar calls in show() and cancel() are removed in following patch.
(WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions): Clear the existing copy.
Populate with origin string, and whether that origin is allowed to post. If no decision has been made
by the user, then there should be no item in this dictionary.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess): When the web process is initialized, we get a copy of the
permissions, and send it to the web process to initialize the notification manager.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Initialize the notification manager.
* WebProcess/Notifications/WebNotificationManager.h:
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::initialize): Initialize the permissions copy.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Set notifications enabled bit from settings.
== Expose toString() method from WebCore::SecurityOrigin. Work is also towards bug 74956.
* Shared/API/c/WKSecurityOrigin.h: Refactor WKSecurityOriginCreateFromIdentifier to
WKSecurityOriginCreateFromDatabaseIdentifier and add WKSecurityOriginCreateFromString function.
* Shared/API/c/WKSecurityOrigin.cpp:
(WKSecurityOriginCreateFromString):
(WKSecurityOriginCreateFromDatabaseIdentifier):
(WKSecurityOriginCopyToString):
Refactor WebSecurityOrigin::create() to WebSecurityOrigin::createFromDatabaseIdentifier()
and add WebSecurityOrigin::createFromString().
* Shared/WebSecurityOrigin.h:
(WebKit::WebSecurityOrigin::createFromString):
(WebKit::WebSecurityOrigin::createFromDatabaseIdentifier):
(WebKit::WebSecurityOrigin::toString): Added function.
Refactor with renamed createFromDatabaseIdentifier() method.
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
(WebKit::WebDatabaseManagerProxy::didModifyOrigin):
(WebKit::WebDatabaseManagerProxy::didModifyDatabase):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
== Add WK API calls to change notificationsEnabled bit in WebCore::Settings.
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetNotificationsEnabled):
(WKPreferencesGetNotificationsEnabled):
* UIProcess/API/C/WKPreferences.h:
2012-01-18 Anders Carlsson <andersca@apple.com>
REGRESSION (r88886): Tabs restore blank when running Safari with a nightly build for the first time
https://bugs.webkit.org/show_bug.cgi?id=76587
<rdar://problem/9739135>
Reviewed by Sam Weinig.
* UIProcess/cf/WebPageProxyCF.cpp:
Change CurrentSessionStateDataVersion back to 2.
* WebProcess/WebPage/DecoderAdapter.cpp:
(WebKit::DecoderAdapter::decodeString):
* WebProcess/WebPage/EncoderAdapter.cpp:
(WebKit::EncoderAdapter::encodeString):
Backport the CoreIPC string encoding and decoding functions that were in place prior to r88886.
2012-01-17 Alexey Proskuryakov <ap@apple.com>
[Mac] Add a flag telling plug-in if it can enter sandbox
https://bugs.webkit.org/show_bug.cgi?id=76467
Reviewed by Anders Carlsson.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue): Added a private flag.
2012-01-18 Eric Carlson <eric.carlson@apple.com>
Provide access to user's list of preferred languages
https://bugs.webkit.org/show_bug.cgi?id=76138
Reviewed by Alexey Proskuryakov.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Encode the languages array.
(WebKit::WebProcessCreationParameters::decode): Decode the languages array.
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::languageChanged): Override the WebProcess userPreferredLanguages.
(WebKit::WebContext::ensureWebProcess): Initialize parameters.languages.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Override user languages array.
(WebKit::WebProcess::userPreferredLanguagesChanged): Ditto.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Define UserPreferredLanguagesChanged.
* win/WebKit2.def: Export the new functions.
* win/WebKit2CFLite.def: Ditto.
2012-01-18 Luciano Wolf <luciano.wolf@openbossa.org>
[Qt][WK2] Broken build with undefined reference to shm_open and shm_unlink
https://bugs.webkit.org/show_bug.cgi?id=76538
Reviewed by Tor Arne Vestbø.
The -lrt parameter was coming before -lWebKit2 during linkage.
Moved rt lib inclusion from Source/api.pri to WebKit2.pri as it should be aware
of its own dependencies instead of letting WebKit guess about. Letting
it on api.pri can lead to a wrong parameter's order during linker phase.
Ubuntu 11.10 was giving errors about SharedMemory (shm_open and
shm_unlink undefined symbols).
The issue was fixed with the help of Aloisio Almeida and Lauro Venancio.
* WebKit2.pri:
2012-01-18 Carlos Garnacho <carlosg@gnome.org>
[GTK] Listen to GDK_SCROLL_MASK
https://bugs.webkit.org/show_bug.cgi?id=76529
Set GDK_SCROLL_MASK explicitly, as WebKitWebViewBase does handle
scroll events, scrolling currently works because GTK+ happens
to send such events to widgets listening to GDK_BUTTON_PRESS_MASK,
but this isn't the intended behavior, so it's subject to change.
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize):
2012-01-18 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Fix the debug build.
Unreviewed.
* UIProcess/qt/QtWebPageEventHandler.cpp:
(setInputPanelVisible): Remove assertion from non-member function.
2012-01-12 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Zoom in to the focused node only when vkb starts becoming visible
https://bugs.webkit.org/show_bug.cgi?id=76174
Reviewed by Simon Hausmann.
Remove the old code which always zoomed in when something got focus,
even via JavaScript, and replaced it with code checking the state of
the Qt input panel.
Also make sure that we do not zoom in or request the input panel if
the item is not focused.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtPageClient.cpp:
* UIProcess/qt/QtPageClient.h:
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::QtWebPageEventHandler):
(QtWebPageEventHandler::~QtWebPageEventHandler):
(QtWebPageEventHandler::inputPanelVisibleChanged):
* UIProcess/qt/QtWebPageEventHandler.h:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::respondToChangedSelection):
2012-01-18 Shinya Kawanaka <shinyak@google.com>
Move ShadowContentElement from dom/ to html/ and make ShadowContentElement subclass of HTMLElement.
https://bugs.webkit.org/show_bug.cgi?id=76241
Reviewed by Dimitri Glazkov.
* win/WebKit2.def: Exposed necessary symbols.
* win/WebKit2CFLite.def: ditto.
2012-01-17 Hajime Morrita <morrita@chromium.org>
[Internals] Should be able to access corresponding Document object.
https://bugs.webkit.org/show_bug.cgi?id=76425
Reviewed by Adam Barth.
* win/WebKit2.def: Added exporting symbols.
* win/WebKit2CFLite.def: Added exporting symbols.
2012-01-17 Matthew Delaney <mdelaney@apple.com>
On post-Lion releases, preserve the Lion behavior where WebKit explicitly calls -setGeometryFlipped on the hosting layer for applications that were linked on Lion or earlier.
<rdar://problem/10692025>
Reviewed by Simon Fraser.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Init new function.
(InitWebCoreSystemInterface):
2012-01-17 Sam Weinig <sam@webkit.org>
Rename quickLookPreviewItemsAtWindowLocation: to quickLookWithEvent:
<rdar://problem/10688913>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView quickLookWithEvent:]):
2012-01-17 Sam Weinig <sam@webkit.org>
Add helper macro for forward declaring objective-c classes
https://bugs.webkit.org/show_bug.cgi?id=76485
Reviewed by Anders Carlsson.
* WebProcess/WebCoreSupport/WebDragClient.h:
Deploy OBJC_CLASS for a little code reduction.
* config.h:
Remove duplicate copy of OBJC_CLASS.
2012-01-17 Martin Robinson <mrobinson@igalia.com>
[GTK] [WK2] WebKitPrivate should include the entire WebKit2 C API
https://bugs.webkit.org/show_bug.cgi?id=76345
Reviewed by Gustavo Noronha Silva.
Isolate all of the WebKit2 C API includes into WebKitPrivate.h and no longer
include anything other than WebKit2.h for the C API.
* UIProcess/API/gtk/WebKitBackForwardList.cpp: Use WebKitPrivate.h now.
* UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto.
* UIProcess/API/gtk/WebKitPrivate.h: Add WebKit2.h, WKAPICast.h and WKRetainPtr.h includes.
* UIProcess/API/gtk/WebKitSettings.cpp: Use WebKitPrivate.h.
* UIProcess/API/gtk/WebKitUIClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebContext.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebView.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
* UIProcess/API/gtk/WebKitWindowProperties.cpp: Ditto.
2012-01-17 Alexander Færøy <alexander.faeroy@nokia.com>
[Qt] Implement HTTP authentication QML API
https://bugs.webkit.org/show_bug.cgi?id=75535
Reviewed by Kenneth Rohde Christiansen.
This patch implements the QML API for handling HTTP authentication.
The implementation uses a syncronous message between the WebProcess
and the UIProcess which is called when the authenticationRequired
signal is emitted from QNAM.
Based in part upon patch by Peter Hartmann.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::handleAuthenticationRequiredRequest):
(QQuickWebViewExperimental::authenticationDialog):
(QQuickWebViewExperimental::setAuthenticationDialog):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::authenticationRequiredRequest):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtDialogRunner.cpp:
(AuthenticationDialogContextObject::AuthenticationDialogContextObject):
(AuthenticationDialogContextObject::hostname):
(AuthenticationDialogContextObject::realm):
(AuthenticationDialogContextObject::prefilledUsername):
(AuthenticationDialogContextObject::accept):
(AuthenticationDialogContextObject::reject):
(QtDialogRunner::initForAuthentication):
* UIProcess/qt/QtDialogRunner.h:
(QtDialogRunner::username):
(QtDialogRunner::password):
(QtDialogRunner::onAuthenticationAccepted):
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::handleAuthenticationRequiredRequest):
* UIProcess/qt/QtPageClient.h:
* WebProcess/qt/QtNetworkAccessManager.cpp:
(WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
(WebKit::QtNetworkAccessManager::onAuthenticationRequired):
* WebProcess/qt/QtNetworkAccessManager.h:
2012-01-16 Dan Bernstein <mitz@apple.com>
<rdar://problem/10702758> REGRESSION: Every Safari Reader WKView leaks
Reviewed by John Sullivan and Ada Chan.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]): Since this method can be called multiple times in a row
while [self window] is non-nil, check if there isn’t already an event monitor before adding
a new one.
2012-01-16 Anders Carlsson <andersca@apple.com>
Crash when calling SecItemAdd with a null result pointer
https://bugs.webkit.org/show_bug.cgi?id=76407
<rdar://problem/10696087>
Reviewed by Brady Eidson.
Add null check.
* WebProcess/mac/SecItemShimMethods.mm:
(WebKit::webSecItemAdd):
2012-01-16 Jon Lee <jonlee@apple.com>
Build fix for r105086.
* Configurations/FeatureDefines.xcconfig:
2012-01-16 Zeno Albisser <zeno@webkit.org>
[Qt] Fix QT_VERSION related warnings when building on Mac OS X
https://bugs.webkit.org/show_bug.cgi?id=76340
This bug was caused by r104826.
As was already mentioned for https://bugs.webkit.org/show_bug.cgi?id=57239
we should not use "using namespace WebCore" in header files,
because it might cause ambiguous references.
This patch reverts the changes from r104826 and r104981
and removes the "using namespace WebCore" statement from
two header files.
Reviewed by Tor Arne Vestbø.
* Shared/WebLayerTreeInfo.h:
(WebKit::WebLayerUpdateInfo::WebLayerUpdateInfo):
(WebKit::WebLayerAnimation::WebLayerAnimation):
* UIProcess/LayerTreeHostProxy.h:
(WebKit::LayerTreeHostProxy::layerByID):
(WebKit::LayerTreeHostProxy::rootLayer):
(WebKit::LayerTreeHostProxy::notifyAnimationStarted):
(WebKit::LayerTreeHostProxy::notifySyncRequired):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
2012-01-16 Alexander Færøy <alexander.faeroy@nokia.com>
[Qt] Remove references to PagePointer in the FrameNetworkingContext
https://bugs.webkit.org/show_bug.cgi?id=76342
Reviewed by Simon Hausmann.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createNetworkingContext):
* WebProcess/qt/QtNetworkAccessManager.cpp:
(WebKit::QtNetworkAccessManager::obtainOriginatingWebPage):
* WebProcess/qt/QtNetworkAccessManager.h:
2012-01-14 Dan Bernstein <mitz@apple.com>
<rdar://problem/10696295> Crash in WebProcess at com.apple.CFNetwork: URLCredentialStorage::CreateCurrentPersistentCredentials + 298
Reviewed by Anders Carlsson.
* WebProcess/mac/SecItemShimMethods.mm:
(WebKit::initializeSecItemShim): Removed an early return that was accidentally added in r105008.
2012-01-13 Anders Carlsson <andersca@apple.com>
Delay updating the root compositing layer if the layer tree state is frozen
https://bugs.webkit.org/show_bug.cgi?id=76316
Reviewed by Dan Bernstein.
When the layer tree is frozen, stash the root layer in m_pendingRootCompositingLayer and set it in flushLayers.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2012-01-13 Anders Carlsson <andersca@apple.com>
Implement TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen
https://bugs.webkit.org/show_bug.cgi?id=76308
Reviewed by Sam Weinig.
Keep track of whether the layer tree state is frozen and suspend/resume the layer flush scheduler accordingly.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen):
(WebKit::TiledCoreAnimationDrawingArea::layerTreeStateIsFrozen):
(WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2012-01-13 Anders Carlsson <andersca@apple.com>
Disable implicit animations when setting the root compositing layer
https://bugs.webkit.org/show_bug.cgi?id=76304
Reviewed by Sam Weinig.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2012-01-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
TextureMapper: Extract layer transform logic to a LayerTransform class.
https://bugs.webkit.org/show_bug.cgi?id=76291
Reviewed by Noam Rosenthal.
Move the paint call before the visible rect collection to make sure that
transforms are computed. This will increase the delay for the visible rects
to get to the WebProcess until we move this calculation out of the UI Process.
This fixes an assert triggering in LayerTransform::combineTransforms.
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
2012-01-13 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Build correction.
* Shared/WebGraphicsContext.h: Use proper include path for RefPtrCairo.h.
2012-01-12 Martin Robinson <mrobinson@igalia.com>
[GTK] [WebKit2] WebKitURIRequest and WebKitURIResponse should wrap the corresponding WebCore classes
https://bugs.webkit.org/show_bug.cgi?id=74478
Reviewed by Gustavo Noronha Silva.
Have WebKitURIRequest wrap a ResourceRquesst and WebKitURIResponse wrap a ResourceResponse.
They are the WebCore types they are meant to represent and we will need to expose more
information from them in the future to make them useful. Later we can have ResourceResponse
generate a SoupMessage lazily if necessary.
* GNUmakefile.am:
* UIProcess/API/gtk/WebKitURIRequest.cpp:
(webkit_uri_request_class_init): Remove the set property vmethod.
(webkit_uri_request_new): The URI property is no longer settable.
(webkitURIRequestCreateForResourceRequest): Added this private constructor.
(webkit_uri_request_get_uri): Now we just get the URI directly from the ResourceRequest.
* UIProcess/API/gtk/WebKitURIResponse.cpp:
(webkit_uri_response_class_init): Remove the set property vmethod.
(webkit_uri_response_get_uri): Get the URI directly from the ResourceReponse.
(webkit_uri_response_get_status_code): Get the status code directly from the ResourceResponse.
(webkit_uri_response_get_content_length): Get the content length directly from the ResourceResponse.
(webkitURIResponseCreateForResourceResponse): Added this private constructor.
* UIProcess/API/gtk/WebKitURIResponsePrivate.h: Removed unnecessary methods.
2012-01-12 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] WebProcesses crashes when composited reflections/masks are present
https://bugs.webkit.org/show_bug.cgi?id=75883
Reviewed by Kenneth Rohde Christiansen.
Make sure masks and replica layers can access layerTreeTileClient. Let masks
have the right contents/visible rect so that they can render content tiles.
Default the mask's size to be the layer's size.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
(WebCore::WebGraphicsLayer::setSize):
(WebCore::WebGraphicsLayer::setMaskLayer):
(WebCore::WebGraphicsLayer::setReplicatedByLayer):
(WebCore::WebGraphicsLayer::syncCompositingState):
(WebCore::WebGraphicsLayer::setContentsScale):
(WebCore::WebGraphicsLayer::setVisibleContentRect):
(WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
(WebCore::WebGraphicsLayer::updateTileBuffersRecursively):
(WebCore::WebGraphicsLayer::layerTreeTileClient):
(WebCore::WebGraphicsLayer::purgeBackingStores):
(WebCore::WebGraphicsLayer::recreateBackingStoreIfNeeded):
(WebCore::WebGraphicsLayer::setLayerTreeTileClient):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebCore::WebGraphicsLayer::maskTarget):
(WebCore::WebGraphicsLayer::setMaskTarget):
2012-01-12 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Set the input method hints on the QtQuick item
https://bugs.webkit.org/show_bug.cgi?id=76169
Reviewed by Simon Hausmann.
Set the input method hints given the HTMLElement type and state.
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::updateTextInputState):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
2012-01-12 Eunmi Lee <eunmi15.lee@samsung.com>
[EFL][WK2] Update and show ewk_view with updated webpage.
https://bugs.webkit.org/show_bug.cgi?id=76023
Reviewed by Andreas Kling.
Update ewk_view with BackingStore image which is rendered webpage
image by WebProcess, and show updated image's area when
PageClientImpl::setViewNeedsDisplay() is called.
The ewk_view_display() function is used to display updated area of
evas_object_image and the ewk_view_image_data_set() function is used
to set evas_object_image's data with rendered webpage.
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::setViewNeedsDisplay):
* UIProcess/API/efl/ewk_private.h: Added.
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_add):
(ewk_view_display):
(ewk_view_image_data_set):
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::incorporateUpdate):
2012-01-12 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Network is not available when SOUP is enabled.
https://bugs.webkit.org/show_bug.cgi?id=76112
Reviewed by Andreas Kling.
ecore_main_loop_glib_integrate should be called to use glib based library
such as SOUP.
* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainEfl):
2012-01-12 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Add PLATFORM(EFL) in SharedMemory.h, WebProcessStore.h, WebEditorClient.cpp
https://bugs.webkit.org/show_bug.cgi?id=76115
Reviewed by Andreas Kling.
This patch added PLATFORM(EFL) guard in SharedMemory.h to use UNIX_DOMAIN_SOCKETS
and WebProcessStore.h to have font family preference
and WebEditorClient.cpp to use platform specific handleKeyboardEvent(),
handleInputMethodKeydown()
* Platform/SharedMemory.h:
* Shared/WebPreferencesStore.h:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
2012-01-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Web process should use the same locale than UI process
https://bugs.webkit.org/show_bug.cgi?id=76054
Reviewed by Gustavo Noronha Silva.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::childSetupFunction): Make child process use the same
locale than its parent.
2012-01-11 Ryuan Choi <ryuan.choi@samsung.com>
[WK2] Share cairo specific codes with EFL port.
https://bugs.webkit.org/show_bug.cgi?id=75457
Reviewed by Brent Fulgham.
Change PLATFORM(GTK) to USE(CAIRO) in WebGraphicsContext{h,cpp} to share
with EFL port.
* Shared/WebGraphicsContext.cpp:
(WebKit::WebGraphicsContext::WebGraphicsContext):
* Shared/WebGraphicsContext.h:
2012-01-11 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=75904
WebKit 1: Scrollbar uiStateTransitionProgress requires tracking the mouse all
the time
-and corresponding-
<rdar://problem/10498816>
Reviewed by Darin Adler.
This patch gets rid of the optional parameter called onlyUpdateScrollbars for
WebCore::EventHandler::mouseMoved() and instead moves that functionality into
its own function called passMouseMovedEventToScrollbars().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleMouseEvent):
2012-01-11 Brent Fulgham <bfulgham@webkit.org>
WinCairo build correction.
* UIProcess/WebPageProxy.h: Don't define viewWidget for WinCairo port.
2012-01-11 Anders Carlsson <andersca@apple.com>
Webpages flash white when switching between windows
https://bugs.webkit.org/show_bug.cgi?id=76080
<rdar://problem/9893565>
Reviewed by Dan Bernstein.
Introduce a _windowHasValidBackingStore boolean and only paint the background (white or clear)
* UIProcess/API/mac/WKView.mm:
(-[WKView setFrameSize:]):
Set _windowHasValidBackingStore to false if the new size is different from the old size.
(-[WKView viewDidMoveToWindow]):
Set _windowHasValidBackingStore to false.
(-[WKView _windowDidMiniaturize:]):
Set _windowHasValidBackingStore to false.
(-[WKView _windowDidChangeBackingProperties:]):
Set _windowHasValidBackingStore to false.
(-[WKView drawRect:]):
Only call drawPageBackground if _windowHasValidBackingStore is false. Set it to true after painting.
2012-01-11 Anders Carlsson <andersca@apple.com>
Fix the Mac GCC build.
Work around the fact that GCC doesn't work very well with Blocks and C++ objets.
* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::dispatchFunctionOnQueue):
(WebKit::WebProcessProxy::secItemRequest):
(WebKit::WebProcessProxy::secKeychainItemRequest):
2012-01-11 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Directly-composited images sometimes appear with a wrong geometry
https://bugs.webkit.org/show_bug.cgi?id=75882
Reviewed by Simon Hausmann.
When assigning a directly composited image to a TextureMapperNode in WebKit2, we take
contentsRect() onto account. However, contentsRect() might be changed after the image
is already assigned.
We have to reassign the image when contentsRect() changes. This is a pretty cheap
operation, since the image is already converted to a texture and we simply change the
geometric values.
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::syncLayerParameters):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
2012-01-11 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Add the editor rect to the EditorState
https://bugs.webkit.org/show_bug.cgi?id=76053
Reviewed by Simon Hausmann.
Also rename some members to match the new Qt naming scheme.
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::inputMethodQuery):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::respondToChangedSelection):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
2012-01-11 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
[GTK] Linking of big binaries should be serialized to avoid thrashing
https://bugs.webkit.org/show_bug.cgi?id=75977
Reviewed by Martin Robinson.
Added artificial dependencies so that libwebkitgtk is always
linked first, libwebkit2gtk second, and WebKitPluginProcess
last. Automake unfortunately replaces the whole rule used to build
the libraries if the actual name is used to add the dependency, so
we use helper variables to work around that.
* GNUmakefile.am:
2012-01-11 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Rename viewObject to viewWidget
https://bugs.webkit.org/show_bug.cgi?id=75947
Reviewed by Martin Robinson.
Rename viewObject to viewWidget for the EFL port to use WidgetBackingStore
which calls viewWidget().
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::setViewNeedsDisplay):
(WebKit::PageClientImpl::viewSize):
* UIProcess/API/efl/PageClientImpl.h:
(WebKit::PageClientImpl::create):
(WebKit::PageClientImpl::viewWidget):
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::viewWidget):
2012-01-10 Mark Rowe <mrowe@apple.com>
REGRESSION (r104377): All pages print blank on Snow Leopard
<http://webkit.org/b/75879> / <rdar://problem/10674335>
We need to explicitly load PDFKit.framework before using PDFDocument and friends.
On SnowLeopard the framework is not necessarily loaded by anything else before we
print, which would lead to us failing to allocate the PDFDocument that we use for
drawing the content from the web process.
Reviewed by Dan Bernstein.
* UIProcess/API/mac/WKPrintingView.mm:
(pdfKitFrameworkPath): Construct the path to the PDFKit framework.
(classFromPDFKit): Ensure that the PDFKit framework is loaded, and then retrieve the
given class from it.
(pdfAnnotationLinkClass): ASSERT that we found the class.
(pdfDocumentClass): Ditto.
2012-01-10 Chris Marrin <cmarrin@apple.com>
Wrapped allowedCompositingTriggers in ACCELERATED_COMPOSITING ifdef to make non-accelerated builds work
Unreviewed.
* WebProcess/WebCoreSupport/WebChromeClient.h:
2012-01-10 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt][WK2]REGRESSION(r102435): It made tst_QQuickWebView::show() crash
https://bugs.webkit.org/show_bug.cgi?id=74176
Reviewed by Noam Rosenthal.
Check texture mapper exists already in ensureRootLayer to avoid recrecation.
Check if root layer was deleted already in purgeGLResources.
Added multipleWebViewWindows and multipleWebViews API tests.
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::multipleWebViewWindows):
(tst_QQuickWebView::multipleWebViews):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::ensureRootLayer):
(WebKit::LayerTreeHostProxy::purgeGLResources):
2012-01-10 Ryosuke Niwa <rniwa@webkit.org>
Snow Leopard build fix.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
2012-01-10 Anders Carlsson <andersca@apple.com>
Hang opening movie that requires authentication
https://bugs.webkit.org/show_bug.cgi?id=75989
Reviewed by Sam Weinig.
Change the way the keychain calls are processed to avoid deadlocks:
1. When a keychain call is made, the web process sends an asynchronous request message to the UI process,
avoiding the need to bounce calls to the main thread (since CoreIPC only allows sending
synchronous messages from the main thread). Incidentally, this fixes <rdar://problem/9428041>.
2. The Web Process now waits on the calling thread, (for a condition variable to be signalled) for a reply message.
3. The UI process handles the incoming message request message on the connection work queue and uses
dispatch_async to a global dispatch queue where the keychain call is made.
We use a global queue to prevent the connection work queue from blocking on the call.
4. The UI process then sends an asynchronous reply message back to the web process. This message is sent from
the global dispatch queue.
5. The Web Process handles the reply message on the connection queue, adds the reply to a map and signals
the condition variable that the web process is waiting on and the thread that made the keychain call
can resume execution.
* Shared/mac/SecItemRequestData.cpp:
(WebKit::SecItemRequestData::SecItemRequestData):
(WebKit::SecItemRequestData::encode):
(WebKit::SecItemRequestData::decode):
* Shared/mac/SecItemRequestData.h:
(WebKit::SecItemRequestData::type):
Add a type to SecItemRequestData and encode/decode it.
* Shared/mac/SecItemResponseData.h:
(WebKit::SecItemResponseData::resultObject):
Make this return a reference so we can call leakRef() on it.
* Shared/mac/SecKeychainItemRequestData.cpp:
(WebKit::SecKeychainItemRequestData::SecKeychainItemRequestData):
(WebKit::SecKeychainItemRequestData::~SecKeychainItemRequestData):
(WebKit::SecKeychainItemRequestData::attributeList):
(WebKit::SecKeychainItemRequestData::encode):
(WebKit::SecKeychainItemRequestData::decode):
* Shared/mac/SecKeychainItemRequestData.h:
(WebKit::SecKeychainItemRequestData::type):
Add a type, and put the OwnPtr and OwnArrayPtr in a RefCounted struct so we can
correctly copy this object.
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess):
Don't open the connection here, the WebProcessProxy object needs to add itself as a queue client before opening.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::disconnect):
Remove the WebProcessProxy object from the list of connection queue clients.
(WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue):
Call didReceiveWebProcessProxyMessageOnConnectionWorkQueue.
(WebKit::WebProcessProxy::didFinishLaunching):
Add the WebProcessProxy as a queue client and open the connection.
* UIProcess/WebProcessProxy.h:
WebProcessProxy should inherit from CoreIPC::Connection::QueueClient. Replace all individual keychain
handler functions with two generic functions, secItemRequest and secKeychainItemRequest.
* UIProcess/WebProcessProxy.messages.in:
Replace individual keychain messages with SecItemRequest and SecKeychainItemRequest messages.
* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::handleSecItemRequest):
Call the right SecItem function depending on the request type and send back the result.
(WebKit::WebProcessProxy::secItemRequest):
Dispatch handleSecItemRequest on a global dispatch queue.
(WebKit::handleSecKeychainItemRequest):
Call the right SecKeychainItem function depending on the request type and send back the result.
(WebKit::WebProcessProxy::secKeychainItemRequest):
Dispatch handleSecKeychainItemRequest on a global dispatch queue.
* WebKit2.xcodeproj/project.pbxproj:
Update for added/removed files.
* WebProcess/WebProcess.h:
Add secItemResponse and secKeychainItemResponse message handlers.
* WebProcess/WebProcess.messages.in:
Add SecItemResponse and SecKeychainItemResponse messages.
* WebProcess/mac/CoreIPCClientRunLoop.h:
* WebProcess/mac/CoreIPCClientRunLoop.mm:
This is no longer needed.
* WebProcess/mac/KeychainItemShimMethods.h:
* WebProcess/mac/KeychainItemShimMethods.mm:
(WebKit::managedAttributeLists):
Make this an atomically initialized static.
(WebKit::managedAttributeListsMutex):
Add an atomically initialized mutex.
(WebKit::allocateAttributeListContents):
Use the managedAttributeListsMutex to make this function callable from any thread.
(WebKit::managedKeychainItemContents):
Make this an atomically initialized static.
(WebKit::managedKeychainItemContentsMutex):
Add an atomically initialized mutex.
(WebKit::allocateKeychainItemContentData):
Use the managedAttributeListsMutex to make this function callable from any thread.
(WebKit::webFreeAttributeListContent):
Use locking so this can be called from any thread.
(WebKit::webFreeKeychainItemContent):
Ditto.
(WebKit::responseMap):
Add responseMap thread-safe singleton for holding incoming responses.
(WebKit::generateSecKeychainItemRequestID):
Return a unique item request id, using OSAtomicIncrement64Barrier for atomicity.
(WebKit::didReceiveSecKeychainItemResponse):
Pass the response over the response map.
(WebKit::sendSeqKeychainItemRequest):
Send a request message and wait for a response using ResponseMap::waitForResponse.
(WebKit::webSecKeychainItemCopyContent):
Send a request using sendSeqKeychainItemRequest.
(WebKit::webSecKeychainItemCreateFromContent):
Ditto.
(WebKit::webSecKeychainItemModifyContent):
Ditto.
* WebProcess/mac/KeychainShimResponseMap.h:
New thread-safe helper class that stores a map of responses and lets client wait for a response
with a given ID.
(KeychainShimResponseMap::waitForResponse):
Wait until the response is available in the hash map, then return it.
(KeychainShimResponseMap::didReceiveResponse):
Add the response to the hash map and signal the condition variable.
* WebProcess/mac/SecItemShimMethods.h:
* WebProcess/mac/SecItemShimMethods.mm:
(WebKit::responseMap):
Add responseMap thread-safe singleton for holding incoming responses.
(WebKit::generateSecItemRequestID):
Return a unique item request id, using OSAtomicIncrement64Barrier for atomicity.
(WebKit::didReceiveSecItemResponse):
Pass the response over the response map.
(WebKit::sendSeqItemRequest):
Send a request message and wait for a response using ResponseMap::waitForResponse.
(WebKit::webSecItemCopyMatching):
Send a request using sendSeqItemRequest.
(WebKit::webSecItemAdd):
Ditto.
(WebKit::webSecItemUpdate):
Ditto.
(WebKit::webSecItemDelete):
Ditto.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::secItemResponse):
Call didReceiveSecItemResponse.
(WebKit::WebProcess::secKeychainItemResponse):
Call didReceiveSecKeychainItemResponse.
2012-01-10 Anders Carlsson <andersca@apple.com>
DispatchOnConnectionQueue messages should have a Connection parameter
https://bugs.webkit.org/show_bug.cgi?id=75986
Reviewed by Adam Roben.
Message handlers for messages with the DispatchOnConnectionQueue should have a CoreIPC::Connection
parameter, making it easier to send messages back over that connection.
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction):
(CoreIPC::handleMessageOnConnectionQueue):
* Scripts/webkit2/messages.py:
(async_case_statement):
(generate_message_handler):
* Scripts/webkit2/messages_unittest.py:
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
(WebKit::EventDispatcher::gestureEvent):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::pluginProcessCrashed):
* WebProcess/WebProcess.h:
2012-01-10 Chris Marrin <cmarrin@apple.com>
Turn off the FilterTrigger in WebKit and WebKit2
https://bugs.webkit.org/show_bug.cgi?id=75914
Reviewed by Simon Fraser.
Implement allowedCompositingTriggers to turn on all compositing triggers except FilterTrigger.
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebKit::WebChromeClient::allowedCompositingTriggers):
2012-01-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
Unreviewed potential Mac WK2 build fix.
* UIProcess/PageClient.h: forward declare WebGestureEvent.
2012-01-10 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed, rolling out an accidental commit r104569.
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::inputMethodQuery):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::respondToChangedSelection):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
2012-01-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
Unreviewed potential Mac WK2 build fix.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::doneWithGestureEvent):
2012-01-10 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt][WK2] Add font-related API tests for QWebPreferences
https://bugs.webkit.org/show_bug.cgi?id=75739
Reviewed by Zoltan Herczeg.
* UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
* UIProcess/API/qt/tests/qmltests/common/font-preferences.html: Added.
2012-01-10 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Fix failing WK2 layout tests after r104557
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent): Add missing break to not
handle mouseDown as gesture event.
2012-01-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
Unreviewed buildfix.
* UIProcess/WebPageProxy.h:
2012-01-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
Implement the input panel request/close handling
Reviewed by Simon Hausmann.
With the current patch we only request the input panel as a
response to a user tap. Close requests, on the other hand,
is always respected.
As multiple show/hide requests can happen while processing
the tap gesture, input panel visibility changes are postponed
until the tap gesture ends.
The input panel will become visible if the WebCore editor is
in canEdit mode and thus work for content-editable, meaning
that it won't close the input panel if you click on a link
(eg. editCommand) while in content-editable mode.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleGestureEvent):
(WebKit::WebPageProxy::editorStateChanged):
(WebKit::WebPageProxy::didReceiveEvent):
Add a new doneWithGestureEvent method to the PageClient
as well as add a updateTextInputState similar to that of mac.
* UIProcess/WebPageProxy.h:
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::updateTextInputState):
(QtPageClient::doneWithGestureEvent):
Propagate the new events to the Qt EventHandler.
* UIProcess/qt/QtPageClient.h:
* UIProcess/qt/QtWebPageEventHandler.cpp:
* UIProcess/qt/QtWebPageEventHandler.h:
(QtWebPageEventHandler::QtWebPageEventHandler):
(QtWebPageEventHandler::handleSingleTapEvent):
(setInputPanelVisible):
(QtWebPageEventHandler::updateTextInputState):
(QtWebPageEventHandler::doneWithGestureEvent):
Handle postponing of the input method visibility change
and the actual showing/hiding.
2012-01-10 Eunmi Lee <eunmi15.lee@samsung.com>
[EFL][WK2] Remove codes to move and resize the clip.
https://bugs.webkit.org/show_bug.cgi?id=75428
Reviewed by Andreas Kling.
Remove codes to move and resize the clip because clip is not used now.
We have to show whole area of evas_object_image so we don't have to
clip any area.
In the WebKit1 Efl, the clip is used to clip the area to show during
weak zoom, so we can use codes to manipulate the clip when we want to
implement weak zoom for WebKit2 Efl.
* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_smart_calculate):
2012-01-09 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Pinch zoom should affect the page size
https://bugs.webkit.org/show_bug.cgi?id=74601
Reviewed by Kenneth Rohde Christiansen.
The current implementation uses the scale property of the QQuickWebPage
to scale the page in response to pinch gestures.
However for layout and anchoring to work correctly in QML, pinching needs
to change the page size.
This patch applies the pinch scale to the page size and to the transformation
matrix of the drawing area.
Thus the page item's coordinate system is no longer a direct representation
of the WebCore::Page coordinate system and it is no longer suitable as
an inertial frame of reference for input events. The event propagation had
to be moved to the QQuickWebView and the positions translated to content
coordinates when NativeWebEvents are created.
Re-landing with fixed event delivery for the test infrastructure.
* Shared/NativeWebMouseEvent.h:
* Shared/NativeWebTouchEvent.h:
* Shared/NativeWebWheelEvent.h:
* Shared/qt/NativeWebMouseEventQt.cpp:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
* Shared/qt/NativeWebTouchEventQt.cpp:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* Shared/qt/NativeWebWheelEventQt.cpp:
(WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebTouchEvent):
* Shared/qt/WebEventFactoryQt.h:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::geometryChanged):
(QQuickWebPagePrivate::QQuickWebPagePrivate):
(QQuickWebPagePrivate::paintToCurrentGLContext):
(QQuickWebPage::usesTraditionalDesktopBehaviour):
(QQuickWebPage::setUsesTraditionalDesktopBehaviour):
(QQuickWebPage::eventHandler):
(QQuickWebPage::setContentSize):
(QQuickWebPage::contentSize):
(QQuickWebPage::setContentScale):
(QQuickWebPage::contentScale):
(QQuickWebPage::transformFromItem):
(QQuickWebPage::transformToItem):
(QQuickWebPagePrivate::updateSize):
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebpage_p_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::enableMouseEvents):
(QQuickWebViewPrivate::disableMouseEvents):
(QQuickWebViewPrivate::loadDidCommit):
(QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
(QQuickWebViewPrivate::didChangeContentsSize):
(QQuickWebViewPrivate::didChangeViewportProperties):
(QQuickWebViewPrivate::pageDidRequestScroll):
(QQuickWebViewPrivate::updateVisibleContentRectAndScale):
(QQuickWebViewPrivate::PostTransitionState::apply):
(QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
(QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
(QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
(QQuickWebView::mapToWebContent):
(QQuickWebView::mapRectToWebContent):
(QQuickWebView::mapFromWebContent):
(QQuickWebView::mapRectFromWebContent):
(QQuickWebView::geometryChanged):
(QQuickWebView::keyPressEvent):
(QQuickWebView::keyReleaseEvent):
(QQuickWebView::inputMethodEvent):
(QQuickWebView::focusInEvent):
(QQuickWebView::focusOutEvent):
(QQuickWebView::touchEvent):
(QQuickWebView::mousePressEvent):
(QQuickWebView::mouseMoveEvent):
(QQuickWebView::mouseReleaseEvent):
(QQuickWebView::mouseDoubleClickEvent):
(QQuickWebView::wheelEvent):
(QQuickWebView::hoverEnterEvent):
(QQuickWebView::hoverMoveEvent):
(QQuickWebView::hoverLeaveEvent):
(QQuickWebView::dragMoveEvent):
(QQuickWebView::dragEnterEvent):
(QQuickWebView::dragLeaveEvent):
(QQuickWebView::dropEvent):
(QQuickWebView::event):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::contentsSize):
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::scrollRequest):
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::QtPinchGestureRecognizer::recognize):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::setItemRectVisible):
(WebKit::QtViewportInteractionEngine::animateItemRectVisible):
(WebKit::QtViewportInteractionEngine::event):
(WebKit::QtViewportInteractionEngine::wheelEvent):
(WebKit::QtViewportInteractionEngine::pagePositionRequest):
(WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
(WebKit::QtViewportInteractionEngine::applyConstraints):
(WebKit::QtViewportInteractionEngine::currentCSSScale):
(WebKit::QtViewportInteractionEngine::panGestureStarted):
(WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::panGestureEnded):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::scaleContent):
* UIProcess/qt/QtViewportInteractionEngine.h:
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleEvent):
(QtWebPageEventHandler::handleMouseMoveEvent):
(QtWebPageEventHandler::handleMousePressEvent):
(QtWebPageEventHandler::handleMouseReleaseEvent):
(QtWebPageEventHandler::handleWheelEvent):
(QtWebPageEventHandler::handleHoverLeaveEvent):
(QtWebPageEventHandler::handleHoverMoveEvent):
(QtWebPageEventHandler::handleDragEnterEvent):
(QtWebPageEventHandler::handleDragMoveEvent):
(QtWebPageEventHandler::handleDropEvent):
(QtWebPageEventHandler::handleSingleTapEvent):
(QtWebPageEventHandler::handleDoubleTapEvent):
(QtWebPageEventHandler::touchEvent):
* UIProcess/qt/QtWebPageEventHandler.h:
2012-01-09 Eunmi Lee <eunmi15.lee@samsung.com>
[EFL][WK2] Set color_set function to the clipped smart class.
https://bugs.webkit.org/show_bug.cgi?id=75286
Reviewed by Andreas Kling.
Set _ewk_view_smart_color_set() function to the clipped smart class's color_set,
so application can set webpage's background color using evas_object_color_set() API.
* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_smart_color_set):
(ewk_view_smart_class_init):
2012-01-08 Dan Bernstein <mitz@apple.com>
REGRESSION (r103859): WKViews leak
https://bugs.webkit.org/show_bug.cgi?id=75805
The flags changed event monitor added in r103859 was retaining the WKView (as it references
self in the handler block), causing it to leak.
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]): Moved call to remove the flags changed event monitor from here...
(-[WKView viewDidMoveToWindow]): ...to here. Moved call to add the flags changed event
monitor to here from...
(-[WKView initWithFrame:contextRef:pageGroupRef:]): ...here.
2012-01-06 Mark Rowe <mrowe@apple.com>
REGRESSION (WebKit2): Save as PDF no longer generates links to URLs
<http://webkit.org/b/65076> / <rdar://problem/9606246>
WebKit2 printing works by having the web process render the page content to a PDF. The PDF
data is then shipped to the UI process which will render it in to the printing graphics context.
Links were being lost because the API used to do the rendering of the PDF in to the printing
graphics context, CGContextDrawPDFPage, did not preserve the links that were present in the
PDF content received from the web process.
To fix this we switch to using PDFKit for drawing the PDF in to the printing graphics context.
PDFKit provides the ability for us to iterate over the links in the PDF content ourselves and
add links in to the printing graphics context.
Reviewed by Alexey Proskuryakov.
* UIProcess/API/mac/WKPrintingView.h:
* UIProcess/API/mac/WKPrintingView.mm:
(pdfAnnotationLinkClass): Look up the PDFAnnotationLink class from PDFKit as WebKit2 loads PDFKit lazily.
(pdfDocumentClass): Ditto.
(-[WKPrintingView _drawPDFDocument:page:atPoint:]): Switch to using the PDFKit equivalents of several types.
Iterate over the annotations present in the PDFPage, calling CGPDFContextSetURLForRect for each PDFAnnotationLink
that we find.
(-[WKPrintingView _drawPreview:]): Create an NSData to feed to PDFDocument.
(-[WKPrintingView drawRect:]): Ditto.
* WebKit2Prefix.h: Add the usual workaround to make Objective-C exceptions compile when C++ exception handling is disabled.
2012-01-06 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] Minibrowser leaks memory ~6-7Mb per reload
https://bugs.webkit.org/show_bug.cgi?id=75746
Reset WebGraphicsLayer::m_layerTreeTileClient of all dependent
layers from ~LayerTreeHostQt(). This replaces r103760 which
causes leaks of GraphicsLayerTextureMapper objects on UI side.
Reviewed by Noam Rosenthal.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::setLayerTreeTileClient):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::~LayerTreeHostQt):
2012-01-06 Alexey Proskuryakov <ap@apple.com>
[Mac] Thread verifier assertions when printing
https://bugs.webkit.org/show_bug.cgi?id=75738
Reviewed by Sam Weinig.
* UIProcess/API/mac/WKPrintingView.mm:
(-[WKPrintingView dealloc]): Dealloc in main thread, so that WebFrameProxy doesn't get
deref'ed from a secondary one.
(-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): This method calls out to client,
which only expects that on main thread.
(-[WKPrintingView knowsPageRange:]): Call _adjustPrintingMarginsForHeaderAndFooter on main
thread.
2012-01-06 Alexey Proskuryakov <ap@apple.com>
Need to allow SCNetworkReachability service in sandbox profile
https://bugs.webkit.org/show_bug.cgi?id=75724
<rdar://problem/10652415>
Reviewed by Mark Rowe.
* WebProcess/com.apple.WebProcess.sb:
2012-01-06 Benjamin Poulain <bpoulain@apple.com>
[Mac] Sort the resources of WebKit2.xcodeproj
https://bugs.webkit.org/show_bug.cgi?id=75636
Reviewed by Andreas Kling.
* WebKit2.xcodeproj/project.pbxproj:
2012-01-06 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt][WK2] QQuickWebView breaks when an empty url is loaded
https://bugs.webkit.org/show_bug.cgi?id=75445
Reviewed by Tor Arne Vestbø.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::load):
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: Check if a request to load
an empty url is ignored. 'about:blank' should be used instead to load an empty page.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2012-01-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Move listing of include paths and libs to pri files in sources
Includepaths are sometimes modified by non-Qt contributors so keeping
them in files inside Sources makes it more likely that they are updated
along with project files for the other ports.
Using pri files instead of prf files for this also has the benefit that
the include() from the main target file can be parsed and followed by
Qt Creator -- something that does not work with load().
Dependency from a target to a library through the WEBKIT variable are
handled through forwarding-files in Tools/qmake/mkspecs/modules, which
set the source root of the module and include the right pri file.
Ideally we'd use the variant of include() that takes an optional
namespace to read the variables into, or the fromfile() function,
but both of these add an overhead of about 40% on the total qmake
runtime, due to making a deep copy of all the variables in the
project or re-reading all the prf files from scratch.
Reviewed by Simon Hausmann.
Reviewed by Ossy.
* Target.pri:
* WebKit2.pri: Renamed from Tools/qmake/mkspecs/features/webkit2.prf.
2012-01-06 Zeno Albisser <zeno@webkit.org>
[Qt][WK2] Add test for application URL schemes.
https://bugs.webkit.org/show_bug.cgi?id=74933
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2012-01-05 Dan Bernstein <mitz@apple.com>
<rdar://problem/10633760> Update copyright strings
Reviewed by Mark Rowe.
* Info.plist:
* PluginProcess/Info.plist:
* WebProcess/Info.plist:
2012-01-05 Anders Carlsson <andersca@apple.com>
Crash when trying to invalidate the NPRuntimeObjectMap for a plug-in in a subframe
https://bugs.webkit.org/show_bug.cgi?id=75667
<rdar://problem/10389454>
Reviewed by Kevin Decker.
NPRuntimeObjectMap::invalidate is called whenever a plug-in view is destroyed. If invalidate is called for an object map
whose plug-in has a null frame, we'd crash.
The plug-in will have a null frame if the plug-in view is destroyed because its containing frame has been removed from the document,
and if the plug-in view is being destroyed asynchronously due to the plug-in itself calling JavaScript that will remove the frame
(see PluginView::unprotectPluginFromDestruction).
The reason NPRuntimeObjectMap::invalidate will crash when the frame is null is because we were trying to access the frame's global
object, causing a null dereference. The reason we were trying to get at the frame's global object was to create a Strong handle to
a JSNPObject so we could stick the object in a vector so we could later iterate over the vector elements and call invalidate() on
each JSNPObject which will end up releasing the underlying NPObject.
However, it turns out that we don't need to stick the JSNPObject in a vector; we can just get the underlying NPObject directly and
stick that in a vector and then iterate over the NPObjects, releasing them.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::invalidate):
2012-01-05 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r98912-r99538): Crash in WebKit::WebFrameLoaderClient::didDetectXSS
https://bugs.webkit.org/show_bug.cgi?id=75578
Reviewed by Daniel Bates.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame):
Check for a correct struct member existence.
2012-01-05 Alexey Proskuryakov <ap@apple.com>
WK2: Safari fails to open a PostScript file in Preview from context menu
https://bugs.webkit.org/show_bug.cgi?id=75643
<rdar://problem/9823430>
Reviewed by Dan Bernstein.
* UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::setPDFDocumentData):
Append ".pdf" to file name when converting data, as suggested file name is created for
original MIME type.
2012-01-05 Zeno Albisser <zeno@webkit.org>
[Qt][WK2] Implement custom URL schemes defined in QML.
https://bugs.webkit.org/show_bug.cgi?id=74931
Allow creation of custom UrlSchemeDelegates from QML.
A UrlSchemeDelegate contains a handler signal that is triggered
when a url matching the defined scheme is requested.
To allow for this a derivation of QNetworkAccessManager
is necessary.
The request is then handled in QML/JS and a reply
is sent back from the UIProcess to the WebProcess.
Reviewed by Kenneth Rohde Christiansen.
* Shared/qt/QtNetworkReplyData.cpp: Added.
(WebKit::QtNetworkReplyData::QtNetworkReplyData):
(WebKit::QtNetworkReplyData::encode):
(WebKit::QtNetworkReplyData::decode):
* Shared/qt/QtNetworkReplyData.h: Added.
* Shared/qt/QtNetworkRequestData.cpp: Added.
(WebKit::QtNetworkRequestData::QtNetworkRequestData):
(WebKit::QtNetworkRequestData::encode):
(WebKit::QtNetworkRequestData::decode):
* Shared/qt/QtNetworkRequestData.h: Added.
* Target.pri:
* UIProcess/API/qt/qquicknetworkreply.cpp: Added.
(QQuickNetworkReply::QQuickNetworkReply):
(QQuickNetworkReply::contentType):
(QQuickNetworkReply::setContentType):
(QQuickNetworkReply::operation):
(QQuickNetworkReply::setOperation):
(QQuickNetworkReply::contentDisposition):
(QQuickNetworkReply::setContentDisposition):
(QQuickNetworkReply::location):
(QQuickNetworkReply::setLocation):
(QQuickNetworkReply::lastModified):
(QQuickNetworkReply::setLastModified):
(QQuickNetworkReply::cookie):
(QQuickNetworkReply::setCookie):
(QQuickNetworkReply::userAgent):
(QQuickNetworkReply::setUserAgent):
(QQuickNetworkReply::server):
(QQuickNetworkReply::setServer):
(QQuickNetworkReply::data):
(QQuickNetworkReply::setData):
(QQuickNetworkReply::send):
(QQuickNetworkReply::networkRequestData):
(QQuickNetworkReply::setNetworkRequestData):
(QQuickNetworkReply::networkReplyData):
* UIProcess/API/qt/qquicknetworkreply_p.h: Added.
* UIProcess/API/qt/qquicknetworkrequest_p.h: Added.
* UIProcess/API/qt/qquickurlschemedelegate.cpp: Added.
(QQuickUrlSchemeDelegate::QQuickUrlSchemeDelegate):
(QQuickUrlSchemeDelegate::scheme):
(QQuickUrlSchemeDelegate::setScheme):
(QQuickUrlSchemeDelegate::request):
(QQuickUrlSchemeDelegate::reply):
* UIProcess/API/qt/qquickurlschemedelegate_p.h: Added.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewExperimental::QQuickWebViewExperimental):
(QQuickWebViewExperimental::schemeDelegates_At):
(QQuickWebViewExperimental::schemeDelegates_Append):
(QQuickWebViewExperimental::schemeDelegates_Count):
(QQuickWebViewExperimental::schemeDelegates_Clear):
(QQuickWebViewExperimental::schemeDelegates):
(QQuickWebViewExperimental::invokeApplicationSchemeHandler):
(QQuickWebViewExperimental::sendApplicationSchemeReply):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::handleApplicationSchemeRequest):
* UIProcess/qt/QtPageClient.h:
* UIProcess/qt/WebPageProxyQt.cpp:
(WebKit::WebPageProxy::registerApplicationScheme):
(WebKit::WebPageProxy::resolveApplicationSchemeRequest):
(WebKit::WebPageProxy::sendApplicationSchemeReply):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createNetworkingContext):
* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::registerApplicationScheme):
(WebKit::WebPage::receivedApplicationSchemeRequest):
(WebKit::WebPage::applicationSchemeReply):
* WebProcess/qt/QtNetworkAccessManager.cpp: Added.
(WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
(WebKit::QtNetworkAccessManager::obtainOriginatingWebPage):
(WebKit::QtNetworkAccessManager::createRequest):
(WebKit::QtNetworkAccessManager::registerApplicationScheme):
* WebProcess/qt/QtNetworkAccessManager.h: Added.
* WebProcess/qt/QtNetworkReply.cpp: Added.
(WebKit::QtNetworkReply::QtNetworkReply):
(WebKit::QtNetworkReply::setData):
(WebKit::QtNetworkReply::setReplyData):
(WebKit::QtNetworkReply::readData):
(WebKit::QtNetworkReply::bytesAvailable):
(WebKit::QtNetworkReply::setHeader):
(WebKit::QtNetworkReply::abort):
(WebKit::QtNetworkReply::close):
(WebKit::QtNetworkReply::setReadBufferSize):
(WebKit::QtNetworkReply::canReadLine):
(WebKit::QtNetworkReply::finalize):
* WebProcess/qt/QtNetworkReply.h: Added.
* WebProcess/qt/WebProcessQt.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
2012-01-05 Fady Samuel <fsamuel@chromium.org>
Move scalePageBy from eventSender to window.internals
https://bugs.webkit.org/show_bug.cgi?id=64512
Reviewed by Simon Fraser.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-01-05 Alexander Færøy <alexander.faeroy@nokia.com>
Pass WebFrame instead of WebCore::Frame to the WebKit2 specific FrameNetworkingContext
https://bugs.webkit.org/show_bug.cgi?id=75550
Make the WebKit2 FrameNetworkingContext implementation store the
WebFrame instead of the WebCore::Frame as this is needed for the Qt
port to implement a.o. HTTP autentication and SSL support.
As the WebFrameNetworkingContext is partly shared across all WebKit2 ports,
all port specific files have been modified.
For the Qt implementation of FrameNetworkingContext, we also set a
property to the originatingObject for the page ID. We also switch to
using an OwnPtr instead of a raw C++ pointer for the
m_originatingObject member.
Based on original patch by Peter Hartmann.
Reviewed by Kenneth Rohde Christiansen.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createNetworkingContext):
* WebProcess/WebCoreSupport/efl/WebFrameNetworkingContext.h:
(WebFrameNetworkingContext::create):
(WebFrameNetworkingContext::WebFrameNetworkingContext):
* WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h:
(WebFrameNetworkingContext::create):
(WebFrameNetworkingContext::WebFrameNetworkingContext):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
(WebKit::WebFrameNetworkingContext::create):
(WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
(WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):
(WebCore::WebFrameNetworkingContext::~WebFrameNetworkingContext):
(WebCore::WebFrameNetworkingContext::create):
* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
* WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h:
(WebFrameNetworkingContext::create):
(WebFrameNetworkingContext::WebFrameNetworkingContext):
2012-01-05 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Implement QQuickWebView::inputMethodQuery
Reviewed by Simon Hausmann.
Implement the current Qt5 queries of inputMethodQuery.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::inputMethodQuery):
* UIProcess/API/qt/qquickwebview_p.h:
2012-01-05 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add methods to get/set the WebView zoom level to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=75248
Reviewed by Gustavo Noronha Silva.
It uses the page zoom factor unconditionally for now.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewSetProperty):
(webkitWebViewGetProperty):
(webkit_web_view_class_init): Add WebKitWebView:zoom-level
property.
(webkit_web_view_set_zoom_level): Set current zoom level.
(webkit_web_view_get_zoom_level): Get current zoom level.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewZoomLevel):
(beforeAll):
2012-01-05 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Rename webkit_web_view_load_alternate_html as webkit_web_view_replace_content in WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=75433
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewLoadFail): Use webkit_web_view_replace_content().
(webkitWebViewLoadChanged): Do not emit load-changed signal when
replacing content.
(webkitWebViewLoadFailed): Do not emit load-failed signal when
replacing content.
(webkitWebViewSetEstimatedLoadProgress): Do not emit
notify::estimated-load-progress signal when replacing content.
(webkit_web_view_replace_content):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
(beforeAll):
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(replaceContentTitleChangedCallback):
(replaceContentLoadCallback):
(testWebViewReplaceContent):
(beforeAll):
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::replaceContent):
* UIProcess/API/gtk/tests/WebViewTest.h:
2012-01-05 Keunsoon Lee <keunsoon.lee@samsung.com>
[WK2][EFL] creating dummy functions for Download class on Efl port.
https://bugs.webkit.org/show_bug.cgi?id=75246
dummy functions for Download class on Efl port
Reviewed by Hajime Morita.
* PlatformEfl.cmake: add new file to compile
* WebProcess/Downloads/efl: Added.
* WebProcess/Downloads/efl/DownloadEfl.cpp: Added.
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::cancel):
(WebKit::Download::platformInvalidate):
(WebKit::Download::didDecideDestination):
(WebKit::Download::platformDidFinish):
(WebKit::Download::receivedCredential):
(WebKit::Download::receivedRequestToContinueWithoutCredential):
(WebKit::Download::receivedCancellation):
(WebKit::Download::useCredential):
(WebKit::Download::continueWithoutCredential):
(WebKit::Download::cancelAuthenticationChallenge):
2012-01-04 Dan Bernstein <mitz@apple.com>
Allow WebProcess to launch a client process and become its first WebProcess.
This is the WebKit2 part of fixing <http://webkit.org/b/75444> Debugging WebProcess requires running a UI process first and waiting to attach
Reviewed by Anders Carlsson.
* PluginProcess/mac/PluginProcessMainMac.mm:
(WebKit::PluginProcessMain): Added a newline to stderr output.
* UIProcess/Launcher/mac/EnvironmentVariables.cpp:
(WebKit::EnvironmentVariables::preexistingProcessServiceNameKey): Added. Returns the name
of the environment variable that optionally tells a UI processs to look for a preexisting
web process instead of launching a new one.
(WebKit::EnvironmentVariables::preexistingProcessTypeKey): Added. Returns the name of the
environment variable that tells a UI process the type of the preexisting web process
indicated by the other variable.
* UIProcess/Launcher/mac/EnvironmentVariables.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess): Changed to look for a preexisting web process if
the aforementioned environment variables are set and the preexisting process has not been
used yet.
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain): Changed to look for the -client-executable command-line option,
and if present, launch the specified executable, setting variables in its environment that
tell it to use this preexisting web process, then wait for it to send a send right to its
listening port.
2012-01-04 Alexey Proskuryakov <ap@apple.com>
First sentence is missing or clipped when printing a inline PDF
https://bugs.webkit.org/show_bug.cgi?id=75514
<rdar://problem/10640680>
Reviewed by Dan Bernstein.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::headerHeight):
(WebKit::WebPageProxy::footerHeight):
(WebKit::WebPageProxy::drawHeader):
(WebKit::WebPageProxy::drawFooter):
Do not ask the client about headers and footers when printing a PDF.
2012-01-04 Alexander Færøy <alexander.faeroy@nokia.com>
[Qt] Fix test regressions after r104025
https://bugs.webkit.org/show_bug.cgi?id=75545
Reviewed by Kenneth Rohde Christiansen.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
2012-01-04 Andras Becsi <andras.becsi@nokia.com>
REGRESSION(r104028): Broke editing tests and event coordinates in desktop behaviour
https://bugs.webkit.org/show_bug.cgi?id=75542
[Qt][WK2] Pinch zoom should affect the page size
https://bugs.webkit.org/show_bug.cgi?id=74601
Unreviewed roll-out.
* Shared/NativeWebMouseEvent.h:
* Shared/NativeWebTouchEvent.h:
* Shared/NativeWebWheelEvent.h:
* Shared/qt/NativeWebMouseEventQt.cpp:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
* Shared/qt/NativeWebTouchEventQt.cpp:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* Shared/qt/NativeWebWheelEventQt.cpp:
(WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebTouchEvent):
* Shared/qt/WebEventFactoryQt.h:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::keyPressEvent):
(QQuickWebPage::keyReleaseEvent):
(QQuickWebPage::inputMethodEvent):
(QQuickWebPage::focusInEvent):
(QQuickWebPage::focusOutEvent):
(QQuickWebPage::mousePressEvent):
(QQuickWebPage::mouseMoveEvent):
(QQuickWebPage::mouseReleaseEvent):
(QQuickWebPage::mouseDoubleClickEvent):
(QQuickWebPage::wheelEvent):
(QQuickWebPage::hoverEnterEvent):
(QQuickWebPage::hoverMoveEvent):
(QQuickWebPage::hoverLeaveEvent):
(QQuickWebPage::dragMoveEvent):
(QQuickWebPage::dragEnterEvent):
(QQuickWebPage::dragLeaveEvent):
(QQuickWebPage::dropEvent):
(QQuickWebPage::geometryChanged):
(QQuickWebPage::event):
(QQuickWebPage::touchEvent):
(QQuickWebPagePrivate::QQuickWebPagePrivate):
(QQuickWebPagePrivate::paintToCurrentGLContext):
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebpage_p_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::enableMouseEvents):
(QQuickWebViewPrivate::disableMouseEvents):
(QQuickWebViewPrivate::loadDidCommit):
(QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
(QQuickWebViewPrivate::didChangeContentsSize):
(QQuickWebViewPrivate::didChangeViewportProperties):
(QQuickWebViewPrivate::pageDidRequestScroll):
(QQuickWebViewPrivate::updateVisibleContentRectAndScale):
(QQuickWebViewPrivate::PostTransitionState::apply):
(QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
(QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
(QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
(QQuickWebView::geometryChanged):
(QQuickWebView::focusInEvent):
(QQuickWebView::focusOutEvent):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::contentsSize):
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::scrollRequest):
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::QtPinchGestureRecognizer::recognize):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::setItemRectVisible):
(WebKit::QtViewportInteractionEngine::animateItemRectVisible):
(WebKit::QtViewportInteractionEngine::event):
(WebKit::QtViewportInteractionEngine::wheelEvent):
(WebKit::QtViewportInteractionEngine::pagePositionRequest):
(WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
(WebKit::QtViewportInteractionEngine::applyConstraints):
(WebKit::QtViewportInteractionEngine::currentCSSScale):
(WebKit::QtViewportInteractionEngine::panGestureStarted):
(WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::panGestureEnded):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::scaleContent):
* UIProcess/qt/QtViewportInteractionEngine.h:
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleEvent):
(QtWebPageEventHandler::handleMouseMoveEvent):
(QtWebPageEventHandler::handleMousePressEvent):
(QtWebPageEventHandler::handleMouseReleaseEvent):
(QtWebPageEventHandler::handleWheelEvent):
(QtWebPageEventHandler::handleHoverLeaveEvent):
(QtWebPageEventHandler::handleHoverMoveEvent):
(QtWebPageEventHandler::handleDragEnterEvent):
(QtWebPageEventHandler::handleDragMoveEvent):
(QtWebPageEventHandler::handleDropEvent):
(QtWebPageEventHandler::handleSingleTapEvent):
(QtWebPageEventHandler::handleDoubleTapEvent):
(QtWebPageEventHandler::touchEvent):
* UIProcess/qt/QtWebPageEventHandler.h:
2012-01-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Introduce new qmake variable 'WEBKIT' for signaling dependencies
The custom qmake variable 'WEBKIT' is used for signaling that a
target depends in some way on other subproject of the WebKit
project. For now this is limited to the set of intermediate
libraries: wtf, javascriptcore, webcore, and webkit2.
This replaces the previous convension of using load(foo) for
just include paths, and CONFIG += foo to also link against foo.
Adding a dependency results in additional include paths being
available, and potentially linking to the library. This is
decided by the build system based on conditions such as what
kind of target is being built and the general build config.
An advantage to his approach is that it simplifies the individual
foo.prf files, for example by allowing us to use INCLUDEPATH +=
and LIBS += as normal instead of prepending.
Reviewed by Simon Hausmann.
* Target.pri:
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2012-01-03 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Pinch zoom should affect the page size
https://bugs.webkit.org/show_bug.cgi?id=74601
Reviewed by Kenneth Rohde Christiansen and Simon Hausmann.
The current implementation uses the scale property of the QQuickWebPage
to scale the page in response to pinch gestures.
However for layout and anchoring to work correctly in QML, pinching needs
to change the page size.
This patch applies the pinch scale to the page size and to the transformation
matrix of the drawing area.
Thus the page item's coordinate system is no longer a direct representation
of the WebCore::Page coordinate system and it is no longer suitable as
an inertial frame of reference for input events. The event propagation had
to be moved to the QQuickWebView and the positions translated to content
coordinates when NativeWebEvents are created.
* Shared/NativeWebMouseEvent.h:
* Shared/NativeWebTouchEvent.h:
* Shared/NativeWebWheelEvent.h:
* Shared/qt/NativeWebMouseEventQt.cpp:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
* Shared/qt/NativeWebTouchEventQt.cpp:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* Shared/qt/NativeWebWheelEventQt.cpp:
(WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebTouchEvent):
* Shared/qt/WebEventFactoryQt.h:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::geometryChanged):
(QQuickWebPagePrivate::QQuickWebPagePrivate):
(QQuickWebPagePrivate::paintToCurrentGLContext):
(QQuickWebPage::usesTraditionalDesktopBehaviour):
(QQuickWebPage::setUsesTraditionalDesktopBehaviour):
(QQuickWebPage::eventHandler):
(QQuickWebPage::setContentSize):
(QQuickWebPage::contentSize):
(QQuickWebPage::setContentScale):
(QQuickWebPage::contentScale):
(QQuickWebPage::transformFromItem):
(QQuickWebPage::transformToItem):
(QQuickWebPagePrivate::updateSize):
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebpage_p_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::enableMouseEvents):
(QQuickWebViewPrivate::disableMouseEvents):
(QQuickWebViewPrivate::loadDidCommit):
(QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
(QQuickWebViewPrivate::didChangeContentsSize):
(QQuickWebViewPrivate::didChangeViewportProperties):
(QQuickWebViewPrivate::pageDidRequestScroll):
(QQuickWebViewPrivate::updateVisibleContentRectAndScale):
(QQuickWebViewPrivate::PostTransitionState::apply):
(QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
(QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
(QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
(QQuickWebView::mapToWebContent):
(QQuickWebView::mapRectToWebContent):
(QQuickWebView::mapFromWebContent):
(QQuickWebView::mapRectFromWebContent):
(QQuickWebView::geometryChanged):
(QQuickWebView::keyPressEvent):
(QQuickWebView::keyReleaseEvent):
(QQuickWebView::inputMethodEvent):
(QQuickWebView::focusInEvent):
(QQuickWebView::focusOutEvent):
(QQuickWebView::touchEvent):
(QQuickWebView::mousePressEvent):
(QQuickWebView::mouseMoveEvent):
(QQuickWebView::mouseReleaseEvent):
(QQuickWebView::mouseDoubleClickEvent):
(QQuickWebView::wheelEvent):
(QQuickWebView::hoverEnterEvent):
(QQuickWebView::hoverMoveEvent):
(QQuickWebView::hoverLeaveEvent):
(QQuickWebView::dragMoveEvent):
(QQuickWebView::dragEnterEvent):
(QQuickWebView::dragLeaveEvent):
(QQuickWebView::dropEvent):
(QQuickWebView::event):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::contentsSize):
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::scrollRequest):
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::QtPinchGestureRecognizer::recognize):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::setItemRectVisible):
(WebKit::QtViewportInteractionEngine::animateItemRectVisible):
(WebKit::QtViewportInteractionEngine::event):
(WebKit::QtViewportInteractionEngine::wheelEvent):
(WebKit::QtViewportInteractionEngine::pagePositionRequest):
(WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
(WebKit::QtViewportInteractionEngine::applyConstraints):
(WebKit::QtViewportInteractionEngine::currentCSSScale):
(WebKit::QtViewportInteractionEngine::panGestureStarted):
(WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::panGestureEnded):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::scaleContent):
* UIProcess/qt/QtViewportInteractionEngine.h:
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleEvent):
(QtWebPageEventHandler::handleMouseMoveEvent):
(QtWebPageEventHandler::handleMousePressEvent):
(QtWebPageEventHandler::handleMouseReleaseEvent):
(QtWebPageEventHandler::handleWheelEvent):
(QtWebPageEventHandler::handleHoverLeaveEvent):
(QtWebPageEventHandler::handleHoverMoveEvent):
(QtWebPageEventHandler::handleDragEnterEvent):
(QtWebPageEventHandler::handleDragMoveEvent):
(QtWebPageEventHandler::handleDropEvent):
(QtWebPageEventHandler::handleSingleTapEvent):
(QtWebPageEventHandler::handleDoubleTapEvent):
(QtWebPageEventHandler::touchEvent):
* UIProcess/qt/QtWebPageEventHandler.h:
2012-01-03 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Clean up Qt specific part of editorState()
Reviewed by Simon Hausmann.
Use unsigned instead of int.
No need to clone the range as we don't modify it.
Support selections which include a composition.
If we are not in editable content make sure to use the document element
as the scope for calculating the positions and lengths.
Remove compositionStart/Length as there cannot be a selection and
composition at the same time.
Only tested manually as we don't have everything in place yet
to properly test this.
* Shared/EditorState.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
2012-01-04 Mihnea Ovidenie <mihnea@adobe.com>
[Mac]Fix build after changeset 103997
https://bugs.webkit.org/show_bug.cgi?id=75530
Reviewed by Andreas Kling.
* UIProcess/API/mac/WKView.mm:
2012-01-03 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Scrollbars are drawn behind the window resize grip
https://bugs.webkit.org/show_bug.cgi?id=75384
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseNotifyResizerSizeForWindow): Get the size of the
main window resize grip and send it to the page proxy if it
overlaps with the view.
(toplevelWindowResizeGripVisibilityChanged): Call
webkitWebViewBaseNotifyResizerSizeForWindow().
(webkitWebViewBaseRealize): Get the toplevel window and connect to
notify::resize-grip-visible signal.
(webkitWebViewBaseSizeAllocate): Call
webkitWebViewBaseNotifyResizerSizeForWindow().
2012-01-03 Jon Lee <jonlee@apple.com>
Leak of WebNotificationClient when page is destroyed
https://bugs.webkit.org/show_bug.cgi?id=74980
<rdar://problem/10611231>
Reviewed by Mark Rowe.
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
(WebKit::WebNotificationClient::notificationControllerDestroyed): Delete the instance.
* WebProcess/WebCoreSupport/WebNotificationClient.h:
2012-01-03 Sam Weinig <sam@webkit.org>
Remove unnecessary forward declaration of Function
https://bugs.webkit.org/show_bug.cgi?id=75485
Reviewed by Dan Bernstein.
* Platform/WorkQueue.h:
2012-01-03 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Simplify loader client WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=74605
Reviewed by Gustavo Noronha Silva.
Remove WebKitWebLoaderClient from public API keeping it as a
private object. Loading API has been reduced to two signals in
WebKitWebView.
* GNUmakefile.am: Remove WebKitWebLoaderClientPrivate.h.
* UIProcess/API/gtk/WebKitDefines.h: Remove forward delcarations
that are no longer needed.
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
(didStartProvisionalLoadForFrame): Emit
WebKitWebView::load-changed signal with Started event.
(didReceiveServerRedirectForProvisionalLoadForFrame): Emit
WebKitWebView::load-changed signal with Redirected event.
(didFailProvisionalLoadWithErrorForFrame): Emit
WebKitWebView::load-failed signal with Started event.
(didCommitLoadForFrame): Emit WebKitWebView::load-changed signal
with Committed event.
(didFinishLoadForFrame): Emit WebKitWebView::load-changed signal
with Finished event.
(didFailLoadWithErrorForFrame): Emit WebKitWebView::load-failed
signal with Committed event.
(webkit_web_loader_client_init):
(webkit_web_loader_client_class_init):
* UIProcess/API/gtk/WebKitWebLoaderClient.h: Remove public API and
move private API here.
* UIProcess/API/gtk/WebKitWebLoaderClientPrivate.h: Removed.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewLoadFail): Default implementation of
WebKitWebView::load-failed signal to show a custom error page.
(webkit_web_view_class_init): Add load-changed and load-failed
signals.
(webkitWebViewLoadChanged): Emit WebKitWebView::load-changed with
the given event.
(webkitWebViewLoadFailed): Emit WebKitWebView::load-failed signal
with the given event, failing uri and error.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Remove loader
client section.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Remove loader
client symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Remove
webkit_web_loader_client_get_type.
* UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
(loadChangedCallback):
(loadFailedCallback):
(LoadTrackingTest::LoadTrackingTest):
(LoadTrackingTest::~LoadTrackingTest):
(LoadTrackingTest::provisionalLoadStarted):
(LoadTrackingTest::provisionalLoadReceivedServerRedirect):
(LoadTrackingTest::provisionalLoadFailed):
(LoadTrackingTest::loadCommitted):
(LoadTrackingTest::loadFinished):
(LoadTrackingTest::loadFailed):
* UIProcess/API/gtk/tests/LoadTrackingTest.h:
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
(testLoadingError):
(LoadStopTrackingTest::loadCommitted):
(LoadStopTrackingTest::loadFailed):
(testLoadCancelled):
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(beforeAll):
* UIProcess/API/gtk/webkit2.h: Remove loader client header.
* UIProcess/API/gtk/webkit2marshal.list:
2012-01-03 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt][WK2] tst_favIconLoad.qml crashes on debug mode
https://bugs.webkit.org/show_bug.cgi?id=75448
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Loads
"about:blank" instead of an empty url between tests to clean favicon.
2012-01-02 Dan Bernstein <mitz@apple.com>
Fixed a typo I made in r103871.
Fixes <http://webkit.org/b/75450> Inline PDF doesn't preview correctly when attempting to print its frame
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawRectToPDF): Changed USE(GC) to USE(CG).
2012-01-02 Andy Estes <aestes@apple.com>
Fix the Windows build (again).
* Platform/CoreIPC/Connection.h:
2012-01-02 Sam Weinig <sam@webkit.org>
Fix windows build.
* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/win/ConnectionWin.cpp:
* Platform/RunLoop.h:
Missing declarations/includes of BinarySemaphore.
2012-01-02 Sam Weinig <sam@webkit.org>
Move dispatchSentMessagesUntil out of the RunLoop class.
https://bugs.webkit.org/show_bug.cgi?id=75320
Reviewed by Dan Bernstein.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::SyncMessageState::waitWhileDispatchingSentWin32Messages):
* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::dispatchSentMessagesUntil):
* Platform/win/RunLoopWin.cpp:
2012-01-02 Dan Bernstein <mitz@apple.com>
Build fix.
* Platform/CoreIPC/mac/ConnectionMac.cpp:
* Platform/mac/SharedMemoryMac.cpp:
2012-01-02 Nikolas Zimmermann <nzimmermann@rim.com>
Not reviewed. Fix build on Lion, by including mach_error.h in two places that need it.
* PluginProcess/mac/PluginProcessMainMac.mm:
* WebProcess/mac/WebProcessMainMac.mm:
2012-01-01 Dan Bernstein <mitz@apple.com>
EnvironmentUtilities::stripValuesEndingWithString enters an infinite loop if the search value
occurs a component other than the first.
Reviewed by Anders Carlsson.
* Platform/unix/EnvironmentUtilities.cpp:
(WebKit::EnvironmentUtilities::stripValuesEndingWithString): Changed to start the search for
the next colon after the current colon.
2012-01-01 Dan Bernstein <mitz@apple.com>
Improved reproting of kernel return codes.
Reviewed by Anders Carlsson.
* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC::Connection::exceptionSourceEventHandler): Added the error string to the log message.
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::create): Ditto.
* PluginProcess/mac/PluginProcessMainMac.mm:
(WebKit::PluginProcessMain): Ditto. Also changed to log to stderr.
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain): Ditto.
2011-12-31 Dan Bernstein <mitz@apple.com>
Continue trying to fix the ASSERT-enabled Windows build after r103858.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawRectToPDF):
(WebKit::WebPage::drawPagesToPDF):
2011-12-31 Dan Bernstein <mitz@apple.com>
Start trying to fix the Windows build after r103858.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::drawPDFPage):
2011-12-31 Dan Bernstein <mitz@apple.com>
<rdar://problem/10463059> Cannot print USPS shipping labels
http://webkit.org/b/72801
Reviewed by Anders Carlsson and Alexey Proskuryakov.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(appendValuesInPDFNameSubtreeToVector): Copied from WebKit/mac/WebView/WebPDFDocumentExtras.mm.
(getAllValuesInPDFNameTree): Ditto.
(getAllScriptsInPDFDocument): Copied allScriptsInPDFDocument() from WebPDFDocumentExtras.mm
and changed it to append to a Vector<RetainPtr<CFStringRef> >.
(WebKit::BuiltInPDFView::create): Changed to take a WebFrame* rather than a Page*.
(WebKit::BuiltInPDFView::BuiltInPDFView): Ditto. Updated initializer accordingly.
(WebKit::BuiltInPDFView::pdfDocumentDidLoad): Copied and adapted code from
-[WebPDFRepresentation finishedLoadingWithDataSource:] to run scripts from the PDF with a
Doc object as the this object.
(WebKit::BuiltInPDFView::initialize): Adapted for the change from having a Page* to having
a WebFrame*.
(WebKit::BuiltInPDFView::destroy): Ditto.
(WebKit::BuiltInPDFView::isActive): Ditto.
(WebKit::jsPDFDocInitialize): Added. Refs the BuiltInPDFView which is the private object for
this Doc.
(WebKit::jsPDFDocFinalize): Added. Derefs the BuiltInPDFView for this Doc.
(WebKit::BuiltInPDFView::jsPDFDocPrint): Added. Calls WebCore::Chrome::print().
(WebKit::BuiltInPDFView::makeJSPDFDoc): Copied from WebKit/mac/WebView/WebJSPDFDoc.mm and
modified to use this BuiltInPDFView as the private object of the Doc being made.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
(WebKit::BuiltInPDFView::disconnectFromPage): Adapted for the change from having a Page* to
having a WebFrame*.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createPlugin): Pass the WebFrame to WebPage::createPlugin().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin): Added a WebFrame* parameter, which is used when creating
a BuiltInPDFView.
* WebProcess/WebPage/WebPage.h:
2011-12-31 Dan Bernstein <mitz@apple.com>
<rdar://problem/8553040> REGRESSION (WebKit2): Safari status text doesn't change when you change the modifier keys without moving the mouse
https://bugs.webkit.org/show_bug.cgi?id=75404
Reviewed by Jon Honeycutt.
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]): Remove the flags changed event monitor.
(-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Added. Similarly to
-[WebHTMLView _postFlagsChangedEvent:], creates a mouse moved event and passes it to
-mouseMoved:.
(-[WKView initWithFrame:contextRef:pageGroupRef:]): Create a local event monitor for flags
changed events.
2011-12-31 Dan Bernstein <mitz@apple.com>
<rdar://problem/8750356> REGRESSION (WebKit2): Printing a subframe containing a PDF prints the on-screen view instead of the entire PDF document
<http://webkit.org/b/75232>
Reviewed by Alexey Proskuryakov.
* UIProcess/API/C/WKPage.cpp:
(WKPageDrawPagesToPDF): Added WKPrintInfo parameter, which is passed through as a PrintInfo
to the WebPageProxy.
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/API/mac/WKPrintingView.mm:
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Changed to pass the PrintInfo
down to WebPageProxy::drawPagesToPDF.
(-[WKPrintingView _drawPreview:]): Changed to pass the PrintInfo down to
WebPageProxy::drawRectToPDF.
* UIProcess/API/mac/WKView.mm:
(-[WKView canChangeFrameLayout:]): Changed to use WebFrameProxy::isDisplayingPDFDocument, which
works for subframes as well.
(-[WKView printOperationWithPrintInfo:forFrame:]): Added a FIXME.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::isDisplayingPDFDocument): Added.
* UIProcess/WebFrameProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::drawRectToPDF): Added a PrintInfo parameter, which is passed through to
the Web process.
(WebKit::WebPageProxy::drawPagesToPDF): Ditto.
* UIProcess/WebPageProxy.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
Added an override of pdfDocumentForPrinting() which returns the PDFDocument.
* WebProcess/Plugins/Plugin.h:
(WebKit::Plugin::pdfDocumentForPrinting): Added. This base class implementation returns 0.
* WebProcess/Plugins/PluginView.h:
(WebKit::PluginView::pdfDocumentForPrinting): Added. Calls through to the Plugin.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::pdfDocumentForPrintingFrame): Added this helper function. If the frame is displaying
a plug-in document, allows the plug-in to provide a PDF document for printing.
(WebKit::WebPage::beginPrinting): Added an early return if the frame provides a PDF document
for printing.
(WebKit::WebPage::computePagesForPrinting): If the frame provides a PDF document for printing,
create for each page in the PDF document a page rect with the size available for printing.
(WebKit::drawPDFPage): Added this helper function, which draws a page from the PDF document
into one of the aforementioned page rects. It rotates the PDF page 90 degrees if necessary to
better match the aspect ratio of the paper, then it centers it on the paper. This matches the
behavior of a PDFView when printed with default settings.
(WebKit::WebPage::drawRectToPDF): If the frame provides a PDF document for printing, draw the
PDF pages falling within the requested rect.
(WebKit::WebPage::drawPagesToPDF): If the frame provides a PDF document for printing, draw
the requested pages.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added a PrintInfo parameter to DrawRectToPDF and
DrawPagesToPDF.
2011-12-30 Dan Bernstein <mitz@apple.com>
EnvironmentUtilities::stripValuesEndingWithString fails when the variable ends with the search value
https://bugs.webkit.org/show_bug.cgi?id=75389
Reviewed by Anders Carlsson.
* Platform/unix/EnvironmentUtilities.cpp:
(WebKit::EnvironmentUtilities::stripValuesEndingWithString): Fixed an off-by-1 error when
examining the character after the match.
2011-12-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Remove unused m_signalListeners from WorkQueue
https://bugs.webkit.org/show_bug.cgi?id=75354
Reviewed by Andreas Kling.
This is unused since r76507.
* Platform/WorkQueue.h:
* Platform/qt/WorkQueueQt.cpp:
(WorkQueue::platformInvalidate):
2011-12-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Context menu is hidden right after showing it when first menu item is not disabled
https://bugs.webkit.org/show_bug.cgi?id=75357
Reviewed by Martin Robinson.
The problem is that we are passing GDK_CURRENT_TIME (which is 0)
to gtk_popup_menu, because the events are async and
gtk_get_current_event is NULL when calling gtk_menu_popup. GtkMenu
has a timeout to decide whether the press-release was fast enough
and ignore the button release event in that case. That way, a
normal right click shows the menu while a long press hides the
menu when the button is released. So, we need to know the real time
when the right button was pressed and pass it to gtk_popup_menu.
* UIProcess/WebPageProxy.h: Make
currentlyProcessedMouseDownEvent() public.
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::showContextMenu): Use
WebPageProxy::currentlyProcessedMouseDownEvent() to get the
current mouse event and pass its button number and time to
gtk_popup_menu.
2011-12-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix several conding style issues in WebKit2 GTK+ code
https://bugs.webkit.org/show_bug.cgi?id=75339
Reviewed by Martin Robinson.
In addition to the WebKit coding style, code in UIProcess/API/gtk
should follow style and conventions described here
http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
* UIProcess/API/gtk/WebKitSettings.cpp: Remove trailing whitespaces.
(webkit_settings_class_init): Remove trailing whitespaces, fix
indentation issues in API doc comments, add missing trailing to
some properties.
(webkit_settings_set_enable_fullscreen): Move the code after
get_enable_fullscreen() for consistency.
* UIProcess/API/gtk/WebKitSettings.h: Remove trailing
whitespaces. Fix * placement and line up parameters.
* UIProcess/API/gtk/WebKitWebView.cpp: Remove several empty lines.
(webkit_web_view_class_init): Mark property nicks and blurbs for translation.
(webkitWebViewSetTitle): Remove trailing whitespaces.
* UIProcess/API/gtk/WebKitWebView.h: Line up parameters.
* UIProcess/API/gtk/WebKitWebViewBase.cpp: Use the angle-bracket
form for including file from WebCore and wtf. Use GRefPtr for
GtkIMContext and bool instead of gboolean. Use the placement new
syntax for private struct instead of new/delete.
(webkitWebViewBaseRealize):
(webkitWebViewBaseFinalize):
(webkit_web_view_base_init):
(webkitWebViewBaseFocusInEvent):
(webkitWebViewBaseFocusOutEvent):
(webkitWebViewBaseKeyPressEvent): Remove trailing whitespaces.
(webkitWebViewBaseKeyReleaseEvent):
(webkit_web_view_base_class_init):
(webkitWebViewBaseGetIMContext):
2011-12-28 Balazs Kelemen <kbalazs@webkit.org>
[Qt][WK2] Crash in ~WebGraphicsLayer when running fast/multicol/pagination-* tests
https://bugs.webkit.org/show_bug.cgi?id=75000
Reviewed by Noam Rosenthal.
Don't adopt a tile client that belongs to a parent layer.
This is unnecessary and also unsafe because we can live
through that client.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
2011-12-27 Dan Bernstein <mitz@apple.com>
[mac] Stop using bootstrap_look_up2
https://bugs.webkit.org/show_bug.cgi?id=75280
Reviewed by Mark Rowe.
* PluginProcess/mac/PluginProcessMainMac.mm:
(WebKit::PluginProcessMain): Changed to use bootstrap_look_up() instead of
bootstrap_look_up2().
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain): Ditto.
2011-12-27 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Make the inputMethodEvent set or confirm the composition
https://bugs.webkit.org/show_bug.cgi?id=75256
Reviewed by Chang Shu.
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::inputMethodEvent):
2011-12-26 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/75196> REGRESSION(r103643): Command-clicking a link no longer opens a new tab.
r103643 contained some botched copy-paste code that caused the state of the Command key
to be lost when translating from a WebKit2 event to a WebCore event.
Reviewed by Dan Bernstein.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): Test for the correct modifier.
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): Ditto.
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent): Ditto.
(WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): Ditto.
(WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): Ditto.
2011-12-26 Carlos Garcia Campos <cgarcia@igalia.com>
Fix a crash in WebProcess when starting a download not initiated by a WebPage
https://bugs.webkit.org/show_bug.cgi?id=75225
Reviewed by Darin Adler.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::downloadRequest): Check initiatingPage is not
NULL before using it.
2011-12-25 Dan Bernstein <mitz@apple.com>
Find indicators overlap when a match spans multiple text boxes
https://bugs.webkit.org/show_bug.cgi?id=75220
Reviewed by Darin Adler.
* UIProcess/FindIndicator.cpp:
(WebKit::findIndicatorsForTextRectsOverlap): Added this helper function that checks for
pairwise intersections between all indicator rects.
(WebKit::FindIndicator::FindIndicator): Changed to use a single rect (the union of all text
rects) if any two indicator rects would otherwise overlap. This is similar to what Safari
does, and it eliminates overlapping rects for adjacent text boxes. In rare cases (such as when
a match spans two lines and adjacent text boxes on one of those lines) it results in a find
indicator that is too large and obscures some non-match text.
* UIProcess/FindIndicator.h:
2011-12-21 Sam Weinig <sam@webkit.org>
Start extracting platform specific bits out of PlatformEvents
https://bugs.webkit.org/show_bug.cgi?id=75063
Reviewed by Anders Carlsson.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
(WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
(WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
* UIProcess/API/mac/WKView.mm:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2011-12-22 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Use HashMap instead of Vector in the builtin bundle
https://bugs.webkit.org/show_bug.cgi?id=75112
Reviewed by Andreas Kling.
Fix my own FIXME now that HashMap have support to hold OwnPtr as value.
* WebProcess/qt/QtBuiltinBundle.cpp:
(WebKit::QtBuiltinBundle::didCreatePage):
(WebKit::QtBuiltinBundle::willDestroyPage):
(WebKit::QtBuiltinBundle::handleMessageToNavigatorQtObject):
(WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled):
* WebProcess/qt/QtBuiltinBundle.h:
2011-12-22 Anders Carlsson <andersca@apple.com>
Remove the last of the WebKit2 display throttling
https://bugs.webkit.org/show_bug.cgi?id=75109
Reviewed by Adam Roben.
The code to do display throttling in WebKit2 is complex and doesn't really help us except
on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
(WebKit::DrawingAreaImpl::displayTimerFired):
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::wheelEvent):
(WebKit::WebPage::wheelEventSyncForTesting):
2011-12-22 Anders Carlsson <andersca@apple.com>
Get rid of didStartAnimatedScroll and didCompleteAnimatedScroll
https://bugs.webkit.org/show_bug.cgi?id=75107
Reviewed by Adam Roben.
This is another step towards removing the display throttling in WebKit2.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2011-12-22 Anders Carlsson <andersca@apple.com>
Remove didStartRubberBand and didCompleteRubberBand callbacks
https://bugs.webkit.org/show_bug.cgi?id=75102
Reviewed by Adam Roben.
The code to do display throttling in WebKit2 is complex and doesn't really help us except
on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
2011-12-22 Ryuan Choi <ryuan.choi@samsung.com>, Tomasz Morawski <t.morawski@samsung.com>
[EFL][WK2] Add an option to build WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=61999
Reviewed by Eric Seidel.
Add build script for WebKit2 on EFL port.
* CMakeLists.txt:
* PlatformEfl.cmake: Added.
2011-12-21 Eunmi Lee <eunmi15.lee@samsung.com>
[EFL][WK2] Add efl port's ewk_view files
https://bugs.webkit.org/show_bug.cgi?id=61915
Reviewed by Eric Seidel.
This is the initial version of WebKit2 EFL port's ewk_view.
The ewk_view is Evas_Object to show the rendered web contents.
* UIProcess/API/efl/ewk_view.cpp: Added.
(_ewk_view_smart_changed):
(_ewk_view_smart_focus_in):
(_ewk_view_smart_focus_out):
(_ewk_view_smart_mouse_wheel):
(_ewk_view_smart_mouse_down):
(_ewk_view_smart_mouse_up):
(_ewk_view_smart_mouse_move):
(_ewk_view_smart_key_down):
(_ewk_view_smart_key_up):
(_ewk_view_on_focus_in):
(_ewk_view_on_focus_out):
(_ewk_view_on_mouse_wheel):
(_ewk_view_on_mouse_down):
(_ewk_view_on_mouse_up):
(_ewk_view_on_mouse_move):
(_ewk_view_on_key_down):
(_ewk_view_on_key_up):
(_ewk_view_priv_new):
(_ewk_view_priv_del):
(_ewk_view_smart_add):
(_ewk_view_smart_del):
(_ewk_view_smart_resize):
(_ewk_view_smart_move):
(_ewk_view_smart_calculate):
(_ewk_view_smart_show):
(_ewk_view_smart_hide):
(ewk_view_smart_class_init):
(_ewk_view_smart_class_new):
(ewk_view_add):
(ewk_view_page_get):
* UIProcess/API/efl/ewk_view.h: Added.
2011-12-21 Timothy Hatcher <timothy@apple.com>
Web Inspector: suppress incremental rendering and use application chrome mode
https://webkit.org/b/75026
Reviewed by Joseph Pecoraro.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::createInspectorPageGroup): Set suppress incremental rendering and use application chrome mode.
2011-12-21 Sam Weinig <sam@webkit.org>
Cleanup up clients when deallocating WebKit2 API objects
https://bugs.webkit.org/show_bug.cgi?id=75014
Reviewed by Adam Roben.
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController dealloc]):
* UIProcess/API/mac/WKConnection.mm:
(-[WKConnection dealloc]):
Clear clients on dealloc.
2011-12-21 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt][WK2] Add tests for favicon and fix icon url decoding issue
https://bugs.webkit.org/show_bug.cgi?id=74967
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qwebiconimageprovider.cpp: We already receive the url
without the percent encoding and we should access WebIconDatabase with
an encoded url. Added a test to cover this behavior.
(QWebIconImageProvider::requestImage):
* UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/favicon.html: Added.
* UIProcess/API/qt/tests/qmltests/common/favicon.png: Added.
* UIProcess/API/qt/tests/qmltests/common/favicon2.html: Added.
* UIProcess/API/qt/tests/qmltests/common/small-favicon.png: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2011-12-21 Sam Weinig <sam@webkit.org>
Exception thrown when running WKBrowsingContextLoadDelegateTest.SimpleLoad test
https://bugs.webkit.org/show_bug.cgi?id=75012
Reviewed by Adam Roben.
* UIProcess/API/mac/WKProcessGroup.mm:
(-[WKProcessGroup dealloc]):
Clear the WKContext's connection client.
2011-12-21 Michael Brüning <michael.bruning@nokia.com>
[Qt][WK2] Fix tst_QQuickWebView::scrollRequest() API test
https://bugs.webkit.org/show_bug.cgi?id=73994
Reviewed by Kenneth Rohde Christiansen.
Added a viewport meta tag so that the view is actually scrollable and
does not get scaled to not be scrollable. Corrected the style
definition for the <div> tag. Removed unneeded text in div
Rolled back changes some of the changes from the previous patch
(r102453) because they weren't necessary.
* UIProcess/API/qt/tests/html/scroll.html:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::scrollRequest): Partially rolled back changes.
2011-12-21 Jessie Berlin <jberlin@apple.com>
Windows build fix.
Replace all instances of "WebPropupMenuProxy" with "WebPopupMenuProxy".
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::showPopupMenu):
(WebKit::WebPopupMenuProxyWin::setFocusedIndex):
2011-12-20 Anders Carlsson <andersca@apple.com>
Add ScrollableArea::contentsResized and have it call the scroll animator
https://bugs.webkit.org/show_bug.cgi?id=74966
Reviewed by Sam Weinig.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::scrollbarStyleChanged):
2011-12-20 Anders Carlsson <andersca@apple.com>
Try to fix the Windows build.
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::showPopupMenu):
(WebKit::WebPopupMenuProxyWin::setFocusedIndex):
2011-12-20 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][WK2] Remove statusBarMessageChanged
https://bugs.webkit.org/show_bug.cgi?id=74405
Reviewed by Tor Arne Vestbø.
Removing support for window.status updates from the public
QML API. See bug for details.
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/qt/QtWebPageUIClient.cpp:
(QtWebPageUIClient::QtWebPageUIClient):
* UIProcess/qt/QtWebPageUIClient.h:
2011-12-20 Anders Carlsson <andersca@apple.com>
Add ScrollableArea wrappers for a bunch of ScrollAnimator member functions
https://bugs.webkit.org/show_bug.cgi?id=74951
Reviewed by Sam Weinig.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::paint):
(WebKit::BuiltInPDFView::handleMouseEvent):
(WebKit::BuiltInPDFView::handleMouseEnterEvent):
(WebKit::BuiltInPDFView::handleMouseLeaveEvent):
2011-12-20 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed build fix.
* win/WebKit2CFLite.def: Add missing export declaration.
2011-12-20 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Build fix for gcc used on WK2 build bot.
* UIProcess/qt/QtWebPagePolicyClient.cpp:
(QtWebPagePolicyClient::decidePolicyForNavigationAction): Don't do case:
with values outside the range of the type. Instead switch() on the int instead.
2011-12-20 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt] Extend QQuickWebview::navigationRequested API
https://bugs.webkit.org/show_bug.cgi?id=73818
Reviewed by Simon Hausmann.
Added url of the originating frame on QWebNavigationRequest,
accessible via 'request.originatingUrl' on QML. Download action
was moved to experimental, so in order to use it you should set
'request.action = WebViewExperimental.DownloadRequest' on QML.
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebnavigationrequest.cpp:
(QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
(QWebNavigationRequest::QWebNavigationRequest):
(QWebNavigationRequest::originatingUrl):
* UIProcess/API/qt/qwebnavigationrequest_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
Tests were modified a bit to reuse urls and also added a test case to check
originating url once a request is done.
* UIProcess/qt/QtWebPagePolicyClient.cpp:
(QtWebPagePolicyClient::decidePolicyForNavigationAction):
* UIProcess/qt/QtWebPagePolicyClient.h:
2011-12-20 Balazs Kelemen <kbalazs@webkit.org>
[Qt] WK2 Debugging quirks need some improvement
https://bugs.webkit.org/show_bug.cgi?id=74859
Reviewed by Simon Hausmann.
Improvements added to make debugging WebKit2 more
confortable and efficient:
1. Unify debugging quirks. From now all of them are controlled
by the QT_WEBKIT2_DEBUG environment variable.
2. Disable crash handlers for WebKitTestRunner if debugging quirks
are used to make it possible to use postmortem debugging via core dumps
which is extremely useful for debugging bugs triggered by layout tests.
3. Disable test timeout for WebKitTestRunner if debugging quirks
are used because that makes debugging impossible.
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::QtWebProcess::setupChildProcess):
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):
2011-12-20 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2]REGRESSION(r103310): It broke tst_QQuickWebView::loadNonexistentFileUrl() API test
https://bugs.webkit.org/show_bug.cgi?id=74923
Rubber-stamped by Csaba Osztrogonác.
Fixing API usage after http://trac.webkit.org/changeset/103310.
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::loadNonexistentFileUrl):
2011-12-20 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Favicon support should work with multiple web contexts
https://bugs.webkit.org/show_bug.cgi?id=74922
Reviewed by Tor Arne Vestbø.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize): Remove unnecessary use of QtWebContext::defaultContext(). There is
already a member variable "context" which is the correct one.
(QQuickWebViewPrivate::setIcon): Ditto.
* UIProcess/API/qt/qwebiconimageprovider.cpp:
(QWebIconImageProvider::requestImage): Extract the context id from the image id and use it to
query the correct icon database.
* UIProcess/qt/QtWebContext.cpp: Provide a mapping from id to qtwebcontext.
(WebKit::generateContextID):
(WebKit::QtWebContext::QtWebContext):
(WebKit::QtWebContext::~QtWebContext):
(WebKit::QtWebContext::contextByID):
(WebKit::QtWebContext::initialize):
* UIProcess/qt/QtWebContext.h:
(WebKit::QtWebContext::context):
(WebKit::QtWebContext::contextID):
* UIProcess/qt/QtWebIconDatabaseClient.cpp:
(QtWebIconDatabaseClient::QtWebIconDatabaseClient):
(QtWebIconDatabaseClient::requestIconForPageURL): Store the context id in the icon url.
* UIProcess/qt/QtWebIconDatabaseClient.h:
2011-12-20 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt][WK2] Implement favicon support
https://bugs.webkit.org/show_bug.cgi?id=71082
Reviewed by Simon Hausmann.
Added attribute to QQuickWebView named "icon" that should be used
as source for QQuickImage in order to display it. All images
pointing to it will refresh when the icon is ready. We also use IDs
to make it possible to handle different icons for the same page URL
at different times (i.e. dynamically changing favicon).
IconDatabase storage lies on UIProcess and the synchronous call for
the icon that happens on WebIconDatabase won't need to send any message
to WebProcess. The part of IconDatabase on WebProcess handles the download
of the resource whenever it is needed. Then the content downloaded is sent
through IPC to the actual database, on UIProcess.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::_q_onIconChangedForPageURL):
(QQuickWebViewPrivate::setIcon):
(QQuickWebView::icon):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/qwebiconimageprovider.cpp: Added.
(QWebIconImageProvider::QWebIconImageProvider):
(QWebIconImageProvider::~QWebIconImageProvider):
(QWebIconImageProvider::requestImage):
* UIProcess/API/qt/qwebiconimageprovider_p.h: Added.
* UIProcess/WebContext.h:
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::synchronousIconURLForPageURL):
(WebKit::WebIconDatabase::imageForPageURL): Added iconSize parameter
and a default value for it to not break the old usage. The support for
multiple sizes of favicons is still missing on WebCore.
* UIProcess/WebIconDatabase.h:
* UIProcess/qt/QtWebContext.cpp:
(WebKit::QtWebContext::initialize):
* UIProcess/qt/QtWebContext.h:
(WebKit::QtWebContext::iconDatabase):
* UIProcess/qt/QtWebIconDatabaseClient.cpp: Added.
(toQtWebIconDatabaseClient):
(QtWebIconDatabaseClient::QtWebIconDatabaseClient):
(QtWebIconDatabaseClient::~QtWebIconDatabaseClient):
(QtWebIconDatabaseClient::didChangeIconForPageURL):
(QtWebIconDatabaseClient::iconImageForPageURL):
(QtWebIconDatabaseClient::iconURLHashForPageURL):
(QtWebIconDatabaseClient::requestIconForPageURL):
(QtWebIconDatabaseClient::retainIconForPageURL):
(QtWebIconDatabaseClient::releaseIconForPageURL):
* UIProcess/qt/QtWebIconDatabaseClient.h: Added.
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::didStartProgress):
2011-12-20 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt] Improve QQuickWebView error handling API
https://bugs.webkit.org/show_bug.cgi?id=73815
Reviewed by Simon Hausmann.
Modifying loadFail signal to include the error description
and changing the ErrorType enum to ErrorDomain, to stay aligned
with ResourceError API itself.
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::dispatchLoadFailed):
2011-12-19 Sam Weinig <sam@webkit.org>
Add support for scrollLineDown: and scrollLineUp: NSResponder selectors
https://bugs.webkit.org/show_bug.cgi?id=74907
Reviewed by Dan Bernstein.
* UIProcess/API/mac/WKView.mm:
Add implementations for scrollLineDown: and scrollLineUp: using our
fun macros.
2011-12-19 Sam Weinig <sam@webkit.org>
More PlatformEvent cleanup
https://bugs.webkit.org/show_bug.cgi?id=74831
Reviewed by Dan Bernstein.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleContextMenuEvent):
Update to use new names, access style.
2011-12-16 Jon Lee <jonlee@apple.com>
[WK2] Extend show notification API to include the source page
https://bugs.webkit.org/show_bug.cgi?id=74751
<rdar://problem/10514541>
Reviewed by John Sullivan.
We add the source page that dispatched the notification in the API for convenience. In order to include the page,
we move the show() message sent by WebNotificationManager from WebNotificationManagerProxy to WebPageProxy.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show): We aim the message at WebPageProxy instead of WebNotificationManagerProxy.
* UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove the show() message.
* UIProcess/WebPageProxy.messages.in: Add a showNotification() message.
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::show): This function is now called from the WebPageProxy.
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/API/C/WKNotificationProvider.h:
* UIProcess/Notifications/WebNotificationProvider.cpp:
(WebKit::WebNotificationProvider::show):
* UIProcess/Notifications/WebNotificationProvider.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showNotification):
* UIProcess/WebPageProxy.h:
2011-12-19 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] QWebDownloadItems are leaking
https://bugs.webkit.org/show_bug.cgi?id=74618
Reviewed by Kenneth Rohde Christiansen.
QWebDownloadItems are leaking when WebProcess raises a
download failure before sending didReceiveResponse back to UIProcess.
This can happen when QtFileDownloader fails in determineFilename(), for instance.
It happens when QtDownloadManager::downloadFailed() is reached
and has an "empty" downloadItem, which means we never got to
QtDownloadManager::downloadReceivedResponse(). At this point
QQuickWebView::downloadRequested() signal hasn't been emitted and
the downloadItem will have null parent. Therefore, it will leak
unless we delete it ourselves.
* UIProcess/qt/QtDownloadManager.cpp:
(WebKit::QtDownloadManager::downloadFailed):
2011-12-19 Anders Carlsson <andersca@apple.com>
Send gesture events through the event dispatcher and scrolling coordinator
https://bugs.webkit.org/show_bug.cgi?id=74879
Reviewed by Andreas Kling.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleGestureEvent):
Use the EventDispatcher message.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::gestureEvent):
Try to send the event to the scrolling coordinator first before dispatching it on the main thread.
(WebKit::EventDispatcher::dispatchGestureEvent):
Just call through to the WebPageProxy.
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/EventDispatcher.messages.in:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Move the GestureEvent message from WebPage to EventDispatcher.
2011-12-19 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt] Setting QWebPreferences affect multiple WebViews
https://bugs.webkit.org/show_bug.cgi?id=71559
Reviewed by Kenneth Rohde Christiansen.
The QWebPreferences are per WebView, but the actual implementation
in WebKit2 make them per page group. Currently we share only one
page group between all the views, so if we set preferences
to one WebView the preferences are shared between them all, generating
unexpected behavior. This patch fixes this by making each WebView have
its own page group.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
* UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
2011-12-19 Eric Carlson <eric.carlson@apple.com>
Enable <track> for Mac build
https://bugs.webkit.org/show_bug.cgi?id=74838
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
2011-12-19 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Fix build error due to unused variables
https://bugs.webkit.org/show_bug.cgi?id=74862
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::inputMethodEvent):
2011-12-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Add methods for setting, cancelling and confirming the composition
Reviewed by Simon Hausmann.
* UIProcess/WebPageProxy.h:
* UIProcess/qt/WebPageProxyQt.cpp:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::confirmComposition):
(WebKit::WebPageProxy::cancelComposition):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::targetFrameForEditing):
(WebKit::WebPage::confirmComposition):
(WebKit::WebPage::setComposition):
(WebKit::WebPage::cancelComposition):
2011-12-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
First stab at upstreaming our virtual keyboard code
Reviewed by Simon Hausmann.
Add basic implementation of inputMethodEvent
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleEvent):
(QtWebPageEventHandler::inputMethodEvent):
* UIProcess/qt/QtWebPageEventHandler.h:
2011-12-19 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][WK2] Add support for modal event loop processing for WTR
https://bugs.webkit.org/show_bug.cgi?id=74852
Reviewed by Kenneth Rohde Christiansen.
Add support for nested event loops, used by WebPage::runModal().
* Platform/qt/RunLoopQt.cpp:
(RunLoop::run):
(RunLoop::stop):
2011-12-18 Sam Weinig <sam@webkit.org>
Another attempt to fix the windows build.
* Platform/win/WorkQueueWin.cpp:
(WorkQueue::performWorkOnRegisteredWorkThread):
(WorkQueue::dispatch):
2011-12-18 Sam Weinig <sam@webkit.org>
Try to fix the windows build.
* Platform/win/WorkQueueWin.cpp:
(WorkQueue::performWorkOnRegisteredWorkThread):
2011-12-18 Sam Weinig <sam@webkit.org>
Remove now unused WorkItem.h
https://bugs.webkit.org/show_bug.cgi?id=74818
Reviewed by Andreas Kling.
* GNUmakefile.am:
* Platform/CoreIPC/Connection.cpp:
* Platform/RunLoop.cpp:
* Platform/RunLoop.h:
* Platform/WorkItem.h: Removed.
* Platform/gtk/RunLoopGtk.cpp:
* Platform/mac/RunLoopMac.mm:
* Platform/mac/WorkQueueMac.cpp:
(WorkQueue::platformInvalidate):
* Platform/qt/RunLoopQt.cpp:
* Platform/win/RunLoopWin.cpp:
* Target.pri:
* UIProcess/ResponsivenessTimer.cpp:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
* win/WebKit2.vcproj:
2011-12-18 Anders Carlsson <andersca@apple.com>
Set the main frame view scroll position asynchronously
https://bugs.webkit.org/show_bug.cgi?id=74823
Reviewed by Sam Weinig.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
Don't make the background red.
2011-12-18 Sam Weinig <sam@webkit.org>
Move timestamp down from PlatformEvent subclasses to the base class
https://bugs.webkit.org/show_bug.cgi?id=74805
Reviewed by Anders Carlsson.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
(WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
(WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
2011-12-18 Anders Carlsson <andersca@apple.com>
Add a scrolling thread to the scrolling coordinator
https://bugs.webkit.org/show_bug.cgi?id=74814
Reviewed by Andreas Kling.
Check if the scrolling coordinator can handle the wheel event before dispatching it
to the main thread.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
2011-12-18 Anders Carlsson <andersca@apple.com>
EventDispatcher should keep track of all scrolling coordinators
https://bugs.webkit.org/show_bug.cgi?id=74810
Reviewed by Andreas Kling.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::addScrollingCoordinatorForPage):
Get the scrolling coordinator from the WebCore page and add it to the map.
(WebKit::EventDispatcher::removeScrollingCoordinatorForPage):
Remove the scrolling coordinator from the map.
(WebKit::EventDispatcher::sendDidHandleEvent):
Add a new helper function, currently unused.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
Add the scrolling coordinator.
(WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
Remove the scrolling coordinator.
* WebProcess/WebProcess.h:
(WebKit::WebProcess::eventDispatcher):
Add a getter.
2011-12-16 Anders Carlsson <andersca@apple.com>
Move everyone off of WorkItem
https://bugs.webkit.org/show_bug.cgi?id=74773
Reviewed by Darin Adler.
* Platform/CoreIPC/unix/ConnectionUnix.cpp:
(CoreIPC::Connection::open):
(CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination):
* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::open):
* Platform/RunLoop.cpp:
(RunLoop::performWork):
(RunLoop::dispatch):
* Platform/RunLoop.h:
* Platform/WorkQueue.cpp:
* Platform/WorkQueue.h:
(WorkQueue::WorkItemWin::function):
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::EventSource::EventSource):
(WorkQueue::EventSource::executeEventSource):
(WorkQueue::registerEventSourceHandler):
(WorkQueue::dispatchOnSource):
(WorkQueue::dispatch):
(WorkQueue::dispatchAfterDelay):
(WorkQueue::dispatchOnTermination):
* Platform/mac/WorkQueueMac.cpp:
(WorkQueue::executeFunction):
(WorkQueue::dispatch):
(WorkQueue::dispatchAfterDelay):
* Platform/qt/WorkQueueQt.cpp:
(WorkQueue::WorkItemQt::WorkItemQt):
(WorkQueue::WorkItemQt::~WorkItemQt):
(WorkQueue::WorkItemQt::execute):
(WorkQueue::registerSocketEventHandler):
(WorkQueue::dispatch):
(WorkQueue::dispatchAfterDelay):
(WorkQueue::dispatchOnTermination):
* Platform/win/RunLoopWin.cpp:
(RunLoop::wakeUp):
* Platform/win/WorkQueueWin.cpp:
(WorkQueue::WorkItemWin::WorkItemWin):
(WorkQueue::WorkItemWin::create):
(WorkQueue::HandleWorkItem::HandleWorkItem):
(WorkQueue::HandleWorkItem::createByAdoptingHandle):
(WorkQueue::registerHandle):
(WorkQueue::dispatch):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/win/ProcessLauncherWin.cpp:
(WebKit::ProcessLauncher::launchProcess):
* WebProcess/mac/CoreIPCClientRunLoop.mm:
(WebKit::callOnCoreIPCClientRunLoopAndWait):
2011-12-17 Sam Weinig <sam@webkit.org>
Make PlatformTouchEvent inherit from PlatformEvent
https://bugs.webkit.org/show_bug.cgi?id=74777
Reviewed by Andreas Kling.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
Add PlatformEvent prefix to enum types.
2011-12-16 Anders Carlsson <andersca@apple.com>
Convert more WorkItems over to WTF::Functions
https://bugs.webkit.org/show_bug.cgi?id=74770
Reviewed by Andreas Kling.
* Platform/WorkQueue.cpp:
(WorkQueue::dispatchAfterDelay):
* Platform/WorkQueue.h:
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::didCloseOnConnectionWorkQueue):
* UIProcess/Launcher/ThreadLauncher.cpp:
(WebKit::ThreadLauncher::launchThread):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::pluginThreadAsyncCall):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::derefPluginView):
(WebKit::PluginView::unprotectPluginFromDestruction):
2011-12-16 Mark Hahnenberg <mhahnenberg@apple.com>
Windows test fix
Unreviewed test fix. All Windows tests were crashing when objects who were pointing to
static data members across DLL boundaries were getting garbage in their pointers.
* win/WebKit2.def:
2011-12-16 Ryosuke Niwa <rniwa@webkit.org>
Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
https://bugs.webkit.org/show_bug.cgi?id=74748
Reviewed by Eric Seidel.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::registerUndoStep):
(WebKit::WebEditorClient::registerRedoStep):
* WebProcess/WebCoreSupport/WebEditorClient.h:
2011-12-16 Anders Carlsson <andersca@apple.com>
Add a pretty dumb tile cache to WebTileCacheLayer
https://bugs.webkit.org/show_bug.cgi?id=74753
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
Always do a layout here, to prevent an ASSERT(!needsLayout()) when painting.
2011-12-16 Anders Carlsson <andersca@apple.com>
TiledCoreAnimationDrawingArea should enable the scrolling coordinator
https://bugs.webkit.org/show_bug.cgi?id=74724
Reviewed by Adam Roben.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2011-12-16 Sam Weinig <sam@webkit.org>
Give PlatformEvents a base class
https://bugs.webkit.org/show_bug.cgi?id=74685
Reviewed by Anders Carlsson.
Add a base class for PlatformMouseEvent, PlatformKeyboardEvent, PlatformWheelEvent
and PlatformGestureEvent and move Type enumeration and modifiers down to it.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
(WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::handleKeyboardEvent):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleMouseEvent):
(WebKit::WebPage::setInitialFocus):
(WebKit::WebPage::handleEditingKeyboardEvent):
(WebKit::WebPage::dragEnded):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::executeKeypressCommandsInternal):
(WebKit::WebPage::handleEditingKeyboardEvent):
2011-12-16 Ryosuke Niwa <rniwa@webkit.org>
Only EditCommandComposition should implement unapply and reapply
https://bugs.webkit.org/show_bug.cgi?id=74490
Reviewed by Eric Seidel.
Renamed WebEditCommand to WebUndoStep and made necessary changes.
Everything on WebProcess side should have the correct name now.
Names in the proxy and UIProcess are to be updated in a follow up.
* CMakeLists.txt:
* GNUmakefile.am:
* Target.pri:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::registerCommandForUndo):
(WebKit::WebEditorClient::registerCommandForRedo):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/WebEditCommand.cpp: Removed.
* WebProcess/WebPage/WebEditCommand.h: Removed.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::webUndoStep):
(WebKit::WebPage::addWebUndoStep):
(WebKit::WebPage::removeWebEditCommand):
(WebKit::WebPage::unapplyEditCommand):
(WebKit::WebPage::reapplyEditCommand):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebUndoStep.cpp: Copied from Source/WebKit2/WebProcess/WebPage/WebEditCommand.cpp.
(WebKit::generateUndoStep):
(WebKit::WebUndoStep::create):
* WebProcess/WebPage/WebUndoStep.h: Copied from Source/WebKit2/WebProcess/WebPage/WebEditCommand.h.
(WebKit::WebUndoStep::entry):
(WebKit::WebUndoStep::entryID):
(WebKit::WebUndoStep::WebUndoStep):
* win/WebKit2.vcproj:
2011-12-16 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Eliminate dependency to QUndoStack
https://bugs.webkit.org/show_bug.cgi?id=74691
Reviewed by Kenneth Rohde Christiansen.
Replaced the QUndoStack with two vectors. When calling unapply()
on the edit command proxy, it will automatically re-register itself
in the redo stack.
* UIProcess/qt/QtWebUndoController.cpp:
(QtWebUndoController::registerEditCommand):
(QtWebUndoController::clearAllEditCommands):
(QtWebUndoController::canUndoRedo):
(QtWebUndoController::executeUndoRedo):
* UIProcess/qt/QtWebUndoController.h:
2011-12-16 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt][WK2] Move webView.page into experimental
https://bugs.webkit.org/show_bug.cgi?id=74406
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewExperimental::page):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::accessPage):
2011-12-16 Mark Hahnenberg <mhahnenberg@apple.com>
De-virtualize destructors
https://bugs.webkit.org/show_bug.cgi?id=74331
Reviewed by Geoffrey Garen.
* WebProcess/Plugins/Netscape/JSNPMethod.cpp: Add trivial destructor assert.
* WebProcess/Plugins/Netscape/JSNPObject.cpp: Add static destroy.
(WebKit::JSNPObject::destroy):
* WebProcess/Plugins/Netscape/JSNPObject.h:
* win/WebKit2.def: Add/remove necessary symbols.
* win/WebKit2CFLite.def: Ditto.
2011-12-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use bit field for bool members of WebKitWindowPropertiesPrivate
https://bugs.webkit.org/show_bug.cgi?id=74713
Reviewed by Gustavo Noronha Silva.
Most of the members are bools, so it reduces the memory footprint.
* UIProcess/API/gtk/WebKitWindowProperties.cpp:
2011-12-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Window frame should be 0x0 when the toplevel window is not visible
https://bugs.webkit.org/show_bug.cgi?id=74709
Reviewed by Gustavo Noronha Silva.
* UIProcess/API/gtk/WebKitUIClient.cpp:
(getWindowFrame): Check also whether the toplevel is visible
before getting its size and position.
2011-12-16 Michael Bruning <michael.bruning@nokia.com>
[qt][wk2] Viewport info panel shows wrong current scale
https://bugs.webkit.org/show_bug.cgi?id=74613
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::currentScale): Added division by devicePixelRatio. Also
added emission of currenScaleUpdated signal when the viewport constraints
have been updated.
(QWebViewportInfo::didUpdateViewportConstraints):
* UIProcess/API/qt/qwebviewportinfo_p.h: Changed return type of
currentScale to QVariant as it depends on the viewport interaction engine
now.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): Changed
to use currentCSSScale for getting the current css scale.
(WebKit::QtViewportInteractionEngine::currentCSSScale): Added.
* UIProcess/qt/QtViewportInteractionEngine.h: Added method currentCSSScale.
2011-12-15 Martin Robinson <mrobinson@igalia.com>
Fix 'make dist' in preparation for the GTK+ release.
* GNUmakefile.am: Add missing header.
2011-12-15 Anders Carlsson <andersca@apple.com>
Add support for accelerated compositing to the tiled Core Animation drawing area
https://bugs.webkit.org/show_bug.cgi?id=74675
Reviewed by Andreas Kling.
Add a layer flush scheduler and get rid of the content layer since WebCore will manage that for us.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay):
(WebKit::TiledCoreAnimationDrawingArea::scroll):
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
(WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
2011-12-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r102652 and r102717.
http://trac.webkit.org/changeset/102652
http://trac.webkit.org/changeset/102717
https://bugs.webkit.org/show_bug.cgi?id=74674
Broke too many webs. (Requested by kling on #webkit).
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateWindowAndViewFrames]):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::windowAndViewFramesChanged):
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::windowRect):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowAndViewFramesChanged):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::windowFrameInScreenCoordinates):
(WebKit::WebPage::viewFrameInWindowCoordinates):
(WebKit::WebPage::accessibilityPosition):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
2011-12-15 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
[GTK] New API test for WindowProperties fails
https://bugs.webkit.org/show_bug.cgi?id=74630
Reviewed by Martin Robinson.
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(WindowProperties::viewReadyToShow): assert each member to make
assertion error messages more useful, and avoid asserting x and y,
since we are getting bad values from WebCore, for some reason.
(testWebViewWindowProperties): use smaller values that fit inside the
800x600 screen used by the bots.
2011-12-15 Anders Carlsson <andersca@apple.com>
EventDispatcher should handle wheel events on the connection queue
https://bugs.webkit.org/show_bug.cgi?id=74627
Reviewed by Andreas Kling.
Send wheel events to the EventDispatcher, which handles them on the connection work queue, and
immediately bounces them to the main thread (for now).
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::didReceiveEvent):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
(WebKit::EventDispatcher::dispatchWheelEvent):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/EventDispatcher.messages.in:
* WebProcess/WebPage/WebPage.h:
2011-12-15 Jon Lee <jonlee@apple.com>
[WK2] Extend WebNotification to include its origin
https://bugs.webkit.org/show_bug.cgi?id=74615
<rdar://problem/10587164>
Reviewed by Sam Weinig.
* Shared/API/c/WKSecurityOrigin.h: Expose API that converts the security origin to database
identifier.
* Shared/API/c/WKSecurityOrigin.cpp:
(WKSecurityOriginCopyDatabaseIdentifier):
* UIProcess/Notifications/WebNotification.h: Extend WebNotification to include the origin.
(WebKit::WebNotification::create):
(WebKit::WebNotification::origin):
* UIProcess/Notifications/WebNotification.cpp: Remove unneeded encode() and decode() functions.
(WebKit::WebNotification::WebNotification):
* UIProcess/API/C/WKNotification.h: Expose WebNotification's origin().
* UIProcess/API/C/WKNotification.cpp:
(WKNotificationGetSecurityOrigin):
* UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Update show() to include the
origin of the notification.
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::show):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show): Pass the notification's exec context's origin as
identifier.
2011-12-15 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt][WK2] Add test for download policy on navigation request
https://bugs.webkit.org/show_bug.cgi?id=74541
Reviewed by Tor Arne Vestbø.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml: Make it wait for a
downloadFinished signal to finish the test.
2011-12-15 Anders Carlsson <andersca@apple.com>
Move WorkQueue Mach handlers over to WTF::Function
https://bugs.webkit.org/show_bug.cgi?id=74620
Reviewed by Sam Weinig.
* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC::Connection::open):
(CoreIPC::Connection::initializeDeadNameSource):
* Platform/WorkQueue.h:
* Platform/mac/WorkQueueMac.cpp:
(WorkQueue::EventSource::EventSource):
(WorkQueue::EventSource::eventHandler):
(WorkQueue::registerMachPortEventHandler):
2011-12-14 Anders Carlsson <andersca@apple.com>
Add WTF::Function to wtf/Forward.h
https://bugs.webkit.org/show_bug.cgi?id=74576
Reviewed by Adam Roben.
* Platform/RunLoop.h:
* Platform/WorkQueue.h:
Remove forward declarations and just include wtf/Forward.h.
2011-12-15 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt][WK2] Move WebPreferences into experimental
https://bugs.webkit.org/show_bug.cgi?id=74404
Reviewed by Tor Arne Vestbø.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewExperimental::preferences):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
2011-12-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add WebKitWindowProperties to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=74595
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitUIClient.cpp:
(createNewPage): Pass the dictionary containing the window
features to webkitWebViewCreateNewPage().
(toolbarsAreVisible): Return
WebKitWindowProperties:toolbar-visible.
(setToolbarsAreVisible): Set
WebKitWindowProperties:toolbar-visible.
(menuBarIsVisible): Return WebKitWindowProperties:menu-visible.
(setMenuBarIsVisible): Set WebKitWindowProperties:menu-visible.
(statusBarIsVisible): Return
WebKitWindowProperties:status-visible.
(setStatusBarIsVisible): Set
WebKitWindowProperties:status-visible.
(isResizable): Return WebKitWindowProperties:resizable.
(setIsResizable): Set WebKitWindowProperties:resizable.
(getWindowFrame): Return WebKitWindowProperties:geometry.
(setWindowFrame): Set WebKitWindowProperties:geometry.
(webkitUIClientAttachUIClientToPage): Initialize the UI client for
the given page.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_init): Create a WebKitWindowProperties object for
the view.
(webkit_web_view_class_init):
(webkitWebViewCreateNewPage): Update the WebKitWindowProperties
object using the window features dictionary.
(webkit_web_view_get_window_properties): Return the
WebKitWindowProperties object of the view.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/WebKitWindowProperties.cpp: Added.
(webkitWindowPropertiesFinalize):
(webkitWindowPropertiesGetProperty):
(webkitWindowPropertiesSetProperty):
(webkit_window_properties_class_init):
(webkit_window_properties_init):
(webkitWindowPropertiesCreate): Create a new
WebKitWindowProperties object.
(webkitWindowPropertiesSetGeometry):
(webkitWindowPropertiesSetToolbarVisible):
(webkitWindowPropertiesSetMenubarVisible):
(webkitWindowPropertiesSetStatusbarVisible):
(webkitWindowPropertiesSetLocationbarVisible):
(webkitWindowPropertiesSetScrollbarsVisible):
(webkitWindowPropertiesSetResizable):
(webkitWindowPropertiesSetFullscreen):
(webkitWindowPropertiesUpdateFromWKWindowFeatures): Parse the
window features dictionary and update the WebKitWindowProperties
object accordingly.
(webkit_window_properties_get_geometry):
(webkit_window_properties_get_toolbar_visible):
(webkit_window_properties_get_statusbar_visible):
(webkit_window_properties_get_scrollbars_visible):
(webkit_window_properties_get_menubar_visible):
(webkit_window_properties_get_locationbar_visible):
(webkit_window_properties_get_resizable):
(webkit_window_properties_get_fullscreen):
* UIProcess/API/gtk/WebKitWindowProperties.h: Added.
* UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
WebKitWindowProperties.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_window_properties_get_type.
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(WindowProperties::windowPropertiesNotifyCallback):
(WindowProperties::viewReadyToShow):
(WindowProperties::viewCreate):
(WindowProperties::setExpectedWindowProperties):
(testWebViewWindowProperties):
(beforeAll):
* UIProcess/API/gtk/webkit2.h: Include WebKitWindowProperties.h.
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::createNewPage): Add also "locationBarVisible"
to the window features dictionary.
2011-12-15 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Remove QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=74540
Reviewed by Kenneth Rohde Christiansen.
Move WebPageProxy* to QQuickWebViewPrivate. The remaining functions in
QtWebPageProxy were simple wrappers to WebKit functionality (text zoom, page zoom
and user agent setting). Since those wrappers are unused, they were removed. The
signal in the class was also unused.
This patch also remove the code from WebContextMenuProxyQt, it was remains of a
previous QMenu-based implementation. We want to rewrite this code for QML anyway,
so I reverted to an empty state.
Farewell, QtWebPageProxy!
* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::~QQuickWebViewPrivate):
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::processDidCrash):
(QQuickWebViewPrivate::createDrawingAreaProxy):
(QQuickWebViewPrivate::updateVisibleContentRectAndScale):
(QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
(QQuickWebViewPrivate::_q_onVisibleChanged):
(QQuickWebViewPrivate::updateViewportSize):
(QQuickWebViewPrivate::computeViewportConstraints):
(QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
(QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
(QQuickWebViewExperimental::postMessage):
(QQuickWebView::load):
(QQuickWebView::goBack):
(QQuickWebView::goForward):
(QQuickWebView::stop):
(QQuickWebView::reload):
(QQuickWebView::url):
(QQuickWebView::canGoBack):
(QQuickWebView::canGoForward):
(QQuickWebView::loading):
(QQuickWebView::canReload):
(QQuickWebView::title):
(QQuickWebView::pageRef):
(QQuickWebView::loadHtml):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/qwebnavigationhistory_p_p.h:
* UIProcess/API/qt/qwebpreferences.cpp:
(QWebPreferencesPrivate::preferencesRef):
* UIProcess/PageClient.h:
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::QtPageClient):
(QtPageClient::initialize):
(QtPageClient::createPopupMenuProxy):
(QtPageClient::createContextMenuProxy):
* UIProcess/qt/QtPageClient.h:
* UIProcess/qt/QtWebPageProxy.cpp: Removed.
* UIProcess/qt/QtWebPageProxy.h: Removed.
* UIProcess/qt/WebContextMenuProxyQt.cpp:
(WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
(WebKit::WebContextMenuProxyQt::create):
(WebKit::WebContextMenuProxyQt::showContextMenu):
(WebKit::WebContextMenuProxyQt::hideContextMenu):
* UIProcess/qt/WebContextMenuProxyQt.h:
2011-12-15 Simon Hausmann <simon.hausmann@nokia.com>
[WK2] Eliminate unnecessary GTK/QT ifdefs for shared memory implementation
https://bugs.webkit.org/show_bug.cgi?id=74602
Reviewed by Kenneth Rohde Christiansen.
For shared memory Qt was using shm_open, Gtk was using files in /tmp. There
is no reason to obfuscate the code with #ifdefs or let Gtk use an inferior
method of opening shared memory. So this patch makes SharedMemoryUnix.cpp
truly Qt and Gtk independent.
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::create):
2011-12-15 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Cleanup: Remove unnecessary const_cast
Reviewed by Kenneth Christiansen.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::preferences):
2011-12-15 Michael Brüning <michael.bruning@nokia.com>
[QT][WK2]Add (experimental) viewport info view to Minibrowser/qt.
https://bugs.webkit.org/show_bug.cgi?id=72893
Reviewed by Kenneth Rohde Christiansen.
This patch extends QQuickWebViewExperimental by a property named
viewportInfo, which contains the viewport scalability and
layout and contents size information. This property is exposed to
QML through the experimental extension for QQuickWebView.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::didChangeContentsSize):
(QQuickWebViewPrivate::computeViewportConstraints):
(QQuickWebViewPrivate::PostTransitionState::apply): Added applying
contentsSize to viewportInfo.
(QQuickWebViewExperimental::QQuickWebViewExperimental):
(QQuickWebViewExperimental::viewportInfo):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h: Moved PostTransitionState::apply
to qquickwebview.cpp. Added friend QWebViewportInfo.
* UIProcess/API/qt/qwebviewportinfo.cpp: Added.
(QWebViewportInfo::QWebViewportInfo):
(QWebViewportInfo::~QWebViewportInfo):
(QWebViewportInfo::contentsSize):
(QWebViewportInfo::currentScale):
(QWebViewportInfo::devicePixelRatio):
(QWebViewportInfo::initialScale):
(QWebViewportInfo::minimumScale):
(QWebViewportInfo::maximumScale):
(QWebViewportInfo::isScalable):
(QWebViewportInfo::layoutSize):
(QWebViewportInfo::didUpdateContentsSize):
(QWebViewportInfo::didUpdateCurrentScale):
(QWebViewportInfo::didUpdateViewportConstraints):
* UIProcess/API/qt/qwebviewportinfo_p.h: Added.
* UIProcess/qt/QtViewportInteractionEngine.h:
(WebKit::QtViewportInteractionEngine::Constraints::Constraints): Added layoutSize.
(WebKit::QtViewportInteractionEngine::constraints): Added property to access m_contraints.
2011-12-15 Simon Hausmann <simon.hausmann@nokia.com>
[WK2] WebPage::m_useFixedLayout variable unininitialized
https://bugs.webkit.org/show_bug.cgi?id=74596
Reviewed by Kenneth Rohde Christiansen.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Avoid uninitialized use through
initialization in the constructor.
2011-12-15 Alexander Færøy <ahf@0x90.dk>
[Qt] r102849 broke the Qt build on Mac OS X.
https://bugs.webkit.org/show_bug.cgi?id=74594
Reviewed by Simon Hausmann.
The __APPLE__ macro is defined on all standard OS X compilers, which
leads to various CoreGraphics headers to be included in the Qt build.
* config.h:
2011-12-14 Jing Zhao <jingzhao@chromium.org>
Opening two popup menus by dispatchEvent() makes problems.
https://bugs.webkit.org/show_bug.cgi?id=73304
Reviewed by Kent Tamura.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::hasOpenedPopup): Not implemented.
* WebProcess/WebCoreSupport/WebChromeClient.h: Overrides hasOpenedPopup().
2011-12-14 Sam Weinig <weinig@apple.com>
Remove whitespace from InheritedPropertySheets attributes in
vsprops files to appease the Visual Studio project migrator.
Reviewed by Adam Roben.
* win/WebKit2Debug.vsprops:
* win/WebKit2DebugAll.vsprops:
* win/WebKit2DebugCairoCFLite.vsprops:
* win/WebKit2Production.vsprops:
* win/WebKit2Release.vsprops:
* win/WebKit2ReleaseCairoCFLite.vsprops:
* win/WebKit2WebProcessDebug.vsprops:
* win/WebKit2WebProcessDebugAll.vsprops:
* win/WebKit2WebProcessDebugCairoCFLite.vsprops:
* win/WebKit2WebProcessProduction.vsprops:
* win/WebKit2WebProcessRelease.vsprops:
* win/WebKit2WebProcessReleaseCairoCFLite.vsprops:
2011-12-14 Anders Carlsson <andersca@apple.com>
Add WorkQueue::dispatch and RunLoop::dispatch which both take WTF::Function objects
https://bugs.webkit.org/show_bug.cgi?id=74574
Reviewed by Sam Weinig.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::SyncMessageState::processIncomingMessage):
(CoreIPC::Connection::addQueueClient):
(CoreIPC::Connection::removeQueueClient):
(CoreIPC::Connection::invalidate):
(CoreIPC::Connection::sendMessage):
(CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
(CoreIPC::Connection::connectionDidClose):
(CoreIPC::Connection::enqueueIncomingMessage):
Switch over to dispatch.
* Platform/RunLoop.cpp:
(RunLoop::dispatch):
Create a FunctionWorkItem and call scheduleWork.
* Platform/RunLoop.h:
Add dispatch.
* Platform/WorkItem.h:
(FunctionWorkItem::FunctionWorkItem):
(FunctionWorkItem::execute):
(WorkItem::create):
Add a helper work item that wraps a WTF::Function.
* Platform/WorkQueue.cpp:
(WorkQueue::dispatch):
Create a FunctionWorkItem and call scheduleWork.
* Platform/WorkQueue.h:
Add dispatch.
* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::ProcessLauncher::ProcessLauncher):
Switch over to dispatch.
2011-12-14 Hajime Morrita <morrita@chromium.org>
JS_INLINE and WTF_INLINE should be visible from WebCore
https://bugs.webkit.org/show_bug.cgi?id=73191
Reviewed by Kevin Ollivier.
Removed macro definitions which is now provided by Platform.h
* config.h:
2011-12-14 Alexey Proskuryakov <ap@apple.com>
[Mac] Sandbox violation opening AppleSNBFBUserClient
https://bugs.webkit.org/show_bug.cgi?id=74560
<rdar://problem/10410896>
Reviewed by Darin Adler.
* WebProcess/com.apple.WebProcess.sb: Just allow it.
2011-12-13 Jon Lee <jonlee@apple.com>
Enable notifications on Mac.
Reviewed by Sam Weinig.
* Configurations/FeatureDefines.xcconfig:
2011-12-14 Mark Rowe <mrowe@apple.com>
<rdar://problem/10573872> NPN_GetValueForURL returns wrong value for NPNURLVProxy
Reviewed by Anders Carlsson.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::proxiesForURL): Fix a copy-paste error.
2011-12-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Move QWebPreferences out of QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=74525
Reviewed by Luiz Agostini.
This patch also uses internal WebKit API to set the Accelerate Compositing
directly instead of going thru QWebPreferencesPrivate. The previous approach was
always causing the QWebPreferences to be created making the "lazy initialization"
useless.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::navigatorQtObjectEnabled):
(QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
(QQuickWebViewExperimental::postMessage):
(QQuickWebView::preferences):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/qwebpreferences.cpp:
(QWebPreferencesPrivate::createPreferences):
(QWebPreferencesPrivate::testAttribute):
(QWebPreferencesPrivate::setAttribute):
(QWebPreferences::navigatorQtObjectEnabled):
(QWebPreferences::setNavigatorQtObjectEnabled):
(QWebPreferencesPrivate::preferencesRef):
* UIProcess/API/qt/qwebpreferences_p_p.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
* UIProcess/qt/QtWebPageProxy.h:
2011-12-14 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Page size should be 0,0 when view widget is not realized
https://bugs.webkit.org/show_bug.cgi?id=74523
Reviewed by Martin Robinson.
We currently return 1,1 because GTK+ initializes widget allocation
as -1,-1,1,1.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::viewSize): Check whether widget is
realized and return IntSize() in that case.
2011-12-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Move download handling out of QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=74506
Reviewed by Kenneth Rohde Christiansen.
Also moves the creation of QtWebContext out of QtWebPageProxy.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::handleDownloadRequest):
(QQuickWebViewPrivate::_q_onReceivedResponseFromDownload):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/qwebdownloaditem_p.h:
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::handleDownloadRequest):
* UIProcess/qt/QtPageClient.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
* UIProcess/qt/QtWebPageProxy.h:
2011-12-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Move QWebNavigationHistory to QQuickWebView
https://bugs.webkit.org/show_bug.cgi?id=74442
Reviewed by Simon Hausmann.
QWebNavigationHistory used QtWebPageProxy to be QObject parent of the inner models,
this patch change that to use OwnPtr instead. When creating the history object we pass
only the WKPageRef and let it get the backForwardList.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::didChangeBackForwardList):
(QQuickWebViewExperimental::navigationHistory):
(QQuickWebViewExperimental::goForwardTo):
(QQuickWebViewExperimental::goBackTo):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/qwebnavigationhistory.cpp:
(QWebNavigationListModelPrivate::createWebNavigationModel):
(QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate):
(QWebNavigationHistoryPrivate::createHistory):
(QWebNavigationHistoryPrivate::goBackTo):
(QWebNavigationHistoryPrivate::goForwardTo):
(QWebNavigationListModel::QWebNavigationListModel):
(QWebNavigationHistory::backItems):
(QWebNavigationHistory::forwardItems):
* UIProcess/API/qt/qwebnavigationhistory_p.h:
* UIProcess/API/qt/qwebnavigationhistory_p_p.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
* UIProcess/qt/QtWebPageProxy.h:
2011-12-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt][WK2] Remove DrawingArea and QtWebPageEventHandler code from QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=74414
Reviewed by Simon Hausmann.
This also moves QtWebPageEventHandler to inside QQuickWebPagePrivate, to avoid
the WebPage having a backpointer to the QQuickWebView.
* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::geometryChanged):
(QQuickWebPage::event):
(QQuickWebPagePrivate::QQuickWebPagePrivate):
(QQuickWebPagePrivate::initialize):
(QQuickWebPagePrivate::setDrawingAreaSize):
(QQuickWebPagePrivate::paintToCurrentGLContext):
(QQuickWebPagePrivate::resetPaintNode):
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebpage_p_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::initializeDesktop):
(QQuickWebViewPrivate::initializeTouch):
(QQuickWebViewPrivate::_q_resume):
(QQuickWebViewPrivate::processDidCrash):
(QQuickWebViewPrivate::didRelaunchProcess):
(QQuickWebViewPrivate::createDrawingAreaProxy):
(QQuickWebViewPrivate::updateVisibleContentRectAndScale):
(QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
(QQuickWebViewPrivate::updateViewportSize):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::createDrawingAreaProxy):
* UIProcess/qt/QtPageClient.h:
(QtPageClient::findStringInCustomRepresentation):
(QtPageClient::countStringMatchesInCustomRepresentation):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::QtWebPageEventHandler):
(QtWebPageEventHandler::startDrag):
* UIProcess/qt/QtWebPageEventHandler.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::init):
* UIProcess/qt/QtWebPageProxy.h:
2011-12-13 Gustavo Noronha Silva <gns@gnome.org>
Unreviewed build fix.
* GNUmakefile.am: make sure we do not derreference the target link
if it already exists, and replace it with the new one instead,
otherwise we end up with a gtk link inside
Source/WebKit2/UIProcess/API/gtk, which causes the documentation
build to produce warnings, and make the build fail.
2011-12-13 Andreas Kling <kling@webkit.org>
REGRESSION (r102652): New window opens with zero size at produbanco.com
<http://webkit.org/b/74418> and <rdar://problem/10565998>
Reviewed by Anders Carlsson.
Don't use the cached window frame if it's empty (meaning we haven't received
a WindowAndViewFramesChanged message yet.) Instead use the synchronous
GetWindowFrame (WP->UIP) message.
This situation occurs when opening a new window via window.open(), in which
WebCore::createWindow() will query the windowRect() on the new window.
I spent a long time trying to write a layout test for this but couldn't come
up with something reliable. The windowRect() is non-empty before we get a
chance to run JS in/on the new window, and we can't check against the
requested geometry since it varies depending on whether the window manager
has shown the new window yet.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::windowRect):
2011-12-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt][WK2] Make QtPageClient dispatch directly to WebView when possible
https://bugs.webkit.org/show_bug.cgi?id=74407
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::~QQuickWebViewPrivate):
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::pageDidRequestScroll):
(QQuickWebViewPrivate::processDidCrash):
(QQuickWebViewPrivate::didRelaunchProcess):
(QQuickWebViewPrivate::viewSize):
(QQuickWebViewPrivate::didReceiveMessageFromNavigatorQtObject):
(QQuickWebViewExperimental::QQuickWebViewExperimental):
(QQuickWebView::QQuickWebView):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::QtPageClient):
(QtPageClient::setViewNeedsDisplay):
(QtPageClient::pageDidRequestScroll):
(QtPageClient::processDidCrash):
(QtPageClient::didRelaunchProcess):
(QtPageClient::didChangeContentsSize):
(QtPageClient::didChangeViewportProperties):
(QtPageClient::createPopupMenuProxy):
(QtPageClient::didReceiveMessageFromNavigatorQtObject):
(QtPageClient::viewSize):
(QtPageClient::isViewFocused):
(QtPageClient::isViewVisible):
* UIProcess/qt/QtPageClient.h:
(QtPageClient::initialize):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
* UIProcess/qt/QtWebPageProxy.h:
2011-12-13 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add support for javascript dialogs in WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=71362
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitUIClient.cpp:
(runJavaScriptAlert): Call webkitWebViewRunJavaScriptAlert().
(runJavaScriptConfirm): Call webkitWebViewRunJavaScriptConfirm().
(runJavaScriptPrompt): Call webkitWebViewRunJavaScriptPrompt().
(webkitUIClientAttachUIClientToPage): Add implementation for
runJavaScriptAlert, runJavaScriptConfirm and runJavaScriptPrompt
callbacks.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewCreateJavaScriptDialog): Helper function to create
javascript dialogs.
(webkitWebViewScriptAlert): Default implementation of signal
WebKitWebView::script-alert that shows a message dialog.
(webkitWebViewScriptConfirm): Default implementation of signal
WebKitWebView::script-confirm that shows a question dialog.
(webkitWebViewScriptPrompt): Default implementation of signal
WebKitWebView::script-prompt that shows a question dialog with a
text entry.
(webkit_web_view_class_init):
(webkitWebViewRunJavaScriptAlert): Emit WebKitWebView::script-alert.
(webkitWebViewRunJavaScriptConfirm): Emit WebKitWebView::script-confirm.
(webkitWebViewRunJavaScriptPrompt): Emit WebKitWebView::script-prompt.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewJavaScriptDialogs):
(beforeAll):
* UIProcess/API/gtk/webkit2marshal.list:
2011-12-13 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Make sure that touch events result in the page view gaining focus
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::touchEvent): Force active focus.
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/qquickwebview_p.h: Remove ::touchEvent override.
2011-12-13 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Initial UI client implementation for WebKit2 GTK +API
https://bugs.webkit.org/show_bug.cgi?id=69753
Reviewed by Martin Robinson.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitUIClient.cpp: Added.
(createNewPage): Call webkitWebViewCreateNewPage.
(showPage): Call webkitWebViewReadyToShowPage.
(closePage): Call webkitWebViewClosePage.
(webkitUIClientAttachUIClientToPage): Initialize UI client and
attach it to the given page.
(webkit_ui_client_init):
(webkit_ui_client_class_init):
* UIProcess/API/gtk/WebKitUIClient.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewCreate): Default implementation of signal
WebKitWebView::create that simply returns NULL.
(webkitWebViewConstructed): Create the default UI client.
(webkitWebViewAccumulatorObjectHandled):
(webkit_web_view_class_init):
(webkitWebViewCreateNewPage): Emit create signal.
(webkitWebViewReadyToShowPage): Emit ready-to-show signal.
(webkitWebViewClosePage): Emit close signal.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewCreateReadyClose):
(beforeAll):
* UIProcess/API/gtk/webkit2marshal.list:
2011-12-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt][WK2] Move load & navigation related functions out of QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=74395
Reviewed by Simon Hausmann.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::_q_onVisibleChanged):
(QQuickWebViewPrivate::updateViewportSize):
(QQuickWebViewPrivate::computeViewportConstraints):
(QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
(QQuickWebViewPrivate::webPageProxy):
(QQuickWebView::load):
(QQuickWebView::goBack):
(QQuickWebView::goForward):
(QQuickWebView::stop):
(QQuickWebView::reload):
(QQuickWebView::url):
(QQuickWebView::canGoBack):
(QQuickWebView::canGoForward):
(QQuickWebView::loading):
(QQuickWebView::canReload):
(QQuickWebView::title):
(QQuickWebView::loadHtml):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::didReceiveMessageFromNavigatorQtObject):
* UIProcess/qt/QtWebPageProxy.h:
2011-12-13 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r102640.
* GNUmakefile.am: Add DownloadProxy sources again.
2011-12-12 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt][WK2] Move undo & edit command PageClient callbacks into QtWebUndoController
https://bugs.webkit.org/show_bug.cgi?id=74364
Reviewed by Simon Hausmann.
The four callbacks in PageClient related to Undo depend only on the QUndoStack. So we
move their handling to a QtWebUndoController (owned by QQuickWebViewPrivate). This also
make QtWebUndoCommand an implementation detail.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::registerEditCommand):
(QtPageClient::clearAllEditCommands):
(QtPageClient::canUndoRedo):
(QtPageClient::executeUndoRedo):
* UIProcess/qt/QtPageClient.h:
(QtPageClient::initialize):
* UIProcess/qt/QtWebPageProxy.cpp:
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/qt/QtWebUndoController.cpp: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoCommand.cpp.
(QtWebUndoCommand::inUndoRedo):
(QtWebUndoCommand::QtWebUndoCommand):
(QtWebUndoCommand::~QtWebUndoCommand):
(QtWebUndoCommand::redo):
(QtWebUndoCommand::undo):
(QtWebUndoController::QtWebUndoController):
(QtWebUndoController::registerEditCommand):
(QtWebUndoController::clearAllEditCommands):
(QtWebUndoController::canUndoRedo):
(QtWebUndoController::executeUndoRedo):
* UIProcess/qt/QtWebUndoController.h: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoCommand.h.
2011-12-12 Andreas Kling <kling@webkit.org>
Resizing Cappuccino is very laggy on WebKit since Safari 5.1
<http://webkit.org/b/71354> and <rdar://problem/10565998>
Reviewed by Anders Carlsson.
On Mac, we already cache the window rect through the WindowAndViewFramesChanged
message, so simply return that in WebChromeClient::windowRect() instead of
sending a synchronous query to the UIProcess.
Changed WindowAndViewFramesChanged to pass FloatRect/FloatPoint rather than
IntRect/IntPoint to match the ChromeClient::windowRect() return type.
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateWindowAndViewFrames]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setWindowFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::windowAndViewFramesChanged):
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::windowRect):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowAndViewFramesChanged):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::windowFrameInScreenCoordinates):
(WebKit::WebPage::viewFrameInWindowCoordinates):
(WebKit::WebPage::accessibilityPosition):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
2011-12-12 Anders Carlsson <andersca@apple.com>
Add EventDispatcher class to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=74344
Reviewed by Sam Weinig.
The EventDispatcher is a singleton which will be in charge of dispatching events to WebPage objects.
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* Target.pri:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add new files.
* Platform/CoreIPC/MessageID.h:
Add EventDispatcher.
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
(WebKit::WebConnectionToUIProcess::invalidate):
* WebProcess/WebConnectionToUIProcess.h:
WebConnectionToUIProcess doesn't need to be a QueueClient. Also, move the call to open into WebProcess since
we don't want to add queue clients after the connection has been opened.
* WebProcess/WebPage/EventDispatcher.cpp: Added.
(WebKit::EventDispatcher::EventDispatcher):
(WebKit::EventDispatcher::~EventDispatcher):
(WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue):
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/EventDispatcher.messages.in: Added.
Add new stub files.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initialize):
Add the event dispatcher as a queue client.
* WebProcess/WebProcess.h:
Add an EventDispatcher member variable to the web process.
2011-12-12 Sam Weinig <sam@webkit.org>
Prefix internal methods in Objective-C API files with an underscore
https://bugs.webkit.org/show_bug.cgi?id=74363
Reviewed by Dan Bernstein.
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _pageRef]):
(-[WKBrowsingContextController loadRequest:]):
(-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
(-[WKBrowsingContextController stopLoading]):
(-[WKBrowsingContextController reload]):
(-[WKBrowsingContextController reloadFromOrigin]):
(-[WKBrowsingContextController goForward]):
(-[WKBrowsingContextController canGoForward]):
(-[WKBrowsingContextController goBack]):
(-[WKBrowsingContextController canGoBack]):
(-[WKBrowsingContextController activeURL]):
(-[WKBrowsingContextController provisionalURL]):
(-[WKBrowsingContextController committedURL]):
(-[WKBrowsingContextController title]):
(-[WKBrowsingContextController textZoom]):
(-[WKBrowsingContextController setTextZoom:]):
(-[WKBrowsingContextController pageZoom]):
(-[WKBrowsingContextController setPageZoom:]):
(-[WKBrowsingContextController setPaginationMode:]):
(-[WKBrowsingContextController paginationMode]):
(-[WKBrowsingContextController setPageLength:]):
(-[WKBrowsingContextController pageLength]):
(-[WKBrowsingContextController setGapBetweenPages:]):
(-[WKBrowsingContextController gapBetweenPages]):
(-[WKBrowsingContextController pageCount]):
(-[WKBrowsingContextController _initWithPageRef:]):
* UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
* UIProcess/API/mac/WKBrowsingContextGroup.mm:
(-[WKBrowsingContextGroup allowsJavaScript]):
(-[WKBrowsingContextGroup setAllowsJavaScript:]):
(-[WKBrowsingContextGroup allowsPlugIns]):
(-[WKBrowsingContextGroup setAllowsPlugIns:]):
(-[WKBrowsingContextGroup _pageGroupRef]):
* UIProcess/API/mac/WKBrowsingContextGroupInternal.h:
* UIProcess/API/mac/WKConnection.mm:
(-[WKConnection _initWithConnectionRef:]):
* UIProcess/API/mac/WKConnectionInternal.h:
* UIProcess/API/mac/WKProcessGroup.mm:
(didCreateConnection):
(-[WKProcessGroup _contextRef]):
* UIProcess/API/mac/WKProcessGroupInternal.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processGroup:browsingContextGroup:]):
(-[WKView browsingContextController]):
2011-12-12 Ryosuke Niwa <rniwa@webkit.org>
WebKit code shouldn't be calling applyCommand directly
https://bugs.webkit.org/show_bug.cgi?id=74337
Reviewed by Darin Adler.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::replaceSelectionWithText):
2011-12-12 Sam Weinig <sam@webkit.org>
Remove unused getter on WKConnection.
Reviewed by Dan Bernstein.
* UIProcess/API/mac/WKConnection.mm:
2011-12-12 Brady Eidson <beidson@apple.com>
Page cache should support pages with plugins.
<rdar://problem/5190122> and https://bugs.webkit.org/show_bug.cgi?id=13634
Expose a WebKit2 preference for the page cache supporting plugins (on by default).
Reviewed by Anders Carlsson.
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPageCacheSupportsPlugins):
(WKPreferencesGetPageCacheSupportsPlugins):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2011-12-12 Sam Weinig <sam@webkit.org>
Add WKConnection objective-c wrapper around WKConnectionRef
<rdar://problem/10446092>
https://bugs.webkit.org/show_bug.cgi?id=74324
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKConnection.h: Added.
* UIProcess/API/mac/WKConnection.mm: Added.
(-[WKConnection dealloc]):
(-[WKConnection connectionRef]):
(-[WKConnection delegate]):
(-[WKConnection setDelegate:]):
(didReceiveMessage):
(didClose):
(setUpClient):
(-[WKConnection initWithConnectionRef:]):
* UIProcess/API/mac/WKConnectionInternal.h: Added.
Added new class.
* UIProcess/API/mac/WKProcessGroup.h:
* UIProcess/API/mac/WKProcessGroup.mm:
(didCreateConnection):
(setUpConnectionClient):
(-[WKProcessGroup initWithInjectedBundleURL:]):
(-[WKProcessGroup delegate]):
(-[WKProcessGroup setDelegate:]):
Add WKProcessGroupDelegate to inform the user of when connections are established.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2011-12-12 Anders Carlsson <andersca@apple.com>
Rename QueueClient::willProcessMessageOnClientRunLoop
https://bugs.webkit.org/show_bug.cgi?id=74325
Reviewed by Sam Weinig.
Rename the QueueClient willProcessMessageOnClientRunLoop function to didReceiveMessageOnConnectionWorkQueue
and give it an out parameter to indicate whether the message was handled or not. This makes it more clear that
the function is expected to handle the message.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::processIncomingMessage):
* Platform/CoreIPC/Connection.h:
* Scripts/webkit2/messages.py:
(async_case_statement):
* Scripts/webkit2/messages_unittest.py:
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::didReceiveMessageOnConnectionWorkQueue):
* WebProcess/WebConnectionToUIProcess.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue):
* WebProcess/WebProcess.h:
2011-12-12 Alexis Menard <alexis.menard@openbossa.org>
Unreviewed cleanup fix.
Add missing files from https://bugs.webkit.org/show_bug.cgi?id=73016
Also remove the files that should be removed.
* UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: Added.
* UIProcess/qt/qwkhistory.cpp: Removed.
* UIProcess/qt/qwkhistory.h: Removed.
* UIProcess/qt/qwkhistory_p.h: Removed.
2011-12-12 Michael Bruning <michael.bruning@nokia.com>
[qt][wk2] Postpone scroll effects when page transition is ongoing.
https://bugs.webkit.org/show_bug.cgi?id=74177
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::scrollPositionRequested):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::PostTransitionState::apply):
2011-12-12 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt][WK2] Remove dead code from QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=74296
Reviewed by Andreas Kling.
* UIProcess/qt/QtWebPageProxy.cpp:
* UIProcess/qt/QtWebPageProxy.h:
2011-12-12 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed build fix.
Add missing files from https://bugs.webkit.org/show_bug.cgi?id=73016
* UIProcess/API/qt/qwebnavigationhistory.cpp: Added.
(QWebNavigationListModelPrivate::QWebNavigationListModelPrivate):
(QWebNavigationListModelPrivate::createWebNavigationModel):
(QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate):
(QWebNavigationHistoryPrivate::createHistory):
(QWebNavigationHistoryPrivate::reset):
(QWebNavigationHistoryPrivate::goBackTo):
(QWebNavigationHistoryPrivate::goForwardTo):
(QWebNavigationListModel::QWebNavigationListModel):
(QWebNavigationListModel::~QWebNavigationListModel):
(QWebNavigationListModel::rowCount):
(QWebNavigationListModel::data):
(QWebNavigationHistory::QWebNavigationHistory):
(QWebNavigationHistory::~QWebNavigationHistory):
(QWebNavigationHistory::backItems):
(QWebNavigationHistory::forwardItems):
* UIProcess/API/qt/qwebnavigationhistory_p.h: Added.
* UIProcess/API/qt/qwebnavigationhistory_p_p.h: Added.
2011-12-12 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Move postMessage/messageReceived APIS to experimental
Reviewed by Tor Arne Vestbø.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::setPageProxy):
(QQuickWebViewExperimental::QQuickWebViewExperimental):
(QQuickWebViewExperimental::postMessage):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
2011-12-12 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] History is not accessible in QML.
https://bugs.webkit.org/show_bug.cgi?id=73016
Reviewed by Simon Hausmann.
Remove the old qwkhistory and create QWebNavigationHistory which is QML
friendly with data models you can plug to a view in QML
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::didChangeBackForwardList):
(QQuickWebViewExperimental::navigationHistory):
(QQuickWebViewExperimental::goForwardTo):
(QQuickWebViewExperimental::goBackTo):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/qwebnavigationhistory.cpp: Added.
(QWebNavigationListModelPrivate::QWebNavigationListModelPrivate):
(QWebNavigationListModelPrivate::createWebNavigationModel):
(QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate):
(QWebNavigationHistoryPrivate::createHistory):
(QWebNavigationHistoryPrivate::reset):
(QWebNavigationHistoryPrivate::goBackTo):
(QWebNavigationHistoryPrivate::goForwardTo):
(QWebNavigationListModel::QWebNavigationListModel):
(QWebNavigationListModel::~QWebNavigationListModel):
(QWebNavigationListModel::rowCount):
(QWebNavigationListModel::data):
(QWebNavigationHistory::QWebNavigationHistory):
(QWebNavigationHistory::~QWebNavigationHistory):
(QWebNavigationHistory::backItems):
(QWebNavigationHistory::forwardItems):
* UIProcess/API/qt/qwebnavigationhistory_p.h: Added.
* UIProcess/API/qt/qwebnavigationhistory_p_p.h: Renamed from Source/WebKit2/UIProcess/qt/qwkhistory_p.h.
* UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: Added.
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::QtWebPageLoadClient):
(QtWebPageLoadClient::didChangeBackForwardList):
* UIProcess/qt/QtWebPageLoadClient.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::~QtWebPageProxy):
(QtWebPageProxy::goBackTo):
(QtWebPageProxy::goForwardTo):
(QtWebPageProxy::navigationHistory):
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/qt/qwkhistory.cpp: Removed.
* UIProcess/qt/qwkhistory.h: Removed.
2011-12-09 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Move startDrag implementation to QtWebPageEventHandler
https://bugs.webkit.org/show_bug.cgi?id=73145
Reviewed by Simon Hausmann.
Move QtWebPageProxy::startDrag to QtWebPageEventHandler::startDrag
and call it straight from QtPageClient.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(dragOperationToDropAction):
(dragOperationToDropActions):
(dropActionToDragOperation):
Now these functions are static inline and not part of QtWebPageEventHandler
anymore.
(QtWebPageEventHandler::QtWebPageEventHandler):
(QtWebPageEventHandler::startDrag):
* UIProcess/qt/QtWebPageEventHandler.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::startDrag): removed.
2011-12-12 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Support customizing popup menus with QML
https://bugs.webkit.org/show_bug.cgi?id=73560
Reviewed by Tor Arne Vestbø.
Add a new property 'itemSelector' to WebView (experimental for now) that contains
the QML component used when it needs to spawn a popup menu. For example, <select>
HTML tag may trigger a popup menu.
When loaded the component will have the 'model' available in its context with two
properties: 'elementRect', describing the position of the element which spawned
the item selector, and 'items', which is a model ready to be used by ListView. The
'model' also have methods to accept/reject the selection.
Option groups are available as a property for each row in the 'items' model. This
can be used together with ListView to create sections, as demonstrated in the
MiniBrowser. QML tests were added as well.
The existing Desktop version is removed since after the Qt5 refactoring isn't
working correctly. Once Qt have its own QML components for popup, we hope to use
it as a default if no other popupMenu is specified.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewExperimental::itemSelector):
(QQuickWebViewExperimental::setItemSelector):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::get):
* UIProcess/API/qt/tests/qmltests/WebView/tst_itemSelector.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/select.html: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/qt/QtPageClient.cpp:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::createPopupMenuProxy):
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
(WebKit::PopupMenuItemModel::rowCount):
(WebKit::PopupMenuItemModel::Item::Item):
(WebKit::ItemSelectorContextObject::elementRect):
(WebKit::ItemSelectorContextObject::items):
(WebKit::ItemSelectorContextObject::reject):
(WebKit::ItemSelectorContextObject::ItemSelectorContextObject):
(WebKit::ItemSelectorContextObject::accept):
(WebKit::createRoleNamesHash):
(WebKit::PopupMenuItemModel::PopupMenuItemModel):
(WebKit::PopupMenuItemModel::data):
(WebKit::PopupMenuItemModel::select):
(WebKit::PopupMenuItemModel::selectedOriginalIndex):
(WebKit::PopupMenuItemModel::buildItems):
(WebKit::WebPopupMenuProxyQt::WebPopupMenuProxyQt):
(WebKit::WebPopupMenuProxyQt::showPopupMenu):
(WebKit::WebPopupMenuProxyQt::hidePopupMenu):
(WebKit::WebPopupMenuProxyQt::selectIndex):
(WebKit::WebPopupMenuProxyQt::createItem):
(WebKit::WebPopupMenuProxyQt::createContext):
(WebKit::WebPopupMenuProxyQt::notifyValueChanged):
* UIProcess/qt/WebPopupMenuProxyQt.h:
(WebKit::WebPopupMenuProxyQt::create):
* UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp: Removed.
* UIProcess/qt/WebPopupMenuProxyQtDesktop.h: Removed.
2011-12-11 Gopal Raghavan <gopal.1.raghavan@nokia.com>
[Qt] QQuickWebView missing titleChanged signal tests
https://bugs.webkit.org/show_bug.cgi?id=73923
Reviewed by Simon Hausmann.
Added tests for QQuickWebView tilteChanged signal.
* UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/test3.html: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2011-12-11 Anders Carlsson <andersca@apple.com>
Crash when trying to garbage collect JavaScript objects
https://bugs.webkit.org/show_bug.cgi?id=74259
<rdar://problem/10556188>
Reviewed by Sam Weinig.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::garbageCollectJavaScriptObjects):
Use sendToAllProcesses which is more correct and also handles m_process being null.
2011-12-11 Andreas Kling <kling@webkit.org>
WK2/NetscapePlugin: Incorrect mouse event coordinates when frameScaleFactor != 1.
<http://webkit.org/b/74209> and <rdar://problem/10438197>
Reviewed by Anders Carlsson.
* Shared/WebEvent.h:
* Shared/WebMouseEvent.cpp:
Remove the WebMouseEvent "copy" constructor that applied a scale factor
to the coordinates of an existing event.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):
Pass the WebMouseEvent through to the plugin unmodified.
(WebKit::PluginView::viewGeometryDidChange):
Plumb a complex translate+scale transform through to the plugin, so coordinate
space transformations in will behave correctly with scale factors other than 1.
2011-12-10 Sam Weinig <sam@webkit.org>
Try to fix the windows build.
* win/WebKit2.vcproj:
2011-12-10 Alexis Menard <alexis.menard@openbossa.org>
Unreviewed build fix for Qt.
Build error introduced by r102484.
* Target.pri:
2011-12-09 Mark Rowe <mrowe@apple.com>
Fix the Snow Leopard build some more.
Move the #if to a location where it will do some good.
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
2011-12-09 Mark Rowe <mrowe@apple.com>
Fix the Snow Leopard build.
Wrap some code that is only applicable to Lion and newer in the appropriate #if's.
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):
2011-12-09 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt] request parameter of QQuickWebView::navigationRequested is not a registered type
https://bugs.webkit.org/show_bug.cgi?id=73826
Reviewed by Tor Arne Vestbø.
Adding QWebNavigationRequest by moving NavigationRequest out of QtWebPagePolicyClient.
* Target.pri:
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebnavigationrequest.cpp: Added.
(QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
(QWebNavigationRequestPrivate::~QWebNavigationRequestPrivate):
(QWebNavigationRequest::QWebNavigationRequest):
(QWebNavigationRequest::~QWebNavigationRequest):
(QWebNavigationRequest::setAction):
(QWebNavigationRequest::url):
(QWebNavigationRequest::button):
(QWebNavigationRequest::modifiers):
(QWebNavigationRequest::action):
* UIProcess/API/qt/qwebnavigationrequest_p.h: Added.
* UIProcess/qt/QtWebPagePolicyClient.cpp:
(QtWebPagePolicyClient::decidePolicyForNavigationAction):
(QtWebPagePolicyClient::decidePolicyForResponse):
2011-12-09 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Unskip API tests
https://bugs.webkit.org/show_bug.cgi?id=74180
Reviewed by Tor Arne Vestbø.
Unskip API tests for geolocation and javascript dialogs.
* UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
2011-12-07 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/74061> WebProcess and PluginProcess should inherit environment
variables provided in LC_DYLD_ENVIRONMENT of main executable binary.
Reviewed by Darin Adler.
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h: Added.
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm: Added.
(WebKit::DynamicLinkerEnvironmentExtractor::DynamicLinkerEnvironmentExtractor):
(WebKit::DynamicLinkerEnvironmentExtractor::processEnvironmentVariable): Parse out the name
and value from the environment string and add an entry to our variable map if the variable
is one that dyld would respect in LC_DYLD_ENVIRONMENT.
(WebKit::DynamicLinkerEnvironmentExtractor::processLoadCommand): Look for a LC_DYLD_ENVIRONMENT
load command and extract any environment string that we find within.
(WebKit::DynamicLinkerEnvironmentExtractor::processLoadCommands): Iterate over each
load command in the Mach-O file.
(WebKit::DynamicLinkerEnvironmentExtractor::processSingleArchitecture): Determine whether
the Mach-O file is of the correct architecture, and if so then process the load commands
found within.
(WebKit::DynamicLinkerEnvironmentExtractor::processFatFile): Process each architecture of the
Mach-O file in turn.
(WebKit::DynamicLinkerEnvironmentExtractor::getExtractedEnvironmentVariables): Add our
extracted variables to the passed-in EnvironmentVariables object. We skip adding any
variables that already exist so as to allow variables passed in the environment to override
those that we extract from the executable file.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess): Extract the environment variables from the
main binary and add them to the launch environment of our subprocess.
* WebKit2.xcodeproj/project.pbxproj:
2011-12-09 Sam Weinig <sam@webkit.org>
Add WKView implementation for quickLookPreviewItemsAtWindowLocation.
<rdar://problem/10472505>
Reviewed by Dan Bernstein.
* UIProcess/API/mac/WKView.mm:
(-[WKView quickLookPreviewItemsAtWindowLocation:]):
2011-12-09 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Open shared memory files with shm_open.
https://bugs.webkit.org/show_bug.cgi?id=74078
Original patch by Kimmo Kinnunen
Reviewed by Kenneth Rohde Christiansen.
Open shared memory files with shm_open. This uses mount point that is
intended to host shared memory files. Typically this is /dev/shm.
This fixes crashes when filesystem that hosts QDir::temp() is full.
This is also more well-defined with respect to question whether SHM
writes to temp dir would cause unintended wear if hosted on flash drives.
This also fixes performance problems regarding QDir::temp() and
mkostemp(), both of which appear to be long operations.
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::create):
2011-12-09 Hugo Parente Lima <hugo.lima@openbossa.org>
[Qt] Click's count is limited to three continuous clicks.
https://bugs.webkit.org/show_bug.cgi?id=45666
Reviewed by Kenneth Rohde Christiansen.
Make Qt recognize "infinite" continuous mouse clicks.
handleMouseDoubleClickEvent merged into handleMousePressEvent.
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::QtWebPageEventHandler):
(QtWebPageEventHandler::handleEvent):
(QtWebPageEventHandler::handleMousePressEvent):
(QtWebPageEventHandler::timerEvent):
* UIProcess/qt/QtWebPageEventHandler.h:
2011-12-09 Sam Weinig <sam@webkit.org>
Expose a WKConnectionRef which represents the connection to/from the WebProcess/UIProcess
https://bugs.webkit.org/show_bug.cgi?id=74218
Reviewed by Anders Carlsson.
Test: WebKit2.WKConnectionTest in TestWebKitAPI
* Shared/WebConnection.cpp:
(WebKit::WebConnection::forwardDidReceiveMessageToClient):
* Shared/WebConnection.h:
Add helper for connection subclasses to dispatch to the client.
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::didReceiveMessage):
Handle postMessage messages from the WebProcess.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::processDidFinishLaunching):
Dispatch the notification that a connection to the WebProcess has
been established.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleGetApplicationConnection):
* WebProcess/InjectedBundle/API/c/WKBundle.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::webConnectionToUIProcess):
* WebProcess/InjectedBundle/InjectedBundle.h:
(WebKit::WebProcess::webConnectionToUIProcess):
Add accessor to get the connection to the UIProcess from
the bundle.
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::didReceiveMessage):
Handle postMessage messages from the UIProcess.
* WebProcess/WebProcess.h:
2011-12-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Update WebGraphicLayer's child content scale in all child binding method.
https://bugs.webkit.org/show_bug.cgi?id=74101
Reviewed by Noam Rosenthal.
setChildren is currently the only method propagating the parent layer's content
scale to its children. This need to be done for addChild* as well.
This fixes the overlay layer not being rendered with the right scale when created
until the contents scale is modified again.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::setChildren):
(WebCore::WebGraphicsLayer::addChild):
(WebCore::WebGraphicsLayer::addChildAtIndex):
(WebCore::WebGraphicsLayer::addChildAbove):
(WebCore::WebGraphicsLayer::addChildBelow):
(WebCore::WebGraphicsLayer::replaceChild):
2011-12-09 Michael Brüning <michael.bruning@nokia.com>
[Qt][WK2] Fix tst_QQuickWebView::scrollRequest() API test
https://bugs.webkit.org/show_bug.cgi?id=73994
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/tests/html/scroll.html: Corrected html and
added some coloring.
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::scrollRequest): Corrected calculation
of expected value.
2011-12-09 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Fix compilation with newly separated Qt 5 QtQuick module
https://bugs.webkit.org/show_bug.cgi?id=73990
Reviewed by Kenneth Rohde Christiansen, tweaked by Csaba Osztrogonác.
Fix QtQuick includes after move from QtDeclarative to QtQuick.
* UIProcess/API/qt/qquickwebpage.cpp:
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/tests.pri: Tests need symbols from QtQuick, so link library.
* UIProcess/API/qt/tests/testwindow.h:
* UIProcess/qt/QtDialogRunner.cpp:
* UIProcess/qt/QtSGTileNode.cpp:
* UIProcess/qt/QtSGTileNode.h:
* UIProcess/qt/QtSGUpdateQueue.cpp:
* UIProcess/qt/QtViewportInteractionEngine.cpp:
* UIProcess/qt/QtWebPageProxy.cpp:
* UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
2011-12-09 Nayan Kumar K <nayankk@motorola.com>
[WebKit2][gtk] Re-enable running TestWebKitSettings
https://bugs.webkit.org/show_bug.cgi?id=70135
Reviewed by Martin Robinson.
Re-enable running TestWebKitSettings which was skipped as part
of https://bugs.webkit.org/show_bug.cgi?id=70129 due to the
bug https://bugs.webkit.org/show_bug.cgi?id=70127.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Run testWebKitSettings.
(testWebKitSettingsNewWithSettings): Run testWebKitSettingsNewWithSettings.
2011-12-08 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] Webkit should release TextureMapper GL objects if page paint node is deallocated.
https://bugs.webkit.org/show_bug.cgi?id=73591
Reviewed by Noam Rosenthal.
Implement deallocation of TextureMapper GL objects when QQuickWebPage paint node deallocated.
Also adds purging GraphicsLayer backing stores on WebProcess side in order to force repainting
when page becomes visible and painting resumes and fixes incorrect initialization of view
visibility state.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::resetPaintNode):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
* UIProcess/API/qt/tests/html/direct-image-compositing.html: Added.
* UIProcess/API/qt/tests/html/resources/simple_image.png: Added.
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::showWebView):
(tst_QQuickWebView::removeFromCanvas):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::layerTreeHostProxy):
* UIProcess/LayerTreeHostProxy.h:
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::purgeGLResources):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::purgeGLResources):
* UIProcess/qt/QtWebPageProxy.h:
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
(WebCore::WebGraphicsLayer::purgeBackingStores):
(WebCore::WebGraphicsLayer::recreateBackingStoreIfNeeded):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::purgeBackingStores):
* WebProcess/WebPage/LayerTreeHost.messages.in:
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::LayerTreeHostQt):
(WebKit::LayerTreeHostQt::flushPendingLayerChanges):
(WebKit::LayerTreeHostQt::purgeBackingStores):
(WebKit::LayerTreeHostQt::recreateBackingStoreIfNeeded):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:
2011-12-08 Simon Fraser <simon.fraser@apple.com>
Forced compositing mode breaks display of full-page PDFs in WK2
https://bugs.webkit.org/show_bug.cgi?id=74122
<rdar://problem/9550059>
Reviewed by Dan Bernstein.
Full page PDFs are displayed in WK2 in a subview of the WKView. However,
when the WKView is forced to use accelerated compositing, the layer obscures
the PDF subview.
To fix this we have to drop out of compositing mode when the WKView is showing
a custom representation.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setPageHasCustomRepresentation:]): Tell the drawing area that the view
gained or lost a custom representation.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::pageCustomRepresentationChanged):
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::pageCustomRepresentationChanged): Send a messgae to the web process
to indicate that the custom representation changed.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::pageCustomRepresentationChanged):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::pageCustomRepresentationChanged): Enter or exit compositing mode
as appropriate when we gain or lost a custom represenetation.
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
* WebProcess/WebPage/DrawingAreaImpl.h:
2011-12-08 Jer Noble <jer.noble@apple.com>
HiDPI: Switching a video element to full screen in HiDPI mode doesn't fit the screen correctly
https://bugs.webkit.org/show_bug.cgi?id=74119
rdar://problem/10356869
Reviewed by Darin Adler.
Use the Lion-only -[NSWindow convertRectToScreen:] function to convert between window
coordinates and screen coordinates.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController enterFullScreen:]):
2011-12-08 Csaba Osztrogonác <ossy@webkit.org>
[Qt][WK2] Unreviewed buildfix after r102352.
* DerivedSources.pri:
2011-12-06 Jon Lee <jonlee@apple.com>
[WK2] Add permissions support (73960)
https://bugs.webkit.org/show_bug.cgi?id=73960
<rdar://problem/10357008>
Reviewed by Darin Adler.
* DerivedSources.make: Moved notification files to its own directory. Need to add that path.
* WebKit2.xcodeproj/project.pbxproj: New header and impl files.
* Target.pri: Ditto.
* GNUmakefile.am: Ditto.
* win/WebKit2.vcproj: Ditto.
* win/WebKit2Common.vsprops: Add path to Notifications directory.
Implement permission functions, which go through permission request manager.
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
(WebKit::WebNotificationClient::requestPermission):
(WebKit::WebNotificationClient::cancelRequestsForPermission):
(WebKit::WebNotificationClient::checkPermission):
New NotificationPermissionRequestManager to make and cancel permission requests, and to retrieve current
policy.
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp: Added.
(WebKit::generateRequestID):
(WebKit::NotificationPermissionRequestManager::create):
(WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):
(WebKit::NotificationPermissionRequestManager::startRequest): Keep track of the provided callback once
policy decision is made.
(WebKit::NotificationPermissionRequestManager::cancelRequest):
(WebKit::NotificationPermissionRequestManager::permissionLevel): Retrieve level through a synchronous
message to the proxy.
(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision): Invoke the callback.
* WebProcess/Notifications/NotificationPermissionRequestManager.h: Added.
(WebKit::isRequestIDValid): Make sure any provided request IDs are valid.
Added new NotificationPermissionRequest class.
* UIProcess/Notifications/NotificationPermissionRequest.cpp: Added.
(WebKit::NotificationPermissionRequest::create):
(WebKit::NotificationPermissionRequest::NotificationPermissionRequest):
(WebKit::NotificationPermissionRequest::allow): Notify manager of decision.
(WebKit::NotificationPermissionRequest::deny): Ditto.
(WebKit::NotificationPermissionRequest::invalidate): Disassociate with manager.
(WebKit::NotificationPermissionRequest::type):
* UIProcess/Notifications/NotificationPermissionRequest.h: Added.
WKAPI support for NotificationPermissionRequest:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKNotificationPermissionRequest.cpp: Added.
(WKNotificationPermissionRequestGetTypeID):
(WKNotificationPermissionRequestAllow):
(WKNotificationPermissionRequestDeny):
* UIProcess/API/C/WKNotificationPermissionRequest.h: Added.
Other additions to WK API:
* UIProcess/API/C/WKNotificationProvider.h: Added new callback for WKNotificationProviders, to return policy
for a given security origin.
* UIProcess/API/C/WKPage.h: Added new callback to WKPageUIClient to ask user to decide on policy.
New NotificationPermissionRequestManagerProxy to create requests.
* UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp: Added.
(WebKit::NotificationPermissionRequestManagerProxy::NotificationPermissionRequestManagerProxy):
(WebKit::NotificationPermissionRequestManagerProxy::invalidateRequests):
(WebKit::NotificationPermissionRequestManagerProxy::createRequest):
(WebKit::NotificationPermissionRequestManagerProxy::didReceiveNotificationPermissionDecision):
* UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h: Added.
Added new message to notification manager: NotificationPermissionLevel, to retrieve policy. The current
JS API retrieves the permission synchronously, so the message needs to be sent synchronously also.
* UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Moved from Source/WebKit2/UIProcess/WebNotificationManagerProxy.messages.in.
* UIProcess/Notifications/WebNotificationProvider.cpp: Moved from Source/WebKit2/UIProcess/WebNotificationProvider.cpp.
(WebKit::WebNotificationProvider::policyForNotificationPermissionAtOrigin): Added.
* UIProcess/Notifications/WebNotificationProvider.h: Moved from Source/WebKit2/UIProcess/WebNotificationProvider.h.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveSyncMessage): Boilerplate to forward messages to notification manager.
* UIProcess/Notifications/WebNotificationManagerProxy.cpp: Moved from Source/WebKit2/UIProcess/WebNotificationManagerProxy.cpp.
(WebKit::WebNotificationManagerProxy::create):
(WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
(WebKit::WebNotificationManagerProxy::invalidate):
(WebKit::WebNotificationManagerProxy::initializeProvider):
(WebKit::WebNotificationManagerProxy::didReceiveMessage):
(WebKit::WebNotificationManagerProxy::didReceiveSyncMessage):
(WebKit::WebNotificationManagerProxy::show):
(WebKit::WebNotificationManagerProxy::cancel):
(WebKit::WebNotificationManagerProxy::didDestroyNotification):
(WebKit::WebNotificationManagerProxy::notificationPermissionLevel): Retrieve the policy from the provider.
(WebKit::WebNotificationManagerProxy::providerDidShowNotification):
(WebKit::WebNotificationManagerProxy::providerDidClickNotification):
(WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
* UIProcess/Notifications/WebNotificationManagerProxy.h: Moved from Source/WebKit2/UIProcess/WebNotificationManagerProxy.h.
(WebKit::WebNotificationManagerProxy::clearContext):
(WebKit::WebNotificationManagerProxy::type):
Added NotificationPermissionRequestManagerProxy to WebPageProxy, to allow a request for permission to
go through to the UI client. Added new message to WebPageProxy, RequestNotificationPermission.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close): Invalidate pending requests.
(WebKit::WebPageProxy::processDidCrash): Ditto.
(WebKit::WebPageProxy::requestNotificationPermission): Forward request to UI client.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::decidePolicyForNotificationPermissionRequest):
* UIProcess/WebUIClient.h:
Added new message DidReceiveNotificationPermissionDecision. The WebPage forwards the message to the
permission request manager.
* WebProcess/WebPage/WebPage.messages.in: Added new message DidReceiveNotificationPermissionDecision
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::notificationPermissionRequestManager): Create manager on request.
(WebKit::WebPage::didReceiveNotificationPermissionDecision):
* WebProcess/WebPage/WebPage.h:
Moving files to Notifications/ subdirectory.
* UIProcess/Notifications/WebNotification.cpp: Moved from Source/WebKit2/UIProcess/WebNotification.cpp.
* UIProcess/Notifications/WebNotification.h: Moved from Source/WebKit2/UIProcess/WebNotification.h.
2011-12-08 Nayan Kumar K <nayankk@motorola.com>
[WebKit2] Initialize threading in UI process.
https://bugs.webkit.org/show_bug.cgi?id=70127
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* GNUmakefile.am:
* Shared/APIObject.cpp: Added.
(WebKit::APIObject::APIObject):
* Shared/APIObject.h:
* Target.pri:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
2011-12-08 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] Directly composited images doesn't render
https://bugs.webkit.org/show_bug.cgi?id=74058
Reviewed by Noam Rosenthal.
Attach image to WebGraphicsLayer even if layerTreeTileClient is not set
and create/assign remote image tiles later during sync.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
(WebCore::WebGraphicsLayer::setContentsToImage):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
2011-12-08 Simon Hausmann <simon.hausmann@nokia.com>
REGRESSION(r102334): Various Qt WK2 layout tests crash
Reviewed by Tor Arne Vestbø.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState): Add missing null pointer check for the editable
element (scope) before calling innerText.
2011-12-08 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] WebKitTestRunner crashes with debug builds
https://bugs.webkit.org/show_bug.cgi?id=74090
Reviewed by Tor Arne Vestbø.
Export private C++ API style platformInitialize function needed
by low-level WTR.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::platformInitialize):
* UIProcess/API/qt/qquickwebview_p.h:
2011-12-07 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Fix non-animated pinch-zoom scale commit.
https://bugs.webkit.org/show_bug.cgi?id=74007
Reviewed by Kenneth Rohde Christiansen.
The update deferrer object was only destroyed at the end of the animation
and wouldn't be if the pinch-zoom was ended within legal bounds.
This patch also makes sure that the deferrer isn't destroyed and re-created
once the animation is started if it was already there.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::animateItemRectVisible):
(WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):
* UIProcess/qt/QtViewportInteractionEngine.h:
2011-12-08 Simon Hausmann <simon.hausmann@nokia.com>
REGRESSION(r101683): QQuickWebView doesn't work with OpenGL/ES 2.0
https://bugs.webkit.org/show_bug.cgi?id=74077
Reviewed by Kenneth Rohde Christiansen.
Replace Desktop OpenGL idiom of using gl_Vertex with a simple vertex attribute
that's tied to the same register 0 (by being the first in the array).
* UIProcess/API/qt/qquickwebpage.cpp:
(PageProxyMaterialShader::attributeNames): Define "vertex" attribute, which is
bound to register 0, which is the current vertex.
(PageProxyMaterialShader::vertexShader): Use the vertex attribute instead of the
built-in gl_Vertex, which is only present in Desktop GL.
2011-12-07 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Fix the memory leak of AC layer update message contents on the UI process.
https://bugs.webkit.org/show_bug.cgi?id=74012
Reviewed by Noam Rosenthal.
Since the messages didn't have a virtual destructor, the destructor
of child class members wouldn't be called and would cause the all tile
update buffers, contained in a QImage, to be leaked as well.
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeMessageToRenderer::~LayerTreeMessageToRenderer):
2011-12-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
Upsteam the Qt changes to the EditorState
https://bugs.webkit.org/show_bug.cgi?id=74080
Reviewed by Simon Hausmann.
We are not doing the serialization manually due to it not being a POD
structure anymore in the case of Qt.
* GNUmakefile.am:
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* Target.pri:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::respondToChangedSelection):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
* win/WebKit2.vcproj:
2011-12-08 Gopal Raghavan <gopal.1.raghavan@nokia.com>
[Qt] cleanup qmlplugin
https://bugs.webkit.org/show_bug.cgi?id=73834
Reviewed by Tor Arne Vestbø.
Removed empty folder qmlplugin.
* UIProcess/API/qt/qmlplugin: Removed.
2011-12-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r102323.
http://trac.webkit.org/changeset/102323
https://bugs.webkit.org/show_bug.cgi?id=74069
Caused Chromium and GTK build failure (Requested by bashi on
#webkit).
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-12-08 Fady Samuel <fsamuel@chromium.org>
Move scalePageBy from eventSender to window.internals
https://bugs.webkit.org/show_bug.cgi?id=64512
Reviewed by Simon Fraser.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-12-07 Mark Rowe <mrowe@apple.com>
Fix the 32-bit build.
Ignore some warnings that only occur in 32-bit.
* PluginProcess/mac/PluginProcessShim.mm:
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
(WebKit::NetscapePluginModule::tryLoad):
2011-12-07 Balazs Kelemen <kbalazs@webkit.org>
ShareableBitmapGtk.cpp has no reason to exist
https://bugs.webkit.org/show_bug.cgi?id=74011
Reviewed by Martin Robinson.
Remove this file since the real implementation is
exists in ShareableBitmapCairo.cpp.
* Shared/gtk/ShareableBitmapGtk.cpp: Removed.
2011-12-07 Mary Wu <mary.wu@torchmobile.com.cn>
Change function name InitializeLoggingChannelsIfNecessary to follow coding style guideline
https://bugs.webkit.org/show_bug.cgi?id=73986
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
2011-12-07 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Enable page cache.
https://bugs.webkit.org/show_bug.cgi?id=73938
Enable WebCore's page cache for Qt port by setting its capacity to 20. This is temporary
and will be replaced by a computed value based on CacheMode. See bug#73918.
Reviewed by Simon Hausmann.
* WebProcess/qt/WebProcessQt.cpp:
(WebKit::WebProcess::platformSetCacheModel):
2011-12-06 Andy Estes <aestes@apple.com>
REGRESSION (r101838): Crash in LayerTreeHostCA::initialize() when accelerated drawing is enabled
https://bugs.webkit.org/show_bug.cgi?id=73955
Reviewed by Anders Carlsson.
* WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
(WebKit::LayerTreeHostCA::initialize): m_webPage->drawingArea() will be
null here if we are initializing the layer tree host in DrawingArea's
ctor (as is the case when accelerated drawing is enabled), before
WebPage has set its m_drawingArea pointer. Since the layer tree cannot
have been frozen at this point, it's safe to enable layer flush
scheduling if drawingArea() is null.
2011-12-06 Alexander Færøy <alexander.faeroy@nokia.com>
[Qt] Fix assertion in QtViewportInteractionEngine.cpp:468
https://bugs.webkit.org/show_bug.cgi?id=73914
Reviewed by Kenneth Rohde Christiansen.
m_suspendCount should always be zero when a pinch gesture is started.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2011-12-06 Simon Fraser <simon.fraser@apple.com>
UI process crashes if the Web Process crashes on launch
https://bugs.webkit.org/show_bug.cgi?id=73943
Reviewed by Sam Weinig.
When the Web Process crashes on launch, the WebConnectionToWebProcess
object was getting deleted inside of didClose. Add a protector to
prevent this.
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::didClose):
2011-12-06 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Fix page overlay rendering with AC.
https://bugs.webkit.org/show_bug.cgi?id=73935
Reviewed by Noam Rosenthal.
The inspector node highlight would display old highlights as well
since the overlay is normally rendered right after the page on top
of the same graphics context.
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::paintContents):
2011-12-06 Michael Brüning <michael.bruning@nokia.com>
[qt][wk2] Tests of QQuickWebView assert in debug builds when destroying QQuickWebViewPrivate
https://bugs.webkit.org/show_bug.cgi?id=73907
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebview.cpp: Disconnect signals from
QtViewportInteractionEngine in ~QQuickWebViewPrivate.
(QQuickWebViewPrivate::~QQuickWebViewPrivate):
* UIProcess/API/qt/qquickwebview_p_p.h: Remove empty inline implementation of ~QQuickWebViewPrivate.
2011-12-06 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Add initial support for focusing when entering edit mode.
Reviewed by Simon Hausmann.
Next step would be to properly upstream our EditorState code.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::focusEditableArea):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtPageClient.cpp:
(QtPageClient::focusEditableArea):
* UIProcess/qt/QtPageClient.h:
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::itemCoordFromCSS):
(WebKit::QtViewportInteractionEngine::itemRectFromCSS):
(WebKit::QtViewportInteractionEngine::focusEditableArea):
(WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
* UIProcess/qt/QtViewportInteractionEngine.h:
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::focusEditableArea):
* UIProcess/qt/QtWebPageEventHandler.h:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::respondToChangedSelection):
(WebKit::WebEditorClient::setInputMethodState):
2011-12-06 Alexander Færøy <alexander.faeroy@nokia.com>
[Qt] Fix assertion in QtWebPageEventHandler.cpp
https://bugs.webkit.org/show_bug.cgi?id=73908
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2011-12-05 Igor Oliveira <igor.oliveira@openbossa.org>
[Qt][WK2] Frame is not being showed in the screen when frameLoadCompleted is called
https://bugs.webkit.org/show_bug.cgi?id=73850
WebKit2 has a mechanism to prevent the composited layer tree of the outgoing page
from being torn down or updated until the incoming page has layout. However, for simple
pages, when the frame is loaded the page is not rendered in the screen.
This patch fixes this bug calling LayerTreeHostQt::scheduleLayerFlush when m_layerFlushSchedulingEnabled
is true.
Reviewed by Noam Rosenthal.
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::setLayerFlushSchedulingEnabled):
2011-12-05 Chris Fleizach <cfleizach@apple.com>
AX: WK2: AX hierarchy is not restored after web process crash
https://bugs.webkit.org/show_bug.cgi?id=73870
The accessibility tokens that need to be sent between UI and Web process
were not being sent by the UI process -> the web process when the web
process crashed.
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]):
(-[WKView _accessibilityRegisterUIProcessTokens]):
(-[WKView _didRelaunchProcess]):
2011-12-05 Alexey Proskuryakov <ap@apple.com>
REGRESSION: Full keyboard access doesn't work if enabled before Safari started
https://bugs.webkit.org/show_bug.cgi?id=73864
Reviewed by Darin Adler.
* WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Actually use the
parameter passed at process creation.
2011-12-05 Anders Carlsson <andersca@apple.com>
Make LayerFlushSchedulerClient::flushLayers indicate whether the flush was successful or not
https://bugs.webkit.org/show_bug.cgi?id=73862
Reviewed by Andy Estes.
Change LayerTreeHostCAMac::flushLayers to always return true and remove the call to LayerFlushScheduler::invalidate.
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
(WebKit::LayerTreeHostCAMac::flushLayers):
(WebKit::LayerTreeHostCAMac::didPerformScheduledLayerFlush):
2011-12-05 Michael Brüning <michael.bruning@nokia.com>
[Qt] Rename QQuickWebView::canStop property to just loading
https://bugs.webkit.org/show_bug.cgi?id=73813
Reviewed by Kenneth Rohde Christiansen.
Renamed canStop property of QQuickWebView and QtWebPageProxy
to loading and updated tests.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::loading):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::navigationStatusAtStartup):
(LoadStartedCatcher::onLoadStarted):
(tst_QQuickWebView::stopEnabledAfterLoadStarted):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::loading):
* UIProcess/qt/QtWebPageProxy.h:
2011-12-03 Jer Noble <jer.noble@apple.com>
<video> elements should disable the system and display sleep when playing on OS X.
https://bugs.webkit.org/show_bug.cgi?id=73730
<rdar://problem/9502155>
Reviewed by Alexey Proskuryakov.
Allow the WebProcess to make connections to the PowerManagement control mach server.
* WebProcess/com.apple.WebProcess.sb:
2011-12-04 Sam Weinig <sam@webkit.org>
Move code for connections to/from the UIProcess/WebProcess into WebConnection subclasses
https://bugs.webkit.org/show_bug.cgi?id=73779
Reviewed by Anders Carlsson.
To allow for API objects representing the connection going to/from the UIProcess/WebProcess,
this patch separates out the connections into WebConnection subclasses. It does not yet
expose a way to access these connections, and is therefore not yet testable.
* GNUmakefile.am:
* Target.pri:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add new files.
* Platform/CoreIPC/MessageID.h:
* Shared/CoreIPCSupport/WebConnectionMessageKinds.h: Added.
Add a new message type for communicating between WebConnections.
* Shared/ChildProcess.h:
Make helper public so that WebConnectionToWebProcess can use it.
* UIProcess/WebConnectionToWebProcess.cpp: Added.
(WebKit::WebConnectionToWebProcess::create):
(WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess):
(WebKit::WebConnectionToWebProcess::invalidate):
(WebKit::WebConnectionToWebProcess::postMessage):
(WebKit::WebConnectionToWebProcess::didReceiveMessage):
(WebKit::WebConnectionToWebProcess::didReceiveSyncMessage):
(WebKit::WebConnectionToWebProcess::didClose):
(WebKit::WebConnectionToWebProcess::didReceiveInvalidMessage):
(WebKit::WebConnectionToWebProcess::syncMessageSendTimedOut):
(WebKit::WebConnectionToWebProcess::windowsToReceiveSentMessagesWhileWaitingForSyncReply):
* UIProcess/WebConnectionToWebProcess.h: Added.
(WebKit::WebConnectionToWebProcess::connection):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendMessage):
(WebKit::WebProcessProxy::didReceiveInvalidMessage):
(WebKit::WebProcessProxy::didFinishLaunching):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::connection):
(WebKit::WebProcessProxy::webConnection):
(WebKit::WebProcessProxy::sendSync):
Thread connection code through WebConnectionToWebProcess.
* WebProcess/WebConnectionToUIProcess.cpp: Added.
(WebKit::WebConnectionToUIProcess::create):
(WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
(WebKit::WebConnectionToUIProcess::invalidate):
(WebKit::WebConnectionToUIProcess::postMessage):
(WebKit::WebConnectionToUIProcess::didReceiveMessage):
(WebKit::WebConnectionToUIProcess::didReceiveSyncMessage):
(WebKit::WebConnectionToUIProcess::didClose):
(WebKit::WebConnectionToUIProcess::didReceiveInvalidMessage):
(WebKit::WebConnectionToUIProcess::syncMessageSendTimedOut):
(WebKit::WebConnectionToUIProcess::windowsToReceiveSentMessagesWhileWaitingForSyncReply):
(WebKit::WebConnectionToUIProcess::willProcessMessageOnClientRunLoop):
* WebProcess/WebConnectionToUIProcess.h: Added.
(WebKit::WebConnectionToUIProcess::connection):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initialize):
(WebKit::WebProcess::addVisitedLink):
(WebKit::WebProcess::shouldTerminate):
(WebKit::WebProcess::terminate):
(WebKit::WebProcess::removeWebFrame):
(WebKit::WebProcess::getSitesWithPluginData):
(WebKit::WebProcess::clearPluginSiteData):
(WebKit::WebProcess::getWebCoreStatistics):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::connection):
Thread connection code through WebConnectionToUIProcess.
2011-12-05 Laszlo Gombos <laszlo.1.gombos@nokia.com>
[Qt] Remove viewModeChanged() from QQuickWebView
https://bugs.webkit.org/show_bug.cgi?id=73828
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebview_p.h: viewModeChanged is not used
and we should not expose it.
2011-12-05 Eric Carlson <eric.carlson@apple.com>
WebKit2 part of: Add WebKit preferences for text track settings
https://bugs.webkit.org/show_bug.cgi?id=73721
Reviewed by John Sullivan.
* Shared/WebPreferencesStore.h: Declared shouldDisplaySubtitles, shouldDisplayCaptions, and
shouldDisplayTextDescriptions properties with macros. All default to false.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetShouldDisplaySubtitles): Added.
(WKPreferencesGetShouldDisplaySubtitles): Ditto.
(WKPreferencesSetShouldDisplayCaptions): Ditto.
(WKPreferencesGetShouldDisplayCaptions): Ditto.
(WKPreferencesSetShouldDisplayTextDescriptions): Ditto.
(WKPreferencesGetShouldDisplayTextDescriptions): Ditto.
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Updates WebCore settings from WebKit2 prefs.
2011-12-04 Gopal Raghavan <gopal.1.raghavan@nokia.com>
[Qt] cleanup qmltests.pro
https://bugs.webkit.org/show_bug.cgi?id=73718
Reviewed by Simon Hausmann.
Removed unused file WebView/tst_loadZeroSizeView.qml and reordered file list.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2011-12-04 Philippe Normand <pnormand@igalia.com>
[WK2][GTK] enable-fullscreen WebSettings
https://bugs.webkit.org/show_bug.cgi?id=73774
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_set_enable_fullscreen):
(webkit_settings_get_enable_fullscreen):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings):
2011-12-02 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] MiniBrowser --touch asserts in debug build
https://bugs.webkit.org/show_bug.cgi?id=73697
Reviewed by Eric Seidel.
Add missing guard to QtViewportInteractionEngine::itemSizeChanged().
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::itemSizeChanged):
2011-12-02 Fady Samuel <fsamuel@chromium.org>
When page scaling is in use position:fixed has incorrect results
https://bugs.webkit.org/show_bug.cgi?id=68617
Reviewed by Simon Fraser.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-12-02 Alexey Proskuryakov <ap@apple.com>
Update sandbox rules
https://bugs.webkit.org/show_bug.cgi?id=73675
<rdar://problem/9276430>
Reviewed by Sam Weinig.
* WebProcess/com.apple.WebProcess.sb:
2011-12-02 Andy Estes <aestes@apple.com>
WebKit2: Freeze the state of the layer tree until frame load completion if incremental rendering is suppressed
https://bugs.webkit.org/show_bug.cgi?id=73641
Reviewed by Darin Adler.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFirstLayout): Do not
un-freeze the layer tree state if incremental rendering is suppressed.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::layerTreeStateIsFrozen): Add a getter for
m_layerTreeStateIsFrozen.
* WebProcess/WebPage/DrawingAreaImpl.h:
(WebKit::DrawingAreaImpl::layerTreeStateIsFrozen): Ditto.
* WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
(WebKit::LayerTreeHostCA::initialize): WebFrameLoaderClient might have
tried to freeze the state of the layer tree before the layer tree host
was created. When creating the layer tree host, only schedule a layer
flush if the layer tree state isn't frozen.
2011-12-02 Nayan Kumar K <nayankk@motorola.com>
[WebKit2][gtk] Add 'enable-dns-prefetching' property to WebKitSettings
https://bugs.webkit.org/show_bug.cgi?id=73414
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty): Add new set function.
(webKitSettingsGetProperty): Add new get function.
(webkit_settings_class_init): Register new property.
(webkit_settings_get_enable_dns_prefetching): API to get 'enable-dns-prefetching' property.
(webkit_settings_set_enable_dns_prefetching): API to set 'enable-dns-prefetching' property.
* UIProcess/API/gtk/WebKitSettings.h: Expose new public API's.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new APIs to gtk-doc sections file.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Add new tests.
2011-12-02 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Set event timestamps on custom input events
Reviewed by Simon Hausmann.
Since r101791 WebEventFactoryQt uses input event timestamps for WebEvents,
thus set the timestamp on the custom events as well.
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::handleHoverLeaveEvent):
(QtWebPageEventHandler::handleHoverMoveEvent):
* UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
(WebKit::WebPopupMenuProxyQtDesktop::showPopupMenu):
2011-12-02 Andras Becsi <andras.becsi@nokia.com>
[Qt] [WK2] Use input event timestamps in WebEvents if available
https://bugs.webkit.org/show_bug.cgi?id=73647
Reviewed by Simon Hausmann.
Qt5 input events already have a native timestamp, use this timestamp
in WebEventFactory instead of WTF::currentTime if it is available.
* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::currentTimeForEvent):
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):
(WebKit::WebEventFactory::createWebTouchEvent):
* Shared/qt/WebEventFactoryQt.h:
2011-12-02 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Split the QtWebPageProxy into PageClient and QtPageProxy
https://bugs.webkit.org/show_bug.cgi?id=66668
Reviewed by Simon Hausmann.
Split QtPageClient out of QtWebPageProxy.
This client will live in QQuickWebViewPrivate and communicate directly
with QtWebPageProxy and QtWebPageEventHandler. The functions that need
anything else than these entities will need to call the proper implementation
through QtWebPageProxy itself.
With this we have a clear separation between PageClient and PageProxy, having
two well defined and separated entities for hooking our clients with our API layer (QtWebPageProxy)
and for hooking the WebPageProxy with our client implementations (QtPageClient).
As a positive side-effect we have a cleaner QtWebPageProxy.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/QtPageClient.cpp: Added.
(QtPageClient::QtPageClient):
(QtPageClient::~QtPageClient):
(QtPageClient::createDrawingAreaProxy):
(QtPageClient::setViewNeedsDisplay):
(QtPageClient::pageDidRequestScroll):
(QtPageClient::processDidCrash):
(QtPageClient::didRelaunchProcess):
(QtPageClient::didChangeContentsSize):
(QtPageClient::didChangeViewportProperties):
(QtPageClient::startDrag):
(QtPageClient::handleDownloadRequest):
(QtPageClient::setCursor):
(QtPageClient::setCursorHiddenUntilMouseMoves):
(QtPageClient::toolTipChanged):
(QtPageClient::registerEditCommand):
(QtPageClient::clearAllEditCommands):
(QtPageClient::canUndoRedo):
(QtPageClient::executeUndoRedo):
(QtPageClient::convertToDeviceSpace):
(QtPageClient::convertToUserSpace):
(QtPageClient::screenToWindow):
(QtPageClient::windowToScreen):
(QtPageClient::createPopupMenuProxy):
(QtPageClient::createContextMenuProxy):
(QtPageClient::flashBackingStoreUpdates):
(QtPageClient::didFindZoomableArea):
(QtPageClient::didReceiveMessageFromNavigatorQtObject):
(QtPageClient::doneWithTouchEvent):
(QtPageClient::displayView):
(QtPageClient::scrollView):
(QtPageClient::viewSize):
(QtPageClient::isViewWindowActive):
(QtPageClient::isViewFocused):
(QtPageClient::isViewVisible):
(QtPageClient::isViewInWindow):
(QtPageClient::enterAcceleratedCompositingMode):
(QtPageClient::exitAcceleratedCompositingMode):
* UIProcess/qt/QtPageClient.h: Added.
(QtPageClient::pageClosed):
(QtPageClient::doneWithKeyEvent):
(QtPageClient::setFindIndicator):
(QtPageClient::didCommitLoadForMainFrame):
(QtPageClient::didFinishLoadingDataForCustomRepresentation):
(QtPageClient::customRepresentationZoomFactor):
(QtPageClient::setCustomRepresentationZoomFactor):
(QtPageClient::didChangeScrollbarsForMainFrame):
(QtPageClient::findStringInCustomRepresentation):
(QtPageClient::countStringMatchesInCustomRepresentation):
(QtPageClient::setEventHandler):
(QtPageClient::setPageProxy):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
* UIProcess/qt/QtWebPageProxy.h:
2011-12-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Do not apply the transition state before we are unsuspended
Reviewed by Simon Hausmann.
Also remove an accessor in the private, which is unneeded as
everything in the private class is supposed to be public or
only used by the private itself.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::loadDidCommit):
(QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
(QQuickWebViewPrivate::_q_suspend):
(QQuickWebViewPrivate::_q_resume):
(QQuickWebViewPrivate::didChangeContentsSize):
(QQuickWebViewPrivate::didChangeViewportProperties):
* UIProcess/API/qt/qquickwebview_p_p.h:
2011-12-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
Unreviewed buildfix, add missing include.
* WebProcess/Notifications/WebNotificationManager.cpp:
2011-12-02 Hajime Morrita <morrita@chromium.org>
Unreviewed, rolling out r101751 and r101775.
http://trac.webkit.org/changeset/101751
http://trac.webkit.org/changeset/101775
https://bugs.webkit.org/show_bug.cgi?id=73191
breaks Windows build
* config.h:
2011-12-02 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r101750.
* GNUmakefile.am: Add missing files.
2011-12-02 Gustavo Noronha Silva <gns@gnome.org>
Unreviewed. GTK+ build fix.
* GNUmakefile.am:
2011-12-02 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] ASSERT at QQuickWebViewPrivate::computeViewportConstraints() when API test is exercising zero sized views.
https://bugs.webkit.org/show_bug.cgi?id=73441
Do not assert on empty available size, but return default constrain values instead.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::computeViewportConstraints):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
2011-12-01 Hajime Morrita <morrita@chromium.org>
JS_INLINE and WTF_INLINE should be visible from WebCore
https://bugs.webkit.org/show_bug.cgi?id=73191
Reviewed by Kevin Ollivier.
Removed macro definitions which is now provided by Platform.h
* config.h:
2011-12-01 Jon Lee <jonlee@apple.com>
[WK2] Add further support for notifications
https://bugs.webkit.org/show_bug.cgi?id=73572
<rdar://problem/10472195>
Reviewed by Darin Adler.
* WebProcess/Notifications/WebNotificationManager.messages.in: Added. Contains messages for callbacks
from the notification platform.
* DerivedSources.make: Add WebNotificationManager.
* DerivedSources.pri: Ditto.
* Platform/CoreIPC/MessageID.h: Add message class.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage): Forward calls to WebNotificationManager when needed.
* WebKit2.xcodeproj/project.pbxproj: Add new message files.
* win/WebKit2.vcproj: Adding new files to project.
* win/WebKit2Common.vsprops: Add Notifications to include paths
* UIProcess/WebNotification.h: Add and expose internal ID of each notification sent to the platform.
(WebKit::WebNotification::create):
(WebKit::WebNotification::notificationID):
(WebKit::isNotificationIDValid): Checks that the ID is not a value that might trip up the HashMaps used
for mapping IDs to notifications.
* UIProcess/WebNotification.cpp:
(WebKit::WebNotification::WebNotification):
(WebKit::WebNotification::encode):
(WebKit::WebNotification::decode):
* UIProcess/API/C/WKNotification.h: Expose notification ID to WKAPI.
* UIProcess/API/C/WKNotification.cpp:
(WKNotificationGetNotificationID):
* UIProcess/WebNotificationManagerProxy.h: Add callbacks for dispatching events back to the notification.
* UIProcess/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::invalidate): Remove manager.
(WebKit::WebNotificationManagerProxy::show): Add manager prior to showing.
(WebKit::WebNotificationManagerProxy::cancel): Add manager prior to canceling.
(WebKit::WebNotificationManagerProxy::didDestroyNotification):
(WebKit::WebNotificationManagerProxy::providerDidShowNotification):
(WebKit::WebNotificationManagerProxy::providerDidClickNotification):
(WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
* UIProcess/API/C/WKNotificationManager.h:
* UIProcess/API/C/WKNotificationManager.cpp:
(WKNotificationManagerProviderDidShowNotification):
(WKNotificationManagerProviderDidClickNotification):
(WKNotificationManagerProviderDidCloseNotifications):
* UIProcess/WebNotificationProvider.h:
* UIProcess/WebNotificationProvider.cpp:
(WebKit::WebNotificationProvider::show):
(WebKit::WebNotificationProvider::cancel):
(WebKit::WebNotificationProvider::didDestroyNotification):
(WebKit::WebNotificationProvider::addNotificationManager):
(WebKit::WebNotificationProvider::removeNotificationManager):
* UIProcess/API/C/WKNotificationProvider.h: Expose add/removeNotificationManager calls
* WebProcess/Notifications/WebNotificationManager.h: Add bookkeeping to keep track of notification IDs with
Notification instances.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::generateNotificationID):
(WebKit::WebNotificationManager::didReceiveMessage):
(WebKit::WebNotificationManager::show):
(WebKit::WebNotificationManager::cancel):
(WebKit::WebNotificationManager::didDestroyNotification):
(WebKit::WebNotificationManager::didShowNotification):
(WebKit::WebNotificationManager::didClickNotification):
(WebKit::WebNotificationManager::didCloseNotifications):
* UIProcess/WebNotificationManagerProxy.messages.in: Add DidDestroyNotification message.
* WebProcess/WebCoreSupport/WebNotificationClient.cpp:
(WebKit::WebNotificationClient::notificationObjectDestroyed): Implemented.
2011-12-01 Goutham J <gouthamj@motorola.com>
[WEBKIT2] Fix for compilation warnings in WebContext.cpp
https://bugs.webkit.org/show_bug.cgi?id=69080
Fix compilation warning in WebKit2 builds.
Reviewed by Hajime Morita.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::processDidFinishLaunching):
(WebKit::WebContext::startMemorySampler):
2011-12-01 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=73592
REGRESSION (r100483): Can't drag out of background window
-and corresponding-
<rdar://problem/10508870>
Reviewed by Darin Adler.
If the mouse is pressed we need to do a full, normal hit test even if the window
is not active.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::mouseEventSyncForTesting):
2011-12-01 Martin Robinson <mrobinson@igalia.com>
[GTK] Add a helper function to find the current executable's path
https://bugs.webkit.org/show_bug.cgi?id=73473
Reviewed by Gustavo Noronha Silva.
Do a series of tests when looking for processes. First search the directory
specified by the environment variable, then the directory of the binary and
then the LIBEXECDIR.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::findWebKitProcess): Added.
(WebKit::ProcessLauncher::launchProcess): Call the new helper to get the
binary location.
2011-12-01 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] QQuickWebView covers QML elements that should be rendered on top.
https://bugs.webkit.org/show_bug.cgi?id=73338
Reviewed by Noam Rosenthal.
Move painting of QQuickWebPage content from canvas afterrendering() to
QSGGeometryNode/QSGMaterial based paint node. Implementation uses QSGMaterialShader
updateState() method to draw TextureMapper graphics layers.
This is considered to be temporary until QSGNode::UserNodeType will be available.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::QQuickWebPage):
(QQuickWebPagePrivate::QQuickWebPagePrivate):
(PageProxyMaterialShader::attributeNames):
(PageProxyMaterialShader::vertexShader):
(PageProxyMaterialShader::fragmentShader):
(PageProxyMaterial::PageProxyMaterial):
(PageProxyMaterial::type):
(PageProxyMaterial::createShader):
(PageProxyNode::PageProxyNode):
(PageProxyNode::~PageProxyNode):
(PageProxyMaterialShader::updateState):
(QQuickWebPage::updatePaintNode):
(QQuickWebPagePrivate::resetPaintNode):
(QQuickWebPagePrivate::~QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebpage_p_p.h:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::showWebView):
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::didRenderFrame):
2011-12-01 Nayan Kumar K <nayankk@motorola.com>
[WK2][GTK] Change default-font-size and default-monospace-font-size
https://bugs.webkit.org/show_bug.cgi?id=73468
Reviewed by Martin Robinson.
Set 'default-font-size' property value to 16px and 'default-monospace-font-size'
value to 13px.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_class_init): Change the default font size settings.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Correct the test.
2011-12-01 Wajahat Siddiqui <mdwajahatali.siddiqui@motorola.com>
Popup menu can get stuck in closed state when GtkMenu can't grab mouse.
https://bugs.webkit.org/show_bug.cgi?id=56466
Add a check if popup menu is not visible due to no mouse grab,
Ensure WebCore is in sync with proper state.
Reviewed by Martin Robinson.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::failedToShowPopupMenu): Added Method to send message
to WebProcess.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPopupMenuProxy.h:
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::showPopupMenu):
* WebProcess/WebCoreSupport/WebPopupMenu.h:
(WebKit::WebPopupMenu::client): Added Method to get WebCore::PopupMenuClient.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::failedToShowPopupMenu):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added Message to inform WebProcess ShowPopupMenu failed.
2011-12-01 Pavel Feldman <pfeldman@chromium.org>
Web Inspector: restore WebKit2 Safari menu items after capabilities refactoring regression.
https://bugs.webkit.org/show_bug.cgi?id=73554
Reviewed by Yury Semikhatsky.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::didClose):
2011-11-30 Alexey Proskuryakov <ap@apple.com>
Remove an unneeded argument from FrameLoaderClient::download
https://bugs.webkit.org/show_bug.cgi?id=73486
Reviewed by Andreas Kling.
* WebProcess/Downloads/Download.h:
* WebProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::convertHandleToDownload):
* WebProcess/Downloads/DownloadManager.h:
* WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
(WebKit::Download::startWithHandle):
* WebProcess/Downloads/curl/DownloadCurl.cpp:
(WebKit::Download::startWithHandle):
* WebProcess/Downloads/mac/DownloadMac.mm:
(WebKit::Download::startWithHandle):
* WebProcess/Downloads/qt/DownloadQt.cpp:
(WebKit::Download::startWithHandle):
* WebProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::startWithHandle):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::download):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::convertHandleToDownload):
* WebProcess/WebPage/WebFrame.h:
Updated for the change. CF version is the only one worth seeing, as it was using the argument.
2011-11-30 Alexey Proskuryakov <ap@apple.com>
Original page URL is not set in quarantine information when downloading using context menu Save Linked File
https://bugs.webkit.org/show_bug.cgi?id=73475
<rdar://problem/10500337>
Reviewed by Dan Bernstein.
* WebProcess/WebProcess.cpp: (WebKit::WebProcess::downloadRequest): Set main document URL
for the request, so that CFNetwork would know where te file was downloaded. Note that this
is an easier case than downloading due to clicks, since we don't really need to build a host
only URL, and could use full page URL. However, the same function is used for consistency.
2011-11-30 Igor Oliveira <igor.oliveira@openbossa.org>
[WK2][Qt] AC animation startTime is wrong
[WK2][Qt] AC animation startTime is wrong
https://bugs.webkit.org/show_bug.cgi?id=73467
When WebProcess sends animation information to UIProcess, It uses the
current time(WTF::currentTime) minus the timeOffset to set the start time
animation.
But there is a latency between the WebProcess and UIProcess communication
and sometimes the animation transition starts late.
This patch fixes the bug moving the startTime calculation to UIProcess.
Reviewed by Noam Rosenthal.
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::syncLayerParameters):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::addAnimation):
2011-11-30 Csaba Osztrogonác <ossy@webkit.org>
[Qt] Buildfix for generating forwarding headers
https://bugs.webkit.org/show_bug.cgi?id=73446
Reviewed by Noam Rosenthal.
* DerivedSources.pri: Always create the parent directory before generating a forwarding header.
2011-11-30 Dan Bernstein <mitz@apple.com>
WebKit2 part of: Allow the length of a page along the pagination axis to differ from the length of the view
https://bugs.webkit.org/show_bug.cgi?id=73476
Reviewed by Anders Carlsson.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Encode pageLength.
(WebKit::WebPageCreationParameters::decode): Decode pageLength.
* Shared/WebPageCreationParameters.h: Added pageLength.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLength): Added this accessor.
(WKPageGetPageLength): Ditto.
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController setPageLength:]): Ditto.
(-[WKBrowsingContextController pageLength]): Ditto.
* UIProcess/API/mac/WKBrowsingContextControllerPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Added initializer for m_pageLength.
(WebKit::WebPageProxy::setPageLength): Added.
(WebKit::WebPageProxy::creationParameters): Initialize pageLength.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::pageLength): Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Set the page length based on the creation parameters.
(WebKit::WebPage::setPageLength): Added.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added SetPageLength.
2011-11-30 Alejandro G. Castro <alex@igalia.com>
[GTK] Add accelerated compositing compilation option
https://bugs.webkit.org/show_bug.cgi?id=73298
Compile whatever we have inside the USE(ACCELERATED_COMPOSITING)
define. Fix accelerated compositing compilation in WK2, update the
enter/exit functions.
Reviewed by Martin Robinson.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::enterAcceleratedCompositingMode):
(WebKit::PageClientImpl::exitAcceleratedCompositingMode):
* UIProcess/API/gtk/PageClientImpl.h:
2011-11-29 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=72751
WebKit2.MouseMoveAfterCrash API test is failing
Reviewed by Sam Weinig.
windowIsFocused() is too restrictive. All we need to know is that the page is
active.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::mouseEventSyncForTesting):
2011-11-29 Sam Weinig <sam@webkit.org>
Add move semantics to WKRetainPtr
https://bugs.webkit.org/show_bug.cgi?id=73400
Reviewed by Anders Carlsson.
* UIProcess/API/cpp/WKRetainPtr.h:
(WebKit::WKRetainPtr::WKRetainPtr):
Add a move constructor and move enabled assignment operators
to WKRetainPtr if the compiler being used supports rvalue
references. If the compiler does not support it, we fallback
to the copy semantics we have always had.
2011-11-30 Mario Sanchez Prada <msanchez@igalia.com>
[Gtk] Links should be Tab-focusable by default
https://bugs.webkit.org/show_bug.cgi?id=73427
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_class_init): Switch the default value for
'enable-tabs-to-links' property from FALSE to TRUE.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Updated unit test.
2011-11-30 Alexey Proskuryakov <ap@apple.com>
Download page URL should be set by WebCore
https://bugs.webkit.org/show_bug.cgi?id=73358
Reviewed by Darin Adler.
* WebProcess/Downloads/mac/DownloadMac.mm:
(WebKit::Download::start): There is no need to set original URL post factum any more.
(WebKit::Download::startWithHandle): Ditto.
2011-11-30 Kenneth Rohde Christiansen <kenneth@webkit.org>
Rename WebKit::ViewportUpdateGuard to *Deferrer and add some better
comments to explain its purpose.
Reviewed by Simon Hausmann.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer):
(WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
(WebKit::QtViewportInteractionEngine::setItemRectVisible):
(WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
(WebKit::QtViewportInteractionEngine::scrollStateChanged):
(WebKit::QtViewportInteractionEngine::applyConstraints):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
* UIProcess/qt/QtViewportInteractionEngine.h:
2011-11-30 Simon Hausmann <simon.hausmann@nokia.com>
Build fix. The removal of the Qt threading back-end also removed
an implicit QString inclusion/forward-declaration.
* UIProcess/qt/QtWebContext.h:
2011-11-30 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Clean up the Qt viewport interaction engine
Reviewed by Simon Hausmann.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::reset):
Make sure reset is not called while suspended.
(WebKit::QtViewportInteractionEngine::applyConstraints):
We always need to apply the constrains due to initial-scale.
Now that we only apply the constrains when we are ready to
paint, it is impossible for the user to have interacted with
the content in the case the viewport meta tag was declared
in the <head> tag, and it is thus always applied.
(WebKit::QtViewportInteractionEngine::panGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureActive):
Fix this method to actually do what it advertises, before
it would be true even if just animation a bounce back effect.
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):
* UIProcess/qt/QtViewportInteractionEngine.h:
General, get rid of the interaction flags as we only need to
know whether the user interacted (panned, pinched, double-tapped).
Before we would still apply initial-scale if the user had panned
the content which can be pretty confusing.
2011-11-30 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed prospective mac build fix after r101450.
* Platform/mac/ModuleMac.mm:
(WebKit::Module::unload): leakRef is declared with attribute warn_unused_result.
2011-11-30 Adenilson Cavalcanti <adenilson.silva@openbossa.org>
[Qt][WK2] Implement permission API for Qt port
https://bugs.webkit.org/show_bug.cgi?id=59200
Permission API hookup for Geolocation, it allows to receive in WebView
a signal when a permission request is done (e.g. to grant permission
for accessing geolocation information) and set it accordingly.
Reviewed by Simon Hausmann.
* Target.pri:
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebpermissionrequest.cpp: Added.
(QWebPermissionRequestPrivate::QWebPermissionRequestPrivate):
(QWebPermissionRequestPrivate::~QWebPermissionRequestPrivate):
(QWebPermissionRequest::create):
(QWebPermissionRequest::QWebPermissionRequest):
(QWebPermissionRequest::~QWebPermissionRequest):
(QWebPermissionRequest::type):
(QWebPermissionRequest::setAllow):
(QWebPermissionRequest::allow):
(QWebPermissionRequest::scheme):
(QWebPermissionRequest::host):
(QWebPermissionRequest::port):
* UIProcess/API/qt/qwebpermissionrequest_p.h: Added.
* UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/geolocation.html: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/qt/QtWebPageUIClient.cpp:
(QtWebPageUIClient::QtWebPageUIClient):
(QtWebPageUIClient::permissionRequest):
(QtWebPageUIClient::policyForGeolocationPermissionRequest):
* UIProcess/qt/QtWebPageUIClient.h:
2011-11-30 Alexey Proskuryakov <ap@apple.com>
-[WKView attributedSubstringForProposedRange:actualRange:] doesn't update actualRange when it's out of bounds
https://bugs.webkit.org/show_bug.cgi?id=67813
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKView.mm:
(-[WKView attributedSubstringForProposedRange:actualRange:]): Update actualRange to match
result length.
(-[WKView firstRectForCharacterRange:actualRange:]): Added a FIXME. This is harder to
implement, and it's unclear if clients care at this time.
2011-11-29 Sam Weinig <sam@webkit.org>
Remove RetainPtr::releaseRef
https://bugs.webkit.org/show_bug.cgi?id=73396
Reviewed by Dan Bernstein.
* Platform/mac/ModuleMac.mm:
(WebKit::Module::unload):
Replace the final use of RetainPtr::releaseRef() with RetainPtr::leakRef(),
its sexy replacement.
2011-11-29 Jessie Berlin <jberlin@apple.com>
WKKeyValueStorageManagerGetKeyValueStorageOrigins may not report the correct list of origins
the first time it is called.
https://bugs.webkit.org/show_bug.cgi?id=73374 (<rdar://problem/10196057>)
Reviewed by Brady Eidson.
Queue any requests for the origins that have Local Storage until the StorageTracker is done
loading the list of those origins from disk.
* WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
(WebKit::keyValueStorageOriginIdentifiers):
Refactored here from getKeyValueStorageOrigins so it can be used by didFinishLoadingOrigins.
(WebKit::dispatchDidGetKeyValueStorageOrigins):
Ditto.
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
If the StorageTracker is not done loading the list of origins from disk, queue up the
request to be handled later.
(WebKit::WebKeyValueStorageManager::didFinishLoadingOrigins):
Dispatch the results for any requests that were make before the StorageTracker was done
loading the list of origins from disk.
(WebKit::WebKeyValueStorageManager::dispatchDidModifyOrigin):
* WebProcess/KeyValueStorage/WebKeyValueStorageManager.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Set the WebKeyValueStorageManager as the StorageTrackerClient.
2011-11-29 Anders Carlsson <andersca@apple.com>
Decorate adoptWK with WARN_UNUSED_RETURN
https://bugs.webkit.org/show_bug.cgi?id=73331
Reviewed by Sam Weinig.
* UIProcess/API/cpp/WKRetainPtr.h:
(WebKit::adoptWK):
2011-11-29 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ WebKit2 build after r101312.
* Scripts/generate-forwarding-headers.pl: Add blackberry to the
list of platforms.
2011-11-29 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Don't hard-code the list of WebKit2 generated sources
The generated sources are... wait for it... generated. So
use the generator itself to figure out which sources we need
to compile.
Reviewed by Simon Hausmann.
* DerivedSources.pri:
* Target.pri:
2011-11-29 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix the GTK+ port build after r101307.
* GNUmakefile.am: Add missing files to compilation.
2011-11-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Add the infrastructure for enabling suspend/resume.
Reviewed by Simon Hausmann.
Also, remove the painting optimization as it is broken in some
situations, as there is an assumption in that comparison that
the guards cannot be nested, which goes against the design and
its use.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initializeDesktop):
(QQuickWebViewPrivate::initializeTouch):
(QQuickWebViewPrivate::_q_suspend):
(QQuickWebViewPrivate::_q_resume):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::ViewportUpdateGuard::ViewportUpdateGuard):
(WebKit::ViewportUpdateGuard::~ViewportUpdateGuard):
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
(WebKit::QtViewportInteractionEngine::scrollStateChanged):
(WebKit::QtViewportInteractionEngine::event):
(WebKit::QtViewportInteractionEngine::pagePositionRequest):
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
(WebKit::QtViewportInteractionEngine::reset):
(WebKit::QtViewportInteractionEngine::applyConstraints):
(WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::panGestureEnded):
(WebKit::QtViewportInteractionEngine::pinchGestureActive):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):
(WebKit::QtViewportInteractionEngine::itemSizeChanged):
* UIProcess/qt/QtViewportInteractionEngine.h:
2011-11-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add WebKitURIResponse to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=72946
Reviewed by Martin Robinson.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitURIResponse.cpp: Added.
(webkitURIResponseFinalize):
(webkitURIResponseGetProperty):
(webkitURIResponseSetProperty):
(webkit_uri_response_class_init):
(webkit_uri_response_init):
(webkit_uri_response_get_uri): Return the URI of the response.
(webkit_uri_response_get_status_code): Return the status code of
the response, or SOUP_STATUS_NONE.
(webkit_uri_response_get_content_length): Return the expected
content length of the response.
(webkitURIResponseCreateForSoupMessage): Private function to
create a response object from a SoupMessage.
(webkitURIResponseGetSoupMessage): Return the soup message
associated to the response.
(webkitURIResponseSetContentLength): Set the expected content
length of the response. This is useful for non http responses.
* UIProcess/API/gtk/WebKitURIResponse.h: Added.
* UIProcess/API/gtk/WebKitURIResponsePrivate.h: Added.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_uri_response_get_type().
* UIProcess/API/gtk/webkit2.h: Add WebKitURIResponse.h.
2011-11-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] QQuickWebView gets wrong position after reload
https://bugs.webkit.org/show_bug.cgi?id=73292
Reviewed by Simon Hausmann.
The ensureContentWithinViewportBoundary animates the current viewport
item into boundaries. That of course breaks when we try to animate it,
given the initial-scale which hasn't been applied; so apply it.
Also put the QScroller settings code in the ctor as it never changes.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
(WebKit::QtViewportInteractionEngine::reset):
(WebKit::QtViewportInteractionEngine::applyConstraints):
* UIProcess/qt/QtViewportInteractionEngine.h:
2011-11-29 Roland Steiner <rolandsteiner@chromium.org>
<style scoped>: add ENABLE(STYLE_SCOPED) flag to WebKit
https://bugs.webkit.org/show_bug.cgi?id=72848
Reviewed by Dimitri Glazkov.
* Configurations/FeatureDefines.xcconfig:
2011-11-28 Jon Lee <jonlee@apple.com>
Create skeleton framework for notifications support in WK2
https://bugs.webkit.org/show_bug.cgi?id=73253
<rdar://problem/10356943>
Reviewed by Sam Weinig.
* WebKit2.xcodeproj/project.pbxproj: Added classes for notification support.
* win/WebKit2.vcproj: Ditto.
* Target.pri: Ditto.
* Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
* DerivedSources.make: Add Notifications to VPATH.
* Platform/CoreIPC/MessageID.h: List WebNotificationManagerProxy as a class with messages.
* Scripts/webkit2/messages.py: Mark WebCore::NotificationContents as a struct.
* Shared/API/c/WKBase.h: Map opaque types to NotificationProvider, NotificationManager, and Notification.
* UIProcess/API/C/WKAPICast.h: Map WK types toNotificationProvider, NotificationManager, and Notification.
* Shared/APIObject.h: Add Notification and NotificationManager as APIObjects.
* Shared/WebCoreArgumentCoders.cpp: Added coders for KURL.
(CoreIPC::::encode):
(CoreIPC::::decode):
* Shared/WebCoreArgumentCoders.h:
* UIProcess/WebNotification.cpp: Added.
(WebKit::WebNotification::WebNotification):
(WebKit::WebNotification::~WebNotification):
(WebKit::WebNotification::encode):
(WebKit::WebNotification::decode):
* UIProcess/WebNotification.h: Added.
(WebKit::WebNotification::create):
(WebKit::WebNotification::title):
(WebKit::WebNotification::body):
(WebKit::WebNotification::type):
* UIProcess/API/C/WKNotification.cpp: Added as API.
(WKNotificationGetTypeID):
(WKNotificationCopyTitle):
(WKNotificationCopyBody):
* UIProcess/API/C/WKNotification.h: Added as API.
* WebProcess/Notifications/WebNotificationManager.h: Added. Contains for now show() and cancel().
The rest of the notification client methods will be added later. These two functions send messages
to the manager proxy.
* WebProcess/Notifications/WebNotificationManager.cpp: Added.
(WebKit::WebNotificationManager::WebNotificationManager):
(WebKit::WebNotificationManager::~WebNotificationManager):
(WebKit::WebNotificationManager::show):
(WebKit::WebNotificationManager::cancel):
* UIProcess/WebNotificationManagerProxy.cpp: Added.
(WebKit::WebNotificationManagerProxy::create):
(WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
(WebKit::WebNotificationManagerProxy::~WebNotificationManagerProxy):
(WebKit::WebNotificationManagerProxy::invalidate):
(WebKit::WebNotificationManagerProxy::initializeProvider):
(WebKit::WebNotificationManagerProxy::didReceiveMessage):
(WebKit::WebNotificationManagerProxy::show):
(WebKit::WebNotificationManagerProxy::cancel):
* UIProcess/WebNotificationManagerProxy.h: Added.
(WebKit::WebNotificationManagerProxy::clearContext):
(WebKit::WebNotificationManagerProxy::type):
* UIProcess/WebNotificationManagerProxy.messages.in: Added.
* UIProcess/API/C/WKNotificationManager.cpp: Added.
(WKNotificationManagerGetTypeID):
(WKNotificationManagerSetProvider):
* UIProcess/API/C/WKNotificationManager.h: Added.
* UIProcess/WebContext.h: Add the notification manager to the web context.
(WebKit::WebContext::notificationManagerProxy): Access the manager.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext): Boilerplate for managers.
(WebKit::WebContext::~WebContext): Boilerplate for managers.
(WebKit::WebContext::disconnectProcess): Boilerplate for managers.
(WebKit::WebContext::didReceiveMessage): Forward messages to the notification manager.
* UIProcess/API/C/WKContext.cpp: Expose as API.
(WKContextGetNotificationManager):
* UIProcess/API/C/WKContext.h: Expose as API.
* UIProcess/API/C/WKNotificationProvider.h: Added.
* UIProcess/WebNotificationProvider.h: Added as APIClient.
* UIProcess/WebNotificationProvider.cpp: Added.
(WebKit::WebNotificationProvider::show): Forward call to the client.
(WebKit::WebNotificationProvider::cancel): Forward call to the client.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage): Forward messages for notification manager to the context.
* WebProcess/WebCoreSupport/WebChromeClient.cpp: Remove notificationPresenter().
* WebProcess/WebCoreSupport/WebChromeClient.h: Remove notificationPresenter().
* WebProcess/WebCoreSupport/WebNotificationClient.h: Added. Forwards client methods to manager.
* WebProcess/WebCoreSupport/WebNotificationClient.cpp: Added. Mostly stub implementation for now.
(WebKit::WebNotificationClient::WebNotificationClient):
(WebKit::WebNotificationClient::~WebNotificationClient):
(WebKit::WebNotificationClient::show):
(WebKit::WebNotificationClient::cancel):
(WebKit::WebNotificationClient::notificationObjectDestroyed):
(WebKit::WebNotificationClient::requestPermission):
(WebKit::WebNotificationClient::cancelRequestsForPermission):
(WebKit::WebNotificationClient::checkPermission):
* WebProcess/WebPage/WebPage.h: Added WebNotificationClient as one of its page clients.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Set the notification client to WebNotificationClient.
* WebProcess/WebProcess.h: Added WebNotificationManager.
(WebKit::WebProcess::notificationManager):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Initialize notificaton manager.
2011-11-28 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed build corrections.
* UIProcess/BackingStore.h: WinCairo doesn't need the Cairo backing
for widgets.
* win/WebKit2CFLite.def: Update to match WebKit2.def.
2011-11-28 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=72551
When the recommended scrollbar style changes, WKView's tracking options should
adjust accordingly
-and corresponding-
<rdar://problem/10409328>
Reviewed by Darin Adler.
These new functions take care of passing along the
recommendedScrollbarStyleDidChange() message that originates in the ChromeClient.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::recommendedScrollbarStyleDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:
This is where we actually respond to the recommendedScrollbarStyleDidChange
message. We remove the existing tracking area and create a new tracking area with
the appropriate tracking options.
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
BuiltInPDFView inherits from WebCore::ScrollableArea, so scrollbarStyleChanged()
must now take two parameters like the one in ScrollableArea.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::scrollbarStyleChanged):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
2011-11-28 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Fix panning after r101179
https://bugs.webkit.org/show_bug.cgi?id=73224
Reviewed by Noam Rosenthal.
We were wrongly checking for interactionEngine() instead of
!interactionEngine() after the QtWebPageEventHandler refactor.
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::recognize):
2011-11-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
Make sure the useFixedLayout feature is consistently handled
https://bugs.webkit.org/show_bug.cgi?id=73212
Reviewed by Simon Hausmann.
Set the fixed layout on the UI side so that it is part of the page
creation parameters and ensure that the page parameters are set
before creating the page.
The parameters are set to our defaults and are now altered in the
WebKitTestRunner.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
(QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
(QQuickWebView::QQuickWebView):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setUseFixedLayout):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
On the web process side the default value for useFixedLayout
wasn't actually read from the creation parameters. As it now may
be different than that of the FrameView, we now call
setFixedLayout in the constructor so make sure the value is
propagated to the FrameView.
(WebKit::WebPage::setFixedVisibleContentRect):
(WebKit::WebPage::setResizesToContentsUsingLayoutSize):
(WebKit::WebPage::resizeToContentsIfNeeded):
(WebKit::WebPage::setViewportSize):
(WebKit::WebPage::setUseFixedLayout):
(WebKit::WebPage::setFixedLayoutSize):
The methods that depends on fixed layout now have asserts to make
sure that they are used properly.
2011-11-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Rename WebKitNetworkRequest to WebKitURIRequest
https://bugs.webkit.org/show_bug.cgi?id=73202
Reviewed by Martin Robinson.
Network is confusing because the request can be for a local file uri.
* GNUmakefile.am:
* UIProcess/API/gtk/WebKitNetworkRequest.h: Removed.
* UIProcess/API/gtk/WebKitURIRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNetworkRequest.cpp.
(webkitURIRequestFinalize):
(webkitURIRequestGetProperty):
(webkitURIRequestSetProperty):
(webkit_uri_request_class_init):
(webkit_uri_request_init):
(webkit_uri_request_new):
(webkit_uri_request_get_uri):
* UIProcess/API/gtk/WebKitURIRequest.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_request):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
(testLoadRequest):
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::loadRequest):
* UIProcess/API/gtk/tests/WebViewTest.h:
* UIProcess/API/gtk/webkit2.h:
2011-11-28 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] WTF should be built as separate static library
https://bugs.webkit.org/show_bug.cgi?id=73201
Reviewed by Tor Arne Vestbø.
* Target.pri: Require wtf.
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp: Remove unnecessary config.h
inclusion and thus wtf dependency.
2011-11-28 Pavel Feldman <pfeldman@chromium.org>
REGRESSION (r101201): Crash inside WebKit::WebInspector::didClose() when closing any tab
https://bugs.webkit.org/show_bug.cgi?id=73183
Reviewed by Yury Semikhatsky.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::closeInspectorFrontend):
2011-11-28 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Simon Hausmann.
[WK2] fast/frames/iframe-plugin-load-remove-document-crash.html crashes
https://bugs.webkit.org/show_bug.cgi?id=63321
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::manualStreamDidFail): Don't assert that m_manualStream
is not null since it is not guaranteed but instead handle the case when it is null
with early return.
2011-11-27 Zeno Albisser <zeno@webkit.org>
[Qt][WK2] MiniBrowser stops displaying content after surfing a few pages.
https://bugs.webkit.org/show_bug.cgi?id=73172
Properly initialize WebLayerTreeInfo structures.
Reviewed by Andreas Kling.
* Shared/WebLayerTreeInfo.h:
(WebKit::WebLayerUpdateInfo::WebLayerUpdateInfo):
(WebKit::WebLayerAnimation::WebLayerAnimation):
(WebKit::WebLayerInfo::WebLayerInfo):
(WebKit::WebLayerTreeInfo::WebLayerTreeInfo):
2011-11-27 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/72665> Switch to a more modern approach to retrieving the OS marketing version
Reviewed by Dan Bernstein.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::macOSXVersionString): Use WKGetMacOSXVersionString.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Set up wkGetMacOSXVersionString.
2011-11-26 Pavel Feldman <pfeldman@google.com>
Web Inspector: remove disconnectFromBackend from the protocol.
https://bugs.webkit.org/show_bug.cgi?id=73127
Reviewed by Yury Semikhatsky.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::inspectorDestroyed):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
2011-11-26 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] QtDownloadManager doesn't need to be RefCounted
https://bugs.webkit.org/show_bug.cgi?id=73151
Reviewed by Kenneth Rohde Christiansen.
QtDownloadManager is owned by QtWebContext, and doesn't need to be a RefCounted
class. This commit also makes the callback handlers private -- following the similar
approach we take in other clients of the C API.
* UIProcess/qt/QtDownloadManager.cpp:
(WebKit::QtDownloadManager::QtDownloadManager):
(WebKit::QtDownloadManager::addDownload):
(WebKit::toQtDownloadManager):
(WebKit::QtDownloadManager::didReceiveResponse):
(WebKit::QtDownloadManager::didCreateDestination):
(WebKit::QtDownloadManager::didFinishDownload): remove unused failingUrl local variable.
(WebKit::QtDownloadManager::didFailDownload):
(WebKit::QtDownloadManager::didReceiveDataForDownload):
* UIProcess/qt/QtDownloadManager.h:
* UIProcess/qt/QtWebContext.cpp:
(WebKit::QtWebContext::initialize):
* UIProcess/qt/QtWebContext.h:
2011-11-26 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101193.
http://trac.webkit.org/changeset/101193
https://bugs.webkit.org/show_bug.cgi?id=73158
Breaks Windows and Qt minimal. (Requested by pfeldman on
#webkit).
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::inspectorDestroyed):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::disconnectFromBackend):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
2011-11-26 Pavel Feldman <pfeldman@google.com>
Web Inspector: remove disconnectFromBackend from the protocol.
https://bugs.webkit.org/show_bug.cgi?id=73127
Reviewed by Yury Semikhatsky.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::inspectorDestroyed):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
2011-11-25 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Remove WebContext related code from QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=73150
Reviewed by Kenneth Rohde Christiansen.
Creates a QtWebContext class that abstracts away from QtWebPageProxy the
handling of creating / maintaining the default WebContext, as well as the
code for the WKContextRef clients.
Another motivation for having this entity is to have a proper place to add
objects are bound to the context, like the QtDownloadManager.
* Target.pri:
* UIProcess/qt/ClientImpl.cpp: Removed.
* UIProcess/qt/ClientImpl.h: Removed.
* UIProcess/qt/QtDownloadManager.cpp:
* UIProcess/qt/QtWebContext.cpp: Added.
(WebKit::QtWebContext::QtWebContext):
(WebKit::QtWebContext::~QtWebContext):
(WebKit::QtWebContext::create):
(WebKit::QtWebContext::defaultContext):
(WebKit::QtWebContext::createWebPage):
(WebKit::QtWebContext::setNavigatorQtObjectEnabled):
(WebKit::QtWebContext::postMessageToNavigatorQtObject):
(WebKit::QtWebContext::initialize):
(WebKit::QtWebContext::initializeContextInjectedBundleClient):
(WebKit::toQtWebContext):
(WebKit::QtWebContext::didReceiveMessageFromInjectedBundle):
* UIProcess/qt/QtWebContext.h: Added.
(WebKit::QtWebContext::downloadManager):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::~QtWebPageProxy):
(QtWebPageProxy::setNavigatorQtObjectEnabled):
(QtWebPageProxy::postMessageToNavigatorQtObject):
(QtWebPageProxy::handleDownloadRequest):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-25 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Refactor GestureRecognizers to use QtWebPageEventHandler
https://bugs.webkit.org/show_bug.cgi?id=73096
Reviewed by Kenneth Rohde Christiansen.
Move all the interaction engine usage to QtWebPageEventHandler,
making all GestureRecognizers (Tap, Pinch and Pan) use it directly.
* UIProcess/qt/QtGestureRecognizer.cpp:
(WebKit::QtGestureRecognizer::QtGestureRecognizer):
* UIProcess/qt/QtGestureRecognizer.h:
* 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/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
(WebKit::QtTapGestureRecognizer::recognize):
(WebKit::QtTapGestureRecognizer::tapTimeout):
* UIProcess/qt/QtTapGestureRecognizer.h:
* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::QtWebPageEventHandler):
(QtWebPageEventHandler::setViewportInteractionEngine):
* UIProcess/qt/QtWebPageEventHandler.h:
(QtWebPageEventHandler::interactionEngine):
2011-11-25 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Remove unneeded declaration from QQuickWebPagePrivate
https://bugs.webkit.org/show_bug.cgi?id=73141
Reviewed by Antonio Gomes.
Left-over from r101165.
* UIProcess/API/qt/qquickwebpage_p_p.h:
2011-11-17 Martin Robinson <mrobinson@igalia.com>
[GTK] Integrate build-gtkdoc into build-webkit and make
https://bugs.webkit.org/show_bug.cgi?id=72626
Reviewed by Philippe Normand.
* GNUmakefile.am: Removed references to build-gtkdoc and gtkdoc.py.
* UIProcess/API/gtk/docs/build-gtkdoc: Removed.
2011-11-25 Kenneth Rohde Christiansen <kenneth@webkit.org>
Clean up code in WK2/ChromeClientClient related to viewport handling
https://bugs.webkit.org/show_bug.cgi?id=73128
Reviewed by Simon Hausmann.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):
Make sure that we only call resizeToContentsIfNeeded when we are
using the tiled backing store and fixed layout as well.
Guard the scrollbar code so that it is only called when scroll
delegation is not used. Do similarily for the frameset code,
which makes no sense with frame flattening.
(WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
This method is only called for the main frame, so the main frame
check has been removed.
2011-11-25 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Eliminate warnings about the deprecated QQuickCanvas::sceneGraphEngine() function.
Reviewed by Andreas Kling.
We use the function in question to find out if we can connect to the scene graph's
afterRendering signal. The signal has been moved into QQuickCanvas right away, so
we can connect to it as soon as we have a canvas.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::initializeSceneGraphConnections):
* UIProcess/API/qt/qquickwebpage_p.h:
2011-11-24 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Move event handling out of QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=73089
Reviewed by Kenneth Rohde Christiansen.
Move all logic related to event handling, gestures and the
interaction engine out of QtWebPageProxy, creating a separate
class called QtWebPageEventHandler. This handler will be created
by the QQuickWebViewPrivate and will be registered into QtWebPageProxy.
QQuickWebPage will now call handleEvent through this entity.
* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::event):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::initializeDesktop):
(QQuickWebViewPrivate::initializeTouch):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
(WebKit::QtTapGestureRecognizer::recognize):
(WebKit::QtTapGestureRecognizer::tapTimeout):
* UIProcess/qt/QtTapGestureRecognizer.h:
* UIProcess/qt/QtWebPageEventHandler.cpp: Added.
(QtWebPageEventHandler::dragOperationToDropAction):
(QtWebPageEventHandler::dragOperationToDropActions):
(QtWebPageEventHandler::dropActionToDragOperation):
(QtWebPageEventHandler::QtWebPageEventHandler):
(QtWebPageEventHandler::~QtWebPageEventHandler):
(QtWebPageEventHandler::handleEvent):
(QtWebPageEventHandler::handleMouseMoveEvent):
(QtWebPageEventHandler::handleMousePressEvent):
(QtWebPageEventHandler::handleMouseReleaseEvent):
(QtWebPageEventHandler::handleMouseDoubleClickEvent):
(QtWebPageEventHandler::handleWheelEvent):
(QtWebPageEventHandler::handleHoverLeaveEvent):
(QtWebPageEventHandler::handleHoverMoveEvent):
(QtWebPageEventHandler::handleDragEnterEvent):
(QtWebPageEventHandler::handleDragLeaveEvent):
(QtWebPageEventHandler::handleDragMoveEvent):
(QtWebPageEventHandler::handleDropEvent):
(QtWebPageEventHandler::handleSingleTapEvent):
(QtWebPageEventHandler::handleDoubleTapEvent):
(QtWebPageEventHandler::timerEvent):
(QtWebPageEventHandler::handleKeyPressEvent):
(QtWebPageEventHandler::handleKeyReleaseEvent):
(QtWebPageEventHandler::handleFocusInEvent):
(QtWebPageEventHandler::handleFocusOutEvent):
(QtWebPageEventHandler::setViewportInteractionEngine):
(QtWebPageEventHandler::touchEvent):
(QtWebPageEventHandler::resetGestureRecognizers):
(QtWebPageEventHandler::doneWithTouchEvent):
(QtWebPageEventHandler::didFindZoomableArea):
* UIProcess/qt/QtWebPageEventHandler.h: Added.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::init):
(QtWebPageProxy::didFindZoomableArea):
(QtWebPageProxy::processDidCrash):
(QtWebPageProxy::startDrag):
(QtWebPageProxy::doneWithTouchEvent):
* UIProcess/qt/QtWebPageProxy.h:
(QtWebPageProxy::eventHandler):
2011-11-25 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Cleanup in QML tests.
Reviewed by Tor Arne Vestbø.
Use a simple QML component for the "DesktopWebView" instead of a new QML type.
This will allow the use of the experimental extension in the future.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/DesktopWebView.qml: Added.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
(main):
2011-11-24 Zeno Albisser <zeno@webkit.org>
[Qt]WK2][Mac] Use Mac port's IPC implementation instead of Unix sockets
https://bugs.webkit.org/show_bug.cgi?id=72495
Make Qt using mach ports and Grand Central Dispatch for IPC
when building on Mac.
Reviewed by Simon Hausmann.
* Platform/CoreIPC/Attachment.cpp:
* Platform/CoreIPC/Attachment.h:
* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/CoreIPCMessageKinds.h:
* Platform/SharedMemory.h:
* Platform/WorkQueue.h:
* Platform/mac/MachUtilities.cpp:
* Platform/mac/WorkQueueMac.cpp:
* Target.pri:
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didFinishLaunching):
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):
2011-11-17 Oleg Romashin <romaxa@gmail.com>
[Qt][WK2] Stop leaking memory in string QWK2 API's
https://bugs.webkit.org/show_bug.cgi?id=72558
Reviewed by Simon Hausmann.
WKRef API pointers don't adopt the implementation pointers by default and the implementation pointers
stay alive after destroying the API pointers.
This patch adopts the implementation pointers correctly by using adoptWK that returns a WKRetainPtr
that will be around temporarily and correctly release the object.
* UIProcess/qt/QtWebPageUIClient.cpp:
(QtWebPageUIClient::mouseDidMoveOverElement):
* UIProcess/qt/QtDownloadManager.cpp:
(WebKit::qt_wk_didFailDownload):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::load):
(QtWebPageProxy::url):
(QtWebPageProxy::title):
2011-11-24 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Get rid of the buildDirForSource() function in the build system
At some point the plan was to allow for running qmake on sub-trees
of the sources, into the top level build directory, but this is no
longer possible, so no reason to keep the convenience function around.
Reviewed by Simon Hausmann.
* DerivedSources.pri:
2011-11-24 Patrick Gansterer <paroga@webkit.org>
[CMake] Add missing source files
https://bugs.webkit.org/show_bug.cgi?id=73052
Reviewed by Andreas Kling.
Add more generic files to the sources list and remove the EFL specific stuff.
* CMakeLists.txt:
2011-11-21 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Move QQuickWebView::downloadRequested signal into experimental
https://bugs.webkit.org/show_bug.cgi?id=72914
Reviewed by Andreas Kling.
Make the signal downloadRequested an experimental API from QQuickWebView
and modify the qml test to use a WebView instead of a DesktopWebView.
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_download.qml.
* UIProcess/API/qt/tests/qmltests/common/download.html: Removed.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::didReceiveDownloadResponse):
2011-11-22 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Expose onNavigationRequested signal instead of expecting a slot be defined from QML
https://bugs.webkit.org/show_bug.cgi?id=72976
Reviewed by Tor Arne Vestbø.
Expecting slots/methods to be implemented in QML isn't very idiomatic in
comparison with the alternative of having a signal. So we now use a signal
for handling navigation requests, and expose a 'request' object with relevant
metadata. There's also a settable property 'action' used to indicate whether
the navigation should be ignored or trigger a download.
The pattern signal with an object parameter that can keep the reply is common in QML,
and used for example for mouse signals.
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationPolicyForUrl.qml.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/qt/QtWebPagePolicyClient.cpp:
(NavigationRequest::NavigationRequest):
(NavigationRequest::url):
(NavigationRequest::button):
(NavigationRequest::modifiers):
(NavigationRequest::action):
(NavigationRequest::setAction):
(QtWebPagePolicyClient::decidePolicyForNavigationAction):
* UIProcess/qt/QtWebPagePolicyClient.h:
2011-11-22 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Move PagePolicyClient related code to QtWebPagePolicyClient
https://bugs.webkit.org/show_bug.cgi?id=72959
Reviewed by Andreas Kling.
Split PagePolicyClient related code from QtWebPageProxy/ClientImpl. The new
QtWebPagePolicyClient registers itself with WKPageRef and it's owned by the
QQuickWebViewPrivate. This is a move to clean up QtWebPageProxy object.
QtPolicyInterface abstraction was not helping us as much as the separation of
the client code will. It was more useful when we had multiple WebViews.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(toPolicyAction):
(QQuickWebViewPrivate::navigationPolicyForURL):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/ClientImpl.cpp:
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPagePolicyClient.cpp: Added.
(QtWebPagePolicyClient::QtWebPagePolicyClient):
(QtWebPagePolicyClient::decidePolicyForNavigationAction):
(toQtWebPagePolicyClient):
(toQtMouseButton):
(toQtKeyboardModifiers):
(QtWebPagePolicyClient::decidePolicyForResponse):
* UIProcess/qt/QtWebPagePolicyClient.h: Renamed from Source/WebKit2/UIProcess/qt/QtPolicyInterface.h.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::init):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-23 Raphael Kubo da Costa <kubo@profusion.mobi>
[CMake] Move the top-level logic to the top-level directory.
https://bugs.webkit.org/show_bug.cgi?id=72685
Reviewed by Brent Fulgham.
* CMakeLists.txt: Adjust Source/ directory.
2011-11-22 Gopal Raghavan <gopal.1.raghavan@nokia.com>
Unreviewed : remove empty folders related to TouchWebView and DesktopWebView
https://bugs.webkit.org/show_bug.cgi?id=72985
* UIProcess/API/qt/tests/qmltests/DesktopWebView: Removed.
* UIProcess/API/qt/tests/qmltests/TouchWebView: Removed.
2011-11-22 Carlos Garcia Campos <cgarcia@igalia.com>
Ensure web process before starting a download
https://bugs.webkit.org/show_bug.cgi?id=72499
Reviewed by Anders Carlsson.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::download): Call ensureWebProcess().
2011-11-22 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed buildfix after r101001.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::openInspectorFrontend): Use ASSERT_UNUSED instead of ASSERT.
2011-11-22 Pavel Feldman <pfeldman@google.com>
Not reviewed: moving inspector frontend creation out of assert in WebKit2.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::openInspectorFrontend):
2011-11-22 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Fix and unskip loadHtml api test
https://bugs.webkit.org/show_bug.cgi?id=72916
Reviewed by Andreas Kling.
Now that linkHovered events are working again we can fix and unskip this
loadHtml test.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
2011-11-22 Pavel Feldman <pfeldman@google.com>
Web Inspector: remove Inspector::bringToFront from the protocol.
https://bugs.webkit.org/show_bug.cgi?id=72937
Reviewed by Yury Semikhatsky.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::openInspectorFrontend):
(WebKit::WebInspectorClient::bringFrontendToFront):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
2011-11-22 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Move PageLoadClient related code to QtWebPageLoadClient
https://bugs.webkit.org/show_bug.cgi?id=72928
Reviewed by Andreas Kling.
Split PageLoadClient related code from QtWebPageProxy/ClientImpl. The new
QtWebPageLoadClient registers itself with WKPageRef and it's owned by the
QQuickWebViewPrivate. This is a move to clean up QtWebPageProxy object.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebView::loadProgress):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/ClientImpl.cpp:
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPageLoadClient.cpp: Added.
(QtWebPageLoadClient::QtWebPageLoadClient):
(QtWebPageLoadClient::didStartProvisionalLoadForFrame):
(QtWebPageLoadClient::didCommitLoadForFrame):
(QtWebPageLoadClient::didSameDocumentNavigationForFrame):
(QtWebPageLoadClient::didReceiveTitleForFrame):
(QtWebPageLoadClient::didFirstVisuallyNonEmptyLayoutForFrame):
(QtWebPageLoadClient::dispatchLoadSucceeded):
(QtWebPageLoadClient::dispatchLoadFailed):
(QtWebPageLoadClient::setLoadProgress):
(toQtWebPageLoadClient):
(QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame):
(QtWebPageLoadClient::didFinishLoadForFrame):
(QtWebPageLoadClient::didFailLoadWithErrorForFrame):
(QtWebPageLoadClient::didStartProgress):
(QtWebPageLoadClient::didChangeProgress):
(QtWebPageLoadClient::didFinishProgress):
* UIProcess/qt/QtWebPageLoadClient.h: Added.
(QtWebPageLoadClient::loadProgress):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::init):
(QtWebPageProxy::updateNavigationState):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-22 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Move PageUIClient related code to QtWebPageUIClient
https://bugs.webkit.org/show_bug.cgi?id=72910
Reviewed by Andreas Kling.
Split PageUIClient related code from QtWebPageProxy/ClientImpl. The new
QtWebPageUIClient registers itself with WKPageRef and it's owned by the
QQuickWebViewPrivate. This is a move to clean up QtWebPageProxy object.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::chooseFiles):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/ClientImpl.cpp:
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::init):
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/qt/QtWebPageUIClient.cpp: Added.
(QtWebPageUIClient::QtWebPageUIClient):
(QtWebPageUIClient::runJavaScriptAlert):
(QtWebPageUIClient::runJavaScriptConfirm):
(QtWebPageUIClient::runJavaScriptPrompt):
(QtWebPageUIClient::runOpenPanel):
(QtWebPageUIClient::setStatusText):
(QtWebPageUIClient::mouseDidMoveOverElement):
(toQtWebPageUIClient):
(createNullWKString):
* UIProcess/qt/QtWebPageUIClient.h: Added.
2011-11-22 Eunmi Lee <eunmi15.lee@samsung.com>
[WK2] Modify EFL port's WebEventFactory to use EflKeyboardUtilities's
keyIdentifierForEvasKeyName() and windowsKeyCodeForEvasKeyName().
https://bugs.webkit.org/show_bug.cgi?id=72850
Reviewed by Anders Carlsson.
The EflKeyboardUtilities has been added, so we can use keyIdentifierForEvasKeyName() and
windowsKeyCodeForEvasKeyName() for EFL port's WebEventFactory.
* Shared/efl/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebKeyboardEvent):
2011-11-21 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] REGRESSION(100483): It made 2 API tests fail
https://bugs.webkit.org/show_bug.cgi?id=72612
Reviewed by Kenneth Rohde Christiansen.
Make sure that when the view is focused, the page knows about it.
Also set a the view to be the focused item in the failing tests.
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::focusInEvent):
(QQuickWebView::focusOutEvent):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::isViewFocused):
2011-11-21 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Speed up debug builds.
https://bugs.webkit.org/show_bug.cgi?id=72882
Reviewed by Tor Arne Vestbø.
* Target.pri: Make BUILDING_WebKit2 available, so it can be
used by the build system.
2011-11-21 Alexis Menard <alexis.menard@openbossa.org>
[Qt] Remove unnecessary initialize method from QQuickWebView.
https://bugs.webkit.org/show_bug.cgi?id=72905
Reviewed by Kenneth Rohde Christiansen.
We don't need this level of indirection.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebView::QQuickWebView):
* UIProcess/API/qt/qquickwebview_p_p.h:
2011-11-21 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Implement loadHtml API for QQuickWebView
https://bugs.webkit.org/show_bug.cgi?id=72161
Reviewed by Simon Hausmann.
Implement QQuickWebView::loadHtml that calls QtWebPageProxy::loadHTMLString.
This function will use WKPageLoadHTMLString in order to load HTML from a given string.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::loadHtml):
* UIProcess/API/qt/qquickwebview.h:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadHtml.qml: Added.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::loadHTMLString):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-21 Igor Oliveira <igor.oliveira@openbossa.org>
[WK2][Qt] Move Accelerated Composite animations to UIProcess
https://bugs.webkit.org/show_bug.cgi?id=72753
Currently, all the accelerated compositing animations are applied in WebProcess and
for each frame generated, WebProcess needs to sync with UIProcess.
This patch moves the accelerated compositing animations to UIProcess reducing the
amount of synchronization messages between WebProcess and UIProcess, this is done
sending animations information to UIProcess.
Reviewed by Noam Rosenthal.
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
Encode/Decode RefPtr<Animation> instead of Animation class. This facilitates
the data serialization.
* Shared/WebCoreArgumentCoders.h:
* Shared/WebLayerTreeInfo.cpp:
(WebKit::WebLayerInfo::encode):
(WebKit::WebLayerInfo::decode):
(WebKit::WebLayerAnimation::encode):
(WebKit::WebLayerAnimation::decode):
Create WebLayerAnimation struct, it is used to send animation information
to UIProcess.
* Shared/WebLayerTreeInfo.h:
(WebKit::WebLayerAnimation::WebLayerAnimation):
* UIProcess/LayerTreeHostProxy.h:
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit::LayerTreeHostProxy::didFireViewportUpdateTimer):
(WebKit::LayerTreeHostProxy::syncLayerParameters):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::addAnimation):
(WebCore::WebGraphicsLayer::pauseAnimation):
(WebCore::WebGraphicsLayer::removeAnimation):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
2011-11-21 Pavel Feldman <pfeldman@chromium.org>
Web Inspector: [WebKit2] Do not access InspectorController from the "Develop" menu code.
https://bugs.webkit.org/show_bug.cgi?id=63009
Reviewed by Yury Semikhatsky.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::openInspectorFrontend):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::WebInspector):
(WebKit::WebInspector::createInspectorPage):
(WebKit::WebInspector::showConsole):
(WebKit::WebInspector::startJavaScriptDebugging):
(WebKit::WebInspector::stopJavaScriptDebugging):
(WebKit::WebInspector::setJavaScriptProfilingEnabled):
(WebKit::WebInspector::startJavaScriptProfiling):
(WebKit::WebInspector::stopJavaScriptProfiling):
(WebKit::WebInspector::startPageProfiling):
(WebKit::WebInspector::stopPageProfiling):
* WebProcess/WebPage/WebInspector.h:
2011-11-21 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Add WebView.view attached property support for dialogs in QML
https://bugs.webkit.org/show_bug.cgi?id=72825
Reviewed by Simon Hausmann.
When creating new dialogs, fill their WebView.view attached property
with the WebView that's creating them. This follows the same pattern
as QtQuick's ListView, enabling the usage of the same dialog component
for different WebViews.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::runJavaScriptAlert):
(QQuickWebViewPrivate::runJavaScriptConfirm):
(QQuickWebViewPrivate::runJavaScriptPrompt):
(QQuickWebViewPrivate::setViewInAttachedProperties):
(QQuickWebViewAttached::QQuickWebViewAttached):
(QQuickWebViewAttached::setView):
(QQuickWebView::qmlAttachedProperties):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
* UIProcess/qt/QtDialogRunner.h:
(QtDialogRunner::dialog):
2011-11-21 Jochen Eisinger <jochen@chromium.org>
Implement Meta referrer
https://bugs.webkit.org/show_bug.cgi?id=72674
Reviewed by Adam Barth.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::loadURL):
2011-11-21 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck build.
* GNUmakefile.am:
2011-10-17 Antonio Gomes <agomes@rim.com>
Pass a Frame* parameter in EditorClient::respondToChangedSelection
https://bugs.webkit.org/show_bug.cgi?id=70248
Reviewed by Ryosuke Niwa.
* WebProcess/WebCoreSupport/WebEditorClient.cpp: Make use of the newly added Frame* parameter.
(WebKit::WebEditorClient::respondToChangedSelection):
* WebProcess/WebCoreSupport/WebEditorClient.h:
2011-11-17 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/72646> Disable deprecation warnings around code where we cannot easily
switch away from the deprecated APIs.
Reviewed by Sam Weinig.
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2011-11-19 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100834.
http://trac.webkit.org/changeset/100834
https://bugs.webkit.org/show_bug.cgi?id=72806
this patch makes Qt run-webkit-test exit before finishing
(Requested by igoroliveira on #webkit).
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
* Shared/WebCoreArgumentCoders.h:
* Shared/WebLayerTreeInfo.cpp:
(WebKit::WebLayerInfo::encode):
(WebKit::WebLayerInfo::decode):
* Shared/WebLayerTreeInfo.h:
* UIProcess/LayerTreeHostProxy.h:
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit::LayerTreeHostProxy::syncLayerParameters):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::addAnimation):
(WebCore::WebGraphicsLayer::pauseAnimation):
(WebCore::WebGraphicsLayer::removeAnimation):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
2011-11-18 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100826.
http://trac.webkit.org/changeset/100826
https://bugs.webkit.org/show_bug.cgi?id=72786
Broke Chromium Mac build (Requested by aklein on #webkit).
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::scrollbarStyleChanged):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
2011-11-18 Igor Oliveira <igor.oliveira@openbossa.org>
[WK2][Qt] Move Accelerated Composite animations to UIProcess
https://bugs.webkit.org/show_bug.cgi?id=72753
Currently, all the accelerated compositing animations are applied in WebProcess and
for each frame generated, WebProcess needs to sync with UIProcess.
This patch moves the accelerated compositing animations to UIProcess reducing the
amount of synchronization messages between WebProcess and UIProcess, this is done
sending animations information to UIProcess.
Reviewed by Noam Rosenthal.
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
Encode/Decode RefPtr<Animation> instead of Animation class. This facilitates
the data serialization.
* Shared/WebCoreArgumentCoders.h:
* Shared/WebLayerTreeInfo.cpp:
(WebKit::WebLayerInfo::encode):
(WebKit::WebLayerInfo::decode):
(WebKit::WebLayerAnimation::encode):
(WebKit::WebLayerAnimation::decode):
Create WebLayerAnimation struct, it is used to send animation information
to UIProcess.
* Shared/WebLayerTreeInfo.h:
(WebKit::WebLayerAnimation::WebLayerAnimation):
* UIProcess/LayerTreeHostProxy.h:
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit::LayerTreeHostProxy::updateSceneGraphUpdateTimerFired):
(WebKit::LayerTreeHostProxy::syncLayerParameters):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::addAnimation):
(WebCore::WebGraphicsLayer::pauseAnimation):
(WebCore::WebGraphicsLayer::removeAnimation):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
2011-11-18 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=72551
When the recommended scrollbar style changes, WKView's tracking options should
adjust accordingly
-and corresponding-
<rdar://problem/10409328>
Reviewed by Darin Adler.
These new functions take care of passing along the
recommendedScrollbarStyleDidChange() message that originates in the ChromeClient.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::recommendedScrollbarStyleDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:
This is where we actually respond to the recommendedScrollbarStyleDidChange
message. We remove the existing tracking area and create a new tracking area with
the appropriate tracking options.
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
BuiltInPDFView inherits from WebCore::ScrollableArea, so scrollbarStyleChanged()
must now take two parameters like the one in ScrollableArea.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::scrollbarStyleChanged):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
2011-11-18 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][Wk2] Add an API test for scroll request from javascript
https://bugs.webkit.org/show_bug.cgi?id=72407
New API test added for QQuickWebView for javascript scroll request
Reviewed by Simon Hausmann.
* UIProcess/API/qt/tests/html/scroll.html: Added.
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::scrollRequest):
2011-11-18 No'am Rosenthal <noam.rosenthal@nokia.com>
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 KeyframeValueList, and modify the TimingFunction ArgumentCoder to
allow encoding const TimingFunctions and not just RefPtr<TimingFunction>.
Reviewed by Simon Hausmann.
* Scripts/webkit2/messages.py:
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
* Shared/WebCoreArgumentCoders.h:
2011-11-18 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Guard for the viewportInteractionEngine as it doesn't always exist.
Reviewed by Antonio Gomes.
The engine is non-existent when the view is configured to use desktop
behavior.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::handleWheelEvent):
(QtWebPageProxy::didFindZoomableArea):
2011-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Send DidCreateDestination to DownloadProxy when destination has been created
https://bugs.webkit.org/show_bug.cgi?id=72724
Reviewed by Martin Robinson.
* WebProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::didReceiveResponse): Call
didCreateDestination() when destination URI has been successfully
created.
2011-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Cancel current download operation before download object is deleted
https://bugs.webkit.org/show_bug.cgi?id=72721
Reviewed by Martin Robinson.
It fixes a crash in the web process when a download finishes early
due to a failure.
* WebProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::cancel): Delete current ResourceHandle.
(WebKit::Download::platformInvalidate): If there's a
ResourceHandle active, cancel the download operation and delete
the handle.
(WebKit::Download::platformDidFinish): Delete current ResourceHandle.
2011-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Downloads not started by WebView only fail for transport errors
https://bugs.webkit.org/show_bug.cgi?id=72718
Reviewed by Martin Robinson.
* WebProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::didReceiveResponse): Check if the http
status of the response is an error code and finish the download
with an error in such case.
2011-11-17 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Support customizing JS alert/confirm/prompt dialogs using QML
https://bugs.webkit.org/show_bug.cgi?id=72319
Reviewed by Simon Hausmann.
Adds alertDialog, confirmDialog and promptDialog properties to QQuickWebView's
privateObject. These are QML components that are created by the webview when the
corresponding function is called in JS.
The dialogs are created in a context that contains a model object, similar to
ListView delegates. The "message" and "defaultValue" parameters are available
in the model object, as well as slots expected to be called by the dialog.
This commit removes the old code for supporting QWidget builtin dialogs. The code
wasn't working properly (closing any dialog was closing the app after QWindow
refactoring in Qt5).
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::runJavaScriptAlert):
(QQuickWebViewPrivate::runJavaScriptConfirm):
(QQuickWebViewPrivate::runJavaScriptPrompt):
(QQuickWebViewExperimental::alertDialog):
(QQuickWebViewExperimental::setAlertDialog):
(QQuickWebViewExperimental::confirmDialog):
(QQuickWebViewExperimental::setConfirmDialog):
(QQuickWebViewExperimental::promptDialog):
(QQuickWebViewExperimental::setPromptDialog):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/alert.html: Added.
* UIProcess/API/qt/tests/qmltests/common/confirm.html: Added.
* UIProcess/API/qt/tests/qmltests/common/prompt.html: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/qt/QtDialogRunner.cpp: Added.
(QtDialogRunner::QtDialogRunner):
(QtDialogRunner::~QtDialogRunner):
(DialogContextObject::DialogContextObject):
(DialogContextObject::message):
(DialogContextObject::defaultValue):
(DialogContextObject::dismiss):
(DialogContextObject::accept):
(DialogContextObject::reject):
(QtDialogRunner::initForAlert):
(QtDialogRunner::initForConfirm):
(QtDialogRunner::initForPrompt):
(QtDialogRunner::createDialog):
* UIProcess/qt/QtDialogRunner.h: Added.
(QtDialogRunner::wasAccepted):
(QtDialogRunner::result):
(QtDialogRunner::onAccepted):
2011-11-18 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Support wheel event together with resizesToContents
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qquickwebpage.cpp:
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::wheelEvent):
* UIProcess/qt/QtViewportInteractionEngine.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::handleWheelEvent):
2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][WK2] Layer violation: WebPopupMenuProxyQtDesktop.cpp uses files from WebKit/qt
https://bugs.webkit.org/show_bug.cgi?id=72696
Reviewed by Kenneth Rohde Christiansen.
Implement the WK2 desktop popup by simply subclassing QComboBox and doing the
same thing as QtWebComboBox from WK1 (a few lines of code).
* UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
(WebKit::WebPopupMenuProxyQtDesktop::WebPopupMenuProxyQtDesktop):
(WebKit::WebPopupMenuProxyQtDesktop::~WebPopupMenuProxyQtDesktop):
(WebKit::WebPopupMenuProxyQtDesktop::showPopupMenu):
(WebKit::WebPopupMenuProxyQtDesktop::hidePopupMenu):
(WebKit::WebPopupMenuProxyQtDesktop::eventFilter):
(WebKit::WebPopupMenuProxyQtDesktop::setSelectedIndex):
(WebKit::WebPopupMenuProxyQtDesktop::populate):
* UIProcess/qt/WebPopupMenuProxyQtDesktop.h:
2011-11-18 Zeno Albisser <zeno@webkit.org>
[Qt][WK2] setViewportInteractionEngine must also set the InteractionEngine for the tap recognizer.
https://bugs.webkit.org/show_bug.cgi?id=72717
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::setViewportInteractionEngine):
* UIProcess/qt/QtTapGestureRecognizer.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::setViewportInteractionEngine):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][WK2] Fix popups for select elements.
Reviewed by Tor Arne Vestbø.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::createPopupMenuProxy): Fall back to the "desktop" implementation
for the moment. Better than nothing :)
2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Unreviewed debug build fix
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy): Don't assert on a non-existant
variable.
2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Removal of QtViewInterface part 3
Reviewed by Kenneth Rohde Christiansen.
Move the remaining forwarded calls from ClientImpl that went through
ViewInterface and then PageProxy or WebView to go straight to
QtWebPageProxy. QtViewInterface is empty now and therefore removed.
* Target.pri:
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebpage_p_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::chooseFiles):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/ClientImpl.cpp:
(qt_wk_runJavaScriptAlert):
(qt_wk_runJavaScriptConfirm):
(qt_wk_runJavaScriptPrompt):
(qt_wk_setStatusText):
(qt_wk_runOpenPanel):
(qt_wk_mouseDidMoveOverElement):
(setupPageUiClient):
* UIProcess/qt/QtViewInterface.cpp: Removed.
* UIProcess/qt/QtViewInterface.h: Removed.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::didChangeStatusText):
(QtWebPageProxy::didMouseMoveOverElement):
(QtWebPageProxy::showContextMenu):
(QtWebPageProxy::hideContextMenu):
(QtWebPageProxy::runJavaScriptAlert):
(QtWebPageProxy::runJavaScriptConfirm):
(QtWebPageProxy::runJavaScriptPrompt):
(QtWebPageProxy::chooseFiles):
(QtWebPageProxy::createContextMenuProxy):
(QtWebPageProxy::didChangeLoadProgress):
* UIProcess/qt/QtWebPageProxy.h:
(QtWebPageProxy::contextMenuItemSelected):
* UIProcess/qt/WebContextMenuProxyQt.cpp:
(WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
(WebKit::WebContextMenuProxyQt::create):
(WebKit::WebContextMenuProxyQt::hideContextMenu):
* UIProcess/qt/WebContextMenuProxyQt.h:
2011-11-18 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] UI process segfaults, when visiblity properties are set while the WebProcess is dead.
https://bugs.webkit.org/show_bug.cgi?id=72699
The drawing area may be null, if the web process has crashed, but not yet recovered.
Always null check against drawing area.
Reviewed by Simon Hausmann.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::setDrawingAreaSize):
(QtWebPageProxy::setVisibleContentRectAndScale):
(QtWebPageProxy::setVisibleContentRectTrajectoryVector):
2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Removal of QtViewInterface part 2
Reviewed by Kenneth Rohde Christiansen.
Move all functions that forwarded from QtWebPageProxy to QtViewInterface and then
to QQuickWebView straight into QtWebPageProxy.
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/QtViewInterface.cpp:
* UIProcess/qt/QtViewInterface.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::setCursor):
(QtWebPageProxy::isViewWindowActive):
(QtWebPageProxy::isViewVisible):
(QtWebPageProxy::pageDidRequestScroll):
(QtWebPageProxy::didFinishFirstNonEmptyLayout):
(QtWebPageProxy::didChangeContentsSize):
(QtWebPageProxy::didChangeViewportProperties):
(QtWebPageProxy::toolTipChanged):
(QtWebPageProxy::didChangeUrl):
(QtWebPageProxy::didChangeTitle):
(QtWebPageProxy::loadDidBegin):
(QtWebPageProxy::loadDidCommit):
(QtWebPageProxy::loadDidSucceed):
(QtWebPageProxy::loadDidFail):
(QtWebPageProxy::didRelaunchProcess):
(QtWebPageProxy::processDidCrash):
(QtWebPageProxy::startDrag):
(QtWebPageProxy::didReceiveDownloadResponse):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Removal of QtViewInterface part 1
Reviewed by Kenneth Rohde Christiansen.
Replace functions of QtViewInterface that forward to QQuickWebPage with direct
usage of QQuickWebPage. Also removed some dead code.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::sceneGraphUpdateQueue):
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
* UIProcess/TiledDrawingAreaProxy.h:
* UIProcess/qt/QtViewInterface.cpp:
(WebKit::QtViewInterface::QtViewInterface):
(WebKit::QtViewInterface::isVisible):
* UIProcess/qt/QtViewInterface.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::setViewNeedsDisplay):
(QtWebPageProxy::viewSize):
(QtWebPageProxy::isViewFocused):
(QtWebPageProxy::isViewVisible):
(QtWebPageProxy::didRelaunchProcess):
* UIProcess/qt/QtWebPageProxy.h:
(QtWebPageProxy::qmlWebPage):
* UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
2011-11-17 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Layer violation: ThirdPartyCookiesQt.cpp uses QWebSettings in two places
https://bugs.webkit.org/show_bug.cgi?id=72597
Reviewed by Kenneth Rohde Christiansen.
Stub implementation of new NetworkingContext::thirdPartyCookiePolicyPermission
API.
* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
(WebCore::WebFrameNetworkingContext::thirdPartyCookiePolicyPermission):
* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
2011-11-17 Martin Robinson <mrobinson@igalia.com>
[GTK] The process freezes when you right click on windowless Flash
https://bugs.webkit.org/show_bug.cgi?id=69123
Reviewed by Xan Lopez.
Add a new plugin quirk for dealing with right-clicking on
windowless Flash on x86_64 machines. This already exists for
WebKit1.
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::determineQuirks): If the plugin is
Flash and we are on x86_64, then disable sending right-clicking
events while in windowless mode.
* Shared/Plugins/PluginQuirks.h: Add the new quirk.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformHandleMouseEvent): If the quirk
is active don't send right click events.
2011-11-17 Igor Oliveira <igor.oliveira@openbossa.org>
[WK2] Fix TransformOperation serialization
https://bugs.webkit.org/show_bug.cgi?id=72625
SimpleArgumentCoder can encode and decode just POD types. And according the
ISO/IEC 14882, POD types does not have virtual methods, however TransformOperation
has pure virtual methods.
This patch fixes TransformOperation subclass serialization.
Reviewed by Noam Rosenthal.
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
(CoreIPC::encodeOperation):
(CoreIPC::decodeOperation):
* Shared/WebCoreArgumentCoders.h:
2011-11-17 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Fix zero sized views in all QML tests
https://bugs.webkit.org/show_bug.cgi?id=72633
Reviewed by Noam Rosenthal.
After r100590, zero sized WebViews are no longer supported and,
therefore, the QML API tests need to be fixed.
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadZeroSizeView.qml: Removed.
* UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml:
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2011-11-17 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] Don't export the private QQuickView.
Reviewed by Kenneth Rohde Christiansen.
We don't need to export that class anymore as the experimental QML plugin
does not expose this object anymore.
* UIProcess/API/qt/qquickwebview_p_p.h:
2011-11-17 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Expose setUseTraditionalDesktopBehaviour() in QML experimental API
https://bugs.webkit.org/show_bug.cgi?id=72610
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebview_p.h:
2011-11-17 Kenneth Rohde Christiansen <kenneth@webkit.org>
Print warning for the Qt port when a process crashes and is relaunched
https://bugs.webkit.org/show_bug.cgi?id=72607
Reviewed by Antonio Gomes.
Make the QtViewInterface::processDidCrash take a URL string argument,
for being able to say which url was the origin of the crash.
We now additionally store the load state and url at process exit. This
is needed for printing the warning and for further crash handling.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processDidCrash):
* UIProcess/qt/QtViewInterface.cpp:
(WebKit::QtViewInterface::processDidCrash):
(WebKit::QtViewInterface::didRelaunchProcess):
* UIProcess/qt/QtViewInterface.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::processDidCrash):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-17 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] Cleanup dead code in QtWebPageProxy.
https://bugs.webkit.org/show_bug.cgi?id=72608
Reviewed by Simon Hausmann.
Remove some dead code after we merged our views.
QQuickWebView is now using AC which means that this
path is never called now.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::didReceiveDownloadResponse):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Remove forwarding header for WebKit2 C API
The Qt port of WebKit does not provide a C-API for the View classes.
Reviewed by Simon Hausmann.
* UIProcess/API/C/WebKit2.h:
* UIProcess/API/qt/WKView.h: Removed.
2011-11-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Resolve import and web-process paths automatically for QML tests
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
(main):
2011-11-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Move WebKit2 C++ APIs to private API and build QML extension plugin on top of that
A new extension object has been added to QQuickWebView (the same approach should be used
for other API classes that need experimental APIs). The QML extension mechanism is then
built on top of the experimental object.
https://bugs.webkit.org/show_bug.cgi?id=72522
Reviewed by Simon Hausmann.
* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
* UIProcess/API/qt/qquickwebpage.h: Removed.
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebpage_p_p.h: Renamed from Source/WebKit2/UIProcess/API/qt/qquickwebviewprivateextension_p.h.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewExperimental::QQuickWebViewExperimental):
(QQuickWebViewExperimental::~QQuickWebViewExperimental):
(QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
(QQuickWebView::QQuickWebView):
(QQuickWebView::experimental):
* UIProcess/API/qt/qquickwebview.h: Removed.
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h: Copied from Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h.
* UIProcess/API/qt/qquickwebviewprivateextension.cpp: Removed.
* UIProcess/API/qt/qwebdownloaditem.cpp:
* UIProcess/API/qt/qwebdownloaditem.h: Removed.
* UIProcess/API/qt/qwebdownloaditem_p.h:
* UIProcess/API/qt/qwebdownloaditem_p_p.h: Copied from Source/WebKit2/UIProcess/API/qt/qwebdownloaditem_p.h.
(QWebDownloadItemPrivate::didReceiveResponse):
* UIProcess/API/qt/qwebpreferences.cpp:
* UIProcess/API/qt/qwebpreferences.h: Removed.
* UIProcess/API/qt/qwebpreferences_p.h:
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
(DesktopWebView::DesktopWebView):
* UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
* UIProcess/qt/QtDownloadManager.cpp:
* UIProcess/qt/QtViewInterface.cpp:
* UIProcess/qt/QtWebError.h:
* UIProcess/qt/QtWebPageProxy.cpp:
2011-11-17 Kenneth Rohde Christiansen <kenneth@webkit.org>
Unreviewed build fix.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2011-11-16 Kenneth Rohde Christiansen <kenneth@webkit.org>
Make use-fixed-layout work reliable
https://bugs.webkit.org/show_bug.cgi?id=72511
Reviewed by Simon Hausmann.
The code handling use-fixed-layout wasn't 100% reliable. The code
was changed to make sure the value is always correct.
It also doesn't set the value by looking at the previous FrameView,
as that wouldn't work in cases, such as when the web process has
crashed.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setResizesToContentsUsingLayoutSize):
(WebKit::WebPage::setUseFixedLayout):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::useFixedLayout):
Store the state as m_useFixedLayout so that it can be used
from the WebFrameLoaderClient.
2011-11-17 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Do not apply new viewport properties until after the first visually non-empty layout.
https://bugs.webkit.org/show_bug.cgi?id=72508
Delay applying viewport properties on the viewport item until after the first visually non-empty
layout finished. It enables the viewport to be intact until the new page is ready to be rendered.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::loadDidCommit):
(QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
(QQuickWebViewPrivate::didChangeContentsSize):
(QQuickWebViewPrivate::didChangeViewportProperties):
(QQuickWebViewPrivate::updateViewportSize):
(QQuickWebViewPrivate::computeViewportConstraints):
* UIProcess/API/qt/qquickwebview_p.h:
(PostTransitionState::isTransitioningToNewPage):
* UIProcess/qt/ClientImpl.cpp:
(qt_wk_didFirstVisuallyNonEmptyLayoutForFrame):
(setupPageLoaderClient):
* UIProcess/qt/QtViewInterface.cpp:
(WebKit::QtViewInterface::didFinishFirstNonEmptyLayout):
(WebKit::QtViewInterface::didChangeContentsSize):
(WebKit::QtViewInterface::didChangeViewportProperties):
(WebKit::QtViewInterface::startDrag):
* UIProcess/qt/QtViewInterface.h:
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::reset):
(WebKit::QtViewportInteractionEngine::applyConstraints):
* UIProcess/qt/QtViewportInteractionEngine.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::didFinishFirstNonEmptyLayout):
(QtWebPageProxy::didChangeContentsSize):
(QtWebPageProxy::didChangeViewportProperties):
(QtWebPageProxy::startDrag):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-17 Eunmi Lee <eunmi15.lee@samsung.com>
Reviewed by Martin Robinson.
[WK2] Move gtk/BackingStoreGtk.cpp to cairo/BackingStoreCairo.cpp to share with EFL port.
https://bugs.webkit.org/show_bug.cgi?id=62444
Rename gtk/BackingStoreGtk.cpp to cairo/BackingStoreCairo.cpp to share with EFL port.
The gtk/BackingStoreGtk.cpp only has cairo dependency, so it can be shared with other port
that uses cairo.
* GNUmakefile.am:
* UIProcess/BackingStore.h:
* UIProcess/cairo/BackingStoreCairo.cpp: Renamed from Source/WebKit2/UIProcess/gtk/BackingStoreGtk.cpp.
(WebKit::BackingStore::paint):
(WebKit::BackingStore::incorporateUpdate):
(WebKit::BackingStore::scroll):
2011-11-17 Nayan Kumar K <nayankk@motorola.com>
[WebKit2][gtk] Add few more properties to WebKitSettings
https://bugs.webkit.org/show_bug.cgi?id=72468
Reviewed by Martin Robinson.
Add 'enable-private-browsing', 'enable-developer-extras, 'enable-resizable-text-areas'
and 'enable-tabs-to-links' properties to WebKitSettings.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty): Add new set functions.
(webKitSettingsGetProperty): Add new get functions.
(webkit_settings_class_init): Add new properties.
(webkit_settings_get_enable_private_browsing): Get 'enable-private-browsing' property.
(webkit_settings_set_enable_private_browsing): Set 'enable-private-browsing' property.
(webkit_settings_get_enable_developer_extras): Get 'enable-developer-extras' property.
(webkit_settings_set_enable_developer_extras): Set 'enable-developer-extras' property.
(webkit_settings_get_enable_resizable_text_areas): Get 'enable-resizable-text-areas' property.
(webkit_settings_set_enable_resizable_text_areas): Set 'enable-resizable-text-areas' property.
(webkit_settings_get_enable_tabs_to_links): Get 'enable-tabs-to-links' property.
(webkit_settings_set_enable_tabs_to_links): Set 'enable-tabs-to-links' property.
* UIProcess/API/gtk/WebKitSettings.h: New public APIs added.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: New APIs added.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Add new tests.
2011-11-17 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix WebKit2 GTK+ build after r100569.
* WebProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::didReceiveResponse):
2011-11-17 Nayan Kumar K <nayankk@motorola.com>
[WebKit2][gtk] Fix assert while running TestWebKitSettings
https://bugs.webkit.org/show_bug.cgi?id=72469
Reviewed by Martin Robinson.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Correct the test.
2011-11-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use a URI instead of local path to create download destination in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=72500
Reviewed by Philippe Normand.
* WebProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::didReceiveResponse): Use
g_file_new_for_uri() instad of g_file_new_for_path(). Also use
adoptGRef to fix a memory leak.
2011-11-16 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Fix build after WTR AX support
https://bugs.webkit.org/show_bug.cgi?id=72560
Reviewed by Geoffrey Garen.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKAccessibilityRootObject):
(WKAccessibilityFocusedObject):
2011-11-11 Adrienne Walker <enne@google.com>
[chromium] Expose mock scrollbars to window.internals
https://bugs.webkit.org/show_bug.cgi?id=72195
Reviewed by James Robinson.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-11-16 Dan Bernstein <mitz@apple.com>
WebKit2 part of <rdar://problem/10262242> Add API for paginated display
https://bugs.webkit.org/show_bug.cgi?id=72537
Reviewed by Anders Carlsson.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Encode the pagination mode and gap between pages.
(WebKit::WebPageCreationParameters::decode): Decode the pagination mode and gap between pages.
* Shared/WebPageCreationParameters.h: Added paginationMode and gapBetweenPages members.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPaginationMode): Added this API wrapper.
(WKPageGetPaginationMode): Ditto.
(WKPageSetGapBetweenPages): Ditto.
(WKPageGetGapBetweenPages): Ditto.
(WKPageGetPageCount): Ditto.
* UIProcess/API/C/WKPagePrivate.h: Added an enum and a definition of WKPaginationMode and
accessors.
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController setPaginationMode:]): Added this API wrapper.
(-[WKBrowsingContextController paginationMode]): Ditto.
(-[WKBrowsingContextController setGapBetweenPages:]): Ditto.
(-[WKBrowsingContextController gapBetweenPages]): Ditto.
(-[WKBrowsingContextController pageCount]): Ditto.
* UIProcess/API/mac/WKBrowsingContextControllerPrivate.h: Added. Includes an enum and a definition
of WKBrowsingContextPaginationMode and property declarations.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Added intialization of m_paginationMode, m_gapBetweenPages,
and m_pageCount.
(WebKit::WebPageProxy::setPaginationMode): Added this accessor, which caches the value and sends
a message to the WebPage.
(WebKit::WebPageProxy::setGapBetweenPages): Ditto.
(WebKit::WebPageProxy::creationParameters): Set the pagination mode and gap between pages in the
creation parameters.
(WebKit::WebPageProxy::didChangePageCount): Added. Updates the cached page count.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::paginationMode): Added this getter that returns a cached value.
(WebKit::WebPageProxy::gapBetweenPages): Ditto.
(WebKit::WebPageProxy::pageCount): Ditto.
* UIProcess/WebPageProxy.messages.in: Added DidChangedPageCount, sent when the page count changes
after layout.
* WebKit2.xcodeproj/project.pbxproj: Added WKBrowsingContextControllerPrivate.h.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLayout): Added a call to WebPage::mainFrameDidLayout(),
allowing the page to respond to changes in the column count.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Added initializer for m_cachedPageCount.
(WebKit::WebPage::setPaginationMode): Added.
(WebKit::WebPage::setGapBetweenPages): Added.
(WebKit::WebPage::mainFrameDidLayout): Added. Sends a DidChangePageCount message to the UI process
if the page count has changed.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added SetPaginationMode and SetGapBetweenPages messages.
2011-11-16 Chris Fleizach <cfleizach@apple.com>
WebKitTestRunner needs to support accessibility-related DRT APIs
https://bugs.webkit.org/show_bug.cgi?id=42131
Allow the injected bundle to retrieve the focused and root accessibility
objects.
Reviewed by Beth Dakin.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKAccessibilityRootObject):
(WKAccessibilityFocusedObject):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2011-11-16 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=72400
Scrollbar uiStateTransitionProgress requires tracking the mouse all the time
-and corresponding-
<rdar://problem/10409328>
Reviewed by Darin Adler.
Set up our initial tracking area based on the currently recommended scrollbar
style. Track the mouse all the time if the style is legacy.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
Now that we might be getting mouseMoved events all the time even when the window
is not key, make sure we opt into the new 'onlyUpdateScrollbars' mode for
EventHandler::mouseMoved() when the window is not focused.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleMouseEvent):
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::mouseEventSyncForTesting):
2011-11-16 Martin Robinson <mrobinson@igalia.com>
[GTK][WEBKIT2] Link error running gtkdoc-scangobj
https://bugs.webkit.org/show_bug.cgi?id=72365
Reviewed by Xan Lopez.
* webkit2gtk.pc.in: Add a libjavascriptcore requirement to the WebKit2 pkgconfig
file so that the compiler links to it.
2011-11-16 Balazs Kelemen <kbalazs@webkit.org>
[WK2][X11] Don't leak the colormap we created for the plugin
https://bugs.webkit.org/show_bug.cgi?id=72144
Reviewed by Xan Lopez.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformDestroy):
2011-11-16 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] Crash in Connection::readyReadHandler() on socket error
https://bugs.webkit.org/show_bug.cgi?id=72392
Reviewed by Simon Hausmann.
Add QWeakPointer to SocketNotifierResourceGuard::m_socketNotifier to track
deallocation of referenced object.
* Platform/CoreIPC/unix/ConnectionUnix.cpp:
(CoreIPC::SocketNotifierResourceGuard::SocketNotifierResourceGuard):
(CoreIPC::SocketNotifierResourceGuard::~SocketNotifierResourceGuard):
2011-11-16 Zeno Albisser <zeno@webkit.org>
[Qt][WK2][Mac] MiniBrowser cannot create socketpair.
https://bugs.webkit.org/show_bug.cgi?id=72389
Use SOCK_DGRAM on mac instead of SOCK_SEQPACKET.
Reviewed by Tor Arne Vestbø.
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2011-11-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add webkit_web_view_load_request() to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=72380
Reviewed by Martin Robinson.
It adds an initial implementation of WebKitNetworkRequest
class that only contains a URI for now.
* GNUmakefile.am:
* UIProcess/API/gtk/WebKitNetworkRequest.cpp: Added.
(webkitNetworkRequestFinalize):
(webkitNetworkRequestGetProperty):
(webkitNetworkRequestSetProperty):
(webkit_network_request_class_init):
(webkit_network_request_init):
(webkit_network_request_new):
(webkit_network_request_get_uri):
* UIProcess/API/gtk/WebKitNetworkRequest.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_request): Use WKPageLoadURLRequest() to load
the given WebKitNetworkRequest.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
(testLoadRequest):
(beforeAll):
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::loadRequest):
* UIProcess/API/gtk/tests/WebViewTest.h:
* UIProcess/API/gtk/webkit2.h:
2011-11-15 Andy Estes <aestes@apple.com>
Consolidate the logic that creates run loop observers for flushing layer tree changes to CoreAnimation
https://bugs.webkit.org/show_bug.cgi?id=72106
Reviewed by Anders Carlsson.
Remove code that schedules layer flushes and use LayerFlushScheduler instead.
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: Replace
m_flushPendingLayerChangesRunLoopObserver with m_layerFlushScheduler
and implement the LayerFlushSchedulerClient interface.
* WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
(WebKit::LayerTreeHostCAMac::LayerTreeHostCAMac): Instantiate
m_layerFlushScheduler with the LayerTreeHost as the client.
(WebKit::LayerTreeHostCAMac::~LayerTreeHostCAMac):
(WebKit::LayerTreeHostCAMac::scheduleLayerFlush): Call LayerFlushScheduler::schedule().
(WebKit::LayerTreeHostCAMac::setLayerFlushSchedulingEnabled): Call
LayerFlushScheduler::suspend() or LayerFlushScheduler::resume().
(WebKit::LayerTreeHostCAMac::invalidate): Call LayerFlushScheduler::invalidate().
(WebKit::LayerTreeHostCAMac::flushLayers): Do the work that
flushPendingLayerChangesRunLoopObserverCallback() used to do.
(WebKit::LayerTreeHostCAMac::didPerformScheduledLayerFlush): Call LayerFlushScheduler::invalidate().
2011-11-15 Sam Weinig <sam@webkit.org>
Add a connection client to the WKContext, to notify when new connections to the WebProcess are established
https://bugs.webkit.org/show_bug.cgi?id=72433
Reviewed by Anders Carlsson.
* UIProcess/API/C/WKContext.cpp:
(WKContextSetConnectionClient):
* UIProcess/API/C/WKContext.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::initializeConnectionClient):
* UIProcess/WebContext.h:
Add connection client API.
* UIProcess/WebContextConnectionClient.cpp: Added.
(WebKit::WebContextConnectionClient::didCreateConnection):
* UIProcess/WebContextConnectionClient.h: Added.
Add basic implementation of the client. It is currently never triggered.
2011-11-15 Jongseok Yang <js45.yang@samsung.com>
[SOUP][WK2] Add initial WebCookieManagerSoup.cpp for webkit2
https://bugs.webkit.org/show_bug.cgi?id=72235
Reviewed by Gustavo Noronha Silva.
Add WebCookieManagerSoup.cpp and implement functions for the cookie accept policy.
It's required when using the soup network backend.
Remove WebCookieManagerEfl.cpp and WebCookieManagerGtk.cpp because GTK port and
EFL port use soup network backend without a network backend of their own.
* GNUmakefile.am:
* WebProcess/Cookies/efl/WebCookieManagerEfl.cpp: Removed.
* WebProcess/Cookies/gtk/WebCookieManagerGtk.cpp: Removed.
* WebProcess/Cookies/soup/WebCookieManagerSoup.cpp: Added.
(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
(WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
2011-11-15 Jochen Eisinger <jochen@chromium.org>
Rename ReferrerPolicy to clarify its meaning
https://bugs.webkit.org/show_bug.cgi?id=72420
Reviewed by Nate Chapin.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::searchWithGoogle):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::linkClicked):
2011-11-15 Sam Weinig <sam@webkit.org>
Fix windows build.
* win/WebKit2Generated.make:
2011-11-15 Sam Weinig <sam@webkit.org>
Add WebKit2 API object to represent a connection
https://bugs.webkit.org/show_bug.cgi?id=72421
Reviewed by Anders Carlsson.
* GNUmakefile.am:
* Target.pri:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add new files.
* Shared/API/c/WKBase.h:
Add type.
* Shared/API/c/WKConnectionRef.cpp: Added.
(WKConnectionGetTypeID):
(WKConnectionSetConnectionClient):
(WKConnectionPostMessage):
* Shared/API/c/WKConnectionRef.h: Added.
Expose interface. Currently no support for synchronous messages.
* Shared/API/c/WKSharedAPICast.h:
Define relationship between WebConnection <-> WKConnectionRef.
* Shared/APIObject.h:
Add API type.
* Shared/WebConnection.cpp: Added.
(WebKit::WebConnection::~WebConnection):
(WebKit::WebConnection::initializeConnectionClient):
* Shared/WebConnection.h: Added.
(WebKit::WebConnection::type):
Sketch out the connection object. It is currently abstract
to allow different implementations for the UI and WebProcess sides
while retaining the same interface.
* Shared/WebConnectionClient.cpp: Added.
(WebKit::WebConnectionClient::didReceiveMessage):
(WebKit::WebConnectionClient::didClose):
* Shared/WebConnectionClient.h: Added.
Add simple client.
* UIProcess/API/C/WebKit2.h:
Add new file.
2011-11-15 Chris Fleizach2 <cfleizach@apple.com>
AX: WKAccessibilityWebObjectPage should not call super in accessibilityAttributeValue:
https://bugs.webkit.org/show_bug.cgi?id=72344
Reviewed by Beth Dakin.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
2011-11-15 Anders Carlsson <andersca@apple.com>
HostWindow screenToWindow/windowToScreen should be screenToRootView/rootViewToScreen
https://bugs.webkit.org/show_bug.cgi?id=72397
Reviewed by Dan Bernstein.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::screenToRootView):
(WebKit::WebChromeClient::rootViewToScreen):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2011-11-14 Anders Carlsson <andersca@apple.com>
HostWindow invalidation functions should use root view coordinates
https://bugs.webkit.org/show_bug.cgi?id=72338
Reviewed by Dan Bernstein.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::invalidateRootView):
(WebKit::WebChromeClient::invalidateContentsAndRootView):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2011-11-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Implement download support in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=72258
Reviewed by Martin Robinson.
* WebProcess/Downloads/Download.h:
* WebProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::DownloadClient):
(WebKit::DownloadClient::downloadFailed):
(WebKit::DownloadClient::didReceiveResponse):
(WebKit::DownloadClient::didReceiveData):
(WebKit::DownloadClient::didFinishLoading):
(WebKit::DownloadClient::didFail):
(WebKit::DownloadClient::wasBlocked):
(WebKit::DownloadClient::cannotShowURL):
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::cancel):
(WebKit::Download::platformInvalidate):
2011-11-15 Mario Sanchez Prada <msanchez@igalia.com>
[GTK][WEBKIT2] Add enable-caret-browsing property to WebKitSettings
https://bugs.webkit.org/show_bug.cgi?id=72267
Reviewed by Martin Robinson.
Allow getting and setting the 'enable-caret-browsing' property
through WebKitSettings.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty): Added property setter.
(webKitSettingsGetProperty): Added propery getter.
(webkit_settings_class_init): Install property.
(webkit_settings_get_enable_caret_browsing): Added.
(webkit_settings_set_enable_caret_browsing): Added.
* UIProcess/API/gtk/WebKitSettings.h: Expose new public APIs.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new sections for gtk-doc generation.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Added new API test.
2011-11-14 Julien Chaffraix <jchaffraix@webkit.org>
Add --css-grid-layout to build-webkit and the build systems
https://bugs.webkit.org/show_bug.cgi?id=72320
Reviewed by Ojan Vafai.
* Configurations/FeatureDefines.xcconfig:
2011-11-14 Tony Chang <tony@chromium.org>
Remove the CSS3_FLEXBOX compile time flag and enable on all ports
https://bugs.webkit.org/show_bug.cgi?id=72196
Reviewed by Ojan Vafai.
* Configurations/FeatureDefines.xcconfig:
2011-11-14 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
Intermittent asserts in TextureMapperGL::bindSurface on MiniBrowser startup
https://bugs.webkit.org/show_bug.cgi?id=72299
Reviewed by Noam Rosenthal.
Added check that clipping rect is valid.
Clear GL error that might remain from QT GL operations.
Added GL error assert for scissor test operations.
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::paintToCurrentGLContext):
2011-11-14 Anders Carlsson <andersca@apple.com>
Only send progress notifications for the main frame
https://bugs.webkit.org/show_bug.cgi?id=72302
Reviewed by Sam Weinig.
Since it's impossible in the API to tell which frame the progress notifications are for, just send them to the main frame for now.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::postProgressStartedNotification):
(WebKit::WebFrameLoaderClient::postProgressEstimateChangedNotification):
(WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
2011-11-14 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] Cleanup QML tests.
https://bugs.webkit.org/show_bug.cgi?id=72259
Reviewed by Simon Hausmann.
Cleanup QML tests. This patch removes the duplicates after the merge of both views.
I also isolated the desktop specific bits into its own directory.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_download.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_messaging.qml.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationPolicyForUrl.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml: Removed.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadZeroSizeView.qml: Removed.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml: Removed.
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml: Removed.
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml: Removed.
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml: Removed.
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml: Removed.
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadFail.qml.
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml.
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml.
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadZeroSizeView.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml.
* UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml.
* UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2011-11-14 Mario Sanchez Prada <msanchez@igalia.com>
Add support for the caretBrowsingEnabled preference in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=72266
Reviewed by Chris Fleizach.
* Shared/WebPreferencesStore.h: Add caretBrowsingEnabled getter
and setter macro.
* UIProcess/API/C/WKPreferences.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCaretBrowsingEnabled): Added.
(WKPreferencesGetCaretBrowsingEnabled): Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Update the
caretBrowsingEnabledKey preference.
2011-11-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Remove reference to QWebNavigationController
https://bugs.webkit.org/show_bug.cgi?id=72257
Reviewed by Simon Hausmann.
QWebNavigationController was removed in r99946, this is just a leftover.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
* UIProcess/API/qt/qquickwebview_p.h:
2011-11-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] the QQuickWebView should support double-tap to zoom
https://bugs.webkit.org/show_bug.cgi?id=72030
Reviewed by Andreas Kling.
* UIProcess/qt/QtViewInterface.cpp:
* UIProcess/qt/QtViewInterface.h:
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::animateItemRectVisible):
(WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
* UIProcess/qt/QtViewportInteractionEngine.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::didFindZoomableArea):
2011-11-14 Zalan Bujtas <zbujtas@gmail.com>
Build breaks with --no-javascript-debugger --no-inspector
https://bugs.webkit.org/show_bug.cgi?id=72228
Reviewed by Simon Hausmann.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
2011-11-13 Mark Rowe <mrowe@apple.com>
Fix the 32-bit build.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::initializeSandbox): Use a format specifier and cast that works on more architectures.
2011-11-12 Laszlo Gombos <laszlo.1.gombos@nokia.com>
[Qt][Symbian] Remove support for WINSCW compiler
https://bugs.webkit.org/show_bug.cgi?id=70178
Reviewed by Chang Shu.
* Shared/API/c/WKString.h:
2011-11-12 Dan Bernstein <mitz@apple.com>
<rdar://problem/10294191> REGRESSION (WebKit2): Lookup bubble sized and positioned incorrectly (vertically off)
https://bugs.webkit.org/show_bug.cgi?id=72217
Reviewed by Dave Hyatt.
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup): Rather than adding the NSFont’s ascender
to the top of the text rect to establish the baseline here...
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForRange): ...do it here, using the WebCore::Font’s
ascender, which is what’s actually used when drawing the text.
2011-11-11 Nayan Kumar K <nayankk@motorola.com>
[GTK][WEBKIT2] Add font and charset properties to WebKitWebSettings
https://bugs.webkit.org/show_bug.cgi?id=68996
Reviewed by Martin Robinson.
Provision to query and set the font related properties (such as
font-family, font-size) and charset properties (such as default-
charset) is added.
* UIProcess/API/gtk/WebKitSettings.cpp: Added font and encoding properties.
(webKitSettingsSetProperty): GObject set property function.
(webKitSettingsGetProperty): GObject get property function.
(webkit_settings_class_init): Few more signals installed.
(webkit_settings_init): Initialization of instance variables.
(webkit_web_settings_get_default_font_family): Get 'default-font-family'.
(webkit_web_settings_set_default_font_family): Set 'default-font-family'.
(webkit_web_settings_get_monospace_font_family): Get 'monospace-font-family'.
(webkit_web_settings_set_monospace_font_family): Set 'monospace-font-family'.
(webkit_web_settings_get_serif_font_family): Get 'serif-font-family'.
(webkit_web_settings_set_serif_font_family): Set 'serif-font-family'.
(webkit_web_settings_get_sans_serif_font_family): Get 'sans-serif-font-family'.
(webkit_web_settings_set_sans_serif_font_family): Get 'sans-serif-font-family'.
(webkit_web_settings_get_cursive_font_family): Get 'cursive-font-family'.
(webkit_web_settings_set_cursive_font_family): Set 'cursive-font-family'.
(webkit_web_settings_get_fantasy_font_family): Get 'fantasy-font-family'.
(webkit_web_settings_set_fantasy_font_family): Set 'fantasy-font-family'.
(webkit_web_settings_get_pictograph_font_family): Get 'pictograph-font-family'.
(webkit_web_settings_set_pictograph_font_family): Set 'pictograph-font-family'.
(webkit_web_settings_get_default_font_size): Get 'default-font-size'.
(webkit_web_settings_set_default_font_size): Set 'default-font-size'.
(webkit_web_settings_get_default_monospace_font_size): Get 'default-monospace-font-size'.
(webkit_web_settings_set_default_monospace_font_size): Set 'default-monospace-font-size'.
(webkit_web_settings_get_minimum_font_size): Get 'minimum-font-size'.
(webkit_web_settings_set_minimum_font_size): Set 'minimum-font-size'.
(webkit_web_settings_get_default_charset): Get 'default-charset'.
(webkit_web_settings_set_default_charset): Set 'default-charset'.
* UIProcess/API/gtk/WebKitSettings.h: Add new sections for gtk-doc generation.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Expose new public APIs.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Add new tests.
2011-11-11 Shinya Kawanaka <shinyak@google.com>
Implement legacy text check emulation in unified text check interface.
https://bugs.webkit.org/show_bug.cgi?id=70299
Reviewed by Hajime Morita.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-11-11 Alexey Proskuryakov <ap@apple.com>
WebProcess should use AppSandbox style quarantine
https://bugs.webkit.org/show_bug.cgi?id=72168
<rdar://problem/10434292>
Reviewed by Darin Adler.
* WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): Just enable it.
2011-11-11 Darin Adler <darin@apple.com>
* WebKit2.xcodeproj/project.pbxproj: Let a newer Xcode update this file.
If an older Xcode downgrades this file and we have a risk of some kind of
oscillating commit situation, please contact me so I know not to do this again.
2011-11-11 Mark Hahnenberg <mhahnenberg@apple.com>
Add jsCast to replace static_cast
https://bugs.webkit.org/show_bug.cgi?id=72071
Reviewed by Geoffrey Garen.
Added new jsCast and changed all of the static_cast sites in functions that
are in the MethodTable to use jsCast instead.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getCallData):
(WebKit::JSNPObject::getConstructData):
(WebKit::JSNPObject::getOwnPropertySlot):
(WebKit::JSNPObject::getOwnPropertyDescriptor):
(WebKit::JSNPObject::put):
(WebKit::JSNPObject::deleteProperty):
(WebKit::JSNPObject::deletePropertyByIndex):
(WebKit::JSNPObject::getOwnPropertyNames):
2011-11-11 Timothy Hatcher <timothy@apple.com>
Only use the textured window style mask when there is no override inspector page.
https://webkit.org/b/72142
Reviewed by Dan Bernstein.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformOpen): Don't set NSTexturedBackgroundWindowMask if
there is an override inspector page. Make setAutorecalculatesContentBorderThickness:,
setContentBorderThickness: and WKNSWindowMakeBottomCornersSquare conditional.
2011-11-11 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Remove dead MeeGoTouch code.
Reviewed by Tor Arne Vestbø.
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):
2011-11-11 Alexis Menard <alexis.menard@openbossa.org>
[Qt] Add a way to have experimental features in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=67707
Reviewed by Kenneth Rohde Christiansen.
Add new QML extensions for our public view. This extension
returns the private object of the view so that the user could
use unstable/unreleased APIs. This requires our private class
to be exported and QObject subclass.
* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebviewprivateextension.cpp: Added.
(QQuickWebViewPrivateExtension::QQuickWebViewPrivateExtension):
(QQuickWebViewPrivateExtension::viewPrivate):
* UIProcess/API/qt/qquickwebviewprivateextension_p.h: Added.
2011-11-11 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][WK2] Remove QWebNavigationController
https://bugs.webkit.org/show_bug.cgi?id=72113
Reviewed by Andreas Kling.
Fold the functions and properties of QWebNavigationController into
QQuickWebView.
* Target.pri:
* UIProcess/API/qt/WKView.h:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::QQuickWebPagePrivate):
* UIProcess/API/qt/qquickwebpage.h:
* UIProcess/API/qt/qquickwebpage_p.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
(QQuickWebView::goBack):
(QQuickWebView::goForward):
(QQuickWebView::stop):
(QQuickWebView::reload):
(QQuickWebView::canGoBack):
(QQuickWebView::canGoForward):
(QQuickWebView::canStop):
(QQuickWebView::canReload):
(QQuickWebView::title):
* UIProcess/API/qt/qquickwebview.h:
* UIProcess/API/qt/qwebnavigationcontroller.cpp: Removed.
* UIProcess/API/qt/qwebnavigationcontroller.h: Removed.
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::navigationStatusAtStartup):
(LoadStartedCatcher::onLoadStarted):
(tst_QQuickWebView::stopEnabledAfterLoadStarted):
(tst_QQuickWebView::backAndForward):
(tst_QQuickWebView::reload):
(tst_QQuickWebView::stop):
2011-11-10 Beth Dakin <bdakin@apple.com>
Once more for the QT build.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::setFindIndicator):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-10 Beth Dakin <bdakin@apple.com>
More attempted build fix.
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::setFindIndicator):
* UIProcess/API/efl/PageClientImpl.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::setFindIndicator):
* UIProcess/API/gtk/PageClientImpl.h:
2011-11-10 Anders Carlsson <andersca@apple.com>
Fix 32-bit build.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(-[WKContentLayer drawInContext:]):
2011-11-10 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::setFindIndicator):
* UIProcess/win/WebView.h:
2011-11-10 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=66584
WebKit2's find bouncy looks blurry after dragging window onto >1.0 scale factor
display
-and corresponding-
<rdar://problem/9987559>
Reviewed by Anders Carlsson.
The setFindIndicator message and various functions of the same name must all take
an additional parameter indicating whether or not setting the find indicator
should result in a bounce animation. This is because when the device scale factor
changes, if there is currently a find indicator, it must be re-set to a higher or
lower resolution version, but we don't want the bounce animation to happen again.
* UIProcess/API/mac/FindIndicatorWindow.h:
* UIProcess/API/mac/FindIndicatorWindow.mm:
(WebKit::FindIndicatorWindow::setFindIndicator):
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setFindIndicator):
* UIProcess/API/mac/WKView.mm:
(-[WKView _setFindIndicator:fadeOut:animate:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setFindIndicator):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
New function FindController::isShowingOverlay() is used to determine if
FindController::deviceScaleFactorDidChange() needs to be called.
* WebProcess/WebPage/FindController.h:
(WebKit::FindController::isShowingOverlay):
FindController::deviceScaleFactorDidChange() calls updateFindIndicator to re-
generate the bitmap at the appropriate scale factor, but tells it not to animate
this time.
(WebKit::FindController::deviceScaleFactorDidChange):
updateFindIndicator() takes a new parameter indicating whether or not the
FindIndicator should animate. It defaults to true since the deviceScaleFactor
changing is the only case currently where we do not want it to animate.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
(WebKit::FindController::hideFindIndicator):
Calls into FindController::deviceScaleFactorDidChange() when the scale factor has
changed and the find overlay is showing.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setDeviceScaleFactor):
2011-11-10 Timothy Hatcher <timothy@apple.com>
Make WKViews in NSPopovers render as they would in active windows.
The NSWindowDid{Become,Resign}KeyNotifications are not fired when NSPopovers
are shown or hidden since they share key with the parent window. So WKView
needs to update the active state during order on/off screen notifications.
https://webkit.org/b/68435
Reviewed by John Sullivan.
* UIProcess/API/mac/WKView.mm:
(-[WKView _windowDidOrderOffScreen:]): Call viewStateDidChange with WebPageProxy::ViewWindowIsActive.
(-[WKView _windowDidOrderOnScreen:]): Ditto.
2011-11-10 Anders Carlsson <andersca@apple.com>
Add a simple content layer to TiledCoreAnimationDrawingArea
https://bugs.webkit.org/show_bug.cgi?id=72044
Reviewed by Darin Adler.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
Add a content layer member variable.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(-[WKContentLayer _initWithWebPage:WebKit::]):
Add initializer.
(-[WKContentLayer drawInContext:]):
Lay out and draw the web page.
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
Add the content layer as a sublayer of the root layer.
(WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay):
(WebKit::TiledCoreAnimationDrawingArea::scroll):
Tell the content layer to paint.
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
Resize the content layer as well.
2011-11-10 Anders Carlsson <andersca@apple.com>
The WKView layer hosting subview needs to be flipped
https://bugs.webkit.org/show_bug.cgi?id=72042
Reviewed by Darin Adler.
In order to match the Core Animation layer hierarchy, the layer hosting WKView
subview needs to be flipped.
* UIProcess/API/mac/WKView.mm:
(-[WKFlippedView isFlipped]):
Add a NSView subview whose sole purpose is to be flipped.
(-[WKView _enterAcceleratedCompositingMode:]):
Create a WKFlippedView instead of a regular NSView.
2011-11-10 Balazs Kelemen <kbalazs@webkit.org>
[Qt] X11 plugins need to be reworked for Qt5
https://bugs.webkit.org/show_bug.cgi?id=70023
Reviewed by Simon Hausmann.
* Target.pri:
* UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
(WebKit::PluginInfoStore::pluginsDirectories):
Kill the last dependency from the WebKit1 plugin system.
This is necessary because currently we don't build the WebKit1
plugin code. The function is equivalent with the XP_UNIX part of
PluginDatabase::defaultPluginDirectories.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::getPluginDisplay):
(WebKit::x11Screen):
(WebKit::displayDepth):
(WebKit::rootWindowID):
(WebKit::NetscapePlugin::x11HostDisplay):
(WebKit::NetscapePlugin::platformPostInitialize):
(WebKit::NetscapePlugin::platformDestroy):
(WebKit::NetscapePlugin::platformGeometryDidChange):
(WebKit::NetscapePlugin::platformPaint):
(WebKit::initializeXEvent):
Rework plugin initialization and drawing model.
2011-11-10 Martin Robinson <mrobinson@igalia.com>
[GTK] [WebKit2] Fix remaining gtkdoc errors
https://bugs.webkit.org/show_bug.cgi?id=71990
Reviewed by Philippe Normand.
* UIProcess/API/gtk/WebKitWebView.cpp: Update add the phrase "property" to
references to properties, because the gtkdoc stylesheet does not differeniate
between properties and signals. Standardize the way we talk about property
notifications.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add an include to silence
warnings about GIR annotations.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the decorators the private section.
2011-11-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Clean up how singe / double taps are handled
https://bugs.webkit.org/show_bug.cgi?id=72024
Reviewed by Simon Hausmann.
Move all decision making to the QtWebPageProxy.
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
(WebKit::QtTapGestureRecognizer::recognize):
(WebKit::QtTapGestureRecognizer::tapTimeout):
* UIProcess/qt/QtTapGestureRecognizer.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::handleSingleTapEvent):
(QtWebPageProxy::handleDoubleTapEvent):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-10 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Clean up build system
Reviewed by Tor Arne Vestbø.
Now that we use whole-archive linking we can fold the files that contain exported
symbols back into the WebKit2 static library.
* Target.pri: Fold in sources from WebKit2.pri.
* WebKit2.pri: Removed.
2011-11-10 Alexis Menard <alexis.menard@openbossa.org>
[Qt] Merge QTouchWebView and QDesktopWebView into one class
https://bugs.webkit.org/show_bug.cgi?id=71355
Reviewed by Kenneth Rohde Christiansen.
Merge QTouchWebView and QDesktopWebView into one class called
QQuickWebView and its attached page QQuickWebPage. You can switch to the
traditional desktop use case with the private header. Also now on desktop
platforms AC is turn on by default. I also merged our two
subclasses of QtViewInterface into one as the split doesn't make
that much sense anymore. In the future we want to be able to enable the
traditional desktop use case depending the platform the code is running.
API tests and QML tests have been updated.
* Target.pri:
* UIProcess/API/qt/WKView.h:
* UIProcess/API/qt/qbasewebview.cpp: Removed.
* UIProcess/API/qt/qbasewebview_p.h: Removed.
* UIProcess/API/qt/qdesktopwebview.cpp: Removed.
* UIProcess/API/qt/qdesktopwebview.h: Removed.
* UIProcess/API/qt/qdesktopwebview_p.h: Removed.
* UIProcess/API/qt/qquickwebpage.cpp: Renamed from Source/WebKit2/UIProcess/API/qt/qtouchwebpage.cpp.
(QQuickWebPage::QQuickWebPage):
(QQuickWebPage::~QQuickWebPage):
(QQuickWebPage::keyPressEvent):
(QQuickWebPage::keyReleaseEvent):
(QQuickWebPage::inputMethodEvent):
(QQuickWebPage::focusInEvent):
(QQuickWebPage::focusOutEvent):
(QQuickWebPage::mousePressEvent):
(QQuickWebPage::mouseMoveEvent):
(QQuickWebPage::mouseReleaseEvent):
(QQuickWebPage::mouseDoubleClickEvent):
(QQuickWebPage::wheelEvent):
(QQuickWebPage::hoverEnterEvent):
(QQuickWebPage::hoverMoveEvent):
(QQuickWebPage::hoverLeaveEvent):
(QQuickWebPage::dragMoveEvent):
(QQuickWebPage::dragEnterEvent):
(QQuickWebPage::dragLeaveEvent):
(QQuickWebPage::dropEvent):
(QQuickWebPage::geometryChanged):
(QQuickWebPage::event):
(QQuickWebPage::touchEvent):
(QQuickWebPage::itemChange):
(QQuickWebPagePrivate::QQuickWebPagePrivate):
(QQuickWebPagePrivate::initializeSceneGraphConnections):
(QQuickWebPagePrivate::setPageProxy):
(computeEffectiveOpacity):
(QQuickWebPagePrivate::paintToCurrentGLContext):
(QQuickWebPagePrivate::_q_onAfterSceneRender):
(QQuickWebPagePrivate::_q_onSceneGraphInitialized):
* UIProcess/API/qt/qquickwebpage.h: Renamed from Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h.
* UIProcess/API/qt/qquickwebpage_p.h: Renamed from Source/WebKit2/UIProcess/API/qt/qtouchwebpage_p.h.
* UIProcess/API/qt/qquickwebview.cpp: Added.
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::enableMouseEvents):
(QQuickWebViewPrivate::disableMouseEvents):
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::initializeDesktop):
(QQuickWebViewPrivate::initializeTouch):
(QQuickWebViewPrivate::loadDidCommit):
(QQuickWebViewPrivate::contentSizeChanged):
(QQuickWebViewPrivate::scrollPositionRequested):
(QQuickWebViewPrivate::_q_viewportUpdated):
(QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
(QQuickWebViewPrivate::_q_onVisibleChanged):
(QQuickWebViewPrivate::updateViewportSize):
(QQuickWebViewPrivate::updateViewportConstraints):
(QQuickWebViewPrivate::didChangeViewportProperties):
(QQuickWebViewPrivate::runJavaScriptAlert):
(QQuickWebViewPrivate::runJavaScriptConfirm):
(QQuickWebViewPrivate::runJavaScriptPrompt):
(QQuickWebViewPrivate::chooseFiles):
(QQuickWebViewPrivate::_q_onOpenPanelFilesSelected):
(QQuickWebViewPrivate::_q_onOpenPanelFinished):
(QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
(toPolicyAction):
(hasMetaMethod):
(QQuickWebViewPrivate::navigationPolicyForURL):
(QQuickWebViewPrivate::setPageProxy):
(QQuickWebView::QQuickWebView):
(QQuickWebView::~QQuickWebView):
(QQuickWebView::page):
(QQuickWebView::load):
(QQuickWebView::postMessage):
(QQuickWebView::url):
(QQuickWebView::loadProgress):
(QQuickWebView::title):
(QQuickWebView::navigationController):
(QQuickWebView::preferences):
(QQuickWebView::geometryChanged):
(QQuickWebView::touchEvent):
(QQuickWebView::pageRef):
* UIProcess/API/qt/qquickwebview.h: Renamed from Source/WebKit2/UIProcess/API/qt/qbasewebview.h.
* UIProcess/API/qt/qquickwebview_p.h: Added.
* UIProcess/API/qt/qtouchwebview.cpp: Removed.
* UIProcess/API/qt/qtouchwebview.h: Removed.
* UIProcess/API/qt/qtouchwebview_p.h: Removed.
* UIProcess/API/qt/tests/commonviewtests/commonviewtests.pro: Removed.
* UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp: Removed.
* UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp: Removed.
* UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h: Removed.
* UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp: Removed.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadFail.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadZeroSizeView.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_messaging.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml:
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
(DesktopWebView::DesktopWebView):
(main):
* UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qdesktopwebview/qdesktopwebview.pro.
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: Added.
(tst_QQuickWebView::tst_QQuickWebView):
(tst_QQuickWebView::init):
(tst_QQuickWebView::cleanup):
(tst_QQuickWebView::webView):
(tst_QQuickWebView::accessPage):
(tst_QQuickWebView::navigationStatusAtStartup):
(LoadStartedCatcher::LoadStartedCatcher):
(LoadStartedCatcher::onLoadStarted):
(tst_QQuickWebView::stopEnabledAfterLoadStarted):
(tst_QQuickWebView::baseUrl):
(tst_QQuickWebView::loadEmptyUrl):
(tst_QQuickWebView::loadEmptyPageViewVisible):
(tst_QQuickWebView::loadEmptyPageViewHidden):
(tst_QQuickWebView::loadNonexistentFileUrl):
(tst_QQuickWebView::backAndForward):
(tst_QQuickWebView::reload):
(tst_QQuickWebView::stop):
(tst_QQuickWebView::loadProgress):
(tst_QQuickWebView::show):
* UIProcess/API/qt/tests/qtouchwebview/qtouchwebview.pro: Removed.
* UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp: Removed.
* UIProcess/API/qt/tests/testwindow.h:
* UIProcess/TiledDrawingAreaProxy.h:
* UIProcess/qt/QtGestureRecognizer.cpp:
(WebKit::QtGestureRecognizer::QtGestureRecognizer):
(WebKit::QtGestureRecognizer::setViewportInteractionEngine):
* UIProcess/qt/QtGestureRecognizer.h:
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::setViewportInteractionEngine):
(WebKit::QtPanGestureRecognizer::recognize):
* UIProcess/qt/QtPanGestureRecognizer.h:
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::QtPinchGestureRecognizer::recognize):
(WebKit::QtPinchGestureRecognizer::setViewportInteractionEngine):
* UIProcess/qt/QtPinchGestureRecognizer.h:
* UIProcess/qt/QtTouchViewInterface.cpp: Removed.
* UIProcess/qt/QtTouchViewInterface.h: Removed.
* UIProcess/qt/QtViewInterface.cpp: Added.
(WebKit::QtViewInterface::QtViewInterface):
(WebKit::QtViewInterface::didFindZoomableArea):
(WebKit::QtViewInterface::sceneGraphUpdateQueue):
(WebKit::QtViewInterface::setViewNeedsDisplay):
(WebKit::QtViewInterface::drawingAreaSize):
(WebKit::QtViewInterface::contentSizeChanged):
(WebKit::QtViewInterface::scrollPositionRequested):
(WebKit::QtViewInterface::isActive):
(WebKit::QtViewInterface::hasFocus):
(WebKit::QtViewInterface::isVisible):
(WebKit::QtViewInterface::startDrag):
(WebKit::QtViewInterface::didChangeViewportProperties):
(WebKit::QtViewInterface::didChangeUrl):
(WebKit::QtViewInterface::didChangeTitle):
(WebKit::QtViewInterface::didChangeToolTip):
(WebKit::QtViewInterface::didChangeStatusText):
(WebKit::QtViewInterface::didChangeCursor):
(WebKit::QtViewInterface::loadDidBegin):
(WebKit::QtViewInterface::loadDidCommit):
(WebKit::QtViewInterface::loadDidSucceed):
(WebKit::QtViewInterface::loadDidFail):
(WebKit::QtViewInterface::didChangeLoadProgress):
(WebKit::QtViewInterface::didMouseMoveOverElement):
(WebKit::QtViewInterface::showContextMenu):
(WebKit::QtViewInterface::hideContextMenu):
(WebKit::QtViewInterface::runJavaScriptAlert):
(WebKit::QtViewInterface::runJavaScriptConfirm):
(WebKit::QtViewInterface::runJavaScriptPrompt):
(WebKit::QtViewInterface::processDidCrash):
(WebKit::QtViewInterface::didRelaunchProcess):
(WebKit::QtViewInterface::engine):
(WebKit::QtViewInterface::downloadRequested):
(WebKit::QtViewInterface::chooseFiles):
* UIProcess/qt/QtViewInterface.h:
* UIProcess/qt/QtWebPageProxy.h:
(QtWebPageProxy::setViewportInteractionEngine):
* UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
* WebKit2.pri:
2011-11-10 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck build.
* GNUmakefile.am: Fix typos in gtk-doc files and scripts.
2011-11-10 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed Mac build fix: Remove TapAndHold gesture type.
It broke the build because it's unhandled. Remove it since it's not
supported at the moment anyway. (looks like an accidental addition?)
* Shared/WebEvent.h:
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
2011-11-09 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Enable exports and constructor functions in static libs
Reviewed by Tor Arne Vestbø.
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::platformInitialize): Remove unnecessary manual Qt resource
initialization.
2011-11-10 Zeno Albisser <zeno.albisser@nokia.com>
[Qt][WK2] Add Tap Gesture recognition to UIProcess
https://bugs.webkit.org/show_bug.cgi?id=71841
Add a Tap gesture recognizer that delivers GestureSingleTap
and GestureTapAndHold events through the WebPageProxy.
Add a GestureTapAndHold to WebEvent.
Add a DoubleTap gesture for zooming in and out.
This patch is based on work of Benjamin Poulain.
Reviewed by Kenneth Rohde Christiansen.
* Shared/WebEvent.h:
* Target.pri:
* UIProcess/qt/QtTapGestureRecognizer.cpp: Added.
(WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
(WebKit::QtTapGestureRecognizer::setWebPageProxy):
(WebKit::QtTapGestureRecognizer::recognize):
(WebKit::QtTapGestureRecognizer::tapTimeout):
(WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
(WebKit::QtTapGestureRecognizer::reset):
(WebKit::QtTapGestureRecognizer::timerEvent):
* UIProcess/qt/QtTapGestureRecognizer.h: Added.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::processDidCrash):
(QtWebPageProxy::doneWithTouchEvent):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-09 Shinya Kawanaka <shinyak@google.com>
Internals.markerRangeForNode should be able to take markers by specifying a marker type.
https://bugs.webkit.org/show_bug.cgi?id=71792
Reviewed by Hajime Morita.
* win/WebKit2.def: Exposed necessary references.
* win/WebKit2CFLite.def: ditto.
2011-10-26 Martin Robinson <mrobinson@igalia.com>
[GTK] [WebKit] Replace the gtkdoc autools magic with something more flexible
https://bugs.webkit.org/show_bug.cgi?id=70877
Reviewed by Philippe Normand.
Add a script that runs gtkdoc manually instead of using the autotools
magic. Remove now unused gtkdoc files.
* GNUmakefile.am: Remove references to removed gtkdoc files.
* UIProcess/API/gtk/docs/GNUmakefile.am: Removed.
* UIProcess/API/gtk/docs/build-gtkdoc: Added.
* UIProcess/API/gtk/docs/gtkdoc.py: Added.
* UIProcess/API/gtk/docs/version.xml.in: Removed.
2011-11-09 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/10423024> WebProcess doesn't use AuthBrokerAgent for proxy credentials
https://bugs.webkit.org/show_bug.cgi?id=71964
Reviewed by Darin Adler.
* WebProcess/com.apple.WebProcess.sb: Allow mach-lookup of com.apple.cfnetwork.AuthBrokerAgent.
2011-11-09 Anders Carlsson <andersca@apple.com>
Element::boundsInWindowSpace should be Element::boundsInRootViewSpace
https://bugs.webkit.org/show_bug.cgi?id=71955
Reviewed by Sam Weinig.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::elementBounds):
Call Element::boundsInRootViewSpace.
2011-11-09 Alexis Menard <alexis.menard@openbossa.org>
WebGraphicsLayer behaves wrongly when no contentsScale is set.
https://bugs.webkit.org/show_bug.cgi?id=71959
Reviewed by Noam Rosenthal.
The contentsScale needs to get a default value just like
TiledBackingStore in case no value is explicitely set.
It is covered by existing tests.
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
2011-11-09 Mark Hahnenberg <mhahnenberg@apple.com>
De-virtualize JSObject::getOwnPropertyDescriptor
https://bugs.webkit.org/show_bug.cgi?id=71523
Reviewed by Sam Weinig.
Added getOwnPropertyDescriptor to the MethodTable, changed all of the
virtual versions of getOwnPropertyDescriptor to static ones, and
changed all of the call sites to the corresponding lookup in the MethodTable.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getOwnPropertyDescriptor):
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-11-09 Alexandru Chiculita <achicu@adobe.com>
Fixing build on MacOSX SL after 71838
https://bugs.webkit.org/show_bug.cgi?id=71912
Reviewed by Anders Carlsson.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2011-11-09 Kenneth Rohde Christiansen <kenneth@webkit.org>
[WebKit2] Prepare viewport meta handling for desktop usage
https://bugs.webkit.org/show_bug.cgi?id=71907
Reviewed by Simon Hausmann.
This is only used by Qt so far. Now we don't always layout pages
without the viewport meta tag, using 980 as the layout width, but
instead we use that value (it is a setting) as a minimum value, or
else we use the viewport width.
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::updateViewportSize):
(QTouchWebViewPrivate::updateViewportConstraints):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setViewportSize):
2011-11-09 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed, rolling out r99701.
http://trac.webkit.org/changeset/99701
Breaks Qt mac build
* WebProcess/WebPage/qt/WebPageQt.cpp:
(initResources):
(WebKit::WebPage::platformInitialize):
2011-11-09 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Enable exports and constructor functions in static libs
Reviewed by Tor Arne Vestbø.
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::platformInitialize): Remove unnecessary manual Qt resource
initialization.
2011-11-09 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Fix geolocation enabled build.
Reviewed by Tor Arne Vestbø.
* Target.pri: Add QT += location to get the right module includes.
* UIProcess/qt/WebGeolocationProviderQt.cpp: Include the moc file with the right name (GeoLocation -> Geolocation)
* UIProcess/qt/WebGeolocationProviderQt.h: Removed the ENABLE(GEOLOCATION) guards, otherwise moc doesn't generate
code, because it can't interpret the ENABLE() macro.
2011-11-09 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Build system cleanup
https://bugs.webkit.org/show_bug.cgi?id=71815
Reviewed by Kenneth Rohde Christiansen.
* Target.pri: Removed duplicated sources that are compiled also into QtWebKit.so through api.pri.
* UIProcess/qt/WebGeolocationProviderQt.cpp: Include the moc file here, as it should only be compiled
if geolocation is enabled.
* UIProcess/qt/WebGeolocationProviderQt.h: Provide ENABLE(GEOLOCATION) guards around class definition.
2011-11-08 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Replace use of QApplication with QGuiApplication
https://bugs.webkit.org/show_bug.cgi?id=71794
Reviewed by Andreas Kling.
* Platform/CoreIPC/unix/ConnectionUnix.cpp: Remove unnecessary QApplication inclusion.
* Platform/qt/RunLoopQt.cpp: Replace QApplication include with QCoreApplication.
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp: Ditto.
* UIProcess/Launcher/qt/ThreadLauncherQt.cpp: Remove unnecessary QApplication inclusion.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::handleMousePressEvent): Replace QApplication usage with QStyleHints.
(QtWebPageProxy::handleMouseDoubleClickEvent): Ditto.
2011-11-07 Adam Barth <abarth@webkit.org>
Move static "policy" state from SecurityOrigin.cpp to SecurityPolicy.cpp
https://bugs.webkit.org/show_bug.cgi?id=71755
Reviewed by Eric Seidel.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::addOriginAccessWhitelistEntry):
(WebKit::InjectedBundle::removeOriginAccessWhitelistEntry):
(WebKit::InjectedBundle::resetOriginAccessWhitelists):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::loadURL):
2011-11-08 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed build fix after r99613.
* win/WebKit2CFLite.def: Add missing export.
2011-11-08 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed build fix after r98624 and r99613.
* win/WebKit2CFLite.def: Add missing exports.
2011-11-08 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=71856
WebKit should use new NSWindowDidChangeBackingPropertiesNotification instead of
old NSWindowDidChangeResolutionNotification
-and corresponding-
<rdar://problem/10317253>
Reviewed by Tim Hatcher.
* UIProcess/API/mac/WKView.mm:
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
We have to check that the backing scale factor actually changed since this
notification can also be used to signify other changes.
(-[WKView _windowDidChangeBackingProperties:]):
2011-11-08 Anders Carlsson <andersca@apple.com>
Add a basic layer hierarchy to the Core Animation drawing area
https://bugs.webkit.org/show_bug.cgi?id=71838
Reviewed by Sam Weinig.
* UIProcess/API/mac/WKView.mm:
(-[WKView drawRect:]):
Return early if we're using a tiled drawing area.
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
If we're using a tiled drawing area, make the WKView layer backed and set its layer
to a simple CALayer with a white background and set the view's content redraw policy
to never to avoid ever calling drawRect.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::didUpdateGeometry):
* UIProcess/DrawingAreaProxy.messages.in:
Add a new didUpdateGeometry message.
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
Initialize m_isWaitingForDidUpdateGeometry.
(WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
Send an UpdateGeometry message to the web process and wait for a reply.
(WebKit::TiledCoreAnimationDrawingAreaProxy::enterAcceleratedCompositingMode):
Tell the web page proxy to enter accelerated compositing mode.
(WebKit::TiledCoreAnimationDrawingAreaProxy::exitAcceleratedCompositingMode):
Assert that this function is never called.
(WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
Send another UpdateGeometry message if needed.
(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
Add helper function to actually send the UpdateGeometry message.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::updateGeometry):
* WebProcess/WebPage/DrawingArea.messages.in:
Add UpdateGeometry message.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
Create a red root layer and a remote layer client that hosts it.
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
Resize the root layer and tell the UI process that we've updated the geometry.
2011-11-08 Dan Bernstein <mitz@apple.com>
<rdar://problem/10262225> Allow RenderView to have columns
https://bugs.webkit.org/show_bug.cgi?id=71840
* win/WebKit2.def: Export Page::setPagination() for WebCoreTestSupport.
2011-11-08 Jon Lee <jonlee@apple.com>
[WK2] Expose acceptMIMETypes for file inputs
https://bugs.webkit.org/show_bug.cgi?id=71836
<rdar://problem/10407367>
Reviewed by Anders Carlsson.
* Shared/WebOpenPanelParameters.cpp:
(WebKit::WebOpenPanelParameters::acceptMIMETypes):
* Shared/WebOpenPanelParameters.h:
* UIProcess/API/C/WKOpenPanelParameters.cpp:
(WKOpenPanelParametersCopyAcceptedMIMETypes):
* UIProcess/API/C/WKOpenPanelParameters.h:
2011-11-08 Zan Dobersek <zandobersek@gmail.com>
[WK2][GTK] The default database & local storage directory names should note they exist for Gtk port's needs
https://bugs.webkit.org/show_bug.cgi?id=71837
Reviewed by Martin Robinson.
Ensure that directories for databases and local storage are in a 'webkitgtk'
directory in current user's data directory, noting they originate from the Gtk port.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultDatabaseDirectory):
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
2011-11-08 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Workaround some problems in QML API tests
https://bugs.webkit.org/show_bug.cgi?id=71818
Reviewed by Tor Arne Vestbø.
This commit workaround the issue of QML's QtTest crashing when we run tests after
"windowShown". We delay to the next run of the mainloop. This workaround is not
pretty but shouldn't affect the semantics of the tests. And we benefit more from
having working tests right now.
This patch also improves Download to: wait for the load before emitting click, and
properly identifying the "succeeded" signal of the downloadItem object.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml:
2011-11-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
Clean up QtViewportInteractionEngine
Reviewed by Simon Hausmann.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::setItemRectVisible):
Rename the method to make it more obvious what it does. Avoid implicit
conversion to/from QVariant.
(WebKit::QtViewportInteractionEngine::pagePositionRequest):
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
(WebKit::QtViewportInteractionEngine::itemSizeChanged):
Only call this method on item size changes, and not for every interaction
with the viewport item. Before this change it was even being called during
animations.
* UIProcess/qt/QtViewportInteractionEngine.h:
(WebKit::QtViewportInteractionEngine::scaleAnimationValueChanged):
Rename to make it clean that this is called from the animator.
2011-11-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Improve the animation time constant
https://bugs.webkit.org/show_bug.cgi?id=71790
Reviewed by Simon Hausmann.
Use 250 milliseconds instead of 400, which feels a lot more natural
and makes the mini browser feel more responsive.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
2011-11-08 Alexis Menard <alexis.menard@openbossa.org>
[Qt] Merge QtDesktopWebPageProxy and QtTouchWebPageProxy into QtWebPageProxy.
https://bugs.webkit.org/show_bug.cgi?id=71355
Reviewed by Simon Hausmann.
As we try to unify our public API offer we need to merge our double
WebPageProxy implementations first into a common class. That will help
to merge our TouchWebView and DesktopWebView views into one class later.
This commit just merge stuff around and doesn't contain any functional changes.
* Target.pri:
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::init):
* UIProcess/API/qt/qtouchwebpage.cpp:
(QTouchWebPagePrivate::paintToCurrentGLContext):
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qtouchwebpage_p.h:
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::init):
(QTouchWebViewPrivate::_q_viewportUpdated):
(QTouchWebViewPrivate::_q_viewportTrajectoryVectorChanged):
* UIProcess/API/qt/qtouchwebview_p.h:
* UIProcess/qt/QtDesktopWebPageProxy.cpp: Removed.
* UIProcess/qt/QtDesktopWebPageProxy.h: Removed.
* UIProcess/qt/QtTouchWebPageProxy.cpp: Removed.
* UIProcess/qt/QtTouchWebPageProxy.h: Removed.
* UIProcess/qt/QtWebPageProxy.cpp:
(dragOperationToDropAction):
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::handleEvent):
(QtWebPageProxy::handleMouseMoveEvent):
(QtWebPageProxy::handleMousePressEvent):
(QtWebPageProxy::handleMouseReleaseEvent):
(QtWebPageProxy::handleMouseDoubleClickEvent):
(QtWebPageProxy::handleWheelEvent):
(QtWebPageProxy::handleHoverLeaveEvent):
(QtWebPageProxy::handleHoverMoveEvent):
(QtWebPageProxy::handleDragEnterEvent):
(QtWebPageProxy::handleDragLeaveEvent):
(QtWebPageProxy::handleDragMoveEvent):
(QtWebPageProxy::handleDropEvent):
(QtWebPageProxy::timerEvent):
(QtWebPageProxy::processDidCrash):
(QtWebPageProxy::didReceiveDownloadResponse):
(QtWebPageProxy::paintContent):
(QtWebPageProxy::createDrawingAreaProxy):
(QtWebPageProxy::renderToCurrentGLContext):
(QtWebPageProxy::doneWithTouchEvent):
(QtWebPageProxy::setVisibleContentRectAndScale):
(QtWebPageProxy::setVisibleContentRectTrajectoryVector):
(QtWebPageProxy::touchEvent):
(QtWebPageProxy::findZoomableAreaForPoint):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-08 Zan Dobersek <zandobersek@gmail.com>
[WK2][GTK] Application cache directory is incorrectly set
https://bugs.webkit.org/show_bug.cgi?id=70680
Reviewed by Philippe Normand.
Correctly set application cache directory to be in current
user's default cache directory.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::applicationCacheDirectory):
2011-11-07 Emil A Eklund <eae@chromium.org>
Revert platform and scrolling to ints
https://bugs.webkit.org/show_bug.cgi?id=71585
Reviewed by Eric Seidel.
Replace all uses of LayoutUnit and related types with ints in platform
and scrolling code.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::invalidateScrollbarRect):
(WebKit::BuiltInPDFView::visibleHeight):
(WebKit::BuiltInPDFView::visibleWidth):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
2011-11-07 Adam Barth <abarth@webkit.org>
Move DomainRelaxationForbidden scheme registry to SchemeRegistry
https://bugs.webkit.org/show_bug.cgi?id=71750
Reviewed by Eric Seidel.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setDomainRelaxationForbiddenForURLScheme):
2011-11-07 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=71490
Support uiStateTransitionProgress for scrollbars
-and corresponding-
<rdar://problem/9849612>
Reviewed by Sam Weinig.
Scrollbar::mouseUp() now takes a PlatformMouseEvent as a parameter.
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::onLButtonUp):
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::handleMouseEvent):
2011-11-07 Alexey Proskuryakov <ap@apple.com>
The Full Keyboard Access preference should be read in the UI process
https://bugs.webkit.org/show_bug.cgi?id=71734
<rdar://problem/9237619>
Reviewed by Darin Adler.
This is consistent with how other global preferences (like language) are handled, and lets
us tighten up the sandbox a little.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
Added fullKeyboardAccessEnabled, so that newly started processes have the right preference value.
* UIProcess/WebContext.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::fullKeyboardAccessModeChanged): If preference changes while a web process
is already running, tell it.
(WebKit::WebContext::ensureWebProcess): Set parameters.fullKeyboardAccessEnabled from current
preference.
* UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::fullKeyboardAccessEnabled):
* UIProcess/mac/WebProcessProxyMac.mm: (WebKit::WebProcessProxy::fullKeyboardAccessEnabled):
* UIProcess/WebProcessProxy.h:
Proxy it to Objective-C code. WebProcessProxy is as good place to have the static function
as any. One day, we will make code more consistent with language and other global preferences.
* UIProcess/mac/WKFullKeyboardAccessWatcher.h: Copied from Source/WebKit2/WebProcess/mac/WKFullKeyboardAccessWatcher.h.
* UIProcess/mac/WKFullKeyboardAccessWatcher.mm: Copied from Source/WebKit2/WebProcess/mac/WKFullKeyboardAccessWatcher.mm.
* WebProcess/mac/WKFullKeyboardAccessWatcher.h: Removed.
* WebProcess/mac/WKFullKeyboardAccessWatcher.mm: Removed.
(-[WKFullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]): Once retrieved,
push the preference value.
* WebKit2.xcodeproj/project.pbxproj: WKFullKeyboardAccessWatcher is now in UI process.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::fullKeyboardAccessModeChanged):
(WebKit::WebProcess::fullKeyboardAccessEnabled):
* WebProcess/mac/WebProcessMac.mm:
WebCprocess now holds the preference value in a mamber value, which UI process pushes
updates to.
* WebProcess/WebProcess.messages.in: Added a message for changes preference value.
* WebProcess/com.apple.WebProcess.sb: We no longer need read access to com.apple.universalaccess.plist.
2011-11-07 Anders Carlsson <andersca@apple.com>
Add TiledCoreAnimationDrawingArea stub classes
https://bugs.webkit.org/show_bug.cgi?id=71729
Reviewed by Sam Weinig.
* Shared/DrawingAreaInfo.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _shouldUseTiledDrawingArea]):
(-[WKView WebKit::]):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: Copied from Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp.
(WebKit::TiledCoreAnimationDrawingAreaProxy::create):
(WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
(WebKit::TiledCoreAnimationDrawingAreaProxy::~TiledCoreAnimationDrawingAreaProxy):
(WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Copied from Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: Copied from Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp.
(WebKit::TiledCoreAnimationDrawingArea::create):
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay):
(WebKit::TiledCoreAnimationDrawingArea::scroll):
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
(WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync):
2011-11-07 Anders Carlsson <andersca@apple.com>
Follow-up build fix.
* WebProcess/WebPage/DrawingAreaImpl.h:
2011-11-07 Anders Carlsson <andersca@apple.com>
Remove unused DrawingArea::syncCompositingLayers
https://bugs.webkit.org/show_bug.cgi?id=71717
Reviewed by John Sullivan.
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
* WebProcess/WebPage/TiledDrawingArea.h:
2011-11-07 Anders Carlsson <andersca@apple.com>
Rename NetscapePlugin::wantsWindowRelativeNPWindowCoordinates to NetscapePlugin::wantsPluginRelativeNPWindowCoordinates
https://bugs.webkit.org/show_bug.cgi?id=71708
Reviewed by Sam Weinig.
The name wantsPluginRelativeNPWindowCoordinates is more clear than wantsWindowRelativeNPWindowCoordinates. Rename the functions
everywhere and, since the meaning is now inverted, invert the checks and return values.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::callSetWindow):
(WebKit::NetscapePlugin::geometryDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
(WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
(WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
2011-11-07 Anders Carlsson <andersca@apple.com>
NetscapePlugin::wantsWindowRelativeNPWindowCoordinates should return false on Mac
https://bugs.webkit.org/show_bug.cgi?id=71707
Reviewed by Sam Weinig.
This changes the way the fake Carbon plug-in window is positioned, so that it's always the same size
and location as the plug-in (relative to the screen).
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformGeometryDidChange):
Call updateFakeWindowBounds.
(WebKit::NetscapePlugin::updateFakeWindowBounds):
Convert the plug-in position to screen coordinates and set the window bounds to be the location and
size of the plug-in, where the location is relative to the screen.
(WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
Return false.
(WebKit::NetscapePlugin::windowAndViewFramesChanged):
Call updateFakeWindowBounds.
2011-11-07 Sam Weinig <sam@webkit.org>
WKPage.h should be in PrivateHeaders.
Rubber-stamped by Anders Carlsson.
* WebKit2.xcodeproj/project.pbxproj:
Mark WKPage.h private.
2011-11-07 Anders Carlsson <andersca@apple.com>
Simplify NetscapePlugin::convertPoint and make it work (in theory) with transformed plug-ins
https://bugs.webkit.org/show_bug.cgi?id=71699
Reviewed by Sam Weinig.
Add a getScreenTransform function which given a coordinate space returns a transform that converts a
point from that coordinate space to the screen coordinate space. We then get the source -> screen transform
and the destination -> screen transform. We invert the destination -> screen transform, multiply it with the
source -> screen transform and use mapPoint to get a complete affine transform from the source to the destination space
and use mapPoint to map the source point and return the destination point.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::getScreenTransform):
(WebKit::NetscapePlugin::convertPoint):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::initializePlugin):
Call windowAndViewFramesChanged before viewGeometryDidChange so that the window and view frames will be up to date by
the time NPP_SetWindow is called in the plug-in.
2011-11-07 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Put handling of gestures and their interaction in one place
https://bugs.webkit.org/show_bug.cgi?id=71682
Reviewed by Simon Hausmann.
Before this patch, the interaction (ie. cancelling animations, events)
was handled in the respective recognizers which then knew about each
others.
* UIProcess/qt/QtGestureRecognizer.h:
(WebKit::QtGestureRecognizer::isRecognized):
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::recognize):
* UIProcess/qt/QtPanGestureRecognizer.h:
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::QtPinchGestureRecognizer::recognize):
* UIProcess/qt/QtPinchGestureRecognizer.h:
* UIProcess/qt/QtTouchWebPageProxy.cpp:
(QtTouchWebPageProxy::QtTouchWebPageProxy):
(QtTouchWebPageProxy::doneWithTouchEvent):
* UIProcess/qt/QtTouchWebPageProxy.h:
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::pagePositionRequest):
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
(WebKit::QtViewportInteractionEngine::scrollAnimationActive):
(WebKit::QtViewportInteractionEngine::interruptScrollAnimation):
(WebKit::QtViewportInteractionEngine::panGestureActive):
(WebKit::QtViewportInteractionEngine::scaleAnimationActive):
(WebKit::QtViewportInteractionEngine::interruptScaleAnimation):
(WebKit::QtViewportInteractionEngine::pinchGestureActive):
* UIProcess/qt/QtViewportInteractionEngine.h:
2011-11-07 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Make it possible to include qdesktopwebview.h from apps
Reviewed by Tor Arne Vestbø.
* UIProcess/API/qt/qdesktopwebview.h: Don't include C API headers, forward
declare the structs manually.
2011-11-07 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Fix failing inspector tests after build system changes
https://bugs.webkit.org/show_bug.cgi?id=71677
Reviewed by Tor Arne Vestbø.
Ensure symbols from the qt resource system are referenced
from outside the static webcore library. One way of doing that is
to initialize the resources right away, as explained in the documentation
of th Qt resource system.
* WebProcess/WebPage/qt/WebPageQt.cpp:
(initResources):
(WebKit::WebPage::platformInitialize):
2011-11-03 Anders Carlsson <andersca@apple.com>
Add NetscapePlugin::convertFromRootView
https://bugs.webkit.org/show_bug.cgi?id=71526
Reviewed by Sam Weinig.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::convertFromRootView):
New function that converts a point from root view coordinates to plug-in coordinates.
Returns false if the conversion can't be done.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::fillInCocoaEventFromMouseEvent):
(WebKit::initializeMouseEvent):
(WebKit::NetscapePlugin::platformHandleMouseEvent):
(WebKit::NetscapePlugin::platformHandleWheelEvent):
(WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
(WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
Use convertFromRootView instead of subtracting m_frameRectInWindowCoordinates.location() from the
event position (which is in root view coordinates).
2011-11-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Refactor and clean up the qmake build system
The qmake build system has accumulated a bit of cruft and redundancy
over time. There's also a fairly tight coupling between how to build
the various targets, and _what_ to build, making it harder to add new
rules or sources. This patch aims to elevate these issues somewhat.
This is a short-list of the changes:
* The rules for how to build targets are now mostly contained as
prf-files in Tools/qmake/mkspecs/features. Using mkspecs also
allows us to do pre- and post-processing of each project file,
which helps to clean up the actual project files.
* Derived sources are no longer generated as a separate make-step
but is part of each target's project file as a subdir. Makefile
rules are used to ensure that we run make on the derived sources
before running qmake on the actual target makefile. This makes
it easier to keep a proper dependency between derived sources
and the target.
* We use GNU make and the compiler to generate dependencies on
UNIX-based systems running Qt 5. This allows us to lessen the
need to run qmake, which should reduce compile time.
* WebKit2 is now build by default if building with Qt 5. It can
be disabled by passing --no-webkit2 to build-webkit.
The result of these changes are hopefully a cleaner and easier
build system to modify, and faster build times due to no longer
running qmake on every single build. It's also a first step
towards possibly generating the list of sources using another
build system.
https://bugs.webkit.org/show_bug.cgi?id=71222
Reviewed by Simon Hausmann.
* DerivedSources.pri: Renamed from Source/WebKit2/DerivedSources.pro.
* Target.pri: Copied from Source/WebKit2/WebKit2.pro.
* UIProcess/API/qt/tests/tests.pri:
* UIProcess/API/qt/tests/tests.pro: Removed.
* WebKit2.pri:
* WebKit2.pro:
* WebKit2API.pri: Removed.
* WebProcess.pro:
2011-11-04 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Support programmatic scrolling with the QTouchWebView
Reviewed by Simon Hausmann.
As more code can be shared between the programmatic scrolling and the
method for ensuring that the contents are within valid bounds, this
patch includes a bit of refactoring as well.
* UIProcess/API/qt/qdesktopwebview_p.h:
(QDesktopWebViewPrivate::scrollPositionRequested):
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::scrollPositionRequested):
* UIProcess/API/qt/qtouchwebview_p.h:
* UIProcess/qt/QtTouchViewInterface.cpp:
(WebKit::QtTouchViewInterface::scrollPositionRequested):
* UIProcess/qt/QtTouchViewInterface.h:
* UIProcess/qt/QtViewInterface.h:
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::event):
(WebKit::boundPosition):
(WebKit::QtViewportInteractionEngine::pagePositionRequest):
(WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
(WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
(WebKit::QtViewportInteractionEngine::setConstraints):
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):
(WebKit::QtViewportInteractionEngine::contentViewportChanged):
* UIProcess/qt/QtViewportInteractionEngine.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::pageDidRequestScroll):
* UIProcess/qt/QtWebPageProxy.h:
2011-11-03 Mark Hahnenberg <mhahnenberg@apple.com>
De-virtualize JSObject::getPropertyNames
https://bugs.webkit.org/show_bug.cgi?id=71306
Reviewed by Darin Adler.
Added getPropertyNames to the MethodTable, changed all the virtual
implementations of getPropertyNames to static ones, and replaced
all call sites with corresponding lookups in the MethodTable.
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::enumerate):
2011-11-03 Anders Carlsson <andersca@apple.com>
Get rid of NetscapePlugin::m_clipRectInWindowCoordinates
https://bugs.webkit.org/show_bug.cgi?id=71521
Reviewed by Dan Bernstein.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::geometryDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
2011-11-03 Anders Carlsson <andersca@apple.com>
Use convertToRootView(IntPoint()) instead of m_frameRectInWindowCoordinates.location() where possible
https://bugs.webkit.org/show_bug.cgi?id=71520
Reviewed by Dan Bernstein.
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
(WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
(WebKit::NetscapePlugin::platformPaint):
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformHandleMouseEvent):
(WebKit::NetscapePlugin::platformHandleWheelEvent):
(WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
(WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
2011-11-03 Anders Carlsson <andersca@apple.com>
Add NetscapePlugin::convertToRootView
https://bugs.webkit.org/show_bug.cgi?id=71519
Reviewed by Darin Adler.
Yet another step towards eliminating uses of m_frameRectInWindowCoordinates.
Also, use the "root view" terminology, since that's really what we mean here.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::callSetWindow):
Use convertToRootView to get the plug-in location and clip rect in root view coordinates.
(WebKit::NetscapePlugin::convertToRootView):
Apply the m_pluginToRootViewTransform.mapPoint transform.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
Add convertToRootView.
2011-11-03 Anders Carlsson <andersca@apple.com>
Move plug-in size and backing store checks to PluginProxy::updateBackingStore
https://bugs.webkit.org/show_bug.cgi?id=71508
Reviewed by Darin Adler.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::geometryDidChange):
Remove code to send back an empty backing store if the plug-in size is empty
or doesn't need a backing store. This check is now done...
(WebKit::PluginProxy::updateBackingStore):
...here.
2011-11-03 Anders Carlsson <andersca@apple.com>
Get rid of PluginControllerProxy::m_frameRectInWindowCoordinates
https://bugs.webkit.org/show_bug.cgi?id=71506
Reviewed by Darin Adler.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::geometryDidChange):
This no longer needs to take the frame rect in window coordinates.
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginControllerProxy.messages.in:
Remove frameRectInWindowCoordinates from the GeometryDidChange message.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::geometryDidChange):
Don't pass frameRectInWindowCoordinates when sending GeometryDidChange.
2011-11-03 Anders Carlsson <andersca@apple.com>
Get rid of Plugin::wantsWindowRelativeCoordinates()
https://bugs.webkit.org/show_bug.cgi?id=71504
Reviewed by Darin Adler.
Since all Plugin subclasses now return false for wantsWindowRelativeCoordinates,
we can go ahead and remove it.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::paint):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::snapshot):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp:
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::paint):
2011-11-03 Anders Carlsson <andersca@apple.com>
NetscapePlugin::wantsWindowRelativeCoordinates should return false for all ports
https://bugs.webkit.org/show_bug.cgi?id=71501
Reviewed by Darin Adler.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::wantsWindowRelativeCoordinates):
Return false.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformGeometryDidChange):
Use m_pluginSize instead of m_frameRectInWindowCoordinates.size().
(WebKit::NetscapePlugin::platformPaint):
No need to translate back and forth between window and plug-in relative coordinates anymore.
2011-11-03 Darin Adler <darin@apple.com>
Change remaining callers of releaseRef to call leakRef
https://bugs.webkit.org/show_bug.cgi?id=71422
Reviewed by Darin Fisher.
* Platform/mac/ModuleMac.mm:
(WebKit::Module::load):
* Shared/API/c/WKArray.cpp:
(WKArrayCreate):
* Shared/API/c/WKData.cpp:
(WKDataCreate):
* Shared/API/c/WKDictionary.cpp:
(WKDictionaryCopyKeys):
* Shared/API/c/WKGeometry.cpp:
(WKPointCreate):
(WKSizeCreate):
(WKRectCreate):
* Shared/API/c/WKMutableArray.cpp:
(WKMutableArrayCreate):
* Shared/API/c/WKMutableDictionary.cpp:
(WKMutableDictionaryCreate):
* Shared/API/c/WKNumber.cpp:
(WKBooleanCreate):
(WKDoubleCreate):
(WKUInt64Create):
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toCopiedAPI):
(WebKit::toCopiedURLAPI):
* Shared/API/c/cf/WKErrorCF.cpp:
(WKErrorCreateWithCFError):
* Shared/API/c/cf/WKURLRequestCF.cpp:
(WKURLRequestCreateWithCFURLRequest):
* Shared/API/c/cf/WKURLResponseCF.cpp:
(WKURLResponseCreateWithCFURLResponse):
* Shared/API/c/mac/WKURLRequestNS.mm:
(WKURLRequestCreateWithNSURLRequest):
* Shared/API/c/mac/WKURLResponseNS.mm:
(WKURLResponseCreateWithNSURLResponse):
* Shared/cf/ArgumentCodersCF.cpp:
(CoreIPC::decode):
* UIProcess/API/C/WKBackForwardList.cpp:
(WKBackForwardListCopyBackListWithLimit):
(WKBackForwardListCopyForwardListWithLimit):
* UIProcess/API/C/WKContext.cpp:
(WKContextCreate):
(WKContextCreateWithInjectedBundlePath):
* UIProcess/API/C/WKCredential.cpp:
(WKCredentialCreate):
(WKCredentialCreateWithCertificateInfo):
* UIProcess/API/C/WKDatabaseManager.cpp:
(WKDatabaseManagerGetOriginKey):
(WKDatabaseManagerGetOriginQuotaKey):
(WKDatabaseManagerGetOriginUsageKey):
(WKDatabaseManagerGetDatabaseDetailsKey):
(WKDatabaseManagerGetDatabaseDetailsNameKey):
(WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
(WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
(WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
* UIProcess/API/C/WKFrame.cpp:
(WKFrameCopyChildFrames):
* UIProcess/API/C/WKGeolocationPosition.cpp:
(WKGeolocationPositionCreate):
* UIProcess/API/C/WKGrammarDetail.cpp:
(WKGrammarDetailCreate):
* UIProcess/API/C/WKPage.cpp:
(WKPageGetSessionHistoryURLValueType):
(WKPageCopySessionState):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesCreateWithIdentifier):
* UIProcess/API/C/win/WKView.cpp:
(WKViewCreate):
* UIProcess/win/WebUndoClient.cpp:
(WebKit::WebUndoClient::registerEditCommand):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameCopyChildFrames):
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
(WKBundleNodeHandleCreate):
(WKBundleNodeHandleCopyDocument):
(WKBundleNodeHandleCopyHTMLTableCellElementCellAbove):
(WKBundleNodeHandleCopyDocumentFrame):
(WKBundleNodeHandleCopyHTMLFrameElementContentFrame):
(WKBundleNodeHandleCopyHTMLIFrameElementContentFrame):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCopyTrackedRepaintRects):
* WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
(WKBundleScriptWorldCreateWorld):
Use leakRef.
2011-11-02 Darin Adler <darin@apple.com>
Change remaining callers of releaseRef to call leakRef
https://bugs.webkit.org/show_bug.cgi?id=71422
Reviewed by Darin Fisher.
* Platform/mac/ModuleMac.mm:
(WebKit::Module::load): Use leakRef.
(WebKit::Module::unload): Use leakRef, and cast to void
to avoid unused return value warning.
* Shared/API/c/WKArray.cpp:
(WKArrayCreate):
* Shared/API/c/WKData.cpp:
(WKDataCreate):
* Shared/API/c/WKDictionary.cpp:
(WKDictionaryCopyKeys):
* Shared/API/c/WKGeometry.cpp:
(WKPointCreate):
(WKSizeCreate):
(WKRectCreate):
* Shared/API/c/WKMutableArray.cpp:
(WKMutableArrayCreate):
* Shared/API/c/WKMutableDictionary.cpp:
(WKMutableDictionaryCreate):
* Shared/API/c/WKNumber.cpp:
(WKBooleanCreate):
(WKDoubleCreate):
(WKUInt64Create):
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toCopiedAPI):
(WebKit::toCopiedURLAPI):
* Shared/API/c/cf/WKErrorCF.cpp:
(WKErrorCreateWithCFError):
* Shared/API/c/cf/WKURLRequestCF.cpp:
(WKURLRequestCreateWithCFURLRequest):
* Shared/API/c/cf/WKURLResponseCF.cpp:
(WKURLResponseCreateWithCFURLResponse):
* Shared/API/c/mac/WKURLRequestNS.mm:
(WKURLRequestCreateWithNSURLRequest):
* Shared/API/c/mac/WKURLResponseNS.mm:
(WKURLResponseCreateWithNSURLResponse):
* Shared/cf/ArgumentCodersCF.cpp:
(CoreIPC::decode):
* UIProcess/API/C/WKBackForwardList.cpp:
(WKBackForwardListCopyBackListWithLimit):
(WKBackForwardListCopyForwardListWithLimit):
* UIProcess/API/C/WKContext.cpp:
(WKContextCreate):
(WKContextCreateWithInjectedBundlePath):
* UIProcess/API/C/WKCredential.cpp:
(WKCredentialCreate):
(WKCredentialCreateWithCertificateInfo):
* UIProcess/API/C/WKDatabaseManager.cpp:
(WKDatabaseManagerGetOriginKey):
(WKDatabaseManagerGetOriginQuotaKey):
(WKDatabaseManagerGetOriginUsageKey):
(WKDatabaseManagerGetDatabaseDetailsKey):
(WKDatabaseManagerGetDatabaseDetailsNameKey):
(WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
(WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
(WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
* UIProcess/API/C/WKFrame.cpp:
(WKFrameCopyChildFrames):
* UIProcess/API/C/WKGeolocationPosition.cpp:
(WKGeolocationPositionCreate):
* UIProcess/API/C/WKGrammarDetail.cpp:
(WKGrammarDetailCreate):
* UIProcess/API/C/WKPage.cpp:
(WKPageGetSessionHistoryURLValueType):
(WKPageCopySessionState):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesCreateWithIdentifier):
* UIProcess/API/C/win/WKView.cpp:
(WKViewCreate):
* UIProcess/win/WebUndoClient.cpp:
(WebKit::WebUndoClient::registerEditCommand):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameCopyChildFrames):
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
(WKBundleNodeHandleCreate):
(WKBundleNodeHandleCopyDocument):
(WKBundleNodeHandleCopyHTMLTableCellElementCellAbove):
(WKBundleNodeHandleCopyDocumentFrame):
(WKBundleNodeHandleCopyHTMLFrameElementContentFrame):
(WKBundleNodeHandleCopyHTMLIFrameElementContentFrame):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCopyTrackedRepaintRects):
* WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
(WKBundleScriptWorldCreateWorld):
Use leakRef.
2011-11-03 Anders Carlsson <andersca@apple.com>
NetscapePlugin should use plug-in relative coordinates on Mac
https://bugs.webkit.org/show_bug.cgi?id=71486
Reviewed by Adam Roben.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::paint):
Don't translate the graphics context when the plug-in doesn't want window relative coordinates.
This also fixed a bug I introduced in my previous commit where we'd always pass the dirty rect in
plug-in coordinates even if the plug-in wants window relative coordinates.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::snapshot):
Don't do the whole translate dance if the plug-in doesn't want window relative coordinates.
(WebKit::NetscapePlugin::wantsWindowRelativeCoordinates):
Return false for PLATFORM_ARCHITECTURE(MAC).
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformPaint):
Simplify code now that we know that the we're always given plug-in relative coordinates.
2011-11-03 Anders Carlsson <andersca@apple.com>
PluginControllerProxy's dirty rect should be in plug-in coordinates
https://bugs.webkit.org/show_bug.cgi?id=71481
Reviewed by Sam Weinig.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::paint):
Convert the dirty rect to window coordinates before passing it to the plug-in.
(WebKit::PluginControllerProxy::invalidate):
No need to convert the dirty rect to window coordinates.
(WebKit::PluginControllerProxy::paintEntirePlugin):
Use m_pluginSize instead of m_frameRectInWindowCoordinates.isEmpty.
2011-11-03 Anders Carlsson <andersca@apple.com>
Use the right function to determine whether NPWindow coordinates should be window relative
https://bugs.webkit.org/show_bug.cgi?id=71480
Reviewed by Adam Roben.
We want to use wantsWindowRelativeNPWindowCoordinates here, and not wantsWindowRelativeCoordinates
which is a temporary function that will be removed (and that returns the wrong value!)
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::geometryDidChange):
2011-11-03 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed build fix after r99195.
The right name is restrictMinimumScaleFactorToViewportSize.
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::updateViewportConstraints):
2011-11-03 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use WEBKIT_API instead of WK_EXPORT in WebKitEnumTypes.h
https://bugs.webkit.org/show_bug.cgi?id=71457
Reviewed by Martin Robinson.
* GNUmakefile.am:
2011-11-03 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Bounce back limits are wrong in some situations
https://bugs.webkit.org/show_bug.cgi?id=71471
Reviewed by Simon Hausmann.
The valid position points were in viewport coordinates, but we were
requiring valid position points in content coordinates.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
2011-11-03 Fady Samuel <fsamuel@chromium.org>
Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
https://bugs.webkit.org/show_bug.cgi?id=70609
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::updateViewportConstraints):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::viewportConfigurationAsText):
2011-11-03 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Fix the signal signature of the loadFailed API test.
Rubber-stamped by Simon Hausmann.
* UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
(WebViewAbstraction::touchViewLoadFailed):
(WebViewAbstraction::desktopViewLoadFailed):
2011-11-03 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Fix an assertion under WebPage::setViewportSize.
https://bugs.webkit.org/show_bug.cgi?id=71473
Reviewed by Simon Hausmann.
The web view can have an empty size and it causes the assert in computeViewportAttributes.
Don't notify the web page of such a size change in this case.
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::updateViewportSize):
2011-11-03 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[WK2] State variable name refactor in WebPageProxy.cpp
https://bugs.webkit.org/show_bug.cgi?id=71467
Reviewed by Andreas Kling.
Renaming m_inDecidePolicyForMIMEType to m_inDecidePolicyForResponse after
https://bugs.webkit.org/show_bug.cgi?id=55827 .
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForResponse):
* UIProcess/WebPageProxy.h:
2011-11-03 Nayan Kumar K <nayankk@motorola.com>
[GTK][WEBKIT2] Add support for title property in WebKitWebView.
https://bugs.webkit.org/show_bug.cgi?id=68074
Reviewed by Philippe Normand.
Support for 'title' property is added in WebKitWebView.
Functions to get the value of this property is provided.
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
(didReceiveTitleForFrame): LoaderClient titleRecieve callback.
(webkitWebLoaderClientAttachLoaderClientToPage): Register didReceiveTitleForFrame callback.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewGetProperty): 'title' property get function.
(webkit_web_view_class_init): Register new property.
(webkitWebViewSetTitle): Notify WebKitWebView about title receive.
(webkit_web_view_get_title): API to get main frame title.
* UIProcess/API/gtk/WebKitWebView.h: webkit_web_view_get_title API expose.
* UIProcess/API/gtk/WebKitWebViewPrivate.h: Added private API.
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
(testWebViewTitle): Test webkit_web_view_get_title API.
(beforeAll): Add testWebViewTitle test.
2011-11-03 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Download support and API in UIProcess
https://bugs.webkit.org/show_bug.cgi?id=68962
Reviewed by Simon Hausmann.
We implement our WkContextDownloadClient and the needed callbacks.
We also add APIs by exposing QWebDownloadItem. Objects from this type
have their ownership handled by QDesktopWebView and will be created or
destroyed as needed. Classes implementing ViewInterface (QDesktopWebViewPrivate
and TouchViewInterface) will receive a signal (downloadRequested) with a pointer
to the recently created QWebDownloadItem. With that they can connect the proper
signals and slots, set the download destination path and then call start().
Objects of this type will provide the progress of a download, a slot to cancel it,
and signals for getting finished or failure status.
QWebDownloadItem was also exposed in QML.
Qt needed an asynchronous way for UIProcess to return a destination path to WebProcess,
therefore the startTransfer API was added to WebKit2's Download handlers.
* Shared/qt/WebCoreArgumentCodersQt.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
Add encoding and decoding of suggestedFilename for ResourceResponse.
* UIProcess/API/qt/WKView.h:
* UIProcess/API/qt/qbasewebview.h: Add signal downloadRequested.
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::downloadRequested):
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/API/qt/qwebdownloaditem.cpp: Added.
(QWebDownloadItemPrivate::QWebDownloadItemPrivate):
(QWebDownloadItem::QWebDownloadItem):
(QWebDownloadItem::~QWebDownloadItem):
(QWebDownloadItem::url):
(QWebDownloadItem::destinationPath):
(QWebDownloadItem::setDestinationPath):
(QWebDownloadItem::suggestedFilename):
(QWebDownloadItem::mimeType):
(QWebDownloadItem::expectedContentLength):
(QWebDownloadItem::totalBytesReceived):
(QWebDownloadItem::cancel):
(QWebDownloadItem::start):
* UIProcess/API/qt/qwebdownloaditem.h: Added.
* UIProcess/API/qt/qwebdownloaditem_p.h: Added.
(QWebDownloadItemPrivate::didReceiveResponse):
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/download.html: Added.
* UIProcess/API/qt/tests/qmltests/common/download.zip: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::startTransfer): Qt only function added.
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/PageClient.h: Added Qt specific function to call handleDownloadRequest from QtWebPageProxy.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::download):
Using WebPageProxy::handleDownloadRequest to bootstrap a download through PageClient.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):
Using handleDownloadRequest() to bootstrap a download through PageClient.
(WebKit::WebPageProxy::handleDownloadRequest): Calls PageClient::handleDownloadRequest().
* UIProcess/WebPageProxy.h:
* UIProcess/qt/QtDownloadManager.cpp: Added.
(WebKit::toQtDownloadManager):
(WebKit::qt_wk_didReceiveResponse):
(WebKit::qt_wk_didCreateDestination):
(WebKit::qt_wk_didFinishDownload):
(WebKit::qt_wk_didFailDownload):
(WebKit::qt_wk_didReceiveDataForDownload):
(QtDownloadManager::downloadReceivedResponse): Will reach QtWebPageProxy::didReceiveDownloadResponse.
(QtDownloadManager::downloadCreatedDestination):
(QtDownloadManager::downloadFinished):
(QtDownloadManager::downloadFailed):
(QtDownloadManager::downloadDataReceived):
* UIProcess/qt/QtDownloadManager.h: Added.
Bootstrap our WKContextDownloadClient and set its callbacks.
This entity will also handle all downloads and keep a map of them.
It will be kept alive together with the WebContext as a static member
of QtWebPageProxy, so we can keep it across several WebPages and, therefore,
WebViews.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::defaultWKContext):
(QtWebPageProxy::~QtWebPageProxy):
(QtWebPageProxy::handleDownloadRequest):
(QtWebPageProxy::didReceiveDownloadResponse):
* UIProcess/qt/QtWebPageProxy.h:
From now on it will keep a static QtDownloadManager to live together
with the default WebContext. It implements PageClient::handleDownloadRequest.
QtWebPageProxy::didReceiveDownloadResponse will emit the view's signal downloadRequested.
* UIProcess/qt/QtTouchViewInterface.h:
(WebKit::QtTouchViewInterface::downloadRequested):
* UIProcess/qt/QtViewInterface.h:
* UIProcess/qt/qweberror.cpp:
(QWebError::description):
* UIProcess/qt/qweberror.h:
(QWebError::errorCodeAsDownloadError):
Add Download error handling to QWebError and a new API
to retrieve the error description from the original ResourceError.
Also, it now has QWebDownloadItem::DownloadError errorCodeAsDownloadError()
that returns the error code as a DownloadError.
* WebKit2.pro:
* WebKit2API.pri:
* WebProcess/Downloads/Download.h:
* WebProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startTransfer):
* WebProcess/Downloads/DownloadManager.h:
Adding Qt specific startTransfer function.
* WebProcess/Downloads/qt/DownloadQt.cpp:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::didDecideDestination):
(WebKit::Download::startTransfer):
* WebProcess/Downloads/qt/QtFileDownloader.cpp:
(WebKit::QtFileDownloader::init): start() was renamed to init().
(WebKit::QtFileDownloader::determineFilename):
Calling onReadyRead() here was unnecessary and it was triggering the overall
download process even before DownloadManager finished startDownload(). This
was leading to a DownloadManager with an empty list of downloads.
(WebKit::QtFileDownloader::startTransfer): decidedDestination() became startTransfer().
(WebKit::QtFileDownloader::abortDownloadWritingAndEmitError):
(WebKit::QtFileDownloader::handleDownloadResponse):
(WebKit::QtFileDownloader::onReadyRead):
(WebKit::QtFileDownloader::onFinished):
(WebKit::QtFileDownloader::cancel):
* WebProcess/Downloads/qt/QtFileDownloader.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::startTransfer):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
Adding Qt specific message StartTransfer and handling function.
2011-11-03 Nayan Kumar K <nayankk@motorola.com>
Add webkit_web_view_load_html and webkit_web_view_load_plain_text APIs.
https://bugs.webkit.org/show_bug.cgi?id=69249
Reviewed by Philippe Normand.
This patch adds support for 2 more load APIs, namely
webkit_web_view_load_html and webkit_web_view_load_plain_text.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_html): New API to load html string.
(webkit_web_view_load_plain_text): New API to load plain text.
* UIProcess/API/gtk/WebKitWebView.h: Public API addition.
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
(testLoadHtml): Test webkit_web_view_load_html API.
(testLoadPlainText): Test webkit_web_view_load_plain_text API.
(beforeAll): Add new tests.
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::loadHtml): Test webkit_web_view_load_html API.
(WebViewTest::loadPlainText): Test webkit_web_view_load_plain_text API.
* UIProcess/API/gtk/tests/WebViewTest.h:
2011-11-03 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][WK2] Failing assertion with desktop webview when touch mocking in MinBrowser
https://bugs.webkit.org/show_bug.cgi?id=71452
Reviewed by Andreas Kling.
Don't re-implement touchEvent(), we don't intend to support touch events as we
receive them from the QQuickCanvas at this point.
* UIProcess/API/qt/qdesktopwebview.cpp:
* UIProcess/API/qt/qdesktopwebview.h:
2011-11-03 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] [WK2] MiniBrowser assert in QtWebProccess on startup in debug build.
https://bugs.webkit.org/show_bug.cgi?id=71196
Reviewed by Kenneth Rohde Christiansen.
Ensure AC is turned off for the desktop view before we launch the process.
This avoids "accidential" enterAc/exitAc calls that cause failing assertions
because we don't really support AC in this setup.
The touch side works the same way, i.e. enable the preference before calling
init().
* UIProcess/qt/QtDesktopWebPageProxy.cpp:
(QtDesktopWebPageProxy::QtDesktopWebPageProxy):
2011-11-03 Balazs Kelemen <kbalazs@webkit.org>
[Qt] X11 plugins need to be reworked for Qt5
https://bugs.webkit.org/show_bug.cgi?id=70023
Reviewed by Simon Hausmann.
Disable X11 plugins.
* config.h:
2011-11-03 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed Qt build fix(es).
* UIProcess/qt/QtDesktopWebPageProxy.cpp:
(QtDesktopWebPageProxy::handleDragMoveEvent): Adapt to dragSession API change.
(QtDesktopWebPageProxy::handleDropEvent): Ditto.
* WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
(WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates): Implement here
also, for plugin-disabled builds.
2011-11-03 ChangSeok Oh <shivamidow@gmail.com>
[GTK] Fix build-break on r99143
https://bugs.webkit.org/show_bug.cgi?id=71440
Reviewed by Philippe Normand.
dragOperation() should be replaced with dragSession().operation since it was removed.
And didDetectXSSForFrame of WKPageLoaderClient should be relocated.
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
(webkitWebLoaderClientAttachLoaderClientToPage):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDragDataReceived):
(webkitWebViewBaseDragMotion):
2011-11-03 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
[Qt] Flagging usage of X11 headers under PLAT_ARCH(X11)
https://bugs.webkit.org/show_bug.cgi?id=71409
Reviewed by Simon Hausmann.
Build fix for building qtwebkit with latest qt5 which has removed Qt X11 headers.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2011-11-03 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK build fix after r99093...
* PluginProcess/PluginControllerProxy.h:
2011-11-02 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK] Debug build broken
https://bugs.webkit.org/show_bug.cgi?id=71417
Add WKNumber.h for WKBooleanGetTypeID
Replace WKGetTypeId with WKGetTypeID
Add initialization for didDetectXSSForFrame member in WKBundlePageLoaderClient
instance.
Reviewed by Noam Rosenthal.
* WebProcess/qt/QtBuiltinBundle.cpp:
(WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled):
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
2011-11-02 Mark Hahnenberg <mhahnenberg@apple.com>
De-virtualize JSObject::getOwnPropertyNames
https://bugs.webkit.org/show_bug.cgi?id=71307
Reviewed by Darin Adler.
Added getOwnPropertyNames to the MethodTable, changed all the virtual
implementations of getOwnPropertyNames to static ones, and replaced
all call sites with corresponding lookups in the MethodTable.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getOwnPropertyNames):
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-11-02 Anders Carlsson <andersca@apple.com>
Don't call NPP_SetWindow if the plug-in size or clip rect hasn't changed if the plug-in isn't using window relative coordinates
https://bugs.webkit.org/show_bug.cgi?id=71418
Reviewed by Adam Roben.
This avoids calling into the plug-in when only the plug-in position relative to the window changes.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::geometryDidChange):
2011-11-02 Jon Lee <jonlee@apple.com>
Fix syntax error.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
2011-11-02 Jon Lee <jonlee@apple.com>
Fix build error from r99108.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
2011-11-02 Dean Jackson <dino@apple.com>
Add ENABLE_CSS_SHADERS flag
https://bugs.webkit.org/show_bug.cgi?id=71394
Reviewed by Sam Weinig.
* Configurations/FeatureDefines.xcconfig:
2011-11-02 Anders Carlsson <andersca@apple.com>
Allow the various plug-in ports to decide whether NPWindow coordinates should be window-relative
https://bugs.webkit.org/show_bug.cgi?id=71415
Reviewed by Darin Adler.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::callSetWindow):
Remove the PLUGIN_ARCHITECTURE(X11) ifdef and set the NPWindow members
based on the return value of wantsWindowRelativeNPWindowCoordinates.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
(WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
Add platform specific implementations.
2011-11-02 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK] Debug build broken after r99065
https://bugs.webkit.org/show_bug.cgi?id=71397
Remove reference to panGestureActive becuase it is not defined anywhere.
Reviewed by Simon Hausmann.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::panGestureStarted):
2011-11-02 Jon Lee <jonlee@apple.com>
Update dragging info on mac when user is dragging files into view
https://bugs.webkit.org/show_bug.cgi?id=71325
<rdar://problem/10379193>
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm:
(-[WKView draggingUpdated:]): Based on the DragSession, we update NSDraggingInfo
to update the badge and dragging formation.
2011-11-02 Jon Lee <jonlee@apple.com>
Expand DragController to provide more information about the dragging session
https://bugs.webkit.org/show_bug.cgi?id=71324
<rdar://problem/10379175>
Reviewed by Darin Adler.
We now pass the DragSession struct from the Web to the UI process, instead of the
DragOperation enum.
* Scripts/webkit2/messages.py:
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
* Shared/WebCoreArgumentCoders.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView draggingUpdated:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): We now cache the last known DragSession state
(WebKit::WebPageProxy::didPerformDragControllerAction):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::dragSession):
(WebKit::WebPageProxy::resetDragOperation):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::keyStateToDragOperation):
(WebKit::WebView::DragEnter):
(WebKit::WebView::DragOver):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
2011-11-02 Anders Carlsson <andersca@apple.com>
Get rid of Plugin::deprecatedGeometryDidChange
https://bugs.webkit.org/show_bug.cgi?id=71411
Reviewed by Sam Weinig.
Now that all Plugin subclasses implement geometryDidChange and do all the work there
we can get rid of deprecatedGeometryDidChange.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp:
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewGeometryDidChange):
2011-11-02 Anders Carlsson <andersca@apple.com>
Move back functions that were not added.
* UIProcess/API/C/WKPage.h:
2011-11-02 Anders Carlsson <andersca@apple.com>
Fix build and WebKit2 ABI.
* Shared/APIClientTraits.cpp:
* Shared/APIClientTraits.h:
Add page loader client sizes.
* UIProcess/API/C/WKPage.h:
Move the newly added callback functions in the loader client last and bump the
WKPageLoaderClient version.
2011-11-02 Anders Carlsson <andersca@apple.com>
Fix build.
* WebProcess/Plugins/PluginView.h:
2011-11-02 Tom Sepez <tsepez@chromium.org>
XSSAuditor is silent
https://bugs.webkit.org/show_bug.cgi?id=70973
Reviewed by Adam Barth.
* UIProcess/API/C/WKPage.h:
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
(webkitWebLoaderClientAttachLoaderClientToPage):
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didDetectXSSForFrame):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didDetectXSSForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didDetectXSS):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2011-11-02 Anders Carlsson <andersca@apple.com>
More window relative coordinate usage removal
https://bugs.webkit.org/show_bug.cgi?id=71393
Reviewed by Adam Roben.
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
(WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
Just use m_clipRect instead of converting m_clipRectInWindowCoordinates to plug-in coordinates.
(WebKit::NetscapePlugin::platformPaint):
Use m_pluginSize instead of m_frameRectInWindowCoordinates.size().
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPaint):
Ditto.
2011-11-02 Anders Carlsson <andersca@apple.com>
Fix non-Mac builds and remove #if PLATFORM(MAC) around all contents scale factor functions.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
(WebKit::PluginControllerProxy::contentsScaleFactor):
(WebKit::PluginControllerProxy::geometryDidChange):
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginCreationParameters.cpp:
(WebKit::PluginCreationParameters::PluginCreationParameters):
(WebKit::PluginCreationParameters::encode):
(WebKit::PluginCreationParameters::decode):
* PluginProcess/PluginCreationParameters.h:
* PluginProcess/mac/PluginControllerProxyMac.mm:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::contentsScaleFactor):
(WebKit::NetscapePlugin::getAuthenticationInfo):
(WebKit::NetscapePlugin::snapshot):
(WebKit::NetscapePlugin::contentsScaleFactorChanged):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::initialize):
(WebKit::PluginProxy::contentsScaleFactorChanged):
(WebKit::PluginProxy::contentsScaleFactor):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::contentsScaleFactor):
2011-11-02 Anders Carlsson <andersca@apple.com>
Use m_pluginSize instead of m_frameRectInWindowCoordinates.size() in NetscapePlugin.
https://bugs.webkit.org/show_bug.cgi?id=71390
Reviewed by Adam Roben.
m_pluginSize is always equal to m_frameRectInWindowCoordinates.size() and this moves us one
sall step further towards eliminating m_frameRectInWindowCoordinates.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::invalidate):
(WebKit::NetscapePlugin::snapshot):
2011-11-02 Anders Carlsson <andersca@apple.com>
Fix non-Mac builds.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::snapshot):
2011-11-02 Anders Carlsson <andersca@apple.com>
Plug-in snapshots are blurry in HiDPI
https://bugs.webkit.org/show_bug.cgi?id=71387
<rdar://problem/10385393>
Reviewed by Adam Roben.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::snapshot):
Create the backing store in the right size and apply the contents scale factor
to the newly created graphics context.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::paint):
Pass the scale factor to ShareableBitmap::paint.
2011-11-02 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Implement message exchange between WebView and the web page
https://bugs.webkit.org/show_bug.cgi?id=70545
Reviewed by Noam Rosenthal.
Adds a mechanism for the WebView to send messages to the JavaScript environment
of the web page. In the WebView we have a method postMessage() and a signal
messageReceived(), while in the web page we expose a navigator.qt object with a
postMessage() method and a onmessage property. The messages are objects that
follow the same structure as MessageEvents.
The feature is disabled by default, and can be enabled by setting
QWebPreferences::navigatorQtObjectEnabled property to true. Changes take effect
after the next load(). QML tests are included.
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/ClientImpl.cpp:
(setupContextInjectedBundleClient): Helper to register the injected bundle client.
(qt_wk_didReceiveMessageFromInjectedBundle): Decode and dispatch a message received
from the WebProcess to the WebPageProxy.
* UIProcess/PageClient.h:
(WebKit::PageClient::didReceiveMessageFromNavigatorQtObject):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessageFromNavigatorQtObject):
* UIProcess/WebPageProxy.h:
Handle messages received from the navigator.qt object via the injected bundle. Called
from the ClientImpl.
* UIProcess/API/qt/qbasewebview.cpp:
(QBaseWebView::postMessage):
(QBaseWebViewPrivate::setPageProxy):
* UIProcess/API/qt/qbasewebview.h:
* UIProcess/API/qt/qwebpreferences.cpp:
(QWebPreferences::navigatorQtObjectEnabled):
(QWebPreferences::setNavigatorQtObjectEnabled):
* UIProcess/API/qt/qwebpreferences.h:
The signal, slot and the setting to enable the feature.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::defaultWKContext): setup the injected bundle client for this the
default context so we can listen to messages from it.
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::didReceiveMessageFromNavigatorQtObject):
(QtWebPageProxy::setNavigatorQtObjectEnabled):
(QtWebPageProxy::postMessageToNavigatorQtObject):
* UIProcess/qt/QtWebPageProxy.h:
(QtWebPageProxy::navigatorQtObjectEnabled):
Enabling and sending messages to the navigator.qt object are done by sending messages to
the injected bundle, identifying the page that we want to act on.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_messaging.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/messaging.html: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* WebProcess/qt/QtBuiltinBundle.cpp:
(WebKit::QtBuiltinBundle::initialize):
(WebKit::QtBuiltinBundle::didReceiveMessage):
(WebKit::QtBuiltinBundle::handleMessageToNavigatorQtObject):
(WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled):
* WebProcess/qt/QtBuiltinBundle.h:
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
(WebKit::QtBuiltinBundlePage::~QtBuiltinBundlePage):
(WebKit::QtBuiltinBundlePage::didClearWindowForFrame):
(WebKit::qt_postMessageCallback):
(WebKit::QtBuiltinBundlePage::postMessageFromNavigatorQtObject):
(WebKit::createWrappedMessage):
(WebKit::QtBuiltinBundlePage::didReceiveMessageToNavigatorQtObject):
(WebKit::QtBuiltinBundlePage::setNavigatorQtObjectEnabled):
(WebKit::QtBuiltinBundlePage::registerNavigatorQtObject):
(WebKit::QtBuiltinBundlePage::navigatorQtObjectClass):
* WebProcess/qt/QtBuiltinBundlePage.h:
(WebKit::QtBuiltinBundlePage::navigatorQtObjectEnabled):
2011-11-02 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Fix qmltest API test failures related to r98973.
https://bugs.webkit.org/show_bug.cgi?id=71280
Reviewed by Noam Rosenthal.
Most of the API was moved from TouchWebView.page to TouchWebView directly.
Fixed the qml tests to reflect this change.
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml:
2011-11-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Handle interruption of page interaction better
https://bugs.webkit.org/show_bug.cgi?id=71366
Reviewed by Simon Hausmann.
Touching the screen when a kinetic scrolling animation is running or
it is bouncing back because it was out of bounds, the animation is
immediately stopped and the content is immediately put into valid
bounds.
Touching the screen when the contents is bouncing back from a pinch
zoom which was out of bounds, we do not stop the animation, but
instead ignored the touch events while the animation lasts.
In the future we want to queue the events instead.
This also fixes some issues which was present before: As the bounce
back animation from pinch zoom centers the content using the contents
point which was in the center of the viewport, this animation could
not be used when stopping a pan animation, as it wouldn't position the
content at the place it was when the pan animation was interrupted.
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::recognize):
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::QtPinchGestureRecognizer::recognize):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
(WebKit::QtViewportInteractionEngine::reset):
(WebKit::QtViewportInteractionEngine::setConstraints):
(WebKit::QtViewportInteractionEngine::panAnimationActive):
(WebKit::QtViewportInteractionEngine::panGestureStarted):
(WebKit::QtViewportInteractionEngine::panGestureCancelled):
(WebKit::QtViewportInteractionEngine::pinchAnimationActive):
* UIProcess/qt/QtViewportInteractionEngine.h:
2011-11-02 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Move content to resize (setResizesToContentsUsingLayoutSize) from UI process to Web process
https://bugs.webkit.org/show_bug.cgi?id=71107
Reviewed by Kenneth Rohde Christiansen.
Reduce the number of IPC calls to WebProcess by moving the content to resize
calls from UI process to Web process.
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::updateViewportSize):
(QTouchWebViewPrivate::updateViewportConstraints):
(QTouchWebView::geometryChanged):
* UIProcess/API/qt/qtouchwebview_p.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setViewportSize):
(WebKit::WebPageProxy::preferencesDidChange):
* UIProcess/WebPageProxy.h:
* UIProcess/qt/QtTouchWebPageProxy.cpp:
* UIProcess/qt/QtTouchWebPageProxy.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
* WebProcess/WebPage/WebPage.messages.in:
2011-10-18 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][WK2]: Shouldn't send unhandled TouchCancel event to gesture recognizers
https://bugs.webkit.org/show_bug.cgi?id=70333
Reviewed by Simon Hausmann.
Gesture recognizers should be reset for unhandled TouchCancel event.
* UIProcess/qt/qtouchwebpageproxy.cpp:
(QTouchWebPageProxy::doneWithTouchEvent):
2011-11-02 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][WK2] Add support for touch event testing to WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=71310
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleTouchEvent): Add support for m_shouldSendEventsSynchronously.
* UIProcess/qt/QtDesktopWebPageProxy.cpp:
(QtDesktopWebPageProxy::handleEvent): Handle plain touch events in the desktop page proxy by
forwarding them appropriately. We will receive them from WTR through ::event, but we won't
receive them from QQuickCanvas (i.e. the user) because that doesn't uses ::event but only
dedicated fooEvent() handlers, of which we don't re-implement the touch version.
(QtDesktopWebPageProxy::handleTouchEvent): Forward touch events to WebPageProxy.
* UIProcess/qt/QtDesktopWebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::touchEventSyncForTesting): Add support for synchronous touch event testing,
similar to the way it's done for mouse events.
* WebProcess/WebPage/WebPage.h: Ditto.
* WebProcess/WebPage/WebPage.messages.in: Ditto.
2011-11-02 Simon Hausmann <simon.hausmann@nokia.com>
[WK2] Remove unused/duplicated modifiers member from WebTouchEvent
https://bugs.webkit.org/show_bug.cgi?id=71353
Reviewed by Kenneth Rohde Christiansen.
WebTouchEvent::m_[ctrl,alt,meta,shift]Key are redundant compared to
WebEvent::m_modifiers. The latter is fully populated and used, the former
can be safely removed.
* Shared/WebEvent.h:
* Shared/WebTouchEvent.cpp:
(WebKit::WebTouchEvent::WebTouchEvent):
* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::WebEventFactory::createWebTouchEvent):
2011-11-02 Philippe Normand <pnormand@igalia.com>
Unreviewed, skip testWebKitSettingsNewWithSettings affected by bug
70127.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettingsNewWithSettings):
2011-11-01 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Make API tests less noisy
https://bugs.webkit.org/show_bug.cgi?id=71295
Reviewed by Simon Hausmann.
Suppress superfluous debug messages of Qt5.
* UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
* UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp:
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
(main):
* UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp:
* UIProcess/API/qt/tests/util.cpp:
(messageHandler):
* UIProcess/API/qt/tests/util.h:
2011-11-01 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] Merge common desktop and touch view APIs under a base class.
https://bugs.webkit.org/show_bug.cgi?id=71280
Reviewed by Andreas Kling.
- Make QDesktopWebView and QTouchWebView inherit from QBaseWebView.
- Move methods from QTouchWebPage to QTouchWebView (through the base class).
We use the same convenience macros as Qt internally by hiding QObject::d_ptr
with QBaseWebView::d_ptr instead of inheriting QBaseWebViewPrivate from
QQuickItemPrivate.
Also, QBaseWebView currently inherits from QQuickPaintedItem since QDesktopWebView
needs it, but should be changed as soon as this is not required anymore.
* UIProcess/API/qt/qbasewebview.cpp: Added.
(QBaseWebViewPrivate::QBaseWebViewPrivate):
(QBaseWebViewPrivate::setPageProxy):
(QBaseWebView::QBaseWebView):
(QBaseWebView::~QBaseWebView):
(QBaseWebView::load):
(QBaseWebView::url):
(QBaseWebView::loadProgress):
(QBaseWebView::title):
(QBaseWebView::navigationController):
(QBaseWebView::preferences):
* UIProcess/API/qt/qbasewebview.h: Copied from Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h.
* UIProcess/API/qt/qbasewebview_p.h: Copied from Source/WebKit2/UIProcess/API/qt/qtouchwebpage_p.h.
(QBaseWebViewPrivate::~QBaseWebViewPrivate):
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::QDesktopWebViewPrivate):
(QDesktopWebViewPrivate::enableMouseEvents):
(QDesktopWebViewPrivate::disableMouseEvents):
(QDesktopWebViewPrivate::webView):
(QDesktopWebViewPrivate::setViewNeedsDisplay):
(QDesktopWebViewPrivate::drawingAreaSize):
(QDesktopWebViewPrivate::hasFocus):
(QDesktopWebViewPrivate::isVisible):
(QDesktopWebViewPrivate::startDrag):
(QDesktopWebViewPrivate::didChangeUrl):
(QDesktopWebViewPrivate::didChangeTitle):
(QDesktopWebViewPrivate::didChangeStatusText):
(QDesktopWebViewPrivate::loadDidBegin):
(QDesktopWebViewPrivate::loadDidSucceed):
(QDesktopWebViewPrivate::loadDidFail):
(QDesktopWebViewPrivate::didChangeLoadProgress):
(QDesktopWebViewPrivate::showContextMenu):
(QDesktopWebViewPrivate::runJavaScriptAlert):
(QDesktopWebViewPrivate::runJavaScriptConfirm):
(QDesktopWebViewPrivate::runJavaScriptPrompt):
(QDesktopWebView::QDesktopWebView):
(QDesktopWebViewPrivate::init):
(QDesktopWebView::~QDesktopWebView):
(QDesktopWebView::geometryChanged):
(QDesktopWebView::paint):
(QDesktopWebView::event):
(QDesktopWebView::pageRef):
(QDesktopWebViewPrivate::processDidCrash):
(QDesktopWebViewPrivate::didRelaunchProcess):
(QDesktopWebViewPrivate::engine):
(QDesktopWebViewPrivate::chooseFiles):
(QDesktopWebViewPrivate::_q_onOpenPanelFilesSelected):
(QDesktopWebViewPrivate::_q_onOpenPanelFinished):
(QDesktopWebViewPrivate::didMouseMoveOverElement):
(QDesktopWebViewPrivate::navigationPolicyForURL):
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/API/qt/qtouchwebpage.cpp:
(QTouchWebPage::event):
(QTouchWebPage::geometryChanged):
(QTouchWebPagePrivate::QTouchWebPagePrivate):
(QTouchWebPagePrivate::setPageProxy):
(QTouchWebPagePrivate::paintToCurrentGLContext):
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qtouchwebpage_p.h:
(QTouchWebPagePrivate::touchPageProxy):
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::init):
(QTouchWebViewPrivate::loadDidCommit):
(QTouchWebViewPrivate::_q_viewportUpdated):
(QTouchWebViewPrivate::_q_viewportTrajectoryVectorChanged):
(QTouchWebViewPrivate::updateViewportConstraints):
(QTouchWebView::QTouchWebView):
(QTouchWebView::~QTouchWebView):
(QTouchWebView::page):
(QTouchWebView::geometryChanged):
(QTouchWebView::onVisibleChanged):
* UIProcess/API/qt/qtouchwebview.h:
* UIProcess/API/qt/qtouchwebview_p.h:
(QTouchWebViewPrivate::touchPageProxy):
* UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
(tst_CommonViewTests::loadNonexistentFileUrl):
* UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
(WebViewAbstraction::WebViewAbstraction):
(WebViewAbstraction::load):
(WebViewAbstraction::url):
(WebViewAbstraction::loadProgress):
(WebViewAbstraction::goBack):
(WebViewAbstraction::goForward):
(WebViewAbstraction::stop):
(WebViewAbstraction::reload):
(WebViewAbstraction::touchViewLoadFailed):
(WebViewAbstraction::desktopViewLoadFailed):
* UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h:
* UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp:
(tst_QTouchWebView::navigationStatusAtStartup):
* UIProcess/qt/QtDesktopWebPageProxy.cpp:
(QtDesktopWebPageProxy::createPopupMenuProxy):
* UIProcess/qt/QtTouchViewInterface.cpp:
(WebKit::QtTouchViewInterface::didChangeViewportProperties):
(WebKit::QtTouchViewInterface::didChangeUrl):
(WebKit::QtTouchViewInterface::didChangeTitle):
(WebKit::QtTouchViewInterface::loadDidBegin):
(WebKit::QtTouchViewInterface::loadDidCommit):
(WebKit::QtTouchViewInterface::loadDidSucceed):
(WebKit::QtTouchViewInterface::loadDidFail):
(WebKit::QtTouchViewInterface::didChangeLoadProgress):
* WebKit2API.pri:
2011-10-31 Anders Carlsson <andersca@apple.com>
PluginProxy shouldn't use window-relative coordinates
https://bugs.webkit.org/show_bug.cgi?id=71261
Reviewed by Adam Roben.
Change PluginProxy::wantsWindowRelativeCoordinates to return false and remove
m_frameRectInWindowCoordinates and m_clipRectInWindowCoordinates. This is yet another step
towards eliminating window-relative coordinates wherever possible.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::paint):
Since the dirty rect passed to paint is now in plug-in coordinates, there's no need to convert it
from window coordinates to plug-in coordinates before passing it to BackingStore::paint.
(WebKit::PluginProxy::deprecatedGeometryDidChange):
Assert that we're not calling this anymore.
(WebKit::PluginProxy::wantsWindowRelativeCoordinates):
Return false.
2011-11-01 Kenneth Rohde Christiansen <kenneth@webkit.org>
The QtViewportInteractionEngine should consider DPI adjustment
https://bugs.webkit.org/show_bug.cgi?id=71283
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qtouchwebview.cpp:
Add some default values for now to make sure we are testing the
DPI adjustment / CSS-item space conversion.
(QTouchWebViewPrivate::updateViewportConstraints):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::ViewportUpdateGuard::ViewportUpdateGuard):
(WebKit::ViewportUpdateGuard::~ViewportUpdateGuard):
Clean up the guard to be more understandable.
(WebKit::QtViewportInteractionEngine::cssScaleFromItem):
(WebKit::QtViewportInteractionEngine::itemScaleFromCSS):
Add methods for converting between CSS and item space.
(WebKit::QtViewportInteractionEngine::innerBoundedCSSScale):
(WebKit::QtViewportInteractionEngine::outerBoundedCSSScale):
Make it clean which methods uses which coord space.
(WebKit::QtViewportInteractionEngine::updateVisibleRect):
(WebKit::QtViewportInteractionEngine::event):
(WebKit::QtViewportInteractionEngine::computePosRangeForItemScale):
Rename calculateBoundariesForScale and change its implementation to
be correct. The new name reflects the space in which the computation
takes place and reflects similar Qt API.
(WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::scaleContent):
Make sure to consider the right coord space.
* UIProcess/qt/QtViewportInteractionEngine.h:
(WebKit::QtViewportInteractionEngine::Constraints::Constraints):
Add the devicePixelRatio.
2011-11-01 Simon Hausmann <simon.hausmann@nokia.com>
Prospective clang build fix.
Reviewed by Andreas Kling.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent): Handle GestureSingleTap in the event type switch.
2011-11-01 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Create infrastructure for Qt's builtin bundle in web process.
https://bugs.webkit.org/show_bug.cgi?id=71279
Reviewed by Simon Hausmann.
Create a builtin bundle for Qt port: an InjectedBundle which the code is together
with the Qt's web process instead of being in a different library. This gives us
access to many hooks at web process (using WKBundle* functions of C API) without
adding any maintenance burden to cross-port code.
Since we also use a InjectedBundle in the WebKitTestRunner, we only install our
builtin bundle if there's no other installed. This is fine because WTR won't use
the extra runtime features that we plan to provide with the builtin bundle.
* WebKit2.pro:
* WebProcess/qt/QtBuiltinBundle.cpp: Added.
(WebKit::QtBuiltinBundle::~QtBuiltinBundle):
(WebKit::QtBuiltinBundle::shared):
(WebKit::QtBuiltinBundle::initialize):
(WebKit::QtBuiltinBundle::didCreatePage):
(WebKit::QtBuiltinBundle::willDestroyPage):
(WebKit::QtBuiltinBundle::bundlePageForPageRef):
* WebProcess/qt/QtBuiltinBundle.h: Added.
(WebKit::QtBuiltinBundle::toRef):
Object that holds a WKBundleRef and keeps track of the pages in the current context.
* WebProcess/qt/QtBuiltinBundlePage.cpp: Added.
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
(WebKit::QtBuiltinBundlePage::~QtBuiltinBundlePage):
* WebProcess/qt/QtBuiltinBundlePage.h: Added.
(WebKit::QtBuiltinBundlePage::page):
Our representation for pages from the bundle perspective. This will be the right
place to registering page related clients.
* WebProcess/qt/WebProcessQt.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
If there's no bundle to be loaded, initialize Qt builtin bundle, which will register the
bundle client for this context.
2011-11-01 Simon Hausmann <simon.hausmann@nokia.com>
[WK2] Add WebGestureEvents to the Qt build and enable PlatformGestureEvent::TapType
https://bugs.webkit.org/show_bug.cgi?id=71274
Reviewed by Kenneth Christiansen.
* Shared/WebEvent.h: Add GestureSingleTap as gesture type.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): Support converting
WebEven::GestureSingleTap to PlatformGestureEvent::TapType.
* Shared/WebGestureEvent.cpp:
(WebKit::WebGestureEvent::isGestureEventType): GestureSingleTap is a valid gesture event type.
* WebKit2.pro: Add WebGestureEvent.cpp to the build.
2011-10-31 Anders Carlsson <andersca@apple.com>
PluginProxy::Update should pass the painted rect in plug-in coordinates
https://bugs.webkit.org/show_bug.cgi?id=71257
Reviewed by Adam Roben.
This is one step in the process of migrating away from window relative coordinates
and use plug-in relative coordinates instead, since window relative coordinates won't work
with transforms.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::paint):
Convert the dirty rect back to plug-in coordinates.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::update):
No need to convert the painted rect back to plug-in coordinates anymore.
* WebProcess/Plugins/PluginProxy.messages.in:
Document that the painted rect is in plug-in coordinates.
2011-10-31 Anders Carlsson <andersca@apple.com>
PluginControllerProxy should call Plugin::geometryDidChange
https://bugs.webkit.org/show_bug.cgi?id=71255
Reviewed by Sam Weinig.
Pass enough information over in the GeometryDidChange message sent from
PluginProxy to PluginControllerProxy so that PluginControllerProxy can call
Plugin::geometryDidChange.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::paint):
(WebKit::PluginControllerProxy::invalidate):
(WebKit::PluginControllerProxy::paintEntirePlugin):
Update for rename from m_frameRect to m_frameRectInWindowCoordinates.
(WebKit::PluginControllerProxy::geometryDidChange):
This now takes the plug-in size and the plug-in to root view transform as well.
* PluginProcess/PluginControllerProxy.h:
Store the plug-in size and rename m_frameRect to m_frameRectInWindowCoordinates.
* PluginProcess/PluginControllerProxy.messages.in:
Update message signature.
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::platformGeometryDidChange):
Use the plug-in size instead of the frame rect size.
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
* Shared/WebCoreArgumentCoders.h:
Add encoder/decoder for WebCore::AffineTransform.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::geometryDidChange):
Compute the frame rect in window coordinates and send it over.
(WebKit::PluginProxy::deprecatedGeometryDidChange):
Move call to geometryDidChange() from here to the new PluginProxy::geometryDidChange.
2011-10-31 Anders Carlsson <andersca@apple.com>
Remove some uses of m_frameRectInWindowCoordinates from PluginProxy
https://bugs.webkit.org/show_bug.cgi?id=71252
Reviewed by Darin Adler.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::paint):
(WebKit::PluginProxy::geometryDidChange):
(WebKit::PluginProxy::updateBackingStore):
(WebKit::PluginProxy::pluginBounds):
* WebProcess/Plugins/PluginProxy.h:
2011-10-31 Anders Carlsson <andersca@apple.com>
Implement PluginProxy::geometryDidChange
https://bugs.webkit.org/show_bug.cgi?id=71251
Reviewed by Sam Weinig.
Keep track of the plug-in size, the clip rect in plug-in coordinates and the
transformation matrix from the root view to the plug-in.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::geometryDidChange):
* WebProcess/Plugins/PluginProxy.h:
2011-10-31 Anders Carlsson <andersca@apple.com>
Fix the X11 build.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformGeometryDidChange):
(WebKit::NetscapePlugin::platformPaint):
(WebKit::NetscapePlugin::platformHandleMouseEvent):
(WebKit::NetscapePlugin::platformHandleWheelEvent):
(WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
(WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
2011-10-31 Anders Carlsson <andersca@apple.com>
Factor code to resize the plug-in backing store out into a separate function
https://bugs.webkit.org/show_bug.cgi?id=71250
Reviewed by Adam Roben.
Add a PluginProxy::contentsScaleFactor helper function to get rid of a bunch of PLATFORM(MAC) #ifdefs,
and move the code to update the backing store out into a separate function.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::initialize):
(WebKit::PluginProxy::paint):
(WebKit::PluginProxy::geometryDidChange):
(WebKit::PluginProxy::contentsScaleFactor):
(WebKit::PluginProxy::updateBackingStore):
(WebKit::PluginProxy::update):
* WebProcess/Plugins/PluginProxy.h:
2011-10-31 Jeff Miller <jeffm@apple.com>
Add more APIs to WKUserContentURLPattern.h
https://bugs.webkit.org/show_bug.cgi?id=71245
Add additional WKUserContentURLPattern APIs to match what was provided by
the equivalent WebKit1 API.
Reviewed by Darin Adler.
* Shared/API/c/WKUserContentURLPattern.cpp:
(WKUserContentURLPatternCopyHost): Added.
(WKUserContentURLPatternCopyScheme): Added.
(WKUserContentURLPatternIsValid): Added.
(WKUserContentURLPatternMatchesSubdomains): Added.
* Shared/API/c/WKUserContentURLPattern.h: Added new APIs.
* Shared/WebUserContentURLPattern.h:
(WebKit::WebUserContentURLPattern::host): Added.
(WebKit::WebUserContentURLPattern::scheme): Added.
(WebKit::WebUserContentURLPattern::isValid): Added.
(WebKit::WebUserContentURLPattern::matchesSubdomains): Added.
2011-10-31 Anders Carlsson <andersca@apple.com>
More work on making plug-ins work better with transforms
https://bugs.webkit.org/show_bug.cgi?id=71241
Reviewed by Darin Adler.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::geometryDidChange):
Implement NetscapePlugin::geometryDidChange and store the plug-in size,
the clip rect and the root view transform. Use the transform to compute the window
relative frame and clip rects.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
Add new member variables.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewGeometryDidChange):
Always call the new Plugin::geometryDidChange.
2011-10-27 Anders Carlsson <andersca@apple.com>
Rename a couple of NetscapePlugin and PluginProxy member variables
https://bugs.webkit.org/show_bug.cgi?id=71086
Reviewed by Sam Weinig.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::invalidate):
(WebKit::NetscapePlugin::callSetWindow):
(WebKit::NetscapePlugin::snapshot):
(WebKit::NetscapePlugin::deprecatedGeometryDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformPaint):
(WebKit::NetscapePlugin::platformHandleMouseEvent):
(WebKit::NetscapePlugin::platformHandleWheelEvent):
(WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
(WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
(WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
(WebKit::NetscapePlugin::platformPaint):
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::paint):
(WebKit::PluginProxy::geometryDidChange):
(WebKit::PluginProxy::deprecatedGeometryDidChange):
(WebKit::PluginProxy::update):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewGeometryDidChange):
2011-10-31 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Fix qmltests after r98460 added widgets dependency.
Reviewed by Simon Hausmann.
Use QApplication and QtWidgets until we get rid of the widgets dependency of QScroller.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
(main):
2011-10-31 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Make QWebPreferences hold a QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=71219
Reviewed by Andreas Kling.
Change QWebPreferences to keep a pointer to QtWebPageProxy. The reason is that
some features we want to control (like the messaging exchange between WebView and
the web process) are not available via WKPreferencesRef.
QtWebPageProxy now uses an OwnPtr to keep the QWebPreferences to clarify the
ownership relationship. Before this change the QWebPreferences created was leaking.
* UIProcess/API/qt/qwebpreferences.cpp:
(QWebPreferencesPrivate::createPreferences):
(QWebPreferencesPrivate::testAttribute):
(QWebPreferencesPrivate::setAttribute):
(QWebPreferencesPrivate::setFontFamily):
(QWebPreferencesPrivate::fontFamily):
(QWebPreferencesPrivate::setFontSize):
(QWebPreferencesPrivate::fontSize):
(QWebPreferencesPrivate::preferencesRef):
* UIProcess/API/qt/qwebpreferences.h:
* UIProcess/API/qt/qwebpreferences_p.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::preferences):
* UIProcess/qt/QtWebPageProxy.h:
2011-10-31 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add webkit_settings_new_with_settings() to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=71111
Reviewed by Martin Robinson.
Convenient method to create a WebKitSettings object with initial
settings.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_new_with_settings):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettingsNewWithSettings):
(beforeAll):
2011-10-31 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add methods to get/set the settings of a web view to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=71109
Reviewed by Martin Robinson.
* GNUmakefile.am: Add WebKitSettingsPrivate.h.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkitSettingsAttachSettingsToPage): Set the preferences of the
given WebKitSettings object to the page group of the given WKPage.
* UIProcess/API/gtk/WebKitSettingsPrivate.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed): Create the default WebKitSettings for
the view.
(webkit_web_view_set_settings):
(webkit_web_view_get_settings):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewSettings):
(beforeAll):
2011-10-31 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck build.
* GNUmakefile.am: Remove docs/GNUmakefile.in from EXTRA_DIST,
since its generation was removed from configure.ac in r98498.
2011-10-28 Jeff Miller <jeffm@apple.com>
More work on WebKit2 should respect WebKitOmitPDFSupport preference on the Mac
https://bugs.webkit.org/show_bug.cgi?id=71156
Don't include PDF and PostScript types in the set of MIME types with custom representations
when initializing the web process if WebKitOmitPDFSupport is set.
I believe the previous patch r98513 was actually sufficient to prevent PDFs from being
shown inline when this preference was set, but to be complete we should exclude the MIME
types here as well.
Reviewed by Alexey Proskuryakov.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
2011-10-28 John Sullivan <sullivan@apple.com>
WebKit2 part of:
https://bugs.webkit.org/show_bug.cgi?id=71142
Whether backspace goes Back should be configurable
Reviewed by Sam Weinig.
* Shared/WebPreferencesStore.h:
Declared backspaceKeyNavigationEnabled property using macro. This initializes
it to true, to match current behavior.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetBackspaceKeyNavigationEnabled):
New function, pass value to impl.
(WKPreferencesGetBackspaceKeyNavigationEnabled):
New function, returns result from impl.
* UIProcess/API/C/WKPreferences.h:
Declared API functions for new preference.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Updates WebCore settings from WebKit2 prefs.
2011-10-28 Timothy Hatcher <timothy@apple.com>
Support using a different front-end for the Web Inspector in WebKit2.
rdar://problem/10318665
https://webkit.org/b/71089
Reviewed by Sam Weinig.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Added webInspectorBasePath and webInspectorLocalizedStringsPath.
(WebKit::WebProcessCreationParameters::decode): Ditto.
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetOverrideWebInspectorBaseDirectory): Added. Calls through to WebContext.
(WKContextSetOverrideWebInspectorPagePath): Ditto.
(WKContextSetOverrideWebInspectorLocalizedStringsPath): Ditto.
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess): Set webInspectorBasePath and webInspectorLocalizedStringsPath.
* UIProcess/WebContext.h:
(WebKit::WebContext::overrideWebInspectorBaseDirectory): Added.
(WebKit::WebContext::setOverrideWebInspectorBaseDirectory): Added.
(WebKit::WebContext::overrideWebInspectorPagePath): Added.
(WebKit::WebContext::setOverrideWebInspectorPagePath): Added.
(WebKit::WebContext::setOverrideWebInspectorLocalizedStringsPath): Added.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectorPageURL): Use WebContext::overrideWebInspectorPagePath if set.
(WebKit::WebInspectorProxy::inspectorBaseURL): Use WebContext::overrideWebInspectorBaseDirectory if set.
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/mac/WebInspectorMac.mm:
(WebKit::globalInspectorLocalizedStringsURL): Added. Static storage for the setting.
(WebKit::WebInspector::setLocalizedStringsPath): Added. Set globalInspectorLocalizedStringsURL.
(WebKit::WebInspector::localizedStringsURL): Return globalInspectorLocalizedStringsURL.
* WebProcess/com.apple.WebProcess.sb: Added read-only subpath for WEBKIT_WEB_INSPECTOR_DIR.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::appendReadonlySandboxDirectory): Check path for empty to prevent an exception when
calling through to fileSystemRepresentation.
(WebKit::initializeSandbox): Added WEBKIT_WEB_INSPECTOR_DIR parameter.
(WebKit::WebProcess::platformInitializeWebProcess): Call WebInspector::setLocalizedStringsPath.
2011-10-28 Alexey Proskuryakov <ap@apple.com>
Clean up BuiltInPDFView a little
https://bugs.webkit.org/show_bug.cgi?id=71133
Reviewed by Daniel Bates.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::createScrollbar):
Removed an incorrect FIXME. Custom scrollbars specified in a document don't apply
to subframes, and thus shouldn't apply to PDFs.
* WebProcess/Plugins/PDF/BuiltInPDFView.h: (WebKit::BuiltInPDFView::zoomAnimatorTransformChanged):
Moved to a correct location. This is not a Plugin method, but a ScrollView one.
2011-10-28 Jochen Eisinger <jochen@chromium.org>
Rename a number of methods mentioning JavaScript to just Script instead
https://bugs.webkit.org/show_bug.cgi?id=71105
Reviewed by Adam Barth.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2011-10-28 Csaba Osztrogonác <ossy@webkit.org>
[Qt] Adapt to QSG* to QQuick* API change in qtdeclarative
https://bugs.webkit.org/show_bug.cgi?id=70494
One more buildfix. (unreviewed)
* UIProcess/API/qt/qtouchwebpage.cpp:
(computeEffectiveOpacity):
(QTouchWebPage::itemChange):
2011-10-28 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Adapt to QSG* to QQuick* API change in qtdeclarative
https://bugs.webkit.org/show_bug.cgi?id=70494
Reviewed by Kenneth Christiansen.
Use QQuick* instead of QSG* as well as QStandardPaths
instead of QDesktopLocation.
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebView::QDesktopWebView):
(QDesktopWebView::geometryChanged):
(QDesktopWebView::event):
(QDesktopWebViewPrivate::engine):
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qtouchwebpage.cpp:
(QTouchWebPage::QTouchWebPage):
(QTouchWebPage::event):
(QTouchWebPage::geometryChanged):
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebView::QTouchWebView):
(QTouchWebView::geometryChanged):
(QTouchWebView::touchEvent):
* UIProcess/API/qt/qtouchwebview.h:
* UIProcess/API/qt/tests/testwindow.h:
(TestWindow::TestWindow):
(TestWindow::resizeEvent):
* UIProcess/qt/QtDesktopWebPageProxy.cpp:
(QtDesktopWebPageProxy::createPopupMenuProxy):
* UIProcess/qt/QtSGUpdateQueue.cpp:
(WebKit::QtSGUpdateQueue::QtSGUpdateQueue):
* UIProcess/qt/QtSGUpdateQueue.h:
* UIProcess/qt/QtTouchViewInterface.cpp:
(WebKit::QtTouchViewInterface::engine):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::contentRectInViewportCoordinates):
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
* UIProcess/qt/QtViewportInteractionEngine.h:
* UIProcess/qt/WebContextQt.cpp:
(WebKit::defaultDataLocation):
* UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
(WebKit::WebPopupMenuProxyQtDesktop::WebPopupMenuProxyQtDesktop):
* UIProcess/qt/WebPopupMenuProxyQtDesktop.h:
(WebKit::WebPopupMenuProxyQtDesktop::create):
2011-10-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Make the kinetic engine use the same curve and constants as on the N9
https://bugs.webkit.org/show_bug.cgi?id=71102
Reviewed by Simon Hausmann.
Now that we are using the QScroller for kinetic scrolling and page
interaction, we need to make sure it uses the same curve (exponential)
and the same values as the MeeGo Touch physics engine used on the N9.
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::reset):
2011-10-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add webkit_web_view_get_uri() to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=70814
Reviewed by Gustavo Noronha Silva.
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
(didStartProvisionalLoadForFrame): Update WebView URI to make sure
it's updated to provisional URL.
(didReceiveServerRedirectForProvisionalLoadForFrame): Update
WebView URI if there's a server redirection.
(didCommitLoadForFrame): Update WebView URI to make sure it
contains the final one.
(didSameDocumentNavigationForFrame): Update WebView URI when a
navigation action within the same document is performed.
(webkitWebLoaderClientAttachLoaderClientToPage): Add
implementation for didSameDocumentNavigationForFrame callback.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init): Add URI property.
(webkitWebViewUpdateURI): Check whether current active URI has
changed to updated it and emit ::notify signal if it changes.
(webkit_web_view_load_uri): Call webkitWebViewUpdateURI() to make
sure the active URI is updated when load operation is started.
(webkit_web_view_load_alternate_html): Ditto.
(webkit_web_view_reload): Ditto.
(webkit_web_view_reload_bypass_cache): Ditto.
(webkit_web_view_go_back): Ditto.
(webkit_web_view_go_forward): Ditto.
(webkit_web_view_get_uri): Ditto.
(webkit_web_view_go_to_back_forward_list_item): Ditto.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h: Add
webkitWebViewUpdateURI().
* UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
(provisionalLoadStartedCallback): Check provisional URL is the
requested URI.
(provisionalLoadReceivedServerRedirectCallback): Check provisional
URL after server redirection is the expected redirected URI.
(provisionalLoadFailedCallback): Check active URI.
(loadCommittedCallback): Ditto.
(loadFinishedCallback): Ditto.
(loadFailedCallback): Ditto
(LoadTrackingTest::LoadTrackingTest): Check active URI is NULL
before any loading operation has started.
* UIProcess/API/gtk/tests/LoadTrackingTest.h:
(LoadTrackingTest::setRedirectURI): Set the redirect URI to check
it after a server redirection.
* UIProcess/API/gtk/tests/TestBackForwardList.cpp:
(testBackForwardListNavigation): Use WebViewTest methods for
navigation actions instead of using WebKitWebView API directly.
(testBackForwardListLimitAndCache): Ditto.
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
(testLoadingStatus): Ditto.
(testLoadingError): Ditto.
(testLoadAlternateContent): Ditto.
(testLoadCancelled): Ditto.
(testWebViewReload): Ditto.
(testLoadProgress): Ditto.
(testWebViewActiveURI): Add a test to check that notify signal is
emitted when active URI changes and it's correctly updated when
loader client signals are emitted.
(beforeAll): Add active-uri test.
* UIProcess/API/gtk/tests/WebViewTest.cpp: Add custom load methods
wrapping the WebKitWebView ones, to initialize the active URI to
the requested one, so that it can be checked by the loader client
test.
(WebViewTest::loadURI):
(WebViewTest::loadAlternateHTML):
(WebViewTest::goBack):
(WebViewTest::goForward):
(WebViewTest::goToBackForwardListItem):
* UIProcess/API/gtk/tests/WebViewTest.h:
2011-10-21 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Synchronize tiling with accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=69151
Reviewed by Simon Hausmann.
Make QTouchWebView always render with accelerated compositing.
At first, the web content would only render after the rest of the scene has rendered. In a
future patch we'll enable rendering the web content via an FBO, which would cover all other
cases as well.
Right now this only works for QTouchWebView, and thus accelerated compositing is disabled
for desktop web-views. This required adding some settings enablers in Q
WebPreferencesPrivate. Those are not exposed to the public API, as they are an implementation
detail.
* UIProcess/API/qt/qtouchwebpage.cpp:
(QTouchWebPage::QTouchWebPage):
(QTouchWebPage::initSceneGraphConnections):
(QTouchWebPagePrivate::QTouchWebPagePrivate):
(QTouchWebPagePrivate::setPage):
(computeEffectiveOpacity):
(QTouchWebPagePrivate::paintToCurrentGLContext):
(QTouchWebPagePrivate::_q_onAfterSceneRender):
(QTouchWebPagePrivate::_q_onSceneGraphInitialized):
(QTouchWebPage::itemChange):
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qtouchwebpage_p.h:
* UIProcess/API/qt/qwebpreferences.cpp:
(QWebPreferencesPrivate::testAttribute):
(QWebPreferencesPrivate::setAttribute):
(QWebPreferencesPrivate::get):
* UIProcess/API/qt/qwebpreferences_p.h:
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::renderNextFrame):
* UIProcess/qt/QtDesktopWebPageProxy.cpp:
(QtDesktopWebPageProxy::QtDesktopWebPageProxy):
* UIProcess/qt/QtTouchViewInterface.cpp:
(WebKit::QtTouchViewInterface::setViewNeedsDisplay):
* UIProcess/qt/QtTouchWebPageProxy.cpp:
(QtTouchWebPageProxy::QtTouchWebPageProxy):
(QtTouchWebPageProxy::createDrawingAreaProxy):
(QtTouchWebPageProxy::renderToCurrentGLContext):
(QtTouchWebPageProxy::setVisibleContentRectAndScale):
(QtTouchWebPageProxy::setVisibleContentRectTrajectoryVector):
(QtTouchWebPageProxy::renderNextFrame):
* UIProcess/qt/QtTouchWebPageProxy.h:
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHost::supportsAcceleratedCompositing):
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::platformInitialize):
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):
2011-10-27 Martin Robinson <mrobinson@igalia.com>
Fix the GTK+ build after r98664.
* WebProcess/Plugins/Plugin.h: Add an IntSize forward declaration.
2011-10-27 Anders Carlsson <andersca@apple.com>
Add a Plugin::geometryDidChange that will work with transforms
https://bugs.webkit.org/show_bug.cgi?id=71072
Reviewed by Simon Fraser.
Add a new Plugin::geometryDidChange pure virtual member function, that takes
the size of the plug-in, the clip rect (in plug-in coordinates), and a matrix that makes
it possible to convert between root view coordinates and plug-in coordinates.
PluginView only calls this new geometryDidChange member function if
Plugin::wantsWindowRelativeCoordinates returns false, which is only true for BuiltInPDFView right now.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::geometryDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
Add stub.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::updateScrollbars):
(WebKit::BuiltInPDFView::pdfDocumentDidLoad):
(WebKit::BuiltInPDFView::paintContent):
(WebKit::BuiltInPDFView::deprecatedGeometryDidChange):
(WebKit::BuiltInPDFView::geometryDidChange):
(WebKit::BuiltInPDFView::setScrollOffset):
(WebKit::BuiltInPDFView::maximumScrollPosition):
(WebKit::BuiltInPDFView::visibleHeight):
(WebKit::BuiltInPDFView::visibleWidth):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
There's no need to keep track of the plug-in rect anymore.
* WebProcess/Plugins/Plugin.h:
Add and document geometryDidChange.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::geometryDidChange):
* WebProcess/Plugins/PluginProxy.h:
Add stub.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewGeometryDidChange):
Call geometryDidChange.
2011-10-27 Joseph Pecoraro <pecoraro@apple.com>
Reviewed by David Kilzer.
Make FeatureDefines Identical Across OS X Projects
https://bugs.webkit.org/show_bug.cgi?id=71051
* Configurations/FeatureDefines.xcconfig:
2011-10-27 Anders Carlsson <andersca@apple.com>
Rename Plugin::geometryDidChange to Plugin::deprecatedGeometryDidChange
https://bugs.webkit.org/show_bug.cgi?id=71065
Reviewed by Simon Fraser.
In preparation for adding a version of geometryDidChange that doesn't take window coordinates.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::geometryDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::deprecatedGeometryDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::deprecatedGeometryDidChange):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::deprecatedGeometryDidChange):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewGeometryDidChange):
2011-10-27 Michael Saboff <msaboff@apple.com>
Investigate storing strings in 8-bit buffers when possible
https://bugs.webkit.org/show_bug.cgi?id=66161
Added export of StringImpl::getData16SlowCase for linking tests.
Reviewed by Geoffrey Garen.
* win/WebKit2.def:
2011-10-27 Sam Weinig <sam@webkit.org>
Add allowsPlugIns property to WKBrowsingContextGroup
https://bugs.webkit.org/show_bug.cgi?id=70987
Reviewed by Anders Carlsson.
Test: WKBrowsingContextGroupTest.GetSetPluginsEnabled
* UIProcess/API/mac/WKBrowsingContextGroup.h:
* UIProcess/API/mac/WKBrowsingContextGroup.mm:
(-[WKBrowsingContextGroup allowsJavaScript]):
(-[WKBrowsingContextGroup setAllowsJavaScript:]):
Rename to allowsJavaScript/setAllowsJavaScript.
(-[WKBrowsingContextGroup allowsPlugIns]):
(-[WKBrowsingContextGroup setAllowsPlugIns:]):
Add allowsPlugIns/setAllowsPlugIns.
2011-10-27 Carlos Garcia Campos <cgarcia@igalia.com>
[Cairo] Implement ShareableBitmap::paint() when scaleFactor=1
https://bugs.webkit.org/show_bug.cgi?id=71027
Reviewed by Martin Robinson.
Fixes windowless plugins in GTK+ port.
* Shared/cairo/ShareableBitmapCairo.cpp:
(WebKit::ShareableBitmap::paint): When scaleFactor is 1, simply
call the paint method that doesn't receive a scaleFactor.
2011-10-27 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r98556.
http://trac.webkit.org/changeset/98556
https://bugs.webkit.org/show_bug.cgi?id=71031
The test added by the patch doesn't pass on Snow Leopard
(Requested by rniwa on #webkit).
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-10-27 Mark Hahnenberg <mhahnenberg@apple.com>
De-virtualize JSCell::toThisObject
https://bugs.webkit.org/show_bug.cgi?id=70958
Reviewed by Geoffrey Garen.
Converted all instances of toThisObject to static functions,
added toThisObject to the MethodTable, and replaced all call sites
with a corresponding lookup in the MethodTable.
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::invoke):
2011-10-27 Adam Roben <aroben@apple.com>
Add WKBundlePageGetBackingScaleFactor
Fixes <http://webkit.org/b/71025> <rdar://problem/10355037> REGRESSION (r97191): Clients
can't reliably determine the scale factor of snapshots returned via
WKBundlePageCreateSnapshot* API
Reviewed by Sam Weinig.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageGetBackingScaleFactor):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
Added. Calls through to WebPage::deviceScaleFactor.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::deviceScaleFactor):
* WebProcess/WebPage/WebPage.h:
Added. Calls through to Page::deviceScaleFactor.
2011-10-27 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2]Add setViewportSize API to WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=71006
Reviewed by Kenneth Rohde Christiansen.
Fixed layout rendering needs the viewport size information on the WebProcess
side to be able to do viewport attribute calculations.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setViewportSize):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::viewportSize):
* WebProcess/WebPage/WebPage.messages.in:
2011-10-27 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] Move the C API callback setup out of QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=70965
Reviewed by Andreas Kling.
Move out the setup of C API callback into ClientImpl file
so that QtWebPageProxy will be less polluted.
* UIProcess/qt/ClientImpl.cpp:
(qt_wk_didStartProvisionalLoadForFrame):
(qt_wk_didFailProvisionalLoadWithErrorForFrame):
(qt_wk_didCommitLoadForFrame):
(qt_wk_didFinishLoadForFrame):
(qt_wk_didFailLoadWithErrorForFrame):
(qt_wk_didSameDocumentNavigationForFrame):
(qt_wk_didReceiveTitleForFrame):
(qt_wk_didStartProgress):
(qt_wk_didChangeProgress):
(qt_wk_didFinishProgress):
(qt_wk_runJavaScriptAlert):
(qt_wk_runJavaScriptConfirm):
(qt_wk_runJavaScriptPrompt):
(qt_wk_setStatusText):
(qt_wk_runOpenPanel):
(qt_wk_mouseDidMoveOverElement):
(qt_wk_decidePolicyForNavigationAction):
(qt_wk_decidePolicyForResponse):
(setupPageLoaderClient):
(setupPageUiClient):
(setupPagePolicyClient):
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::init):
* UIProcess/qt/QtWebPageProxy.h:
(QtWebPageProxy::viewInterface):
2011-10-27 Zeno Albisser <zeno.albisser@nokia.com>
[Qt][WK2] Remove QAction from MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=70525
This fixes the commonview tests that were failing
after r98447.
WebViewAbstraction must forward actions to both
the TouchWebView and the DesktopWebView.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
(WebViewAbstraction::goBack):
(WebViewAbstraction::goForward):
(WebViewAbstraction::stop):
(WebViewAbstraction::reload):
2011-10-27 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2]Content size changed event does not require viewport attribute calculation.
https://bugs.webkit.org/show_bug.cgi?id=70920
Reviewed by Kenneth Rohde Christiansen.
Remove unnecessary recalculation of viewport attributes.
* UIProcess/qt/QtTouchViewInterface.cpp:
(WebKit::QtTouchViewInterface::contentSizeChanged):
2011-10-27 Shinya Kawanaka <shinyak@google.com>
Implement legacy text check emulation in unified text check interface.
https://bugs.webkit.org/show_bug.cgi?id=70299
Reviewed by Hajime Morita.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-10-27 Philippe Normand <pnormand@igalia.com>
[GStreamer] WebAudio AudioFileReader implementation
https://bugs.webkit.org/show_bug.cgi?id=69834
Reviewed by Martin Robinson.
* GNUmakefile.am: Link against libfftw.
2011-10-26 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r98153): Safari crashes if WebProcess crashed during printing
https://bugs.webkit.org/show_bug.cgi?id=70982
Reviewed by Dan Bernstein.
* UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
Null check page, it may be invalid already.
2011-10-26 Jeff Miller <jeffm@apple.com>
WebKit2 should respect secret WebKitOmitPDFSupport preference on the Mac
https://bugs.webkit.org/show_bug.cgi?id=70943
If WebKitOmitPDFSupport pref is set, disable both the new "plug-in" for subframes and the PDFKit-based support for the main frame only.
Reviewed by Alexey Proskuryakov.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::getPlugins): Don't register built-in PDF plugin if WebKitOmitPDFSupport pref is set.
* UIProcess/WebContext.h: Added omitPDFSupport().
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::canShowMIMEType): Don't show PDFs if WebKitOmitPDFSupport is set.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::omitPDFSupport): Added.
2011-10-26 Sam Weinig <sam@webkit.org>
Add initial setting to WKBrowsingContextGroup
https://bugs.webkit.org/show_bug.cgi?id=70942
Reviewed by Anders Carlsson.
Test: WKBrowsingContextGroupTest.
* UIProcess/API/mac/WKBrowsingContextGroup.h:
* UIProcess/API/mac/WKBrowsingContextGroup.mm:
(-[WKBrowsingContextGroup isJavaScriptEnabled]):
(-[WKBrowsingContextGroup setJavaScriptEnabled:]):
Add setting to enabled/disable javascript. By default it is enabled.
2011-10-25 Alexey Proskuryakov <ap@apple.com>
Embedded PDFs should be known to DocumentLoader
https://bugs.webkit.org/show_bug.cgi?id=70864
Reviewed by Darin Adler.
* WebProcess/Plugins/Plugin.h: Plugin stream load notifications now contain a suggested
file name, in case the plug-in wants to save the file properly.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::addArchiveResource): Add the PDF as resource in DocumentLoader.
(WebKit::BuiltInPDFView::pdfDocumentDidLoad): Call addArchiveResource.
(WebKit::BuiltInPDFView::initialize): We need to remember source URL to create a resource
for that. The URL needs to match one in HitTestResult, so we can't use response URL.
(WebKit::BuiltInPDFView::streamDidReceiveResponse): Remember suggested file name, so
that we could put it in archive resource later.
(WebKit::BuiltInPDFView::manualStreamDidReceiveResponse): Ditto.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::streamDidReceiveResponse):
(WebKit::PluginControllerProxy::manualStreamDidReceiveResponse):
Pass an empty string for suggested file name. No plug-in that runs in a separate process
cares about it, so it's not sent to the plugin process.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::streamDidReceiveResponse):
(WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
Updated for new signatures.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::streamDidReceiveResponse):
(WebKit::PluginProxy::manualStreamDidReceiveResponse):
* WebProcess/Plugins/PluginProxy.h:
Updated for new signatures.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::Stream::didReceiveResponse):
(WebKit::PluginView::manualLoadDidReceiveResponse):
Pass suggested file name to plug-in, in case the plug-in wants to save the file properly.
2011-10-26 Mark Hahnenberg <mhahnenberg@apple.com>
Remove getOwnPropertySlotVirtual
https://bugs.webkit.org/show_bug.cgi?id=70741
Reviewed by Geoffrey Garen.
Removed all declarations and definitions of getOwnPropertySlotVirtual.
Also replaced all call sites to getOwnPropertyVirtualVirtual with a
corresponding lookup in the MethodTable.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-10-26 Alejandro G. Castro <alex@igalia.com>
[GTK] [WK2] Add WebKit2 distcheck support
https://bugs.webkit.org/show_bug.cgi?id=70933
Reviewed by Martin Robinson.
* GNUmakefile.am: Add a bunch of missing files from API and
sources, also include more files in the EXTRA_DIST.
* UIProcess/API/gtk/docs/GNUmakefile.am: Add the version.xml to
the cleaning section.
2011-10-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix gtk-doc warnings and style issues in WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=70930
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_class_init):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2011-10-26 Anders Carlsson <andersca@apple.com>
Use the right contents scale factor for non-Mac plug-ins
https://bugs.webkit.org/show_bug.cgi?id=70939
Reviewed by Adam Roben.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::paint):
(WebKit::PluginProxy::geometryDidChange):
(WebKit::PluginProxy::update):
2011-10-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add missing symbols to WebKit2 gtk-doc files
https://bugs.webkit.org/show_bug.cgi?id=70927
Reviewed by Martin Robinson.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add sections for
WebKitBackForwardList, WebKitBackForwardListItem and WebKitSettings.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add missing symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add missing types.
2011-10-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Inconsistent name of WebKitSettings macros
https://bugs.webkit.org/show_bug.cgi?id=70924
Reviewed by Martin Robinson.
Rename WEBKIT_TYPE_WEB_SETTINGS as WEBKIT_TYPE_SETTINGS and
WEBKIT_IS_WEB_SETTINGS as WEBKIT_IS_SETTINGS.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_init):
(webkit_settings_new):
(webkit_settings_get_enable_javascript):
(webkit_settings_set_enable_javascript):
(webkit_settings_get_auto_load_images):
(webkit_settings_set_auto_load_images):
(webkit_settings_get_load_icons_ignoring_image_load_setting):
(webkit_settings_set_load_icons_ignoring_image_load_setting):
(webkit_settings_get_enable_offline_web_application_cache):
(webkit_settings_set_enable_offline_web_application_cache):
(webkit_settings_get_enable_html5_local_storage):
(webkit_settings_set_enable_html5_local_storage):
(webkit_settings_get_enable_html5_database):
(webkit_settings_set_enable_html5_database):
(webkit_settings_get_enable_xss_auditor):
(webkit_settings_set_enable_xss_auditor):
(webkit_settings_get_enable_frame_flattening):
(webkit_settings_set_enable_frame_flattening):
(webkit_settings_get_enable_plugins):
(webkit_settings_set_enable_plugins):
(webkit_settings_get_enable_java):
(webkit_settings_set_enable_java):
(webkit_settings_get_javascript_can_open_windows_automatically):
(webkit_settings_set_javascript_can_open_windows_automatically):
(webkit_settings_get_enable_hyperlink_auditing):
(webkit_settings_set_enable_hyperlink_auditing):
* UIProcess/API/gtk/WebKitSettings.h:
2011-10-26 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Rename clean-up of QtPinchGestureRecognizer and QtViewportInteractionEngine
https://bugs.webkit.org/show_bug.cgi?id=70903
Reviewed by Kenneth Rohde Christiansen.
Rename computeTouchCenter to computePinchCenter,
and use the plural form of coordinate where appropriate.
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::_q_viewportUpdated):
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::computePinchCenter):
(WebKit::QtPinchGestureRecognizer::recognize):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::contentRectInViewportCoordinates):
(WebKit::QtViewportInteractionEngine::event):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::scaleContent):
* UIProcess/qt/QtViewportInteractionEngine.h:
2011-10-26 Zalan Bujtas <zbujtas@gmail.com>
Name viewport change event consistently.
https://bugs.webkit.org/show_bug.cgi?id=70901
Reviewed by Kenneth Rohde Christiansen.
Use ViewportPropertiesDidChange term consistently throughout WebKit.
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::didChangeViewportProperties):
* UIProcess/API/efl/PageClientImpl.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::didChangeViewportProperties):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didChangeViewportProperties):
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::didChangeViewportProperties):
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::didChangeViewportProperties):
* UIProcess/API/qt/qtouchwebview_p.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeViewportProperties):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtDesktopWebPageProxy.cpp:
(QtDesktopWebPageProxy::didChangeViewportProperties):
* UIProcess/qt/QtDesktopWebPageProxy.h:
* UIProcess/qt/QtTouchViewInterface.cpp:
(WebKit::QtTouchViewInterface::didChangeViewportProperties):
* UIProcess/qt/QtTouchViewInterface.h:
* UIProcess/qt/QtViewInterface.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::didChangeViewportProperties):
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::didChangeViewportProperties):
* UIProcess/win/WebView.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2011-10-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove g_thread_init() calls from gtk-doc scanner too
https://bugs.webkit.org/show_bug.cgi?id=70908
Reviewed by Gustavo Noronha Silva.
* UIProcess/API/gtk/docs/GNUmakefile.am:
2011-10-25 Andras Becsi <andras.becsi@nokia.com>
[Qt][WK2] Add the animations on the ViewportInteractionEngine
https://bugs.webkit.org/show_bug.cgi?id=66664
Reviewed by Kenneth Rohde Christiansen.
Introduce a QScroller based panning and a QVariantAnimation based scale animation.
QScroller also handles flick gestures and animates overshoot.
If a pinch gesture ends, the scale animation will scale and reposition the content
such that it is within valid boundaries. The content is by default animated such
that the content position as seen in the center of the visible viewport stays
in the center, unless the content would be out of valid bounds.
The patch also simplifies the ViewportUpdateGuard by using reference counting
instead of a boolean for defering update requests.
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::recognize):
* UIProcess/qt/QtPanGestureRecognizer.h:
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::QtPinchGestureRecognizer::recognize):
* UIProcess/qt/QtTouchWebPageProxy.cpp:
(QtTouchWebPageProxy::doneWithTouchEvent):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::bindToScaleLimits):
(WebKit::ViewportUpdateGuard::ViewportUpdateGuard):
(WebKit::ViewportUpdateGuard::~ViewportUpdateGuard):
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::innerBoundedScale):
(WebKit::QtViewportInteractionEngine::outerBoundedScale):
(WebKit::QtViewportInteractionEngine::updateVisibleRect):
(WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
(WebKit::QtViewportInteractionEngine::event):
(WebKit::QtViewportInteractionEngine::stopAnimations):
(WebKit::QtViewportInteractionEngine::calculateBoundariesForScale):
(WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
(WebKit::QtViewportInteractionEngine::reset):
(WebKit::QtViewportInteractionEngine::setConstraints):
(WebKit::QtViewportInteractionEngine::panGestureStarted):
(WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::panGestureCancelled):
(WebKit::QtViewportInteractionEngine::panGestureEnded):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):
(WebKit::QtViewportInteractionEngine::contentViewportChanged):
* UIProcess/qt/QtViewportInteractionEngine.h:
(WebKit::QtViewportInteractionEngine::scroller):
(WebKit::QtViewportInteractionEngine::ScaleAnimation::ScaleAnimation):
(WebKit::QtViewportInteractionEngine::ScaleAnimation::updateCurrentValue):
2011-10-26 Zeno Albisser <zeno.albisser@nokia.com>
[Qt][WK2] Rewrite MiniBrowser in QML
https://bugs.webkit.org/show_bug.cgi?id=70315
Add the first QML based implementation of MiniBrowser.
Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com>,
Zeno Albisser <zeno.albisser@nokia.com>
Reviewed by Tor Arne Vestbø.
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebView::mousePressEvent):
2011-10-20 Zeno Albisser <zeno.albisser@nokia.com>
[Qt][WK2] Disable Context Menus until we have a proper QML implementation
https://bugs.webkit.org/show_bug.cgi?id=70537
This is just a temporary fix to avoid crashes in QtGui based
MiniBrowser that does not link to QtWidgets.
Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com>,
Zeno Albisser <zeno.albisser@nokia.com>
Reviewed by Simon Hausmann.
* UIProcess/qt/WebContextMenuProxyQt.cpp:
(WebKit::WebContextMenuProxyQt::showContextMenu):
(WebKit::WebContextMenuProxyQt::createContextMenu):
2011-10-25 Zeno Albisser <zeno.albisser@nokia.com>
[Qt][WK2] Remove QAction from MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=70525
In order to rewrite MiniBrowser in QML we need a suitable
mechanism for triggering navigation actions.
Due to the QtWidgets dependency of QAction the current
solution is not suitable anymore. Therefore we introduce
invokable methods and export properties in QWebNavigationController.
Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com>,
Zeno Albisser <zeno.albisser@nokia.com>
Reviewed by Simon Hausmann.
* UIProcess/API/qt/WKView.h:
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qwebkittypes.h: Removed.
* UIProcess/API/qt/qwebnavigationcontroller.cpp:
(QWebNavigationController::QWebNavigationController):
(QWebNavigationController::canGoBack):
(QWebNavigationController::canGoForward):
(QWebNavigationController::canStop):
(QWebNavigationController::canReload):
(QWebNavigationController::goBack):
(QWebNavigationController::goForward):
(QWebNavigationController::stop):
(QWebNavigationController::reload):
* UIProcess/API/qt/qwebnavigationcontroller.h:
* 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::goBack):
(WebViewAbstraction::goForward):
(WebViewAbstraction::stop):
(WebViewAbstraction::reload):
* UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h:
* UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp:
(tst_QDesktopWebView::navigationStatusAtStartup):
(LoadStartedCatcher::onLoadStarted):
(tst_QDesktopWebView::stopEnabledAfterLoadStarted):
* UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp:
(tst_QTouchWebView::navigationStatusAtStartup):
* UIProcess/qt/ClientImpl.cpp:
(dispatchLoadSucceeded):
(dispatchLoadFailed):
(qt_wk_didStartProvisionalLoadForFrame):
(qt_wk_didCommitLoadForFrame):
(qt_wk_didSameDocumentNavigationForFrame):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::canGoBack):
(QtWebPageProxy::goBack):
(QtWebPageProxy::canGoForward):
(QtWebPageProxy::goForward):
(QtWebPageProxy::canStop):
(QtWebPageProxy::stop):
(QtWebPageProxy::canReload):
(QtWebPageProxy::reload):
(QtWebPageProxy::navigationStateChanged):
(QtWebPageProxy::didRelaunchProcess):
(QtWebPageProxy::processDidCrash):
* UIProcess/qt/QtWebPageProxy.h:
* WebKit2API.pri:
2011-10-26 Ryosuke Niwa <rniwa@webkit.org>
Another GTK build fix attempt after r98413 and r98416.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::paint):
(WebKit::PluginProxy::geometryDidChange):
(WebKit::PluginProxy::update):
2011-10-25 Ryosuke Niwa <rniwa@webkit.org>
C/C++ needs ; after each statement.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::geometryDidChange):
2011-10-25 Ryosuke Niwa <rniwa@webkit.org>
GTK build fix attempt after r98413 and r98416.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::paint):
(WebKit::PluginControllerProxy::geometryDidChange):
2011-10-25 Mark Hahnenberg <mhahnenberg@apple.com>
Remove deletePropertyVirtual
https://bugs.webkit.org/show_bug.cgi?id=70738
Reviewed by Geoffrey Garen.
Removed all declarations and definitions of deletePropertyVirtual.
Also replaced all call sites to deletePropertyVirtual with a
corresponding lookup in the MethodTable.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.h:
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::removeProperty):
2011-10-25 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed build fix after r97587.
* win/WebKit2CFLite.def:
2011-10-25 Anders Carlsson <andersca@apple.com>
CG plug-ins are always given a context with a scale factor of 1, even when the device scale factor is something else
https://bugs.webkit.org/show_bug.cgi?id=67227
<rdar://problem/10048319>
Reviewed by Sam Weinig.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::paint):
Apply the scale factor when painting.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::paint):
Apply the scale factor when painting.
(WebKit::PluginProxy::geometryDidChange):
Make sure to apply the contents scale factor to the backing store size.
(WebKit::PluginProxy::update):
Apply the scale factor (when painting).
2011-10-25 Mark Hahnenberg <mhahnenberg@apple.com>
Remove putVirtual
https://bugs.webkit.org/show_bug.cgi?id=70740
Reviewed by Geoffrey Garen.
Removed all declarations and definitions of putVirtual.
Also replaced all call sites to putVirtual with a
corresponding lookup in the MethodTable.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.h:
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::setProperty):
2011-10-25 Anders Carlsson <andersca@apple.com>
Plug-ins have no way to find out when the device scale factor changes
https://bugs.webkit.org/show_bug.cgi?id=67226
<rdar://problem/10048276>
Reviewed by Sam Weinig.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::geometryDidChange):
* PluginProcess/PluginControllerProxy.h:
This now takes the contentsScaleFactor and calls contentsScaleFactorChanged on its plug-in
if the scale factor changes.
* PluginProcess/PluginControllerProxy.messages.in:
GeometryDidChange now takes a contents scale factor parameter.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::contentsScaleFactorChanged):
Implement contentsScaleFactorChanged and call NPP_SetValue with the new scale factor.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::contentsScaleFactorChanged):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
Add stub.
* WebProcess/Plugins/Plugin.h:
Add pure virtual contentsScaleFactorChanged member function.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::geometryDidChange):
Add geometryDidChange overload that doesn't take any parameters. Make it send over the
new scale factor to the plug-in process.
(WebKit::PluginProxy::contentsScaleFactorChanged):
Call geometryDidChange.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setDeviceScaleFactor):
Call Plugin::contentsScaleFactorChanged.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setDeviceScaleFactor):
Call setDeviceScaleFactor on all registered plug-ins.
2011-10-25 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=70852
Setting up a HiDPI base-level GraphicsContext should be more straightforward for
WebKit2
Reviewed by Dan Bernstein.
When we need a base-level HiDPI GraphicsContext, call into new GraphicsContext api
GraphicsContext::applyDeviceScaleFactor() rather than manually scaling and
adjusting the base CTM.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotInViewCoordinates):
(WebKit::WebPage::scaledSnapshotInDocumentCoordinates):
2011-10-25 Anders Carlsson <andersca@apple.com>
Plug-ins have to use JavaScript to find out the current device scale factor
https://bugs.webkit.org/show_bug.cgi?id=67225
<rdar://problem/10048258>
Reviewed by Darin Adler.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
Initialize m_contentsScaleFactor.
* PluginProcess/PluginControllerProxy.h:
Add contentsScaleFactor member function and m_contentsScaleFactor member variable.
* PluginProcess/PluginCreationParameters.cpp:
(WebKit::PluginCreationParameters::PluginCreationParameters):
(WebKit::PluginCreationParameters::encode):
(WebKit::PluginCreationParameters::decode):
* PluginProcess/PluginCreationParameters.h:
Add contentsScaleFactor to the creation parameters.
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::contentsScaleFactor):
Return the cached m_contentsScaleFactor.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
Handle getting the scale factor by calling NetscapePlugin::contentsScaleFactor.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::contentsScaleFactor):
Ask the plug-in controller for the contents scale factor.
* WebProcess/Plugins/PluginController.h:
Add contentsScaleFactor pure virtual member function.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::initialize):
Set contentsScaleFactor in the creation parameters.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::contentsScaleFactor):
Get the device scale factor from the page.
* WebProcess/Plugins/PluginView.h:
Add contentsScaleFactor().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setDeviceScaleFactor):
Bail if the scale factor didn't change.
2011-10-25 Sam Weinig <sam@webkit.org>
Flesh out WKBrowsingContextLoadDelegate a bit
https://bugs.webkit.org/show_bug.cgi?id=70846
Add didReceiveServerRedirectForProvisionalLoad, didFailProvisionalLoad
and didFailLoad.
Reviewed by Anders Carlsson.
Test: WKBrowsingContextLoadDelegateTest
* UIProcess/API/mac/WKBrowsingContextController.mm:
(didReceiveServerRedirectForProvisionalLoadForFrame):
(didFailProvisionalLoadWithErrorForFrame):
(didFailLoadWithErrorForFrame):
(setUpPageLoaderClient):
* UIProcess/API/mac/WKBrowsingContextLoadDelegate.h:
2011-10-25 Anders Carlsson <andersca@apple.com>
Assertion failure when zooming a PDF in an iframe
https://bugs.webkit.org/show_bug.cgi?id=70849
Reviewed by Alexey Proskuryakov.
If the plug-in doesn't want window relative coordinates, we shouldn't give the plug-in window relative coordinates.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewGeometryDidChange):
2011-10-25 Sam Weinig <sam@webkit.org>
Make loadFileURL:restrictToFilesWithin: work, albeit, without the correct
restrictions for now.
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
2011-10-25 Anders Carlsson <andersca@apple.com>
PDF SUBFRAMES: Incomplete repaint after pinch to zoom
https://bugs.webkit.org/show_bug.cgi?id=70821
<rdar://problem/10312733>
Reviewed by Simon Fraser.
Add a new pure virtual member function, Plugin::wantsWindowRelativeCoordinates.
If a plug-in subclass returns true, we'll keep giving the plug-in coordinates that
are relative to the containing window. If a plug-in subclass returns false, we'll give it
coordinates in a much more sane coordinate system, with the origin at the top left corner of the plug-in.
Change BuiltinPDFView to return false so that it'll work correctly with pinch to zoom.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::wantsWindowRelativeCoordinates):
Make wantsWindowRelativeCoordinates return true.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::paint):
Remove translation since the graphics context is already set up in the right way.
(WebKit::BuiltInPDFView::paintContent):
No need to offset by the plug-in view location anymore.
(WebKit::BuiltInPDFView::paintControls):
Account for the scrollbars being children of the parent scroll view here.
(WebKit::BuiltInPDFView::wantsWindowRelativeCoordinates):
Return false.
(WebKit::BuiltInPDFView::convertFromContainingViewToScrollbar):
Implement this so that scrollbar hit testing works correctly.
* WebProcess/Plugins/Plugin.h:
Add wantsWindowRelativeCoordinates.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::wantsWindowRelativeCoordinates):
Return true for now.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::renderer):
Add simple getter.
(WebKit::PluginView::paint):
Handle the case when the plug-in doesn't want window relative coordinates.
(WebKit::PluginView::transformsAffectFrameRect):
Return true here.
(WebKit::PluginView::viewGeometryDidChange):
No need to adjust the bounds to account for the scale factor now, since the frame rect will always be the
same regardless of the transform.
(WebKit::PluginView::clipRectInWindowCoordinates):
Ditto.
2011-10-25 John Sullivan <sullivan@apple.com>
"Open with" item missing from PDF context menu in some cases
https://bugs.webkit.org/show_bug.cgi?id=70828
<rdar://problem/10034302>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/PDFViewController.mm:
(insertOpenWithDefaultPDFMenuItem):
New helper function, extracted from -menuForEvent:. Identical to original code except
that it inserts the item at a specified index, rather than always at the end.
(-[WKPDFView menuForEvent:]):
Now keeps track of whether the Open With item has been inserted while iterating through
the PDFKit-supplied menu items looking for a "Copy" item. If a "Copy" item is not found,
inserts the Open With item at the top of the context menu.
2011-10-25 Zeno Albisser <zeno.albisser@nokia.com>
[Qt][WK2] QDesktopWebView and QTouchWebView should be declared in the meta type system.
https://bugs.webkit.org/show_bug.cgi?id=70693
This change allows us to use the template based features of the meta type system
such as using the WebView classes as types for QVariant.
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qtouchwebview.h:
2011-10-25 Zalan Bujtas <zbujtas@gmail.com>
[Qt][WK2] Remove redundant setPageIsVisible() API
https://bugs.webkit.org/show_bug.cgi?id=70520
Use DrawingAreaProxy::visibilityDidChange() instead of DrawingAreaProxy::setPageIsVisible()
Remove DrawingAreaProxy::setPageIsVisible(), not used anymore.
This change disables the ability of suspending and resuming painting for TiledDrawingAreaProxy.
However, TiledDrawingAreaProxy is about to be deprecated by using DrawingAreaProxyImpl
as the UI process drawing area proxy for tiled based rendering.
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qtouchwebpage.cpp:
(QTouchWebPage::QTouchWebPage):
(QTouchWebPagePrivate::setPage):
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebView::QTouchWebView):
(QTouchWebView::touchEvent):
(QTouchWebView::onVisibleChanged):
* UIProcess/API/qt/qtouchwebview.h:
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
(WebKit::TiledDrawingAreaProxy::deviceScaleFactorDidChange):
* UIProcess/TiledDrawingAreaProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
* UIProcess/qt/QtWebPageProxy.cpp:
* UIProcess/qt/QtWebPageProxy.h:
2011-10-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add go_to_back_forward_list_item() to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=69825
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
(webkitBackForwardListItemGetWKItem):
* UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_go_to_back_forward_list_item):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/tests/TestBackForwardList.cpp:
(testBackForwardListNavigation):
2011-10-25 Vamshikrishna Yellenki <vamshi@motorola.com>
[WK2]Critical warning while building WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=70591
Reviewed by Martin Robinson.
* WebProcess/WebPage/WebPage.cpp: Included DataObjectGtk.h to avoid warnings for GTK
2011-10-24 Sam Weinig <sam@webkit.org>
Simplify url accessors on WKBrowsingContextController
https://bugs.webkit.org/show_bug.cgi?id=70797
Reviewed by Anders Carlsson.
* UIProcess/API/C/WKPage.cpp:
(WKPageCopyActiveURL):
(WKPageCopyProvisionalURL):
(WKPageCopyCommittedURL):
* UIProcess/API/C/WKPage.h:
Add accessors to C SPI.
* UIProcess/API/mac/WKBrowsingContextController.h:
Remove unreachableURL accessor for now. It may make a glorious return when we have
error page support.
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController activeURL]):
(-[WKBrowsingContextController provisionalURL]):
(-[WKBrowsingContextController committedURL]):
Implement these in terms of the new C SPI.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::activeURL):
Add computation of the "active" URL, which is the URL one would show
in an address field. It is the pending URL when there is one, the provisional
URL when there is one, and otherwise the committed/final URL.
(WebKit::WebPageProxy::provisionalURL):
(WebKit::WebPageProxy::committedURL):
Add access to the main frame URL.
* UIProcess/WebPageProxy.h:
2011-10-24 Sam Weinig <sam@webkit.org>
Hook up minimalist load delegate to WKBrowsingContextController
https://bugs.webkit.org/show_bug.cgi?id=70764
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKBrowsingContextController.h:
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController loadDelegate]):
(-[WKBrowsingContextController setLoadDelegate:]):
Add loadDelegate getter/setter. As per convention, the delegate is not
retained.
(didStartProvisionalLoadForFrame):
(didCommitLoadForFrame):
(didFinishLoadForFrame):
(setUpPageLoaderClient):
(-[WKBrowsingContextController initWithPageRef:]):
Hookup the delegate to a WKPageLoaderClient.
* UIProcess/API/mac/WKBrowsingContextLoadDelegate.h: Added.
Add load delegate as a proper protocol.
* WebKit2.xcodeproj/project.pbxproj:
Add new file.
2011-10-24 Michael Saboff <msaboff@apple.com>
WebKit doesn't build with recent changes to libdispatch
https://bugs.webkit.org/show_bug.cgi?id=70737
Added initialization for new WebKitSystemInterface function
CreateVMPressureDispatchOnMainQueue.
Reviewed by Geoffrey Garen.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2011-10-24 Sam Weinig <sam@webkit.org>
Add URL getters for the WKBrowsingContextController
https://bugs.webkit.org/show_bug.cgi?id=70752
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKBrowsingContextController.h:
* UIProcess/API/mac/WKBrowsingContextController.mm:
(autoreleased):
Added helpers for autoreleasing.
(-[WKBrowsingContextController activeURL]):
Added buy not implemented yet.
(-[WKBrowsingContextController pendingURL]):
(-[WKBrowsingContextController provisionalURL]):
(-[WKBrowsingContextController commitedURL]):
(-[WKBrowsingContextController unreachableURL]):
Added getters.
(-[WKBrowsingContextController title]):
Convert to new autoreleased helper.
2011-10-24 Sam Weinig <sam@webkit.org>
Add zoom and title support to Objective-C WebKit2 API
https://bugs.webkit.org/show_bug.cgi?id=70744
Reviewed by Darin Adler.
* UIProcess/API/mac/WKBrowsingContextController.h:
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController title]):
(-[WKBrowsingContextController textZoom]):
(-[WKBrowsingContextController setTextZoom:]):
(-[WKBrowsingContextController pageZoom]):
(-[WKBrowsingContextController setPageZoom:]):
2011-10-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix make distcheck build
https://bugs.webkit.org/show_bug.cgi?id=69745
Reviewed by Martin Robinson.
* GNUmakefile.am:
2011-10-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Initial implementation of back forward list for WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=69343
Reviewed by Martin Robinson.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitBackForwardList.cpp: Added.
(webkitBackForwardListFinalize):
(webkit_back_forward_list_init):
(webkit_back_forward_list_class_init):
(webkitBackForwardListGetOrCreateItem): Helper function that
creates a new WebKitBackForwardListItem for the given
WebBackForwardListItem or returns it from the cache if it's
already cached.
(webkitBackForwardListCreateList): Helper function to convert a
WKArray of WebBackForwardListItems into a GList of
WebKitBackForwardListItems.
(webkitBackForwardListCreate): Create a new WebKitBackForwardList.
(webkitBackForwardListChanged): Emits changed signal when the back
forward list changes.
(webkit_back_forward_list_get_current_item):
(webkit_back_forward_list_get_back_item):
(webkit_back_forward_list_get_forward_item):
(webkit_back_forward_list_get_nth_item):
(webkit_back_forward_list_get_length):
(webkit_back_forward_list_get_back_list):
(webkit_back_forward_list_get_back_list_with_limit):
(webkit_back_forward_list_get_forward_list):
(webkit_back_forward_list_get_forward_list_with_limit):
* UIProcess/API/gtk/WebKitBackForwardList.h: Added.
* UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Added.
(webkitBackForwardListItemFinalize):
(webkit_back_forward_list_item_init):
(webkit_back_forward_list_item_class_init):
(historyItemsMap): Global cache for WebKitBackForwardListItems.
(webkitBackForwardListItemFinalized):
(webkitBackForwardListItemGetOrCreate): Helper function that
creates a new WebKitBackForwardListItem for the given
WebBackForwardListItem or returns it from the global cache if it's
already cached.
(webkit_back_forward_list_item_get_uri):
(webkit_back_forward_list_item_get_title):
(webkit_back_forward_list_item_get_original_uri):
* UIProcess/API/gtk/WebKitBackForwardListItem.h: Added.
* UIProcess/API/gtk/WebKitBackForwardListPrivate.h: Added.
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
(didChangeBackForwardList): Call webkitBackForwardListChanged() to
notify that the list has changed.
(webkitWebLoaderClientAttachLoaderClientToPage): Add
implementation for didChangeBackForwardList.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed):
(webkit_web_view_get_back_forward_list): Return the back forward
list of the view.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/tests/GNUmakefile.am: Add new test.
* UIProcess/API/gtk/tests/TestBackForwardList.cpp: Added.
(serverCallback):
(testBackForwardListNavigation):
(testBackForwardListLimitAndCache):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/tests/TestMain.h:
(Test::~Test): Check there are no objects leaked.
(Test::objectFinalized): Callback called when a GObject is
deleted, used to remove the watched object the list.
(Test::assertObjectIsDeletedWhenTestFinishes): Add an object to
the list of watched objects and add a weak pointer to remove it
from the list when the object is finalized. If there aren't
objects leaked, the list should be empty when the test finishes.
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::WebViewTest): Watch the web view to make sure it's
not leaked.
* UIProcess/API/gtk/tests/WebViewTest.h: Make WebViewTest inherit
from Test class.
* UIProcess/API/gtk/webkit2.h: Include WebKitBackForwardList.h and
WebKitBackForwardListItem.h.
* UIProcess/API/gtk/webkit2marshal.list:
2011-10-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add helper function to set the loader client in WebKitWebView
https://bugs.webkit.org/show_bug.cgi?id=70594
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewSetLoaderClient): Helper function to set the loader
client.
(webkitWebViewConstructed): Use webkitWebViewSetLoaderClient() to
avoid unnecessary checks.
(webkit_web_view_set_loader_client): Use
webkitWebViewSetLoaderClient().
2011-10-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove g_thread_init() calls
https://bugs.webkit.org/show_bug.cgi?id=70717
Reviewed by Xan Lopez.
With newer glib it's not needed anymore and with previous versions
it was already called by g_type_init().
* UIProcess/API/gtk/tests/TestMain.cpp:
(main):
2011-10-24 Zeno Albisser <zeno.albisser@nokia.com>
[Qt][WK2] WebView does not get focus when being clicked / touched in MiniBrowser.
https://bugs.webkit.org/show_bug.cgi?id=70613
Make TouchWebView and DesktopWebView take the focus whenever it receives
a MouseClick or a TouchEvent.
Reviewed by Simon Hausmann.
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebView::mousePressEvent):
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebView::touchEvent):
* UIProcess/API/qt/qtouchwebview.h:
2011-10-24 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
[GTK] [WK2] Memory leaks in WebContextGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=70505
Free the output of g_build_filename()
Reviewed by Martin Robinson.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultDatabaseDirectory):
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
2011-10-23 Mark Hahnenberg <mhahnenberg@apple.com>
Remove getConstructDataVirtual
https://bugs.webkit.org/show_bug.cgi?id=70638
Reviewed by Darin Adler.
Removed all declarations and definitions of getConstructDataVirtual.
Also replaced all call sites to getConstructDataVirtual with a
corresponding lookup in the MethodTable.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-10-21 Alexey Proskuryakov <ap@apple.com>
[WK2] Clicking a print button in a PDF doesn't do anything
https://bugs.webkit.org/show_bug.cgi?id=70663
<rdar://problem/9795014>
Reviewed by Dan Bernstein.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::printMainFrame): Added a public method
that PDFViewController could call.
* UIProcess/API/mac/PDFViewController.h:
* UIProcess/API/mac/PDFViewController.mm:
(-[WKPDFView PDFViewPerformPrint:]):
(WebKit::PDFViewController::print):
Connect PDFView delegate method for printing.
2011-10-21 Sam Weinig <sam@webkit.org>
Lookup does not work on text using web fonts in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=70669
<rdar://problem/10147441>
Reviewed by Anders Carlsson.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForRange):
If the font for the range is web font (and therefore no NSFont is
available), use the system font of the same size. While not great,
it approximates what WebKit1 does.
2011-10-21 Sam Weinig <sam@webkit.org>
Fix crash below CoreIPC::MessageSender<WebKit::WebPage>::send<Messages::WebPageProxy::DidPerformDictionaryLookup>
https://bugs.webkit.org/show_bug.cgi?id=70667
<rdar://problem/9622186>
Reviewed by Anders Carlsson.
* Shared/DictionaryPopupInfo.cpp:
(WebKit::DictionaryPopupInfo::encode):
(WebKit::DictionaryPopupInfo::decode):
Account for the fact that the options dictionary can be null. This is due to Lookup passing
back a null, rather than empty, dictionary when it could not find any interesting characteristics.
2011-10-21 Sam Weinig <sam@webkit.org>
Add WKBrowsingContextGroup which wraps WKPageGroupRef
https://bugs.webkit.org/show_bug.cgi?id=70665
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKBrowsingContextGroup.h: Added.
* UIProcess/API/mac/WKBrowsingContextGroup.mm: Added.
(-[WKBrowsingContextGroup initWithIdentifier:]):
(-[WKBrowsingContextGroup dealloc]):
(-[WKBrowsingContextGroup pageGroupRef]):
* UIProcess/API/mac/WKBrowsingContextGroupInternal.h: Added.
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processGroup:browsingContextGroup:]):
* WebKit2.xcodeproj/project.pbxproj:
2011-10-21 Sam Weinig <sam@webkit.org>
Mark member variables of WebKit2 API @private
https://bugs.webkit.org/show_bug.cgi?id=70655
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKBrowsingContextController.h:
* UIProcess/API/mac/WKView.h:
2011-10-21 Sam Weinig <sam@webkit.org>
Rename WKProcessCluster to WKProcessGroup
https://bugs.webkit.org/show_bug.cgi?id=70654
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKProcessCluster.h: Removed.
* UIProcess/API/mac/WKProcessCluster.mm: Removed.
* UIProcess/API/mac/WKProcessClusterInternal.h: Removed.
* UIProcess/API/mac/WKProcessGroup.h: Copied from Source/WebKit2/UIProcess/API/mac/WKProcessCluster.h.
* UIProcess/API/mac/WKProcessGroup.mm: Copied from Source/WebKit2/UIProcess/API/mac/WKProcessCluster.mm.
(-[WKProcessGroup initWithInjectedBundleURL:]):
* UIProcess/API/mac/WKProcessGroupInternal.h: Copied from Source/WebKit2/UIProcess/API/mac/WKProcessClusterInternal.h.
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processCluster:]):
* WebKit2.xcodeproj/project.pbxproj:
2011-10-21 Sam Weinig <sam@webkit.org>
Remove ability to create a WKView without a WKContextRef and WKPageGroupRef
https://bugs.webkit.org/show_bug.cgi?id=70653
Reviewed by Simon Fraser.
Requiring a context and pagegroup removes the concept of global contexts,
which is something that is both confusing, and makes Objective-C wrapping
harder.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processCluster:]):
* UIProcess/API/mac/WKViewPrivate.h:
Remove init methods that didn't take both a context and a pagegroup.
2011-10-21 Alexey Proskuryakov <ap@apple.com>
[WK2] Crash after printing a view with accelerated compositing content
https://bugs.webkit.org/show_bug.cgi?id=70643
<rdar://problem/9479083>
Reviewed by Darin Adler.
* UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
We cannot rely on -[WKView drawRect:] calling endPrinting() for us. That call to endPrinting()
is still necessary to paint e.g. when resizing a window while a print dialog is present.
2011-10-21 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[WK2] WebFrameLoaderClient::shouldFallback() should use a port-specific implementation
https://bugs.webkit.org/show_bug.cgi?id=70055
Reviewed by Luiz Agostini.
In QtWebKit 1, our FrameLoaderClient::shouldFallback was checking for InterruptedForPolicyChange
error. In WebKit2, we are relying on the common implementation for WebFrameLoaderClient::shouldFallback
which doesn't check for the same error. Here we add this check only for Qt.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldFallBack):
2011-10-21 Anders Carlsson <andersca@apple.com>
Flash of white when loading a page after a web process crash
https://bugs.webkit.org/show_bug.cgi?id=70615
<rdar://problem/10306906>
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm:
(-[WKView _processDidCrash]):
(-[WKView _didRelaunchProcess]):
Remove calls to setNeedsDisplay here.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processDidCrash):
Call setNeedsDisplay, but only if calling out to the loader client didn't relaunch the web process.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setPaintingEnabled):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
(WebKit::DrawingAreaImpl::setNeedsDisplay):
(WebKit::DrawingAreaImpl::scroll):
(WebKit::DrawingAreaImpl::setPaintingEnabled):
* WebProcess/WebPage/DrawingAreaImpl.h:
Add a way to disable painting completely for a drawing area.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Disable painting while setting up the web page, otherwise we'll get paint requests when we set the
active state of the web page.
2011-10-21 Csaba Osztrogonác <ossy@webkit.org>
[Qt][WK2] Buildfix for newer Qt5. Remove duplicated defines.
Reviewed by Simon Hausmann.
* UIProcess/API/qt/tests/util.h:
2011-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix WebKit2 GTK+ build after r98081.
* UIProcess/API/gtk/WebKitWebView.h:
2011-10-21 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r98085.
http://trac.webkit.org/changeset/98085
https://bugs.webkit.org/show_bug.cgi?id=70589
It broke the build (Requested by Ossy on #webkit).
* UIProcess/API/qt/tests/util.h:
2011-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix API documentation comment for webkit_web_view_get_estimated_load_progress()
https://bugs.webkit.org/show_bug.cgi?id=70587
Reviewed by Philippe Normand.
It's should start with /** to be recognized as API documentation.
* UIProcess/API/gtk/WebKitWebView.cpp:
2011-10-21 Csaba Osztrogonác <ossy@webkit.org>
[Qt][WK2] Unreviewed buildfix for newer Qt5. Remove duplicated defines.
* UIProcess/API/qt/tests/util.h:
2011-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add can_go_back/forward methods to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=69823
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_go_back):
(webkit_web_view_can_go_back):
(webkit_web_view_go_forward):
(webkit_web_view_can_go_forward):
* UIProcess/API/gtk/WebKitWebView.h:
2011-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add webkit_web_view_stop_loading() to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=69610
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_stop_loading):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
(provisionalLoadFailedCallback):
(loadFailedCallback):
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
(LoadStopTrackingTest::loadCommitted):
(LoadStopTrackingTest::loadFailed):
(LoadStopTrackingTest::loadFinished):
(testLoadCancelled):
(serverCallback):
(beforeAll):
2011-10-20 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] qweberror* should follow the new file and class naming rules
https://bugs.webkit.org/show_bug.cgi?id=70550
Reviewed by Noam Rosenthal.
Renaming qweberror* files and class to QtWebError*.
QWebErrorPrivate is now merged into QtWebError.
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::loadDidFail):
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/qt/ClientImpl.cpp:
(dispatchLoadFailed):
* UIProcess/qt/QtTouchViewInterface.cpp:
(WebKit::QtTouchViewInterface::loadDidFail):
* UIProcess/qt/QtTouchViewInterface.h:
* UIProcess/qt/QtViewInterface.h:
* UIProcess/qt/QtWebError.cpp: Renamed from Source/WebKit2/UIProcess/qt/qweberror.cpp.
(QtWebError::QtWebError):
(QtWebError::type):
(QtWebError::errorCode):
(QtWebError::url):
* UIProcess/qt/QtWebError.h: Renamed from Source/WebKit2/UIProcess/qt/qweberror.h.
(QtWebError::errorCodeAsHttpStatusCode):
(QtWebError::errorCodeAsNetworkError):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::loadDidFail):
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/qt/qweberror_p.h: Removed.
* WebKit2.pro:
2011-10-20 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r96823): Contextual menu closes immediately when control-clicking in Flash plug-in
https://bugs.webkit.org/show_bug.cgi?id=70534
<rdar://problem/10308827>
Reviewed by Darin Adler.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::handleContextMenuEvent):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::handleContextMenuEvent):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::handleEvent):
Return true when handling contextmenu event, so that plug-ins won't get a default WebKit
context menu. We can't know if the plug-in is handling mousedown (or even mouseup) by
displaying a menu.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::handleContextMenuEvent):
PDF is the only "plug-in" that wants default WebKit menu now.
2011-10-20 Sam Weinig <sam@webkit.org>
Put the WebKit2 C SPI in PrivateHeaders
https://bugs.webkit.org/show_bug.cgi?id=70549
Reviewed by Dan Bernstein.
No change in behavior.
* WebKit2.xcodeproj/project.pbxproj:
2011-10-20 Brady Eidson <beidson@apple.com>
<rdar://problem/9412849> and https://bugs.webkit.org/show_bug.cgi?id=70535
WK2 - Crash deref'ing a null context menu
Reviewed by Darin Adler.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didSelectItemFromActiveContextMenu): In some cases that we still can't reproduce,
this message can be received in the WebProcess after the context menu has been cleared, leading
to a crash. Turning the ASSERT in to an early return will prevent the crash while we try to learn more
about how this could happen.
2011-10-20 Gustavo Noronha Silva <gns@gnome.org>
GTK+ build fix. Wk2 documentation will be dealt with in future
patches.
* UIProcess/API/gtk/docs/GNUmakefile.am:
2011-10-20 Mark Hahnenberg <mhahnenberg@apple.com>
Rename static deleteProperty to deletePropertyByIndex
https://bugs.webkit.org/show_bug.cgi?id=70257
Reviewed by Geoffrey Garen.
Renaming versions of deleteProperty that use an unsigned as the property
name to "deletePropertyByIndex" in preparation for adding them to the
MethodTable, which requires unique names for each method.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::deletePropertyVirtual):
(WebKit::JSNPObject::deletePropertyByIndex):
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove WebKitWebLoaderClientPrivate
https://bugs.webkit.org/show_bug.cgi?id=70488
Reviewed by Philippe Normand.
It's unused since r97920.
* GNUmakefile.am: Add WebKitWebLoaderClientPrivate.h.
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
(webkitWebLoaderClientAttachLoaderClientToPage): Renamed to make
it clear it's a private method of WebKitWebLoaderClient.
(webkit_web_loader_client_init): Remove
WebKitWebLoaderClientPrivate initialization.
(webkit_web_loader_client_class_init): Removed adding
WebKitWebLoaderClientPrivate struct as private data.
* UIProcess/API/gtk/WebKitWebLoaderClient.h: Remove
WebKitWebLoaderClientPrivate definition.
* UIProcess/API/gtk/WebKitWebLoaderClientPrivate.h: Move
webkitWebLoaderClientAttachLoaderClientToPage method here since
it's a private method implemented in WebKitWebLoaderClient, not in
WebKitWebView.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_set_loader_client): Use
webkitWebLoaderClientAttachLoaderClientToPage.
* UIProcess/API/gtk/WebKitWebViewPrivate.h: Remove
webkitWebLoaderClientAttachLoaderClientToPage prototype.
2011-10-10 Martin Robinson <mrobinson@igalia.com>
[GTK] [WebKit2] Allow sharing page clients between WebViews
https://bugs.webkit.org/show_bug.cgi?id=69814
No longer associate WebPage client wrappers with a WebKitWebView. This allows the
same client to be used with more than one WebKitWebView.
Reviewed by Xan Lopez.
* GNUmakefile.am: Add the new WebKitWebViewPrivate header.
* UIProcess/API/gtk/WebKitDefines.h: Added some forward declarations for API classes.
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp: C API callbacks now convert their WKPageRef argument
into a WebKitWebView directly and pass it as a parameter to signals. Remove the web-view property.
* UIProcess/API/gtk/WebKitWebLoaderClient.h: Move the estimated-progress property to WebKitWebView.
* UIProcess/API/gtk/WebKitWebView.cpp: Add an estimated-load-progress property.
(webkitWebViewConstructed):Only allocate one default WebKitWebLoaderClient.
(webkitWebViewGetProperty): Add support for the new property.
(webkit_web_view_class_init): Ditto.
(webkitWebViewSetEstimatedLoadProgress): Added this private method so that the WebKitWebLoaderClient
can update the appropriate WebKitWebView.
(webkit_web_view_set_loader_client): Attach the C API callbacks here now.
(webkit_web_view_get_estimated_load_progress): Moved from WebKitWebLoaderClient.
* UIProcess/API/gtk/WebKitWebView.h: Added new method definition.
* UIProcess/API/gtk/WebKitWebViewPrivate.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitDefines.h.
* UIProcess/API/gtk/tests/LoadTrackingTest.cpp: Updated the load tracking tests callbacks to take the new parameter.
(LoadTrackingTest::LoadTrackingTest): Listen to the WebKitWebView property now.
(LoadTrackingTest::estimatedProgressChanged):
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp: Added a test to verify that two WebViews share the same default client.
* UIProcess/API/gtk/webkit2marshal.list: Updated the marshallers here.
2011-10-19 Anders Carlsson <andersca@apple.com>
White flash when painting a previously crashed WKView
https://bugs.webkit.org/show_bug.cgi?id=70453
<rdar://problem/10306906>
Reviewed by John Sullivan.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcess):
Call waitForBackingStoreUpdateOnNextPaint so we'll wait for the next paint instead of painting white.
2011-10-19 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=70396
Focus rings are too thin in HiDPI in WebKit2
-and corresponding-
<rdar://problem/10086876>
Reviewed by Dan Bernstein.
Rename wkSetPatternBaseCTM to wkSetBaseCTM
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
When setting up a HiDPI context, we must also set the base CTM.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotInDocumentCoordinates):
(WebKit::WebPage::snapshotInViewCoordinates):
2011-10-19 Sam Weinig <sam@webkit.org>
Add skeleton of an Objective-C WebKit2 API
https://bugs.webkit.org/show_bug.cgi?id=70438
Reviewed by Anders Carlsson.
Adds WKBrowsingContextController (WKPageRef wrapper) and WKProcessCluster
(WKContextRef wrapper) as initial files of an Objective-C WebKit2 API. Also,
hook them up so that you can get a WKBrowsingContextController from the WKView
and you can create a WKView associated with a WKProcessCluster. These names are
not final, and this work is mainly about getting the wrapper lifetimes worked
out.
* UIProcess/API/mac/WKBrowsingContextController.h: Added.
* UIProcess/API/mac/WKBrowsingContextController.mm: Added.
(-[WKBrowsingContextController dealloc]):
(-[WKBrowsingContextController pageRef]):
(-[WKBrowsingContextController loadRequest:]):
(-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
(-[WKBrowsingContextController stopLoading]):
(-[WKBrowsingContextController reload]):
(-[WKBrowsingContextController reloadFromOrigin]):
(-[WKBrowsingContextController goForward]):
(-[WKBrowsingContextController canGoForward]):
(-[WKBrowsingContextController goBack]):
(-[WKBrowsingContextController canGoBack]):
(-[WKBrowsingContextController initWithPageRef:]):
* UIProcess/API/mac/WKBrowsingContextControllerInternal.h: Added.
Add wrapper for WKPageRef.
* UIProcess/API/mac/WKProcessCluster.h: Added.
* UIProcess/API/mac/WKProcessCluster.mm: Added.
(-[WKProcessCluster init]):
(-[WKProcessCluster initWithInjectedBundleURL:]):
(-[WKProcessCluster dealloc]):
(-[WKProcessCluster contextRef]):
* UIProcess/API/mac/WKProcessClusterInternal.h: Added.
Add wrapper for WKContextRef.
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processCluster:]):
Add new init method which takes a WKProcessCluster.
(-[WKView browsingContextController]):
Add accessor for the WKBrowsingContextController. This works by lazily creating
the wrapper and caching it in the view itself.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2011-10-19 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Rename files and classes to follow conventions
https://bugs.webkit.org/show_bug.cgi?id=70391
Reviewed by Noam Rosenthal.
Rename the files and classes following the agreed conventions on
QtWebKit mailing list -- which are based on existing usage we have.
- Public API follow Qt conventions: qsomething.cpp qsomething.h with class named QSomething
- Private classes for public API classes follow Qt conventions:
qsomething_p.h qsomething_p.cpp (if needed), with class named QSomethingPrivate
- Subclasses and Qt-specific implementations of WebKit/WebCore classes use Qt suffix:
FrameLoaderClientQt.cpp
- Other classes created for using in our port use Qt prefix: QtFileDownloader, QtViewInterface
This is documented in https://trac.webkit.org/wiki/QtWebKitHacking
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::chooseFiles):
(toPolicyAction):
(QDesktopWebViewPrivate::navigationPolicyForURL):
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/API/qt/qtouchwebpage.cpp:
(QTouchWebPage::updatePaintNode):
(QTouchWebPagePrivate::setPage):
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qtouchwebpage_p.h:
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::updateViewportConstraints):
* UIProcess/API/qt/qtouchwebview.h:
* UIProcess/API/qt/qtouchwebview_p.h:
* UIProcess/TiledDrawingAreaProxy.h:
* UIProcess/qt/ClientImpl.cpp:
(toQtViewInterface):
(toQtPolicyInterface):
(qt_wk_runJavaScriptAlert):
(qt_wk_runJavaScriptConfirm):
(qt_wk_runJavaScriptPrompt):
(qt_wk_setStatusText):
(qt_wk_runOpenPanel):
(qt_wk_mouseDidMoveOverElement):
(qt_wk_decidePolicyForNavigationAction):
* UIProcess/qt/QtDesktopWebPageProxy.cpp: Renamed from Source/WebKit2/UIProcess/qt/qdesktopwebpageproxy.cpp.
(dragOperationToDropAction):
(QtDesktopWebPageProxy::QtDesktopWebPageProxy):
(QtDesktopWebPageProxy::createDrawingAreaProxy):
(QtDesktopWebPageProxy::paintContent):
(QtDesktopWebPageProxy::setViewportArguments):
(QtDesktopWebPageProxy::doneWithTouchEvent):
(QtDesktopWebPageProxy::createPopupMenuProxy):
(QtDesktopWebPageProxy::handleEvent):
(QtDesktopWebPageProxy::handleMouseMoveEvent):
(QtDesktopWebPageProxy::handleMousePressEvent):
(QtDesktopWebPageProxy::handleMouseReleaseEvent):
(QtDesktopWebPageProxy::handleMouseDoubleClickEvent):
(QtDesktopWebPageProxy::handleWheelEvent):
(QtDesktopWebPageProxy::handleHoverLeaveEvent):
(QtDesktopWebPageProxy::handleHoverMoveEvent):
(QtDesktopWebPageProxy::handleDragEnterEvent):
(QtDesktopWebPageProxy::handleDragLeaveEvent):
(QtDesktopWebPageProxy::handleDragMoveEvent):
(QtDesktopWebPageProxy::handleDropEvent):
(QtDesktopWebPageProxy::timerEvent):
* UIProcess/qt/QtDesktopWebPageProxy.h: Renamed from Source/WebKit2/UIProcess/qt/qdesktopwebpageproxy.h.
* UIProcess/qt/QtGestureRecognizer.cpp:
(WebKit::QtGestureRecognizer::QtGestureRecognizer):
* UIProcess/qt/QtGestureRecognizer.h:
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::QtPanGestureRecognizer):
* UIProcess/qt/QtPanGestureRecognizer.h:
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::QtPinchGestureRecognizer::QtPinchGestureRecognizer):
* UIProcess/qt/QtPinchGestureRecognizer.h:
* UIProcess/qt/QtPolicyInterface.h: Renamed from Source/WebKit2/UIProcess/qt/PolicyInterface.h.
* UIProcess/qt/QtSGTileNode.cpp: Renamed from Source/WebKit2/UIProcess/qt/SGTileNode.cpp.
(WebKit::QtSGTileNode::QtSGTileNode):
(WebKit::QtSGTileNode::setBackBuffer):
(WebKit::QtSGTileNode::swapBuffersIfNeeded):
* UIProcess/qt/QtSGTileNode.h: Renamed from Source/WebKit2/UIProcess/qt/SGTileNode.h.
* UIProcess/qt/QtSGUpdateQueue.cpp: Renamed from Source/WebKit2/UIProcess/qt/SGUpdateQueue.cpp.
(WebKit::NodeUpdateCreateTile::NodeUpdateCreateTile):
(WebKit::NodeUpdateRemoveTile::NodeUpdateRemoveTile):
(WebKit::NodeUpdateSetBackBuffer::NodeUpdateSetBackBuffer):
(WebKit::NodeUpdateSwapTileBuffers::NodeUpdateSwapTileBuffers):
(WebKit::QtSGUpdateQueue::QtSGUpdateQueue):
(WebKit::QtSGUpdateQueue::createTileNode):
(WebKit::QtSGUpdateQueue::removeTileNode):
(WebKit::QtSGUpdateQueue::setNodeBackBuffer):
(WebKit::QtSGUpdateQueue::swapTileBuffers):
(WebKit::QtSGUpdateQueue::applyUpdates):
(WebKit::QtSGUpdateQueue::getScaleNode):
* UIProcess/qt/QtSGUpdateQueue.h: Renamed from Source/WebKit2/UIProcess/qt/SGUpdateQueue.h.
(WebKit::QtSGUpdateQueue::isSwapPending):
(WebKit::NodeUpdate::NodeUpdate):
(WebKit::NodeUpdate::~NodeUpdate):
* UIProcess/qt/QtTouchViewInterface.cpp: Renamed from Source/WebKit2/UIProcess/qt/TouchViewInterface.cpp.
(WebKit::QtTouchViewInterface::QtTouchViewInterface):
(WebKit::QtTouchViewInterface::didFindZoomableArea):
(WebKit::QtTouchViewInterface::sceneGraphUpdateQueue):
(WebKit::QtTouchViewInterface::setViewNeedsDisplay):
(WebKit::QtTouchViewInterface::drawingAreaSize):
(WebKit::QtTouchViewInterface::contentSizeChanged):
(WebKit::QtTouchViewInterface::isActive):
(WebKit::QtTouchViewInterface::hasFocus):
(WebKit::QtTouchViewInterface::isVisible):
(WebKit::QtTouchViewInterface::startDrag):
(WebKit::QtTouchViewInterface::didReceiveViewportArguments):
(WebKit::QtTouchViewInterface::didChangeUrl):
(WebKit::QtTouchViewInterface::didChangeTitle):
(WebKit::QtTouchViewInterface::didChangeToolTip):
(WebKit::QtTouchViewInterface::didChangeStatusText):
(WebKit::QtTouchViewInterface::didChangeCursor):
(WebKit::QtTouchViewInterface::loadDidBegin):
(WebKit::QtTouchViewInterface::loadDidCommit):
(WebKit::QtTouchViewInterface::loadDidSucceed):
(WebKit::QtTouchViewInterface::loadDidFail):
(WebKit::QtTouchViewInterface::didChangeLoadProgress):
(WebKit::QtTouchViewInterface::showContextMenu):
(WebKit::QtTouchViewInterface::hideContextMenu):
(WebKit::QtTouchViewInterface::runJavaScriptAlert):
(WebKit::QtTouchViewInterface::runJavaScriptConfirm):
(WebKit::QtTouchViewInterface::runJavaScriptPrompt):
(WebKit::QtTouchViewInterface::processDidCrash):
(WebKit::QtTouchViewInterface::didRelaunchProcess):
(WebKit::QtTouchViewInterface::engine):
* UIProcess/qt/QtTouchViewInterface.h: Renamed from Source/WebKit2/UIProcess/qt/TouchViewInterface.h.
(WebKit::QtTouchViewInterface::chooseFiles):
(WebKit::QtTouchViewInterface::didMouseMoveOverElement):
* UIProcess/qt/QtTouchWebPageProxy.cpp: Renamed from Source/WebKit2/UIProcess/qt/qtouchwebpageproxy.cpp.
(QtTouchWebPageProxy::QtTouchWebPageProxy):
(QtTouchWebPageProxy::createDrawingAreaProxy):
(QtTouchWebPageProxy::processDidCrash):
(QtTouchWebPageProxy::paintContent):
(QtTouchWebPageProxy::doneWithTouchEvent):
(QtTouchWebPageProxy::handleEvent):
(QtTouchWebPageProxy::setVisibleContentRectAndScale):
(QtTouchWebPageProxy::setVisibleContentRectTrajectoryVector):
(QtTouchWebPageProxy::setResizesToContentsUsingLayoutSize):
(QtTouchWebPageProxy::touchEvent):
(QtTouchWebPageProxy::findZoomableAreaForPoint):
(QtTouchWebPageProxy::renderNextFrame):
* UIProcess/qt/QtTouchWebPageProxy.h: Renamed from Source/WebKit2/UIProcess/qt/qtouchwebpageproxy.h.
(QtTouchWebPageProxy::touchViewInterface):
(QtTouchWebPageProxy::drawingArea):
* UIProcess/qt/QtViewInterface.h: Renamed from Source/WebKit2/UIProcess/qt/ViewInterface.h.
* UIProcess/qt/QtViewportInteractionEngine.cpp: Renamed from Source/WebKit2/UIProcess/qt/ViewportInteractionEngine.cpp.
(WebKit::visibleRectInContentCoordinate):
(WebKit::contentRectInViewportCoordinate):
(WebKit::ViewportUpdateGuard::ViewportUpdateGuard):
(WebKit::ViewportUpdateGuard::~ViewportUpdateGuard):
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::~QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::reset):
(WebKit::QtViewportInteractionEngine::setConstraints):
(WebKit::QtViewportInteractionEngine::panGestureStarted):
(WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::panGestureCancelled):
(WebKit::QtViewportInteractionEngine::panGestureEnded):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):
(WebKit::QtViewportInteractionEngine::contentViewportChanged):
(WebKit::QtViewportInteractionEngine::updateContentIfNeeded):
(WebKit::QtViewportInteractionEngine::updateContentScaleIfNeeded):
(WebKit::QtViewportInteractionEngine::updateContentPositionIfNeeded):
(WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
(WebKit::QtViewportInteractionEngine::animateContentPositionIntoBoundariesIfNeeded):
(WebKit::QtViewportInteractionEngine::animateContentScaleIntoBoundariesIfNeeded):
(WebKit::QtViewportInteractionEngine::scaleContent):
* UIProcess/qt/QtViewportInteractionEngine.h: Renamed from Source/WebKit2/UIProcess/qt/ViewportInteractionEngine.h.
(WebKit::QtViewportInteractionEngine::Constraints::Constraints):
(WebKit::operator==):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::registerEditCommand):
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/qt/QtWebUndoCommand.cpp: Renamed from Source/WebKit2/UIProcess/qt/WebUndoCommandQt.cpp.
(QtWebUndoCommand::QtWebUndoCommand):
(QtWebUndoCommand::~QtWebUndoCommand):
(QtWebUndoCommand::redo):
(QtWebUndoCommand::undo):
* UIProcess/qt/QtWebUndoCommand.h: Renamed from Source/WebKit2/UIProcess/qt/WebUndoCommandQt.h.
(QtWebUndoCommand::inUndoRedo):
* UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
(WebKit::TiledDrawingAreaProxy::updateWebView):
* UIProcess/qt/WebContextMenuProxyQt.cpp:
(WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
(WebKit::WebContextMenuProxyQt::create):
* UIProcess/qt/WebContextMenuProxyQt.h:
* WebKit2.pro:
2011-10-19 Tomasz Morawski <t.morawski@samsung.com>
[EFL][WK2] Added missing dummy interpretKeyEvent function
https://bugs.webkit.org/show_bug.cgi?id=70311
Reviewed by Ryosuke Niwa.
Added missing dummy interpretKeyEvent function needed to compile WK2.
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::WebPage::interpretKeyEvent):
2011-10-18 Sam Weinig <sam@webkit.org>
Move uses of C SPI out of WKView.h and into WKViewPrivate.h
https://bugs.webkit.org/show_bug.cgi?id=70387
Reviewed by Dan Bernstein.
* UIProcess/API/mac/WKViewPrivate.h:
Move declarations here.
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateRemoteAccessibilityRegistration:]):
(-[WKView initWithFrame:]):
(-[WKView initWithFrame:contextRef:]):
(-[WKView _registerDraggedTypes]):
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView pageRef]):
(-[WKView canChangeFrameLayout:]):
(-[WKView printOperationWithPrintInfo:forFrame:]):
(-[WKView setFrame:andScrollBy:]):
Move definitions to private category.
* UIProcess/API/mac/PDFViewController.mm:
* UIProcess/mac/WKFullScreenWindowController.mm:
* UIProcess/mac/WebInspectorProxyMac.mm:
Update to include WKViewPrivate.h where necessary.
2011-10-18 Sam Weinig <sam@webkit.org>
Stop leaking internal names in WKView API header
https://bugs.webkit.org/show_bug.cgi?id=70380
Reviewed by Anders Carlsson.
Move _frameSizeUpdatesDisabledCount to WKViewData. Since we cannot change the size of
WKView due to the fragile Objective-C ABI, we must rename the existing variable unused. If
drop 32-bit support, we will be able to remove it.
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView disableFrameSizeUpdates]):
(-[WKView enableFrameSizeUpdates]):
(-[WKView frameSizeUpdatesDisabled]):
* WebKit2.xcodeproj/project.pbxproj:
2011-10-18 Alexey Proskuryakov <ap@apple.com>
Expose PDF information in hit test result
https://bugs.webkit.org/show_bug.cgi?id=70353
Reviewed by Sam Weinig.
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h:
(WebKit::WebHitTestResult::absolutePDFURL):
* UIProcess/API/C/WKHitTestResult.cpp:
(WKHitTestResultCopyAbsolutePDFURL):
* UIProcess/API/C/WKHitTestResult.h:
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
(WKBundleHitTestResultCopyAbsolutePDFURL):
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::absolutePDFURL):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mouseDidMoveOverElement):
Pass through PDF URL from hit testing to injected bundle client.
2011-10-18 Enrica Casucci <enrica@apple.com>
Crash in WebProcess at com.apple.AppKit: -[NSFilePromiseDragSource draggedImage:endedAt:operation:] + 101
https://bugs.webkit.org/show_bug.cgi?id=70340
<rdar://problem/9548174>
We have seen a number of crash reports for this issue that seem to occurr when
the user drags an image from a web page onto the desktop.
We have not been able to reproduce this crash, therefore this is a speculative fix,
but the theory is that the dragging source has been already released when draggedImage
is called.
This patch attempts a fix for the problem by retaining the dragging source when
NSFilePromiseDragSource is created.
Reviewed by Darin Adler.
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(-[WKPasteboardFilePromiseOwner initWithSource:]):
(-[WKPasteboardFilePromiseOwner dealloc]):
2011-10-18 Alexey Proskuryakov <ap@apple.com>
[WK2] Crash after storing credentials in Keychain
https://bugs.webkit.org/show_bug.cgi?id=70376
<rdar://problem/9647503>
Reviewed by Dan Bernstein.
* Shared/mac/SecKeychainItemResponseData.cpp:
(WebKit::SecKeychainItemResponseData::encode):
(WebKit::SecKeychainItemResponseData::decode):
Actually send keychain item over, too. In shimSecKeychainItemCreateFromContent(), we are
going to use it to override SecKeychainItemCreateFromContent(), and we cannot return noErr
from this function without returning a non-null keychain item.
2011-10-18 Damian Kaleta <dkaleta@apple.com>
This revised fix doesn't break SL build.
https://bugs.webkit.org/show_bug.cgi?id=70345
Reviewed and landed by Sam Weinig.
* UIProcess/API/mac/WKView.mm:
(+[WKView hideWordDefinitionWindow]): Hides the definition window.
* UIProcess/API/mac/WKViewPrivate.h:
2011-10-18 Sam Weinig <sam@webkit.org>
Move spellCheckerDocumentTag and handleCorrectionPanelResult from WKViewPrivate to WKViewInternal
https://bugs.webkit.org/show_bug.cgi?id=70377
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView spellCheckerDocumentTag]):
(-[WKView handleCorrectionPanelResult:]):
Move definition of methods to (Internal) area.
* UIProcess/API/mac/WKViewInternal.h:
Add methods.
* UIProcess/API/mac/WKViewPrivate.h:
Remove methods.
* UIProcess/cf/WebBackForwardListCF.cpp:
Add missing newline.
* UIProcess/mac/CorrectionPanel.mm:
Change #include to WKViewInternal.h
* WebKit2.xcodeproj/project.pbxproj:
Sort some files.
2011-10-18 Sam Weinig <sam@webkit.org>
Move WKView helper files into a sub-group
https://bugs.webkit.org/show_bug.cgi?id=70375
Reviewed by Darin Adler.
* WebKit2.xcodeproj/project.pbxproj:
Move some files around.
2011-10-18 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r97788.
http://trac.webkit.org/changeset/97788
https://bugs.webkit.org/show_bug.cgi?id=70366
broke compile (Requested by inferno-sec on #webkit).
* UIProcess/API/mac/WKView.mm:
* UIProcess/API/mac/WKViewPrivate.h:
2011-10-18 Damian Kaleta <dkaleta@apple.com>
Add WebKit API to hide the definition window
https://bugs.webkit.org/show_bug.cgi?id=70345
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView hideWordDefinitionWindow]): Hides the definition window.
* UIProcess/API/mac/WKViewPrivate.h:
2011-10-18 Adam Barth <abarth@webkit.org>
Always enable ENABLE(XPATH)
https://bugs.webkit.org/show_bug.cgi?id=70217
Reviewed by Eric Seidel.
* Configurations/FeatureDefines.xcconfig:
2011-10-18 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Merge QML plugin for WebKit2 with the original WebKit1 plugin
We don't need a separate plugin, as we no longer expose the WK2
APIs under QtWebKit.experimental, but now use QtWebKit. The version
was also changed to 3.0 instead of 5.0, as the original plugin was
versioned 1.0, and bumping to 3.0 fits the scheme used by QtWebKit releases.
Reviewed by Andreas Kling.
* UIProcess/API/qt/qmlplugin/plugin.cpp: Removed.
* UIProcess/API/qt/qmlplugin/qmldir: Removed.
* UIProcess/API/qt/qmlplugin/qmlplugin.pro: Removed.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadFail.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml:
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml:
2011-10-18 Dinu Jacob <dinu.jacob@nokia.com>
[Qt][WK2] ASSERT when displaying context menu in input field
https://bugs.webkit.org/show_bug.cgi?id=69859
Reviewed by Simon Hausmann.
When creating a submenu in the context menu, the submenu of type
QWidget is statically cast to QObject before calling setParent on
it. QObject::setParent asserts if the object is a QWidget. So, call
setParent of QWidget itself.
* UIProcess/qt/WebContextMenuProxyQt.cpp:
(WebKit::WebContextMenuProxyQt::createContextMenu):
2011-10-18 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Fix linkHoveredDoesntEmitRepeated test in the bot
https://bugs.webkit.org/show_bug.cgi?id=70329
Reviewed by Andreas Kling.
Use LoadSpy::wait() instead of the TestCase::tryCompare(). They should be equivalent,
but I'm getting strange results with tryCompare(). This commit also adds an extra check
to make sure the hovered link is the correct one.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml:
2011-10-18 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] Some QML tests were accidentally committed.
https://bugs.webkit.org/show_bug.cgi?id=70321
Reviewed by Andreas Kling.
These tests were committed by accident. They should not be there.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml:
2011-10-18 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Send mouse move events when we handle HoverEnter/Leave in QDesktopWebView
https://bugs.webkit.org/show_bug.cgi?id=70297
Reviewed by Simon Hausmann.
Qt treat the first and last hover movements as special HoverMove and HoverLeave events, but
WebKit doesn't make the difference, so we need to create move events for them.
While HoverEnter is in practice equivalent to HoverMove, the HoverLeave event is a bit
different because we want to emulate that the mouse is not only leaving the current node, but
completely leaving the whole document. The way to do this is to manufacture a move event with
a very far position, and was inspired by WebView::handleMouseEvent() in
Source/WebKit/win/WebView.cpp.
This patch fixes DesktopWebViewLinkHovered QML tests.
* UIProcess/qt/qdesktopwebpageproxy.cpp:
(QDesktopWebPageProxy::handleEvent):
(QDesktopWebPageProxy::handleHoverLeaveEvent):
* UIProcess/qt/qdesktopwebpageproxy.h:
2011-10-18 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] WebPreferences are impossible to use in QML.
https://bugs.webkit.org/show_bug.cgi?id=70141
Reviewed by Kenneth Rohde Christiansen.
Make it possible to use qwkpreferences in QML. Renamed it
to follow our new style regarding class names. This class is
now a QObject that is exposed as a property of the view.
The tests give an idea of the usage.
* UIProcess/API/qt/WKView.h:
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebView::preferences):
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qmlplugin/plugin.cpp:
(WebKit2QmlPlugin::registerTypes):
* UIProcess/API/qt/qtouchwebpage.cpp:
(QTouchWebPage::preferences):
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qwebpreferences.cpp: Added.
(QWebPreferencesPrivate::createPreferences):
(QWebPreferencesPrivate::testAttribute):
(QWebPreferencesPrivate::setAttribute):
(QWebPreferencesPrivate::setFontFamily):
(QWebPreferencesPrivate::fontFamily):
(QWebPreferencesPrivate::setFontSize):
(QWebPreferencesPrivate::fontSize):
(QWebPreferences::QWebPreferences):
(QWebPreferences::~QWebPreferences):
(QWebPreferences::autoLoadImages):
(QWebPreferences::setAutoLoadImages):
(QWebPreferences::javascriptEnabled):
(QWebPreferences::setJavascriptEnabled):
(QWebPreferences::pluginsEnabled):
(QWebPreferences::setPluginsEnabled):
(QWebPreferences::offlineWebApplicationCacheEnabled):
(QWebPreferences::setOfflineWebApplicationCacheEnabled):
(QWebPreferences::localStorageEnabled):
(QWebPreferences::setLocalStorageEnabled):
(QWebPreferences::XSSAuditingEnabled):
(QWebPreferences::setXSSAuditingEnabled):
(QWebPreferences::privateBrowsingEnabled):
(QWebPreferences::setPrivateBrowsingEnabled):
(QWebPreferences::dnsPrefetchEnabled):
(QWebPreferences::setDnsPrefetchEnabled):
(QWebPreferences::standardFontFamily):
(QWebPreferences::setStandardFontFamily):
(QWebPreferences::fixedFontFamily):
(QWebPreferences::setFixedFontFamily):
(QWebPreferences::serifFontFamily):
(QWebPreferences::setSerifFontFamily):
(QWebPreferences::sansSerifFontFamily):
(QWebPreferences::setSansSerifFontFamily):
(QWebPreferences::cursiveFontFamily):
(QWebPreferences::setCursiveFontFamily):
(QWebPreferences::fantasyFontFamily):
(QWebPreferences::setFantasyFontFamily):
(QWebPreferences::minimumFontSize):
(QWebPreferences::setMinimumFontSize):
(QWebPreferences::defaultFontSize):
(QWebPreferences::setDefaultFontSize):
(QWebPreferences::defaultFixedFontSize):
(QWebPreferences::setDefaultFixedFontSize):
* UIProcess/API/qt/qwebpreferences.h: Added.
* UIProcess/API/qt/qwebpreferences_p.h: Added.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/javascript.html: Added.
* UIProcess/API/qt/tests/qmltests/common/localStorage.html: Added.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::preferences):
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/qt/qwkpreferences.cpp: Removed.
* UIProcess/qt/qwkpreferences.h: Removed.
* UIProcess/qt/qwkpreferences_p.h: Removed.
* WebKit2.pro:
* WebKit2API.pri:
2011-10-18 Tomasz Morawski <t.morawski@samsung.com>
[EFL][WK2] Fix compilation error by include WebErrors.h file.
https://bugs.webkit.org/show_bug.cgi?id=70309
Unreviewed build fix
Added a header file to fix compilation error.
* WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
2011-10-18 Adenilson Cavalcanti <adenilson.silva@openbossa.org>
[Qt][WK2] Implement geolocation provider for qt port
https://bugs.webkit.org/show_bug.cgi?id=59199
Reviewed by Simon Hausmann.
Based on patch by Kenneth Christiansen <kenneth.r.christiansen@nokia.com>
Implements default location provider for WK2 QtWebKit (WebGeolocationProviderQt),
allowing QtWebKit clients to implement or override their own provider using WK2 APIs.
* UIProcess/API/C/WKGeolocationManager.h:
* UIProcess/qt/WebContextQt.cpp:
(WebKit::WebContext::platformInitializeWebProcess):
* UIProcess/qt/WebGeolocationProviderQt.cpp: Added.
(toLocationProvider):
(locationStartUpdating):
(locationStopUpdating):
(WebGeolocationProviderQt::create):
(WebGeolocationProviderQt::provider):
(WebGeolocationProviderQt::WebGeolocationProviderQt):
(WebGeolocationProviderQt::~WebGeolocationProviderQt):
(WebGeolocationProviderQt::updateTimeout):
(WebGeolocationProviderQt::positionUpdated):
(WebGeolocationProviderQt::startUpdating):
(WebGeolocationProviderQt::stopUpdating):
* UIProcess/qt/WebGeolocationProviderQt.h: Added.
* WebKit2.pro:
2011-10-18 Carlos Garcia Campos <cgarcia@igalia.com>
[UNIX] Use SOCK_SEQPACKET when available
https://bugs.webkit.org/show_bug.cgi?id=61287
Reviewed by Darin Adler.
Sockets of type SEQPACKET are actually DGRAM sockets but that
notifies the other end when the connection is closed. When
SEQPACKET sockets are not available GTK+ port uses STREAM sockets
while Qt port uses DGRAM sockets.
* PluginProcess/PluginProcess.cpp: Use SOCK_SEQPACKET if possible.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess): Ditto.
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncher::launchProcess): Ditto.
2011-10-17 Jon Lee <jonlee@apple.com>
Filtering of URLs when serializing back forward list saves bad current index value
https://bugs.webkit.org/show_bug.cgi?id=70282
<rdar://problem/10057763>
Reviewed by Sam Weinig.
When reading the serialized b-f list, perform a sanity check on the current index.
If it is invalid, we set it to NoCurrentItemIndex to prevent further corruption of
the list.
When serializing the b-f list, currentIndex can be negative in the case where the list
has one item only, and that item gets filtered out. In this instance currentIndex should
just be -1. A crashing case showed an index that was more negative, a situation that I
could not replicate. Since this value will get cleaned up when the b-f list is restored,
I just strengthened the assertion to check for a more negative index in case we run into it again.
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation): Update the assertion
in case we go beyond NoCurrentItemIndex (which, as an int, is -1).
(WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
2011-10-14 Chris Marrin <cmarrin@apple.com>
Throttle rate of requestAnimationFrame when page is not visible
https://bugs.webkit.org/show_bug.cgi?id=67873
Reviewed by Anders Carlsson.
Plumb through notification when the window is hidden/shown or
minimized/unminimized
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::suspendPainting):
(WebKit::DrawingAreaImpl::resumePainting):
2011-10-17 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Synchronize tiling with accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=69151
Reviewed by Simon Hausmann.
Make the tiled "non-composited" content and the composited layers go through the same
code path on WebKit2. Instead of having a "drawing area" that handles the non-composited
content and a seperate layer tree, we put everything in a layer tree, with the non-
composited content being a layer in the tree.
This allows fixing several issues with websites that have large content areas that are
composited or overlap with composited layers.
Layer-tree synchronization is done by passing WebKit2 messages between a LayerTreeHost
on the WebProcess and a LayerTreeHostProxy on the UI process. Every layer in the tree has
its own tiled backing store, and uses the LayerTreeHost communication channel to pass
content up to the UI process. The UI process will later creates its own GraphicsLayer tree,
based on TextureMapper, which can be painted directly with OpenGL.
Several optimizations are available for the non-composited layer as well, e.g. specifying
a trajectory and updating the visible rect together with the content scale.
This code is currently disabled, a separate patch will enable it and glue it to
QTouchWebPage.
* DerivedSources.pro:
* Platform/CoreIPC/MessageID.h:
* Scripts/webkit2/messages.py:
* Shared/LayerTreeContext.h:
* Shared/WebLayerTreeInfo.cpp:
(WebKit::WebLayerInfo::encode):
(WebKit::WebLayerInfo::decode):
* Shared/WebLayerTreeInfo.h:
* Shared/qt/LayerTreeContextQt.cpp:
(WebKit::LayerTreeContext::LayerTreeContext):
(WebKit::LayerTreeContext::~LayerTreeContext):
(WebKit::LayerTreeContext::encode):
(WebKit::LayerTreeContext::decode):
(WebKit::LayerTreeContext::isEmpty):
(WebKit::operator==):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::updateWebView):
(WebKit::DrawingAreaProxy::contentsRect):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::viewportVisibleRect):
(WebKit::DrawingAreaProxy::isBackingStoreReady):
(WebKit::DrawingAreaProxy::paintToCurrentGLContext):
(WebKit::DrawingAreaProxy::setVisibleContentsRectAndScale):
(WebKit::DrawingAreaProxy::setVisibleContentRectTrajectoryVector):
(WebKit::DrawingAreaProxy::createTileForLayer):
(WebKit::DrawingAreaProxy::updateTileForLayer):
(WebKit::DrawingAreaProxy::removeTileForLayer):
(WebKit::DrawingAreaProxy::didReceiveLayerTreeHostProxyMessage):
(WebKit::DrawingAreaProxy::page):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::didReceiveLayerTreeHostProxyMessage):
(WebKit::DrawingAreaProxyImpl::setVisibleContentsRectAndScale):
(WebKit::DrawingAreaProxyImpl::setVisibleContentRectTrajectoryVector):
(WebKit::DrawingAreaProxyImpl::paintToCurrentGLContext):
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/LayerTreeHostProxy.h: Added.
(WebKit::LayerTreeHostProxy::layerByID):
(WebKit::LayerTreeHostProxy::rootLayer):
(WebKit::LayerTreeHostProxy::notifyAnimationStarted):
(WebKit::LayerTreeHostProxy::notifySyncRequired):
(WebKit::LayerTreeHostProxy::showDebugBorders):
(WebKit::LayerTreeHostProxy::showRepaintCounter):
(WebKit::LayerTreeHostProxy::paintContents):
* UIProcess/LayerTreeHostProxy.messages.in: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
* UIProcess/qt/LayerTreeHostProxyQt.cpp: Added.
* WebKit2.pro:
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
(WebCore::WebGraphicsLayer::~WebGraphicsLayer):
(WebCore::WebGraphicsLayer::setChildren):
(WebCore::WebGraphicsLayer::addChild):
(WebCore::WebGraphicsLayer::addChildAtIndex):
(WebCore::WebGraphicsLayer::addChildAbove):
(WebCore::WebGraphicsLayer::addChildBelow):
(WebCore::WebGraphicsLayer::replaceChild):
(WebCore::WebGraphicsLayer::removeFromParent):
(WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
(WebCore::WebGraphicsLayer::setContentsToImage):
(WebCore::WebGraphicsLayer::setNeedsDisplay):
(WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
(WebCore::WebGraphicsLayer::syncCompositingState):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::tiledBackingStorePaintBegin):
(WebCore::WebGraphicsLayer::setContentsScale):
(WebCore::WebGraphicsLayer::setRootLayer):
(WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
(WebCore::WebGraphicsLayer::setVisibleContentRect):
(WebCore::WebGraphicsLayer::tiledBackingStorePaint):
(WebCore::WebGraphicsLayer::tiledBackingStorePaintEnd):
(WebCore::WebGraphicsLayer::tiledBackingStoreUpdatesAllowed):
(WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
(WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
(WebCore::WebGraphicsLayer::tiledBackingStoreBackgroundColor):
(WebCore::WebGraphicsLayer::createTile):
(WebCore::WebGraphicsLayer::updateTile):
(WebCore::WebGraphicsLayer::removeTile):
(WebCore::WebGraphicsLayer::updateTileBuffersRecursively):
(WebCore::WebGraphicsLayer::layerTreeTileClient):
(WebCore::WebGraphicsLayer::updateContentBuffers):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebCore::WebGraphicsLayer::setLayerTreeTileClient):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::didReceiveLayerTreeHostMessage):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::setVisibleContentRectAndScale):
(WebKit::LayerTreeHost::setVisibleContentRectTrajectoryVector):
(WebKit::LayerTreeHost::setVisibleContentRectForLayer):
(WebKit::LayerTreeHost::renderNextFrame):
* WebProcess/WebPage/LayerTreeHost.messages.in: Added.
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::didReceiveLayerTreeHostMessage):
* WebProcess/WebPage/TiledDrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage):
* 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::didSyncCompositingStateForLayer):
(WebKit::LayerTreeHostQt::didDeleteLayer):
(WebKit::LayerTreeHostQt::performScheduledLayerFlush):
(WebKit::LayerTreeHostQt::layerFlushTimerFired):
(WebKit::LayerTreeHostQt::createPageOverlayLayer):
(WebKit::LayerTreeHostQt::destroyPageOverlayLayer):
(WebKit::LayerTreeHostQt::adoptImageBackingStore):
(WebKit::LayerTreeHostQt::releaseImageBackingStore):
(WebKit::LayerTreeHostQt::notifyAnimationStarted):
(WebKit::LayerTreeHostQt::notifySyncRequired):
(WebKit::LayerTreeHostQt::paintContents):
(WebKit::LayerTreeHostQt::showDebugBorders):
(WebKit::LayerTreeHostQt::showRepaintCounter):
(WebKit::LayerTreeHost::supportsAcceleratedCompositing):
(WebKit::LayerTreeHostQt::createTile):
(WebKit::LayerTreeHostQt::updateTile):
(WebKit::LayerTreeHostQt::removeTile):
(WebKit::LayerTreeHostQt::setVisibleContentRectForLayer):
(WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
(WebKit::LayerTreeHostQt::setVisibleContentRectTrajectoryVector):
(WebKit::LayerTreeHostQt::renderNextFrame):
(WebKit::LayerTreeHostQt::layerTreeTileUpdatesAllowed):
+
2011-10-17 Ada Chan <adachan@apple.com>
Calling WKPageLoadAlternateHTMLString() where baseURL does not point to a directory causes an invalid message to be returned from WebProcess
https://bugs.webkit.org/show_bug.cgi?id=70168
Reviewed by Alexey Proskuryakov.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::assumeReadAccessToBaseURL): Add the file path of url's base URL to m_localPathsWithAssumedReadAccess,
since url may not point to a directory.
2011-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add methods to get/set a custom text enconding to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=69524
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_get_custom_charset):
(webkit_web_view_set_custom_charset):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewCustomCharset):
(beforeAll):
2011-10-14 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Implement decidePolicyForResponse in our PolicyClient
https://bugs.webkit.org/show_bug.cgi?id=69832
Reviewed by Kenneth Rohde Christiansen.
We implement decidePolicyForResponse in our PolicyClient in order to
decide whether a given ResourceResponse should be downloaded or loaded.
* Shared/qt/WebCoreArgumentCodersQt.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
Implement serialization of ResourceResponse.
* UIProcess/qt/ClientImpl.cpp:
(qt_wk_decidePolicyForResponse):
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::init):
2011-10-17 Nayan Kumar K <nayankk@motorola.com>
[WebKit2][gtk] Rename WEBKIT_POLICY_ERROR_CANNOT_SHOW_URL to WEBKIT_POLICY_ERROR_CANNOT_SHOW_URI
https://bugs.webkit.org/show_bug.cgi?id=70040
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitError.cpp:
* UIProcess/API/gtk/WebKitError.h:
2011-10-16 Adam Barth <abarth@webkit.org>
Always enable ENABLE(DOM_STORAGE)
https://bugs.webkit.org/show_bug.cgi?id=70189
Reviewed by Eric Seidel.
* Configurations/FeatureDefines.xcconfig:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
2011-10-15 Adam Barth <abarth@webkit.org>
Rename ENABLE(TILED_BACKING_STORE) to USE(TILED_BACKING_STORE)
https://bugs.webkit.org/show_bug.cgi?id=70194
Reviewed by Daniel Bates.
* Shared/DrawingAreaInfo.h:
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxy.messages.in:
* UIProcess/PageClient.h:
* UIProcess/TiledDrawingAreaProxy.cpp:
* UIProcess/TiledDrawingAreaProxy.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
* WebProcess/WebPage/TiledBackingStoreRemoteTile.h:
* WebProcess/WebPage/TiledDrawingArea.cpp:
* WebProcess/WebPage/TiledDrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSize):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-10-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r97559.
http://trac.webkit.org/changeset/97559
https://bugs.webkit.org/show_bug.cgi?id=70176
Broke build on Mac (Requested by noamr_ on #webkit).
* DerivedSources.pro:
* Platform/CoreIPC/MessageID.h:
* Scripts/webkit2/messages.py:
* Shared/LayerTreeContext.h:
* Shared/WebLayerTreeInfo.cpp:
(WebKit::WebLayerInfo::encode):
(WebKit::WebLayerInfo::decode):
* Shared/WebLayerTreeInfo.h:
* Shared/qt/LayerTreeContextQt.cpp:
(WebKit::LayerTreeContext::LayerTreeContext):
(WebKit::LayerTreeContext::~LayerTreeContext):
(WebKit::LayerTreeContext::encode):
(WebKit::LayerTreeContext::decode):
(WebKit::LayerTreeContext::isEmpty):
(WebKit::operator==):
* UIProcess/DrawingAreaProxy.cpp:
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/LayerTreeHostProxy.h: Removed.
* UIProcess/LayerTreeHostProxy.messages.in: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
* UIProcess/qt/LayerTreeHostProxyQt.cpp: Removed.
* WebKit2.pro:
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::deletedLayerIDs):
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
(WebCore::WebGraphicsLayer::~WebGraphicsLayer):
(WebCore::WebGraphicsLayer::setChildren):
(WebCore::WebGraphicsLayer::addChild):
(WebCore::WebGraphicsLayer::addChildAtIndex):
(WebCore::WebGraphicsLayer::addChildAbove):
(WebCore::WebGraphicsLayer::addChildBelow):
(WebCore::WebGraphicsLayer::replaceChild):
(WebCore::WebGraphicsLayer::removeFromParent):
(WebCore::WebGraphicsLayer::setContentsRect):
(WebCore::WebGraphicsLayer::setContentsToImage):
(WebCore::WebGraphicsLayer::setNeedsDisplay):
(WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
(WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
(WebCore::WebGraphicsLayer::didSynchronize):
(WebCore::WebGraphicsLayer::layerInfo):
(WebCore::WebGraphicsLayer::syncCompositingState):
(WebCore::WebGraphicsLayer::needsDisplayRect):
(WebCore::WebGraphicsLayer::takeLayersToDelete):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::divideIntoTiles):
(WebCore::collectCompositingInfoForThisLayer):
(WebCore::collectCompositingInfoRecursively):
(WebCore::WebGraphicsLayer::sendLayersToUIProcess):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/LayerTreeHost.messages.in: Removed.
* WebProcess/WebPage/TiledDrawingArea.cpp:
* WebProcess/WebPage/TiledDrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
* WebProcess/WebPage/qt/LayerTreeHostQt.h: Removed.
2011-10-15 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Synchronize tiling with accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=69151
Reviewed by Simon Hausmann.
Make the tiled "non-composited" content and the composited layers go through the same
code path on WebKit2. Instead of having a "drawing area" that handles the non-composited
content and a seperate layer tree, we put everything in a layer tree, with the non-
composited content being a layer in the tree.
This allows fixing several issues with websites that have large content areas that are
composited or overlap with composited layers.
Layer-tree synchronization is done by passing WebKit2 messages between a LayerTreeHost
on the WebProcess and a LayerTreeHostProxy on the UI process. Every layer in the tree has
its own tiled backing store, and uses the LayerTreeHost communication channel to pass
content up to the UI process. The UI process will later creates its own GraphicsLayer tree,
based on TextureMapper, which can be painted directly with OpenGL.
Several optimizations are available for the non-composited layer as well, e.g. specifying
a trajectory and updating the visible rect together with the content scale.
This code is currently disabled, a separate patch will enable it and glue it to
QTouchWebPage.
* DerivedSources.pro:
* Platform/CoreIPC/MessageID.h:
* Scripts/webkit2/messages.py:
* Shared/LayerTreeContext.h:
* Shared/WebLayerTreeInfo.cpp:
(WebKit::WebLayerInfo::encode):
(WebKit::WebLayerInfo::decode):
* Shared/WebLayerTreeInfo.h:
* Shared/qt/LayerTreeContextQt.cpp:
(WebKit::LayerTreeContext::LayerTreeContext):
(WebKit::LayerTreeContext::~LayerTreeContext):
(WebKit::LayerTreeContext::encode):
(WebKit::LayerTreeContext::decode):
(WebKit::LayerTreeContext::isEmpty):
(WebKit::operator==):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::updateWebView):
(WebKit::DrawingAreaProxy::contentsRect):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::viewportVisibleRect):
(WebKit::DrawingAreaProxy::isBackingStoreReady):
(WebKit::DrawingAreaProxy::paintToCurrentGLContext):
(WebKit::DrawingAreaProxy::setVisibleContentsRectAndScale):
(WebKit::DrawingAreaProxy::setVisibleContentRectTrajectoryVector):
(WebKit::DrawingAreaProxy::createTileForLayer):
(WebKit::DrawingAreaProxy::updateTileForLayer):
(WebKit::DrawingAreaProxy::removeTileForLayer):
(WebKit::DrawingAreaProxy::didReceiveLayerTreeHostProxyMessage):
(WebKit::DrawingAreaProxy::page):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::didReceiveLayerTreeHostProxyMessage):
(WebKit::DrawingAreaProxyImpl::setVisibleContentsRectAndScale):
(WebKit::DrawingAreaProxyImpl::setVisibleContentRectTrajectoryVector):
(WebKit::DrawingAreaProxyImpl::paintToCurrentGLContext):
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/LayerTreeHostProxy.h: Added.
(WebKit::LayerTreeHostProxy::layerByID):
(WebKit::LayerTreeHostProxy::rootLayer):
(WebKit::LayerTreeHostProxy::notifyAnimationStarted):
(WebKit::LayerTreeHostProxy::notifySyncRequired):
(WebKit::LayerTreeHostProxy::showDebugBorders):
(WebKit::LayerTreeHostProxy::showRepaintCounter):
(WebKit::LayerTreeHostProxy::paintContents):
* UIProcess/LayerTreeHostProxy.messages.in: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
* UIProcess/qt/LayerTreeHostProxyQt.cpp: Added.
* WebKit2.pro:
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
(WebCore::WebGraphicsLayer::~WebGraphicsLayer):
(WebCore::WebGraphicsLayer::setChildren):
(WebCore::WebGraphicsLayer::addChild):
(WebCore::WebGraphicsLayer::addChildAtIndex):
(WebCore::WebGraphicsLayer::addChildAbove):
(WebCore::WebGraphicsLayer::addChildBelow):
(WebCore::WebGraphicsLayer::replaceChild):
(WebCore::WebGraphicsLayer::removeFromParent):
(WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
(WebCore::WebGraphicsLayer::setContentsToImage):
(WebCore::WebGraphicsLayer::setNeedsDisplay):
(WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
(WebCore::WebGraphicsLayer::syncCompositingState):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::tiledBackingStorePaintBegin):
(WebCore::WebGraphicsLayer::setContentsScale):
(WebCore::WebGraphicsLayer::setRootLayer):
(WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
(WebCore::WebGraphicsLayer::setVisibleContentRect):
(WebCore::WebGraphicsLayer::tiledBackingStorePaint):
(WebCore::WebGraphicsLayer::tiledBackingStorePaintEnd):
(WebCore::WebGraphicsLayer::tiledBackingStoreUpdatesAllowed):
(WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
(WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
(WebCore::WebGraphicsLayer::tiledBackingStoreBackgroundColor):
(WebCore::WebGraphicsLayer::createTile):
(WebCore::WebGraphicsLayer::updateTile):
(WebCore::WebGraphicsLayer::removeTile):
(WebCore::WebGraphicsLayer::updateTileBuffersRecursively):
(WebCore::WebGraphicsLayer::layerTreeTileClient):
(WebCore::WebGraphicsLayer::updateContentBuffers):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebCore::WebGraphicsLayer::setLayerTreeTileClient):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::didReceiveLayerTreeHostMessage):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::setVisibleContentRectAndScale):
(WebKit::LayerTreeHost::setVisibleContentRectTrajectoryVector):
(WebKit::LayerTreeHost::setVisibleContentRectForLayer):
(WebKit::LayerTreeHost::renderNextFrame):
* WebProcess/WebPage/LayerTreeHost.messages.in: Added.
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::didReceiveLayerTreeHostMessage):
* WebProcess/WebPage/TiledDrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage):
* 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::didSyncCompositingStateForLayer):
(WebKit::LayerTreeHostQt::didDeleteLayer):
(WebKit::LayerTreeHostQt::performScheduledLayerFlush):
(WebKit::LayerTreeHostQt::layerFlushTimerFired):
(WebKit::LayerTreeHostQt::createPageOverlayLayer):
(WebKit::LayerTreeHostQt::destroyPageOverlayLayer):
(WebKit::LayerTreeHostQt::adoptImageBackingStore):
(WebKit::LayerTreeHostQt::releaseImageBackingStore):
(WebKit::LayerTreeHostQt::notifyAnimationStarted):
(WebKit::LayerTreeHostQt::notifySyncRequired):
(WebKit::LayerTreeHostQt::paintContents):
(WebKit::LayerTreeHostQt::showDebugBorders):
(WebKit::LayerTreeHostQt::showRepaintCounter):
(WebKit::LayerTreeHost::supportsAcceleratedCompositing):
(WebKit::LayerTreeHostQt::createTile):
(WebKit::LayerTreeHostQt::updateTile):
(WebKit::LayerTreeHostQt::removeTile):
(WebKit::LayerTreeHostQt::setVisibleContentRectForLayer):
(WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
(WebKit::LayerTreeHostQt::setVisibleContentRectTrajectoryVector):
(WebKit::LayerTreeHostQt::renderNextFrame):
(WebKit::LayerTreeHostQt::layerTreeTileUpdatesAllowed):
2011-10-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r97549.
http://trac.webkit.org/changeset/97549
https://bugs.webkit.org/show_bug.cgi?id=70174
It broke the SL build (Requested by Ossy_weekend on #webkit).
* DerivedSources.pro:
* Platform/CoreIPC/MessageID.h:
* Scripts/webkit2/messages.py:
* Shared/LayerTreeContext.h:
* Shared/WebLayerTreeInfo.cpp:
(WebKit::WebLayerInfo::encode):
(WebKit::WebLayerInfo::decode):
* Shared/WebLayerTreeInfo.h:
* Shared/qt/LayerTreeContextQt.cpp:
(WebKit::LayerTreeContext::LayerTreeContext):
(WebKit::LayerTreeContext::~LayerTreeContext):
(WebKit::LayerTreeContext::encode):
(WebKit::LayerTreeContext::decode):
(WebKit::LayerTreeContext::isEmpty):
(WebKit::operator==):
* UIProcess/DrawingAreaProxy.cpp:
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/LayerTreeHostProxy.h: Removed.
* UIProcess/LayerTreeHostProxy.messages.in: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
* UIProcess/qt/LayerTreeHostProxyQt.cpp: Removed.
* WebKit2.pro:
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::deletedLayerIDs):
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
(WebCore::WebGraphicsLayer::~WebGraphicsLayer):
(WebCore::WebGraphicsLayer::setChildren):
(WebCore::WebGraphicsLayer::addChild):
(WebCore::WebGraphicsLayer::addChildAtIndex):
(WebCore::WebGraphicsLayer::addChildAbove):
(WebCore::WebGraphicsLayer::addChildBelow):
(WebCore::WebGraphicsLayer::replaceChild):
(WebCore::WebGraphicsLayer::removeFromParent):
(WebCore::WebGraphicsLayer::setContentsRect):
(WebCore::WebGraphicsLayer::setContentsToImage):
(WebCore::WebGraphicsLayer::setNeedsDisplay):
(WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
(WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
(WebCore::WebGraphicsLayer::didSynchronize):
(WebCore::WebGraphicsLayer::layerInfo):
(WebCore::WebGraphicsLayer::syncCompositingState):
(WebCore::WebGraphicsLayer::needsDisplayRect):
(WebCore::WebGraphicsLayer::takeLayersToDelete):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::divideIntoTiles):
(WebCore::collectCompositingInfoForThisLayer):
(WebCore::collectCompositingInfoRecursively):
(WebCore::WebGraphicsLayer::sendLayersToUIProcess):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/LayerTreeHost.messages.in: Removed.
* WebProcess/WebPage/TiledDrawingArea.cpp:
* WebProcess/WebPage/TiledDrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage):
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
* WebProcess/WebPage/qt/LayerTreeHostQt.h: Removed.
2011-10-15 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Synchronize tiling with accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=69151
Reviewed by Simon Hausmann.
Make the tiled "non-composited" content and the composited layers go through the same
code path on WebKit2. Instead of having a "drawing area" that handles the non-composited
content and a seperate layer tree, we put everything in a layer tree, with the non-
composited content being a layer in the tree.
This allows fixing several issues with websites that have large content areas that are
composited or overlap with composited layers.
Layer-tree synchronization is done by passing WebKit2 messages between a LayerTreeHost
on the WebProcess and a LayerTreeHostProxy on the UI process. Every layer in the tree has
its own tiled backing store, and uses the LayerTreeHost communication channel to pass
content up to the UI process. The UI process will later creates its own GraphicsLayer tree,
based on TextureMapper, which can be painted directly with OpenGL.
Several optimizations are available for the non-composited layer as well, e.g. specifying
a trajectory and updating the visible rect together with the content scale.
This code is currently disabled, a separate patch will enable it and glue it to
QTouchWebPage.
* DerivedSources.pro:
* Platform/CoreIPC/MessageID.h:
* Scripts/webkit2/messages.py:
* Shared/LayerTreeContext.h:
* Shared/WebLayerTreeInfo.cpp:
(WebKit::WebLayerInfo::encode):
(WebKit::WebLayerInfo::decode):
* Shared/WebLayerTreeInfo.h:
* Shared/qt/LayerTreeContextQt.cpp:
(WebKit::LayerTreeContext::LayerTreeContext):
(WebKit::LayerTreeContext::~LayerTreeContext):
(WebKit::LayerTreeContext::encode):
(WebKit::LayerTreeContext::decode):
(WebKit::LayerTreeContext::isEmpty):
(WebKit::operator==):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::updateWebView):
(WebKit::DrawingAreaProxy::contentsRect):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::viewportVisibleRect):
(WebKit::DrawingAreaProxy::isBackingStoreReady):
(WebKit::DrawingAreaProxy::paintToCurrentGLContext):
(WebKit::DrawingAreaProxy::setVisibleContentsRectAndScale):
(WebKit::DrawingAreaProxy::setVisibleContentRectTrajectoryVector):
(WebKit::DrawingAreaProxy::createTileForLayer):
(WebKit::DrawingAreaProxy::updateTileForLayer):
(WebKit::DrawingAreaProxy::removeTileForLayer):
(WebKit::DrawingAreaProxy::didReceiveLayerTreeHostProxyMessage):
(WebKit::DrawingAreaProxy::page):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::didReceiveLayerTreeHostProxyMessage):
(WebKit::DrawingAreaProxyImpl::setVisibleContentsRectAndScale):
(WebKit::DrawingAreaProxyImpl::setVisibleContentRectTrajectoryVector):
(WebKit::DrawingAreaProxyImpl::paintToCurrentGLContext):
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/LayerTreeHostProxy.h: Added.
(WebKit::LayerTreeHostProxy::layerByID):
(WebKit::LayerTreeHostProxy::rootLayer):
(WebKit::LayerTreeHostProxy::notifyAnimationStarted):
(WebKit::LayerTreeHostProxy::notifySyncRequired):
(WebKit::LayerTreeHostProxy::showDebugBorders):
(WebKit::LayerTreeHostProxy::showRepaintCounter):
(WebKit::LayerTreeHostProxy::paintContents):
* UIProcess/LayerTreeHostProxy.messages.in: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
* UIProcess/qt/LayerTreeHostProxyQt.cpp: Added.
* WebKit2.pro:
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::WebGraphicsLayer):
(WebCore::WebGraphicsLayer::~WebGraphicsLayer):
(WebCore::WebGraphicsLayer::setChildren):
(WebCore::WebGraphicsLayer::addChild):
(WebCore::WebGraphicsLayer::addChildAtIndex):
(WebCore::WebGraphicsLayer::addChildAbove):
(WebCore::WebGraphicsLayer::addChildBelow):
(WebCore::WebGraphicsLayer::replaceChild):
(WebCore::WebGraphicsLayer::removeFromParent):
(WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
(WebCore::WebGraphicsLayer::setContentsToImage):
(WebCore::WebGraphicsLayer::setNeedsDisplay):
(WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
(WebCore::WebGraphicsLayer::syncCompositingState):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::tiledBackingStorePaintBegin):
(WebCore::WebGraphicsLayer::setContentsScale):
(WebCore::WebGraphicsLayer::setRootLayer):
(WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
(WebCore::WebGraphicsLayer::setVisibleContentRect):
(WebCore::WebGraphicsLayer::tiledBackingStorePaint):
(WebCore::WebGraphicsLayer::tiledBackingStorePaintEnd):
(WebCore::WebGraphicsLayer::tiledBackingStoreUpdatesAllowed):
(WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
(WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
(WebCore::WebGraphicsLayer::tiledBackingStoreBackgroundColor):
(WebCore::WebGraphicsLayer::createTile):
(WebCore::WebGraphicsLayer::updateTile):
(WebCore::WebGraphicsLayer::removeTile):
(WebCore::WebGraphicsLayer::updateTileBuffersRecursively):
(WebCore::WebGraphicsLayer::layerTreeTileClient):
(WebCore::WebGraphicsLayer::updateContentBuffers):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
(WebCore::WebGraphicsLayer::setLayerTreeTileClient):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::didReceiveLayerTreeHostMessage):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::setVisibleContentRectAndScale):
(WebKit::LayerTreeHost::setVisibleContentRectTrajectoryVector):
(WebKit::LayerTreeHost::setVisibleContentRectForLayer):
(WebKit::LayerTreeHost::renderNextFrame):
* WebProcess/WebPage/LayerTreeHost.messages.in: Added.
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::didReceiveLayerTreeHostMessage):
* WebProcess/WebPage/TiledDrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage):
* 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::didSyncCompositingStateForLayer):
(WebKit::LayerTreeHostQt::didDeleteLayer):
(WebKit::LayerTreeHostQt::performScheduledLayerFlush):
(WebKit::LayerTreeHostQt::layerFlushTimerFired):
(WebKit::LayerTreeHostQt::createPageOverlayLayer):
(WebKit::LayerTreeHostQt::destroyPageOverlayLayer):
(WebKit::LayerTreeHostQt::adoptImageBackingStore):
(WebKit::LayerTreeHostQt::releaseImageBackingStore):
(WebKit::LayerTreeHostQt::notifyAnimationStarted):
(WebKit::LayerTreeHostQt::notifySyncRequired):
(WebKit::LayerTreeHostQt::paintContents):
(WebKit::LayerTreeHostQt::showDebugBorders):
(WebKit::LayerTreeHostQt::showRepaintCounter):
(WebKit::LayerTreeHost::supportsAcceleratedCompositing):
(WebKit::LayerTreeHostQt::createTile):
(WebKit::LayerTreeHostQt::updateTile):
(WebKit::LayerTreeHostQt::removeTile):
(WebKit::LayerTreeHostQt::setVisibleContentRectForLayer):
(WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
(WebKit::LayerTreeHostQt::setVisibleContentRectTrajectoryVector):
(WebKit::LayerTreeHostQt::renderNextFrame):
(WebKit::LayerTreeHostQt::layerTreeTileUpdatesAllowed):
2011-10-14 Mark Hahnenberg <mhahnenberg@apple.com>
Rename getOwnPropertySlot to getOwnPropertySlotVirtual
https://bugs.webkit.org/show_bug.cgi?id=69810
Reviewed by Geoffrey Garen.
Renamed the virtual version of getOwnPropertySlot to getOwnPropertySlotVirtual
in preparation for when we add the static getOwnPropertySlot to the MethodTable
in ClassInfo.
Also added a few static getOwnPropertySlot functions where they had been overlooked
before (especially in CodeGeneratorJS.pm).
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getOwnPropertySlotVirtual):
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-10-14 Mark Hahnenberg <mhahnenberg@apple.com>
Rename virtual put to putVirtual
https://bugs.webkit.org/show_bug.cgi?id=69851
Reviewed by Darin Adler.
Renamed virtual versions of put to putVirtual in prepration for
adding the static put to the MethodTable in ClassInfo since the
compiler gets mad if the virtual and static versions have the same
name.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::putVirtual):
(WebKit::JSNPObject::put):
* WebProcess/Plugins/Netscape/JSNPObject.h:
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::setProperty):
2011-10-14 Jeff Miller <jeffm@apple.com>
InjectedBundleHitTestResult::imageRect() should return rect in WKView coordinates
https://bugs.webkit.org/show_bug.cgi?id=69963
WebKit2 clients only have knowledge of the WKView's coordinate system, they have no way to
convert from subframe view coordinates , so any rect that we expose through WK2 APIs should
be in WKView coordinates.
Reviewed by Simon Fraser.
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::imageRect): Use WebCore::FrameView::contentsToRootView() to convert the image rect to WKView coordinates.
2011-10-14 Mark Hahnenberg <mhahnenberg@apple.com>
Rename virtual deleteProperty to deletePropertyVirtual
https://bugs.webkit.org/show_bug.cgi?id=69884
Reviewed by Darin Adler.
Renamed virtual versions of deleteProperty to deletePropertyVirtual in prepration for
adding the static deleteProperty to the MethodTable in ClassInfo since the
compiler gets mad if the virtual and static versions have the same name.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::deletePropertyVirtual):
(WebKit::JSNPObject::deleteProperty):
* WebProcess/Plugins/Netscape/JSNPObject.h:
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::removeProperty):
2011-10-14 Nayan Kumar K <nayankk@motorola.com>
[WebKit2][gtk] Add documentation for WebKitPluginError and WebKitPolicyError.
https://bugs.webkit.org/show_bug.cgi?id=70016
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitError.h:
2011-10-14 Nayan Kumar K <nayankk@motorola.com>
[WebKit2][gtk] Skip TestWebKitSettings test.
https://bugs.webkit.org/show_bug.cgi?id=70129
Reviewed by Martin Robinson.
Skip running TestWebKitSettings test till a bug
https://bugs.webkit.org/show_bug.cgi?id=70127 gets fixed.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Skip TestWebKitSettings test.
2011-10-14 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r97375.
http://trac.webkit.org/changeset/97375
https://bugs.webkit.org/show_bug.cgi?id=70115
It breaks loading of webpages in QtWebKit2 (Requested by jeez_
on #webkit).
* UIProcess/qt/ClientImpl.cpp:
(qt_wk_decidePolicyForNavigationAction):
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::init):
2011-10-12 Ryosuke Niwa <rniwa@webkit.org>
Make the interface of locationAndLengthFromRange and rangeFromLocationAndLength consistent
https://bugs.webkit.org/show_bug.cgi?id=69964
Reviewed by Enrica Casucci.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getMarkedRange):
(WebKit::WebPage::getSelectedRange):
(WebKit::WebPage::characterIndexForPoint):
(WebKit::convertToRange):
2011-10-14 Nayan Kumar K <nayankk@motorola.com>
[GTK] r97438: Inconsistent use of flattening vs flattering in function names/comments
https://bugs.webkit.org/show_bug.cgi?id=70092
Reviewed by Martin Robinson.
Fixes the miss-spelling of 'PROP_ENABLE_FRAME_FLATTENING' as 'PROP_ENABLE_FRAME_FLATTERING'
introduced with change set r97438.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty): Property name correction.
(webKitSettingsGetProperty): Property name correction.
(webkit_settings_class_init): Property name correction.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Spelling correction.
2011-10-14 Gopal Raghavan <gopal.1.raghavan@nokia.com>
[Qt] enable qmltests for qt5
https://bugs.webkit.org/show_bug.cgi?id=70037
Reviewed by Chang Shu.
Qml tests seem to be disabled for some reason. This patch enables the tests by including qmltests to SUBDIRS.
* UIProcess/API/qt/tests/tests.pro:
2011-10-14 Kenneth Rohde Christiansen <kenneth@webkit.org>
Do not cache m_resizesToContentsLayoutSize on WebKit2's WebPage
https://bugs.webkit.org/show_bug.cgi?id=66134
Unreviewed build fix after r97462.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2011-10-14 Kenneth Rohde Christiansen <kenneth@webkit.org>
Do not cache m_resizesToContentsLayoutSize on WebKit2's WebPage
https://bugs.webkit.org/show_bug.cgi?id=66134
Reviewed by Simon Hausmann.
Do the resize to contents on the web process side.
Based on patch by Zalan Bujtas.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSize):
(WebKit::WebPage::setResizesToContentsUsingLayoutSize):
(WebKit::WebPage::resizeToContentsIfNeeded):
* WebProcess/WebPage/WebPage.h:
2011-10-14 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Build is broken with new ld
https://bugs.webkit.org/show_bug.cgi?id=70097
Reviewed by Philippe Normand.
* UIProcess/API/gtk/tests/GNUmakefile.am:
2011-10-12 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][WK2] Fix build after QSGItem API changes
https://bugs.webkit.org/show_bug.cgi?id=69926
Reviewed by Kenneth Rohde Christiansen.
Commit c825865cdd88445aa1db94cdf0da89426919acdb in qtdeclarative changed the
signatures of the Drag & Drop event handlers in QSGItem. The SG specific events
were replaced with the plain QDrag* events, which are now used for widgets as well
as the Qt scene graph.
This patch adapts the desktop webview as well as the page proxy to handle these
kind of events.
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebView::dragMoveEvent):
(QDesktopWebView::dragEnterEvent):
(QDesktopWebView::dragLeaveEvent):
(QDesktopWebView::dropEvent):
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/qt/qdesktopwebpageproxy.cpp:
(QDesktopWebPageProxy::handleEvent):
(QDesktopWebPageProxy::handleDragEnterEvent):
(QDesktopWebPageProxy::handleDragLeaveEvent):
(QDesktopWebPageProxy::handleDragMoveEvent):
(QDesktopWebPageProxy::handleDropEvent):
* UIProcess/qt/qdesktopwebpageproxy.h:
2011-10-13 Nayan Kumar K <nayankk@motorola.com>
[GTK][WEBKIT2] Add WebKitSettings GTK+ API.
https://bugs.webkit.org/show_bug.cgi?id=68371
Reviewed by Martin Robinson.
WebKitSettings GTK+ object is created and first set of
API's are written to get or set the properties of WebKitSettings.
* GNUmakefile.am: Added new files for compilation.
* UIProcess/API/gtk/WebKitSettings.cpp: Added.
(_WebKitSettingsPrivate::_WebKitSettingsPrivate): Constructor.
(webKitSettingsSetProperty): Set property function.
(webKitSettingsGetProperty): Get property function.
(webKitSettingsFinalize): Class finalize function.
(webkit_settings_class_init): Class init function.
(webkit_settings_init): Instance init function.
(webkit_settings_new): Creates WebKitSettings GObject.
(webkit_settings_get_enable_javascript): Function to get 'enable-javascript' property.
(webkit_settings_set_enable_javascript): Function to set 'enable-javascript' property.
(webkit_settings_get_auto_load_images): Get the 'auto-load-images' property.
(webkit_settings_set_auto_load_images): Set the 'auto-load-images' property.
(webkit_settings_get_load_icons_ignoring_image_load_setting): Function to get
'load-icons-ignoring-image-load-setting' property.
(webkit_settings_set_load_icons_ignoring_image_load_setting): Function to set
'load-icons-ignoring-image-load-setting' property.
(webkit_settings_get_enable_offline_web_application_cache): Function to get
'enable-offline-web-application-cache' property.
(webkit_settings_set_enable_offline_web_application_cache): Function to set
'enable-offline-web-application-cache' property.
(webkit_settings_get_enable_html5_local_storage): Get the property 'enable-html5-local-storage'.
(webkit_settings_set_enable_html5_local_storage): Set the property 'enable-html5-local-storage'.
(webkit_settings_get_enable_html5_database): Get the property 'enable-html5-database'.
(webkit_settings_set_enable_html5_database): Set the property 'enable-html5-database'.
(webkit_settings_get_enable_xss_auditor): Get property 'enable-xss-editor'.
(webkit_settings_set_enable_xss_auditor): Set property 'enable-xss-editor'.
(webkit_settings_get_enable_frame_flattening): Get the property 'enable-frame-flattening'.
(webkit_settings_set_enable_frame_flattening): Set the property 'enable-frame-flattening'.
(webkit_settings_get_enable_plugins): Get the property 'enable-plugins'.
(webkit_settings_set_enable_plugins): Set the property 'enable-plugins'.
(webkit_settings_get_enable_java): Function to get 'enable-java' property.
(webkit_settings_set_enable_java): Function to set 'enable-java' property.
(webkit_settings_get_javascript_can_open_windows_automatically): Get the property
'javascript-can-open-windows-automatically'.
(webkit_settings_set_javascript_can_open_windows_automatically): Set the property
'javascript-can-open-windows-automatically'.
(webkit_settings_get_enable_hyperlink_auditing): Get 'enable-hyperlink-auditing' property.
(webkit_settings_set_enable_hyperlink_auditing): Set 'enable-hyperlink-auditing' property.
* UIProcess/API/gtk/WebKitSettings.h: Added. Public API's.
* UIProcess/API/gtk/tests/GNUmakefile.am: Added new test.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp: Added.
(testWebKitSettings): Add WebKitSetting unit test.
(beforeAll): Pre-test function.
(afterAll): Post-test function.
* UIProcess/API/gtk/webkit2.h: Add WebKitSettings.h to exposed API list.
2011-10-13 Mark Hahnenberg <mhahnenberg@apple.com>
Rename virtual getConstructData to getConstructDataVirtual
https://bugs.webkit.org/show_bug.cgi?id=69872
Reviewed by Geoffrey Garen.
Renamed virtual getConstructData functions to getConstructDataVirtual to
avoid conflicts when we add static getConstructData to the MethodTable.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getConstructDataVirtual):
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-10-13 Sam Weinig <sam@webkit.org>
Another SnowLeopard build fix.
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::cachedImage):
(WebKit::WebDragClient::declareAndWriteDragImage):
(-[WKPasteboardOwner initWithImage:WebCore::]):
2011-10-13 Sam Weinig <sam@webkit.org>
Fix SnowLeopard build.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setCursor):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2011-10-13 Alexey Proskuryakov <ap@apple.com>
[Mac] PDF Documents at epo.org look very blurry
https://bugs.webkit.org/show_bug.cgi?id=70072
Reviewed by Dan Bernstein.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::paintContent):
Ensure integral coordinates. <rdar://problem/10283382> tracks lifting this limitation.
2011-10-13 Alexey Proskuryakov <ap@apple.com>
[Mac] Wheel event handler counter is incorrect with PDF views
https://bugs.webkit.org/show_bug.cgi?id=70062
Reviewed by Dan Bernstein.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::didAddVerticalScrollbar): Added forgotten override for vertical case.
(WebKit::BuiltInPDFView::willRemoveVerticalScrollbar): Ditto.
(WebKit::BuiltInPDFView::createScrollbar): Notify self, do not make a shortcut to ScrollAnimator.
(WebKit::BuiltInPDFView::destroyScrollbar): Ditto.
(WebKit::BuiltInPDFView::destroy): Actually destroy the scrollbars.
2011-10-12 Chris Marrin <cmarrin@apple.com>
Sync requestAnimationFrame callback to CVDisplayLink on Mac
https://bugs.webkit.org/show_bug.cgi?id=68911
Reviewed by Simon Fraser.
Add windowDidChangeScreen function which listens for the window changing
screens and passes the new displayID along to WebCore::Page. It also sends
one on windowDidBecomeKey, so the Page has a fresh displayID after it's
created. Event is generated in the UIProcess and then sent over to the
WebProcess, which actually sends it to WebCore::Page.
* UIProcess/API/mac/WKView.mm:
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView _windowDidChangeScreen:]):
(-[WKView _windowDidBecomeKey:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::windowScreenDidChange):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowScreenDidChange):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-10-13 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] WebErrorsQt.cpp duplicates code from WKError.h and WebError.h
https://bugs.webkit.org/show_bug.cgi?id=70053
Reviewed by Kenneth Rohde Christiansen.
Now we will be aligned with WKError.h and WebError.h by using the shared
and pre-defined enum for error codes and WebError::webkitErrorDomain().
* WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
(WebKit::blockedError):
(WebKit::cannotShowURLError):
(WebKit::interruptedForPolicyChangeError):
(WebKit::cannotShowMIMETypeError):
(WebKit::pluginWillHandleLoadError):
2011-10-13 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] WebViews are emitting loadFailed for "private" error codes
https://bugs.webkit.org/show_bug.cgi?id=70047
Reviewed by Kenneth Rohde Christiansen.
Both QDesktopWebView and QTouchWebView are emitting loadFailed for private errors
like the ones defined in Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp.
We now filter these by not emitting this signal for FrameLoadInterruptedByPolicyChange,
PlugInWillHandleLoad and Cancellation, following previous decisions from WebKit 1.
* UIProcess/qt/ClientImpl.cpp:
(dispatchLoadFailed):
2011-10-13 Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
Implement TextChecker for WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=68548
Reviewed by Anders Carlsson.
Added implementation for all functions in TextCheckerGtk.cpp removing earlier stubbed implementations.
Moved couple of API earlier specific to win port to common section and added stubbed implementation
of the same for remaining ports of Qt, Efl and Mac.
* GNUmakefile.am: Added TextChecker implementation files.
* UIProcess/TextChecker.h: Moved spellCheckingEnabled and grammarCheckingEnabled API outside of win port.
* UIProcess/efl/TextCheckerEfl.cpp: Stubbed implementation of API which was moved outside win port.
* UIProcess/gtk/TextCheckerGtk.cpp: Implementation of all TextChecker API.
(WebKit::TextChecker::state):
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
(WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
(WebKit::TextChecker::grammarCheckingEnabledStateChanged):
(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):
* UIProcess/mac/TextCheckerMac.mm: Implementation of API which was moved outside win port.
* UIProcess/qt/TextCheckerQt.cpp: Stubbed implementation of API which was moved outside win port.
2011-10-13 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Implement decidePolicyForResponse in our PolicyClient
https://bugs.webkit.org/show_bug.cgi?id=69832
Reviewed by Kenneth Rohde Christiansen.
We implement decidePolicyForResponse in our PolicyClient in order to
decide whether a given ResourceResponse should be downloaded or loaded.
* UIProcess/qt/ClientImpl.cpp:
(qt_wk_decidePolicyForResponse):
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::init):
2011-10-13 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add WebKitTestServer class to WebKit2 GTK+ unit tests library
https://bugs.webkit.org/show_bug.cgi?id=70010
Reviewed by Martin Robinson.
With this class tests using a soup server only need to implement
the soup server callback.
* UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp: Use WebKitTestServer.
(testLoadingStatus):
(testLoadingError):
(testLoadAlternateContent):
(testWebViewReload):
(testLoadProgress):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/tests/WebKitTestServer.cpp: Added.
(WebKitTestServer::WebKitTestServer):
(WebKitTestServer::~WebKitTestServer):
(WebKitTestServer::run): Run the soup server and adds the given
soup server callback to handle requests.
(WebKitTestServer::getURIForPath): Returns the server absolute URI
for the given relative path.
* UIProcess/API/gtk/tests/WebKitTestServer.h: Added.
(WebKitTestServer::baseURI):
2011-10-13 Nayan Kumar K <nayankk@motorola.com>
[WebKit2][gtk] Fix warnings while generating WebKit2-GTK+ documentation.
https://bugs.webkit.org/show_bug.cgi?id=69928
Reviewed by Philippe Normand.
Patch fixes the warnings reported by gtk-doc while generating
WebKit2-GTK+ documentation.
* UIProcess/API/gtk/WebKitWebContext.h: Correct the documentation comment.
* UIProcess/API/gtk/WebKitWebView.cpp: Parameter name correction.
2011-10-12 Joseph Pecoraro <joepeck@webkit.org>
Pass Parsed Accept Attribute MIME Types to WebKit Clients
https://bugs.webkit.org/show_bug.cgi?id=69598
Reviewed by David Kilzer.
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
2011-10-12 Joseph Pecoraro <joepeck@webkit.org>
Pass Parsed Accept Attribute MIME Types to WebKit Clients
https://bugs.webkit.org/show_bug.cgi?id=69598
Reviewed by Anders Carlsson.
The WebOpenPanelParameters::Data struct was a mirror of
the already existing WebCore::FileChooserSettings struct.
So eliminate the excess struct and generate default
WebCore coders for the WebCore::FileChooserSettings struct.
* Scripts/webkit2/messages.py:
Switch to the new type. FileChooserSetting's header needs
to be special cased to FileChooser.h.
* Shared/WebCoreArgumentCoders.h:
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
Encode and decode all, non-deprecated, values. So we
ignore deprecatedAcceptTypes. A follow-up patch will add it.
* Shared/WebOpenPanelParameters.cpp:
(WebKit::WebOpenPanelParameters::create):
(WebKit::WebOpenPanelParameters::WebOpenPanelParameters):
Switch to the new type.
* Shared/WebOpenPanelParameters.h:
(WebKit::WebOpenPanelParameters::allowMultipleFiles):
(WebKit::WebOpenPanelParameters::selectedFileNames):
FileChooserSettings had different property names.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::runOpenPanel):
Generate the WebOpenPanelParameters object here, before
passing into the WebUIClient. This seems to be the convention
to not have WebCore types in WebUIClient.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::runOpenPanel):
* UIProcess/WebUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runOpenPanel):
Switch to the new type.
2011-10-12 Joseph Pecoraro <joepeck@webkit.org>
Pass Parsed Accept Attribute MIME Types to WebKit Clients
https://bugs.webkit.org/show_bug.cgi?id=69598
Reviewed by Kent Tamura.
Switch to deprecated for now, but the next patches will
remove the deprecated version from the WebKit2 path.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runOpenPanel):
2011-10-12 Adam Barth <abarth@webkit.org>
Remove ENABLE(XHTMLMP) and associated code
https://bugs.webkit.org/show_bug.cgi?id=69729
Reviewed by David Levin.
* Configurations/FeatureDefines.xcconfig:
2011-10-12 Dan Bernstein <mitz@apple.com>
Hang beneath PluginProcessProxy::createPropertyListFile() when using a thin build
https://bugs.webkit.org/show_bug.cgi?id=69960
Reviewed by Adam Roben.
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::createPropertyListFile): Check for any non-zero return value
from posix_spawn() rather than for a negative return value. The old, incorrect check, caused
this function to hang in waitpid() after failing to spawn a plug-in process for a 32-bit plug-in
when WebKit2 was built for 64-bit only.
2011-10-12 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Move qweberror* out of API/qt
https://bugs.webkit.org/show_bug.cgi?id=69875
Reviewed by Andreas Kling.
Moving QWebError outside API/qt in order to keep our API folder (layer) aligned.
* UIProcess/qt/qweberror.cpp: Renamed from Source/WebKit2/UIProcess/API/qt/qweberror.cpp.
(QWebError::QWebError):
(QWebErrorPrivate::createQWebError):
(QWebErrorPrivate::QWebErrorPrivate):
(QWebErrorPrivate::~QWebErrorPrivate):
(QWebError::type):
(QWebError::errorCode):
(QWebError::url):
* UIProcess/qt/qweberror.h: Renamed from Source/WebKit2/UIProcess/API/qt/qweberror.h.
(QWebError::errorCodeAsHttpStatusCode):
(QWebError::errorCodeAsNetworkError):
* UIProcess/qt/qweberror_p.h: Renamed from Source/WebKit2/UIProcess/API/qt/qweberror_p.h.
* WebKit2.pro:
* WebKit2API.pri:
2011-10-12 Nayan Kumar K <nayankk@motorola.com>
[WebKit2][gtk] Add few more API's to gtk-doc section file.
https://bugs.webkit.org/show_bug.cgi?id=69921
Reviewed by Gustavo Noronha Silva.
Generate documentation for existing WebKit2-GTK+ API's,
which are not yet the part of gtk-doc documentation.
* UIProcess/API/gtk/docs/GNUmakefile.am: List ignore files.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: API's addition.
2011-10-11 Simon Fraser <simon.fraser@apple.com>
Make custom scrollbar theme for use in DRT, to reduce pixel diffs between platforms
https://bugs.webkit.org/show_bug.cgi?id=68134
Reviewed by Darin Adler.
Use ScrollbarThemeMock when the setting to use mock scrollbars is enabled.
Make ScrollbarTheme::nativeTheme() private, and add a new static theme() method
that reads the setting, and returns the mock theme if set. All callers now use
theme() rther than nativeTheme(). Add the new ScrollbarTheme.cpp file to the build.
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::calculatePositionAndSize):
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::paintControls):
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::bounds):
2011-10-11 Simon Fraser <simon.fraser@apple.com>
Make custom scrollbar theme for use in DRT, to reduce pixel diffs between platforms
https://bugs.webkit.org/show_bug.cgi?id=68134
Reviewed by Darin Adler.
ScrollbarTheme::nativeTheme() renamed to theme().
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::bounds):
2011-10-10 Martin Robinson <mrobinson@igalia.com>
[GTK] [WebKit2] Make adding another unit test easier
https://bugs.webkit.org/show_bug.cgi?id=69409
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Add the new WebKit2 API tests.
* UIProcess/API/gtk/tests/GNUmakefile.am: Added.
* UIProcess/API/gtk/tests/LoadTrackingTest.cpp: Added. A fixture for creating load tracking tests.
* UIProcess/API/gtk/tests/LoadTrackingTest.h: Added.
* UIProcess/API/gtk/tests/TestMain.cpp: Copied from Source/WebKit2/UIProcess/API/gtk/tests/testwebview.c.
(main):
* UIProcess/API/gtk/tests/TestMain.h: Added.
* UIProcess/API/gtk/tests/TestWebKitWebContext.cpp: Copied from Source/WebKit2/UIProcess/API/gtk/tests/testwebview.c.
* UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp: Added.
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/testwebview.c.
* UIProcess/API/gtk/tests/WebViewTest.cpp: Added. A fixture for generic WebView tests.
* UIProcess/API/gtk/tests/WebViewTest.h: Added.
* UIProcess/API/gtk/tests/testloading.c: Removed.
* UIProcess/API/gtk/tests/testwebcontext.c: Removed.
2011-10-11 Alexey Proskuryakov <ap@apple.com>
[Mac] Crash when opening an embedded PDF in a background tab
https://bugs.webkit.org/show_bug.cgi?id=69880
Reviewed by Darin Adler.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::BuiltInPDFView):
(WebKit::BuiltInPDFView::~BuiltInPDFView):
(WebKit::BuiltInPDFView::initialize):
(WebKit::BuiltInPDFView::destroy):
Moved initialization and destruction code from C++ constructor and destructor to designated
functions. Not part of the fix, but seems related enough to fix.
2011-10-11 Alexey Proskuryakov <ap@apple.com>
[Mac] Crash when opening an embedded PDF in a background tab
https://bugs.webkit.org/show_bug.cgi?id=69880
Reviewed by Darin Adler.
* WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::paint): Don't call plug-in that
doesn't even have a controller yet.
2011-10-11 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=69874
WebKit2 snapshot APIs should take the device scale factor into account
-and corresponding-
<rdar://problem/10269112>
Reviewed by Darin Adler.
Add the deviceScaleFactor as a scale on the snapshot's context to create a
snapshot of the appropriate resolution. This matches the manner in which we scale
the context in DrawingAreaImpl::display().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotInViewCoordinates):
(WebKit::WebPage::scaledSnapshotInDocumentCoordinates):
2011-10-11 W. James MacLean <wjmaclean@chromium.org>
Loss of precision when converting from double to int and double to float in FrameView::zoomAnimatorTransformChanged()
https://bugs.webkit.org/show_bug.cgi?id=69739
Change 'double' parameters to 'float' to match changes in FrameView.
Reviewed by Simon Fraser.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
(WebKit::BuiltInPDFView::zoomAnimatorTransformChanged):
2011-10-11 Alexey Proskuryakov <ap@apple.com>
[Mac] Small embedded PDFs are not fully repainted when scrolling
https://bugs.webkit.org/show_bug.cgi?id=69861
Reviewed by Anders Carlsson.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::paintContent):
Account for vertical centering when deciding which pages to paint.
2011-10-11 Alexey Proskuryakov <ap@apple.com>
Embedding of PDF's with <object> or <embed> fails when there is no MIME type specified
https://bugs.webkit.org/show_bug.cgi?id=64934
Reviewed by Dan Bernstein.
* WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Check URL extension, too,
like GetPluginPath does in UI process. One difference is that UI process additionally tries
platform specific extension to MIME type mapping, but that doesn't matter for PDF, which
does not have other standard extensions.
2011-10-11 Alexey Proskuryakov <ap@apple.com>
[Mac] Should be able to display multi-page PDFs in subframes
https://bugs.webkit.org/show_bug.cgi?id=69804
Reviewed by Anders Carlsson.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::updateScrollbars): Page step should be exactly one page, so that
one could step over the document page by page. It certainly shouldn't be a portion of the
whole document.
(WebKit::BuiltInPDFView::pdfDocumentDidLoad): Moved duplicated code from load callbacks here.
(WebKit::BuiltInPDFView::calculateSizes): Calculate document size including gutters, and
remember page boxes.
(WebKit::BuiltInPDFView::paint): Split into separate functions.
(WebKit::BuiltInPDFView::paintBackground): Just paint gray background for the whole dirty rect.
(WebKit::BuiltInPDFView::paintContent): Paint pages and shadow under them. This code is still
fairly naive, as it doesn't understand annotations or page rotation.
Constants for shadows roughly match PDFView, but not quite, since it draws entirely custom
shadows.
(WebKit::BuiltInPDFView::paintControls): Moved scrollbar and scroll corner painting here.
(WebKit::BuiltInPDFView::streamDidFinishLoading): Moved common code into pdfDocumentDidLoad().
(WebKit::BuiltInPDFView::manualStreamDidFinishLoading): Ditto.
2011-10-11 Gopal Raghavan <gopal.1.raghavan@nokia.com>
[Qt] WebProcess using proxy settings for localhost as well
https://bugs.webkit.org/show_bug.cgi?id=69611
Reviewed by Chang Shu.
Implemented checks in queryProxy to return QNetworkProxy::NoProxy for localhost and 127.0.0.1
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::EnvHttpProxyFactory::queryProxy):
2011-10-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Remove all references to QTDIR_build and standalone_package
Qt is now modularized, which means we no longer import WebKit into
the Qt source tree. Instead we use git submodules, and building
QtWebKit as "part of Qt" is really building QtWebKit as from trunk.
To decrease the number of buildsystem configurations we also remove
the standalone_package code-path used when we were providing tarballs
with the derived sources pre-generated.
Reviewed by Simon Hausmann.
* DerivedSources.pro:
* UIProcess/API/qt/qmlplugin/qmlplugin.pro:
* UIProcess/API/qt/tests/tests.pri:
* WebKit2.pri:
* WebProcess.pro:
2011-10-10 Nate Chapin <japhet@chromium.org>
Use a CachedImageClient instead of CachedResourceClient
in WebDragClientMac.
https://bugs.webkit.org/show_bug.cgi?id=69790
Reviewed by Adam Barth.
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(promisedDataClient):
2011-10-10 Mark Hahnenberg <mhahnenberg@apple.com>
Remove getCallDataVirtual methods
https://bugs.webkit.org/show_bug.cgi?id=69186
Reviewed by Geoffrey Garen.
Removed all getCallDataVirtual methods and replaced their call sites
with an explicit lookup in the MethodTable.
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
* WebProcess/Plugins/Netscape/JSNPMethod.h:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-10-10 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Fix build with qreal == float on MeeGo 1.2 Harmattan
Reviewed by Andreas Kling.
Explicitly choose the qreal variant of qMin, since QPointF is using qreal.
* UIProcess/qt/ViewportInteractionEngine.cpp:
(WebKit::ViewportInteractionEngine::animateContentPositionIntoBoundariesIfNeeded):
2011-10-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add methods to reload the view to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=69613
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_reload):
(webkit_web_view_reload_bypass_cache):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/tests/testloading.c:
(loadReloadProvisionalLoadStarted):
(loadReloadLoadFinished):
(testLoadTimeoutFinishLoop):
(testLoadReload):
(main):
2011-10-09 Luke Macpherson <macpherson@chromium.org>
Fix Lion, Leopard and Snow Leopard builds after changeset 97034 <http://trac.webkit.org/changeset/97034>
(https://bugs.webkit.org/show_bug.cgi?id=68035)
https://bugs.webkit.org/show_bug.cgi?id=69735
Reviewed by Daniel Bates.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
Add symbols that are now required by ScrollableArea.
(WebKit::BuiltInPDFView::zoomAnimatorTransformChanged):
2011-10-08 Mark Hahnenberg <mhahnenberg@apple.com>
Add static version of JSCell::getConstructData
https://bugs.webkit.org/show_bug.cgi?id=69673
Reviewed by Geoffrey Garen.
Added static version of getConstructData to all classes that
override it and changed the virtual versions to call the static
versions. This is the first step in de-virtualizing JSCell::getConstructData.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getConstructData):
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-10-08 Mark Hahnenberg <mhahnenberg@apple.com>
Add static version of JSCell::getOwnPropertySlot
https://bugs.webkit.org/show_bug.cgi?id=69593
Reviewed by Geoffrey Garen.
Added static version of getOwnPropertySlot to every class that overrides
JSCell::getOwnPropertySlot. The virtual versions now call the static versions.
This is the first step in de-virtualizing JSCell::getOwnPropertySlot.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getOwnPropertySlot):
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-10-03 Carlos Garcia Campos <cgarcia@igalia.com> and Martin Robinson <mrobinson@igalia.com>
[GTK] Implement drag and drop support in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=63706
Reviewed by Philippe Normand.
* GNUmakefile.am: Add new files to compilation.
* Shared/gtk/ArgumentCodersGtk.cpp: Added.
(CoreIPC::encodeImage): Encode a GdkPixbuf.
(CoreIPC::decodeImage): Decode a GdkPixbuf.
(CoreIPC::encodeDataObject): Encode a DataObjectGtk.
(CoreIPC::decodeDataObject): Decode a DataObjectGtk.
(CoreIPC::::encode): Encode DragData.
(CoreIPC::::decode): Decode DragData.
* Shared/gtk/ArgumentCodersGtk.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::startDrag):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkit_web_view_base_init): Set the view as a potential drop destination.
(webkitWebViewBaseDragDataGet): Added, delegate to GtkDragAndDropHelper.
(webkitWebViewBaseDragEnd): Ditto.
(webkitWebViewBaseDragDataReceived): Ditto.
(webkitWebViewBaseDragEnter): Ditto.
(webkitWebViewBaseDragMotion): Ditto.
(doDragLeaveLater): Ditto.
(webkitWebViewBaseDragLeave): Ditto.
(webkitWebViewBaseDragDrop): Ditto.
(webkit_web_view_base_class_init): Override GtkWidget drag and drop methods.
(webkitWebViewBaseStartDrag): Calls gtk_drag_begin() to start a drag operation.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Add webkitWebViewBaseStartDrag().
* UIProcess/PageClient.h: Add startDrag().
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performDragControllerAction): Share the Qt version.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebDragClient.cpp:
* WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp: Added.
* WebProcess/WebPage/WebPage.cpp: Add drag support for GTK+.
* WebProcess/WebPage/WebPage.h: Ditto.
* WebProcess/WebPage/WebPage.messages.in: Ditto.
2011-10-08 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] Wrong handling of visibility in QTouchWebPage
https://bugs.webkit.org/show_bug.cgi?id=69670
Reviewed by Andreas Kling.
Replace QTouchWebPage visibility handling by Show/Hide events with use of
QSGItem::visibleChanged signal.
* UIProcess/API/qt/qtouchwebpage.cpp:
(QTouchWebPage::QTouchWebPage):
(QTouchWebPage::event):
(QTouchWebPage::onVisibleChanged):
* UIProcess/API/qt/qtouchwebpage.h:
2011-10-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r96996.
http://trac.webkit.org/changeset/96996
https://bugs.webkit.org/show_bug.cgi?id=69697
It broke all tests on the Qt bot (Requested by Ossy_night on
#webkit).
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::JSNPMethod::getCallDataVirtual):
* WebProcess/Plugins/Netscape/JSNPMethod.h:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getCallDataVirtual):
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-10-07 Jeff Miller <jeffm@apple.com>
Add WKPageContextMenuClient callback when context menu is dismissed
https://bugs.webkit.org/show_bug.cgi?id=69553
Add contextMenuDismissed callback to WKPageContextMenuClient, and bump the API
version of this client to 1 so we continue to work with old clients.
* Shared/APIClientTraits.cpp: Added array of interface sizes for WKPageContextMenuClient.
* Shared/APIClientTraits.h: Added APIClientTraits for WKPageContextMenuClient.
* UIProcess/API/C/WKPage.h: Added contextMenuDismissed callback to WKPageContextMenuClient and bumped kWKPageContextMenuClientCurrentVersion.
* UIProcess/WebPageContextMenuClient.cpp:
(WebKit::WebPageContextMenuClient::contextMenuDismissed): Added.
* UIProcess/WebPageContextMenuClient.h: Added WebPageContextMenuClient::contextMenuDismissed().
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu): Notify client when context menu is dismissed.
2011-10-07 Mark Hahnenberg <mhahnenberg@apple.com>
Remove getCallDataVirtual methods
https://bugs.webkit.org/show_bug.cgi?id=69186
Reviewed by Geoffrey Garen.
Removed all getCallDataVirtual methods and replaced their call sites
with an explicit lookup in the MethodTable.
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
* WebProcess/Plugins/Netscape/JSNPMethod.h:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-10-07 Alexey Proskuryakov <ap@apple.com>
[Mac] Scrollbars in embedded PDFs should update when system preferences change
https://bugs.webkit.org/show_bug.cgi?id=69654
Reviewed by Simon Fraser.
* WebProcess/Plugins/PDF/BuiltInPDFView.h: Added an scrollbarStyleChanged() override.
ScrollAnimatorMac sets scrollbar frame to a bogus (0, 0, thickness, thickness) one when style
changes, and expects clients to move them back in place.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::isOnActivePage): Fixed a typo that prevented ScrollAnimatorMac from
updating style of PDF view scrollbars.
(WebKit::BuiltInPDFView::scrollbarStyleChanged): Reposition scrollbars and content after
style change. The behavior is not perfect in edge cases, but roughly matches ScrollView.
2011-10-07 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r96938.
http://trac.webkit.org/changeset/96938
https://bugs.webkit.org/show_bug.cgi?id=69653
It broke zillion tests and make testing so slow (Requested by
ossy_ on #webkit).
* UIProcess/WebContext.cpp:
* UIProcess/WebContext.h:
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::applicationCacheDirectory):
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::applicationCacheDirectory):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::applicationCacheDirectory):
* UIProcess/qt/WebContextQt.cpp:
(WebKit::WebContext::applicationCacheDirectory):
* UIProcess/win/WebContextWin.cpp:
(WebKit::WebContext::applicationCacheDirectory):
2011-10-07 Qi Zhang <qi.2.zhang@nokia.com>
[Qt][WK2] ApplicationCache LayoutTests failed
https://bugs.webkit.org/show_bug.cgi?id=69541
Reviewed by Chang Shu.
1. Moved applicationCacheDirectory to common code.
2. Added interface setApplicationCacheDirectory to allow UI client overriding.
3. Renamed all platform-dependent implementations of applicationCacheDirectory to platformDefaultApplicationCacheDirectory.
4. On Qt, set the platformDefaultApplicationCacheDirectory to the default data location.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::applicationCacheDirectory):
* UIProcess/WebContext.h:
(WebKit::WebContext::setApplicationCacheDirectory):
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformDefaultApplicationCacheDirectory):
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultApplicationCacheDirectory):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultApplicationCacheDirectory):
* UIProcess/qt/WebContextQt.cpp:
(WebKit::WebContext::platformDefaultApplicationCacheDirectory):
* UIProcess/win/WebContextWin.cpp:
(WebKit::WebContext::platformDefaultApplicationCacheDirectory):
2011-10-06 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Correct improper identification of WKQC extensions.
https://bugs.webkit.org/show_bug.cgi?id=69600
* DerivedSources.make: Make sure we are not building the
WinCairo variant.
2011-10-06 Anders Carlsson <andersca@apple.com>
When building with clang, enable -Wglobal-constructors and -Wexit-time-destructors
https://bugs.webkit.org/show_bug.cgi?id=69586
Reviewed by Darin Adler.
* Configurations/Base.xcconfig:
Add -Wglobal-constructors and -Wexit-time-destructors when building with clang.
* WebKit2.xcodeproj/project.pbxproj:
When building with clang, we don't need to run the check-for-global-initializers and
check-for-exit-time-destructors anymore.
2011-10-06 Anders Carlsson <andersca@apple.com>
Add DEFINE_DEBUG_ONLY_GLOBAL for globals that should be defined in debug builds
https://bugs.webkit.org/show_bug.cgi?id=69584
Reviewed by Darin Adler.
Adopt the DEFINE_DEBUG_ONLY_GLOBAL macro.
* UIProcess/WebContext.cpp:
* UIProcess/WebPageProxy.cpp:
* WebProcess/WebPage/WebFrame.cpp:
* WebProcess/WebPage/WebPage.cpp:
2011-10-06 Alexey Proskuryakov <ap@apple.com>
[Mac] Should be able to scroll embedded PDFs using mouse
https://bugs.webkit.org/show_bug.cgi?id=69579
Reviewed by Darin Adler.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::handleMouseEvent): No longer need to hardcode mouseDown handling,
ScrollableArea does everything now.
(WebKit::BuiltInPDFView::horizontalScrollbar): Added plumbing to access scrollbars from
WebCore hit testing code.
(WebKit::BuiltInPDFView::verticalScrollbar): Ditto.
(WebKit::BuiltInPDFView::visibleHeight): ScrollableArea now wants this.
(WebKit::BuiltInPDFView::visibleWidth): Ditto.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::horizontalScrollbar):
(WebKit::NetscapePlugin::verticalScrollbar):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::horizontalScrollbar):
(WebKit::PluginProxy::verticalScrollbar):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::horizontalScrollbar):
(WebKit::PluginView::verticalScrollbar):
* WebProcess/Plugins/PluginView.h:
Added plumbing to access scrollbars from WebCore hit testing code.
2011-10-06 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] WebIconDatabase expects a file path not a directory.
https://bugs.webkit.org/show_bug.cgi?id=69557
Reviewed by Andreas Kling.
WebIconDatabase::setDatabasePath expects a file path not a directory.
I used the same name as the Mac port.
* UIProcess/qt/WebContextQt.cpp:
(WebKit::WebContext::platformDefaultIconDatabasePath):
2011-10-06 Anders Carlsson <andersca@apple.com>
In background window, page flashes white if it enters and then immediately leaves compositing mode
https://bugs.webkit.org/show_bug.cgi?id=69566
<rdar://problem/9521192>
Reviewed by Dan Bernstein.
Don't update the backing store state if we're just about to exit accelerated compositing mode. Otherwise
the UI process will try to render an empty layer tree for a short period of time, leading to a white flash.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
2011-10-06 Fady Samuel <fsamuel@chromium.org>
Code clean-up: Make RenderObject::absoluteBoundingBoxRect and associated methods const and make its parameter useTransforms no longer default to false
https://bugs.webkit.org/show_bug.cgi?id=69009
Reviewed by Simon Fraser.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-10-06 Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
Move windows specific TextChecker implementation common to all ports.
https://bugs.webkit.org/show_bug.cgi?id=68532
Reviewed by Anders Carlsson.
All the TextChecker feature implementation files are moved outside of win port since they are
platform independent and can be moved across all ports. Only the implementation of TextChecker
class is platform dependent now and has been retained across all ports. Rest all files has been
moved for all ports usage.
* Shared/API/c/WKBase.h: Add WKGrammarDetailRef & WKTextCheckerRef types.
* Shared/API/c/win/WKBaseWin.h: Remove WKGrammarDetailRef & WKTextCheckerRef types.
* Shared/APIObject.h: Moved TypeGrammarDetail & TypeTextChecker from platform specific section to UIProcess types.
* UIProcess/API/C/WKAPICast.h: Added mapping for WKTextCheckerRef & WKGrammarDetailRef.
* UIProcess/API/C/WKGrammarDetail.cpp: Renamed from Source/WebKit2/UIProcess/API/C/win/WKGrammarDetail.cpp.
* UIProcess/API/C/WKGrammarDetail.h: Renamed from Source/WebKit2/UIProcess/API/C/win/WKGrammarDetail.h.
* UIProcess/API/C/WKTextChecker.cpp: Renamed from Source/WebKit2/UIProcess/API/C/win/WKTextChecker.cpp.
* UIProcess/API/C/WKTextChecker.h: Renamed from Source/WebKit2/UIProcess/API/C/win/WKTextChecker.h.
* UIProcess/API/C/win/WKAPICastWin.h: Removed mapping for WKTextCheckerRef & WKGrammarDetailRef.
* UIProcess/WebGrammarDetail.cpp: Renamed from Source/WebKit2/UIProcess/win/WebGrammarDetail.cpp.
* UIProcess/WebGrammarDetail.h: Renamed from Source/WebKit2/UIProcess/win/WebGrammarDetail.h.
* UIProcess/WebTextChecker.cpp: Renamed from Source/WebKit2/UIProcess/win/WebTextChecker.cpp.
* UIProcess/WebTextChecker.h: Renamed from Source/WebKit2/UIProcess/win/WebTextChecker.h.
* UIProcess/WebTextCheckerClient.cpp: Renamed from Source/WebKit2/UIProcess/win/WebTextCheckerClient.cpp.
* UIProcess/WebTextCheckerClient.h: Renamed from Source/WebKit2/UIProcess/win/WebTextCheckerClient.h.
* win/WebKit2.vcproj: Corrected paths for renamed files.
* win/WebKit2Generated.make: Corrected paths for renamed files.
2011-10-06 Anders Carlsson <andersca@apple.com>
Crash when PluginProxy object is destroyed inside PluginProxy::pluginScriptableNPObject
https://bugs.webkit.org/show_bug.cgi?id=69559
<rdar://problem/9704066>
Reviewed by Maciej Stachowiak.
Protect the plug-in itself in the call to pluginScriptableNPObject. In some cases, sending
the synchronous message to the plug-in process can end up causing the web process to handle
an incoming message that will destroy t he plug-in.
Unfortunately, this is highly timing-dependent and can't be tested reliably.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::pluginScriptableNPObject):
2011-10-06 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add estimated-progress property to WebKitWebLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=69509
Reviewed by Martin Robinson.
It allows to monitor the estimated progress of a lof operation by
connecting to the notify signal.
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
(didChangeProgress): Update estimated-progress property and notify when
it changes.
(webkitWebLoaderClientConstructed): Add implementations for
didStartProgress, didChangeProgress and didFinishProgress.
(webkitWebLoaderClientGetProperty):
(webkit_web_loader_client_class_init): Add estimated-progress property.
(webkit_web_loader_client_get_estimated_progress): Returns the
value of estimated-progress property.
* UIProcess/API/gtk/WebKitWebLoaderClient.h:
* UIProcess/API/gtk/tests/testloading.c:
(webLoadingFixtureSetup):
(loadProgressEstimatedProgressChanged):
(loadProgressLoadFinished):
(testLoadProgress):
(main):
2011-10-06 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Implement cache model for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=68434
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_set_cache_model):
(webkit_web_context_get_cache_model):
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/tests/testwebcontext.c:
(testWebContextCacheModel):
(main):
* WebProcess/gtk/WebProcessGtk.cpp:
(WebKit::getCacheDiskFreeSize): Helper function to get free space
of the file system where the cache directory is on.
(WebKit::getMemorySize): Helper function to get the total memory
of the system in MB.
(WebKit::WebProcess::platformSetCacheModel): Implement
platformSetCacheModel for Gtk port using calculateCacheSizes().
2011-10-05 Alexey Proskuryakov <ap@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=69492
[Mac] Should be able to scroll embedded PDFs from keyboard
Reviewed by Darin Adler.
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::handleScroll):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::handleScroll):
* WebProcess/Plugins/PluginProxy.h:
Added a handleScroll method. A plug-in gets it if it doesn't handle a keyboard event, and
WebCore decides that this is an event for scrolling. A plug-in can decide whether it scrolls
main content, or some scrollable subview of its own.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::handleMouseEvent): Added a comment explaining returned value.
(WebKit::BuiltInPDFView::handleScroll): Just call ScrollableArea, it will do everything.
* WebProcess/Plugins/PDF/BuiltInPDFView.h: Added a handleScroll override.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::scroll): Pass a PluginViewBase scroll to plug-in to handle.
(WebKit::PluginView::handleEvent): Added a FIXME.
* WebProcess/Plugins/PluginView.h:
2011-10-06 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Do not use C API in GTK+ API public headers
https://bugs.webkit.org/show_bug.cgi?id=69506
Reviewed by Martin Robinson.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitDefines.h: Added.
* UIProcess/API/gtk/WebKitError.h: Use WEBKIT_API instead of WK_EXPORT.
* UIProcess/API/gtk/WebKitWebContext.h: Ditto.
* UIProcess/API/gtk/WebKitWebLoaderClient.h: Ditto.
* UIProcess/API/gtk/WebKitWebView.h: Ditto.
* UIProcess/API/gtk/WebKitWebViewBase.h: Ditto.
* UIProcess/API/gtk/docs/GNUmakefile.am: Ignore WEBKIT_API
decorator in docs.
* UIProcess/API/gtk/webkit2.h: Include <webkit2/WebKitDefines.h>
2011-10-06 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] Cursor should change when hovering links or input fields.
https://bugs.webkit.org/show_bug.cgi?id=69519
Reviewed by Simon Hausmann.
This is a temporary fix until Qt5 brings support for changing cursor
per item. This patch enforce the change of the cursor at application
level.
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::didChangeCursor):
2011-10-06 Zeno Albisser <zeno.albisser@nokia.com>
[Qt][WK2][Mac] QtWebProcess should not show up in the Dock.
https://bugs.webkit.org/show_bug.cgi?id=69432
We can set the environment variable QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM
in the WebProcess stub to disable the automatic foreground transformation.
Reviewed by Andreas Kling.
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::QtWebProcess::setupChildProcess):
2011-10-03 Andy Estes <aestes@apple.com>
Add an option to suppress rendering until the document's load event fires.
https://bugs.webkit.org/show_bug.cgi?id=69298
Reviewed by Simon Fraser.
Add a new WKPreference.
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetSuppressRenderingWhileInitiallyLoading):
(WKPreferencesGetSuppressRenderingWhileInitiallyLoading):
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2011-10-05 Simon Fraser <simon.fraser@apple.com>
r96770 broke binary compatibility with Safari
https://bugs.webkit.org/show_bug.cgi?id=69496
Reviewed by Dan Bernstein.
Fix binary compatibility issue by declaring the deprecated methods inside a extern "C" block.
* UIProcess/API/C/WKContext.cpp:
2011-10-05 Jer Noble <jer.noble@apple.com>
Enable WEB_AUDIO by default in the WebKit/mac port.
https://bugs.webkit.org/show_bug.cgi?id=68587
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig:
2011-10-05 Simon Fraser <simon.fraser@apple.com>
In WebKitTestRunner, text has font smoothing in pixel snapshots
https://bugs.webkit.org/show_bug.cgi?id=69396
Reviewed by Darin Adler.
Plumb through a method on WKContext that controls whether font smoothing
is enabled. Since this is a global setting, such a method is more appropriate
than a preference.
Remove leading underscores on some WKContext functions, but keep
exported versions of same for binary compatibility.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetAlwaysUsesComplexTextCodePath):
(WKContextSetShouldUseFontSmoothing):
(WKContextSetAdditionalPluginsDirectory):
(WKContextRegisterURLSchemeAsEmptyDocument):
(WKContextSetHTTPPipeliningEnabled):
(_WKContextSetAdditionalPluginsDirectory):
(_WKContextRegisterURLSchemeAsEmptyDocument):
(_WKContextSetAlwaysUsesComplexTextCodePath):
(_WKContextSetHTTPPipeliningEnabled):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::ensureWebProcess):
(WebKit::WebContext::setShouldUseFontSmoothing):
(WebKit::WebContext::httpPipeliningEnabled):
* UIProcess/WebContext.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::setShouldUseFontSmoothing):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2011-10-05 Anders Carlsson <andersca@apple.com>
Flash of white when unminimizing windows
https://bugs.webkit.org/show_bug.cgi?id=69476
<rdar://problem/10202680>
Reviewed by Simon Fraser.
Whenever the UI process requests an immediate backing store update, make sure to resume
painting if it's suspended.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::updateBackingStoreState):
2011-10-05 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Support JS alert/confirm/prompt in QDesktopWebView
https://bugs.webkit.org/show_bug.cgi?id=69274
Reviewed by Andreas Kling.
Use currently existing QtWidgets to provide an implementation of
window.alert(), window.confirm() and window.prompt().
* Shared/WebString.h:
(WebKit::WebString::createNull):
(WebKit::WebString::WebString):
Add a way to create a Null WebString. RunJavaScriptPrompt will differentiate
between empty and null strings.
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::enableMouseEvents):
(QDesktopWebViewPrivate::disableMouseEvents):
Create helper functions to enable and disable mouse events. This is useful for
disabling mouse events in the WebView when we show QtWidget dialogs to avoid
unwanted interaction with the page.
(QDesktopWebViewPrivate::runJavaScriptAlert):
(QDesktopWebViewPrivate::runJavaScriptConfirm):
(QDesktopWebViewPrivate::runJavaScriptPrompt):
(QDesktopWebView::init):
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/qt/ClientImpl.cpp:
(qt_wk_runJavaScriptAlert):
(qt_wk_runJavaScriptConfirm):
(createNullWKString):
(qt_wk_runJavaScriptPrompt):
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::init):
* UIProcess/qt/TouchViewInterface.cpp:
(WebKit::TouchViewInterface::runJavaScriptAlert):
(WebKit::TouchViewInterface::runJavaScriptConfirm):
(WebKit::TouchViewInterface::runJavaScriptPrompt):
* UIProcess/qt/TouchViewInterface.h:
* UIProcess/qt/ViewInterface.h:
2011-10-05 Chang Shu <cshu@webkit.org>
[WK2] Support setMarkedText/hasMarkedText/unmarkText/insertText for WTR TextInputController
https://bugs.webkit.org/show_bug.cgi?id=68924
Implemented WKBundlePage private APIs to support the above functions.
Reviewed by Darin Adler.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetComposition):
(WKBundlePageHasComposition):
(WKBundlePageConfirmComposition):
(WKBundlePageConfirmCompositionWithText):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setCompositionForTesting):
(WebKit::WebPage::hasCompositionForTesting):
(WebKit::WebPage::confirmCompositionForTesting):
* WebProcess/WebPage/WebPage.h:
2011-10-05 Alexey Proskuryakov <ap@apple.com>
[Mac] Make built-in PDF description localizable
https://bugs.webkit.org/show_bug.cgi?id=69442
Reviewed by Dan Bernstein.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp: Use a localized string instead of a literal one.
2011-10-05 Chang Shu <cshu@webkit.org>
[WK2] WebKitTestRunner needs LayoutTestController.dumpConfigurationForViewport
https://bugs.webkit.org/show_bug.cgi?id=69365
Reviewed by Darin Adler.
Implement retrieving viewport configuration as text in WebProcess.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageViewportConfigurationAsText):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::viewportConfigurationAsText):
* WebProcess/WebPage/WebPage.h:
2011-10-05 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] Default directories and paths are missing for LocalStorage, Database and IconDatabase.
https://bugs.webkit.org/show_bug.cgi?id=69111
Reviewed by Kenneth Rohde Christiansen.
Provide default path for LocalStorage, Database and IconDatabase using QDesktopServices.
* UIProcess/qt/WebContextQt.cpp:
(WebKit::defaultDataLocation):
(WebKit::WebContext::platformInitializeWebProcess):
(WebKit::WebContext::platformDefaultDatabaseDirectory):
(WebKit::WebContext::platformDefaultIconDatabasePath):
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
2011-10-05 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use WKRetainPtr for WK types in WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=69404
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextFinalize):
(createDefaultWebContext):
(webkitWebContextGetWKContext):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_uri):
(webkit_web_view_load_alternate_html):
2011-10-04 Kent Tamura <tkent@chromium.org>
Introduce feature flags for incomplete input types
https://bugs.webkit.org/show_bug.cgi?id=68971
Reviewed by Hajime Morita.
* Configurations/FeatureDefines.xcconfig:
Add ENABLE_INPUT_TYPE_* flags. They are enabled only for iOS.
2011-10-04 Scott Graham <scottmg@chromium.org>
Add GAMEPAD feature flag
https://bugs.webkit.org/show_bug.cgi?id=66859
Reviewed by Darin Fisher.
* Configurations/FeatureDefines.xcconfig:
2011-10-04 Ada Chan <adachan@apple.com>
toURLRef() in WKSharedAPICast.h should return null for a null string
https://bugs.webkit.org/show_bug.cgi?id=69380
Reviewed by Jon Honeycutt.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toURLRef): Add the missing "return" for the null string case.
2011-10-04 Alexey Proskuryakov <ap@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=67774
PDF in a frameset is not displayed, always downloads
Reviewed by Darin Adler.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/PDF: Added.
Added BuiltInPDFView class. It implements ScrollableArea and Plugin, working with iframes,
objects and embeds. The implementation targets Mac port only, fixing a WebKit2 regression.
* UIProcess/WebContext.cpp: (WebKit::WebContext::getPlugins): Tell WebCore that there is a
plug-in for PDF, so that it instantiates it in a regular fashion.
* UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::canShowMIMEType): We can now show
PDF not only in main frame.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp: Added. This is largely an implementation of
ScrollableArea now, which can render the first page of a PDF. Further improvements to come.
* WebProcess/Plugins/PDF/BuiltInPDFView.h: Added.
* WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::updateControlTints): Give Plugin a chance
to invalidate its tintable controls - it's necessary for PDF because scrollbars are tintable.
* WebProcess/Plugins/Plugin.h: (WebKit::Plugin::controller): Added a const version, since
some ScrollableArea methods are const.
* WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::paint): Call updateControlTints
at updatingControlTints phase.
* WebProcess/Plugins/PluginView.h: PDF plug-in needs to tinker with embedding FrameView to
use Scrollbar class, so it needs to cast its PluginController up to PluginView. It's unfortunate
that PluginView has so much NPAPI specific code, but that's how it is now.
* WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): If there is no real plug-in
installed for PDF, instantiate built-in one.
2011-10-04 Jon Lee <jonlee@apple.com>
REGRESSION (WK2): (Shift-)option-tabbing skips over elements when transitioning from chrome to webview
https://bugs.webkit.org/show_bug.cgi?id=68412
<rdar://problem/9988252>
Reviewed by Darin Adler.
In WK1 setInitialFocus() is called on FocusController with the key event that
caused the web view to become first responder. In WK2 no event is sent. So if
the key stroke that caused the change in first responder status contains the
option modifier key, FocusController did not know that it had to switch behavior.
Because there are multiple ways that the WKView can becomeFirstResponder, I changed
the signature to setInitialFocus to express whether the key event parameter is an
actual key event.
* UIProcess/API/C/win/WKView.cpp:
(WKViewSetInitialFocus):
* UIProcess/API/mac/WKView.mm:
(-[WKView becomeFirstResponder]): Take the NSApp currentEvent and pass it along if
the event is a keyboard event, otherwise pass an empty event.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setInitialFocus): Change in function signature to confirm that
the event that caused the initial focus was a keyboard event, and provide the keyboard
event itself.
* UIProcess/WebPageProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::setInitialFocus):
* UIProcess/win/WebView.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setInitialFocus): If we know that the cause of this was a keyboard
event, we pass that event to the FocusController. Otherwise we fall back to the original
behavior, which is to pass no event at all.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-10-04 Jeff Miller <jeffm@apple.com>
WKPreferences should allow control of application chrome mode
https://bugs.webkit.org/show_bug.cgi?id=69344
Reviewed by Dan Bernstein.
* Shared/WebPreferencesStore.h: Add application chrome mode setting to FOR_EACH_WEBKIT_BOOL_PREFERENCE().
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetApplicationChromeModeEnabled): Added.
(WKPreferencesGetApplicationChromeModeEnabled): Added.
* UIProcess/API/C/WKPreferencesPrivate.h: Added WKPreferencesSetApplicationChromeModeEnabled() and WKPreferencesGetApplicationChromeModeEnabled().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Set application chrome mode setting.
2011-10-04 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Implement default error pages in WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=69255
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitError.cpp:
(webkit_policy_error_quark): Add quark for policy errors.
(webkit_plugin_error_quark): Add quark for plugin errors.
* UIProcess/API/gtk/WebKitError.h: Add policy and plugin errors.
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
(webkitWebLoaderClientLoadFailed): Load a custom error page when
load failed and signal has not been handled.
(webkit_web_loader_client_class_init): Add default implementation
for provisional_load_failed and load_failed virtual methods.
2011-10-04 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add webkit_web_view_load_alternate_html() to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=69254
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_alternate_html):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/tests/testloading.c:
(loadAlternateContentLoadFinished):
(loadAlternateContentLoadFailed):
(testLoadAlternateContent):
(main):
2011-10-03 Jon Lee <jonlee@apple.com>
Extend DOM WheelEvent to differentiate between physical and logical scroll directions
https://bugs.webkit.org/show_bug.cgi?id=68959
<rdar://problem/10036688>
Reviewed by Sam Weinig.
* Shared/WebEvent.h:
(WebKit::WebWheelEvent::directionInvertedFromDevice):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
* Shared/WebWheelEvent.cpp:
(WebKit::WebWheelEvent::WebWheelEvent):
(WebKit::WebWheelEvent::encode):
(WebKit::WebWheelEvent::decode):
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebWheelEvent): get the flag from the NSEvent.
* UIProcess/WebPageProxy.cpp:
(WebKit::coalesce):
2011-10-04 Nayan Kumar K <nayankk@motorola.com>
[WebKit2][gtk] Generate gtk-doc for WebKit2-GTK.
https://bugs.webkit.org/show_bug.cgi?id=69325
Reviewed by Gustavo Noronha Silva.
Documentation generation for WebKit2-GTK+ APIs
using gtk-doc.
* GNUmakefile.am: Added doc generation files to EXTRA_DIST.
* UIProcess/API/gtk/docs/GNUmakefile.am: Makefile for doc generation.
* UIProcess/API/gtk/docs/version.xml.in: Version information.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Document template.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Document sections added.
* UIProcess/API/gtk/docs/webkit2gtk.types: Added GObjects types.
2011-10-04 Nayan Kumar K <nayankk@motorola.com>
[WebKit2][gtk] Fix warnings while generating documentation using gtk-doc.
https://bugs.webkit.org/show_bug.cgi?id=69329
Reviewed by Martin Robinson.
Added documentation for WebKitNetworkError enum and corrected few other
minor issues in WebKit2-GTK+ API documentation.
* UIProcess/API/gtk/WebKitError.h: Added documentation for WebKitNetworkError.
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
(webkit_web_loader_client_class_init): Corrected parameter name.
* UIProcess/API/gtk/WebKitWebView.cpp: Corrected annotation.
2011-10-04 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Remove http/tests/inspector/network/disabled-cache-crash.html.
https://bugs.webkit.org/show_bug.cgi?id=69332
Reviewed by Pavel Feldman.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-10-03 Anders Carlsson <andersca@apple.com>
Content area does not return to the correct position after rubberbanding
https://bugs.webkit.org/show_bug.cgi?id=69302
<rdar://problem/10102886>
Reviewed by Sam Weinig.
Make sure to schedule a display after adding to the dirty region.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::scroll):
2011-10-03 Anders Carlsson <andersca@apple.com>
Remove custom scrollbar painting hooks
https://bugs.webkit.org/show_bug.cgi?id=69163
Remove overridden ChromeClient member functions.
Reviewed by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
2011-10-03 Jer Noble <jer.noble@apple.com>
Unreviewed, rolling out r96526.
http://trac.webkit.org/changeset/96526
https://bugs.webkit.org/show_bug.cgi?id=68587
WEB_AUDIO has numerous 64->32 bit casting warnings, causing
build breakages where -Wall is enabled.
* Configurations/FeatureDefines.xcconfig:
2011-10-03 Jer Noble <jer.noble@apple.com>
Enable WEB_AUDIO by default in the WebKit/mac port.
https://bugs.webkit.org/show_bug.cgi?id=68587
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig:
2011-10-03 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add failing uri parameter to provisional-load-failed and load-failed signals
https://bugs.webkit.org/show_bug.cgi?id=69252
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
(didFailProvisionalLoadWithErrorForFrame): Pass failing URL to
signal handler.
(didFailLoadWithErrorForFrame): Ditto.
(webkit_web_loader_client_class_init): Add failing URL parameter
to provisional-load-failed and load-failed signals.
* UIProcess/API/gtk/WebKitWebLoaderClient.h:
* UIProcess/API/gtk/tests/testloading.c:
(loadStatusProvisionalLoadFailed): Update to API changes.
(loadStatusLoadFailed): Ditto.
(loadErrorProvisionalLoadFailed): Ditto.
* UIProcess/API/gtk/webkit2marshal.list:
2011-10-03 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix memory leak when loading url
https://bugs.webkit.org/show_bug.cgi?id=69247
Reviewed by Martin Robinson.
Release URL created with WKURLCreateWithUTF8CString().
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_uri):
2011-10-03 Carlos Garcia Campos <cgarcia@igalia.com>
[UNIX] Rename NetscapePluginModule::pluginInfo to NetscapePluginModule::getPluginInfoForLoadedPlugin()
https://bugs.webkit.org/show_bug.cgi?id=69147
Reviewed by Martin Robinson.
* Shared/Plugins/Netscape/NetscapePluginModule.h:
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin):
(WebKit::NetscapePluginModule::getPluginInfo):
2011-10-03 Zeno Albisser <zeno.albisser@nokia.com>
[Qt][WebKit2][Mac] WebProcess should exit automatically when UIProcess dies.
https://bugs.webkit.org/show_bug.cgi?id=68439
We use a dispatch queue and a dispatch source in the WebProcess
to receive a notification when the UI Process dies.
The WebProcess then commits suicide.
Reviewed by Andreas Kling.
* WebProcess/qt/WebProcessQt.cpp:
(WebKit::parentProcessDiedCallback):
(WebKit::WebProcess::platformInitializeWebProcess):
2011-10-02 Zeno Albisser <zeno.albisser@nokia.com>
[Qt][WK2][Mac] WebKit2 does not build on mac after merge of Qt5 refactor branch.
https://bugs.webkit.org/show_bug.cgi?id=69223
After the merge of the Qt5 refactor branch, networking stuff has been
extracted into a separate library. The qmlplugin needs to link to that
library to get QNetworkReply defined.
Reviewed by Noam Rosenthal.
* UIProcess/API/qt/qmlplugin/qmlplugin.pro:
2011-10-01 Geoffrey Garen <ggaren@apple.com>
Removed redundant helper functions for allocating Strong handles
https://bugs.webkit.org/show_bug.cgi?id=69218
Reviewed by Sam Weinig.
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2011-09-30 Sam Weinig <sam@webkit.org>
Add support for eventSender.mouseScrollBy in WTR
https://bugs.webkit.org/show_bug.cgi?id=69189
Reviewed by Simon Fraser.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleWheelEvent):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::wheelEventSyncForTesting):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Add sync version of wheel event handling for use in testing.
2011-09-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Add missing include for QMimeData
https://bugs.webkit.org/show_bug.cgi?id=69178
Reviewed by Tor Arne Vestbø.
This was implicitly included by other headers, but due to changes in
Qt5 we need to include explicitly.
* UIProcess/qt/QtWebPageProxy.cpp:
* WebProcess/WebPage/WebPage.cpp:
2011-09-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Prevent qDebug() output from DRT and WTR unless --verbose
For DRT we didn't install the message handler early enough to
catch output while constructing the QApplication. For WTR we
didn't even install a message handler.
Since the UI process will forward any output from the web process
we set an environment variable QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT
in WTR before the web process is started. This is picked up by the
web process which installs its own message handler.
The environment variable can be overriden on the command line if you
want to see output from the web process, or you can pass --verbose to
WTR to see output from both processes.
https://bugs.webkit.org/show_bug.cgi?id=69132
Reviewed by Andreas Kling.
* WebProcess/qt/WebProcessMainQt.cpp:
2011-09-30 Anders Carlsson <andersca@apple.com>
Remove didCompleteRubberBandForMainFrame UIClient callback
https://bugs.webkit.org/show_bug.cgi?id=69161
Reviewed by Adam Roben.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
* UIProcess/WebUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::didCompleteRubberBandForFrame):
2011-09-30 Qi Zhang <qi.2.zhang@nokia.com>
WebKitTestRunner needs layoutTestController.setAppCacheMaximumSize
https://bugs.webkit.org/show_bug.cgi?id=42698
Reviewed by Andreas Kling.
Implemented layoutTestController.setAppCacheMaximumSize and layoutTestController.clearApplicationCache,
and call clearApplicationCache when layoutTest start up.
* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
(WebKit::WebApplicationCacheManager::setAppCacheMaximumSize):
* WebProcess/ApplicationCache/WebApplicationCacheManager.h:
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleClearApplicationCache):
(WKBundleSetAppCacheMaximumSize):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearApplicationCache):
(WebKit::InjectedBundle::setAppCacheMaximumSize):
* WebProcess/InjectedBundle/InjectedBundle.h:
2011-09-30 Carlos Garcia Campos <cgarcia@igalia.com>
[UNIX] Add a method to get information for an already loaded plugin module
https://bugs.webkit.org/show_bug.cgi?id=69139
Reviewed by Martin Robinson.
* Shared/Plugins/Netscape/NetscapePluginModule.h: Add pluginInfo().
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::pluginInfo): Private method to get
the plugin information from the module, it must be called when the
module has been already initialized.
(WebKit::NetscapePluginModule::getPluginInfo): Use pluginInfo() to
get information of the plugin module for the given path.
2011-09-30 Zeno Albisser <zeno.albisser@nokia.com>
[Qt][WK2] Event delivery in QDesktopWebView is broken after merge of Qt5 refactor
https://bugs.webkit.org/show_bug.cgi?id=69105
This changes QDesktopWebView and QDesktopWebPageProxy to use QMouseEvent instead
of QGraphicsSceneMouseEvent.
Further it removes an endless loop introduced by the QSGItem::event() function
delivering inputMethodEvents but no other events.
Reviewed by Andreas Kling.
* Shared/NativeWebMouseEvent.h:
(WebKit::NativeWebMouseEvent::nativeEvent):
* Shared/NativeWebWheelEvent.h:
(WebKit::NativeWebWheelEvent::nativeEvent):
* Shared/qt/NativeWebMouseEventQt.cpp:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
* Shared/qt/NativeWebWheelEventQt.cpp:
(WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::mouseButtonForEvent):
(WebKit::webEventTypeForEvent):
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
* Shared/qt/WebEventFactoryQt.h:
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebView::mousePressEvent):
(QDesktopWebView::mouseMoveEvent):
(QDesktopWebView::mouseReleaseEvent):
(QDesktopWebView::mouseDoubleClickEvent):
(QDesktopWebView::wheelEvent):
(QDesktopWebView::event):
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/qt/qdesktopwebpageproxy.cpp:
(QDesktopWebPageProxy::handleEvent):
(QDesktopWebPageProxy::handleMouseMoveEvent):
(QDesktopWebPageProxy::handleMousePressEvent):
(QDesktopWebPageProxy::handleMouseReleaseEvent):
(QDesktopWebPageProxy::handleMouseDoubleClickEvent):
(QDesktopWebPageProxy::handleWheelEvent):
(QDesktopWebPageProxy::handleHoverMoveEvent):
* UIProcess/qt/qdesktopwebpageproxy.h:
2011-09-29 Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
Initial implementation of WebInspector for WebKit2 GTK port.
https://bugs.webkit.org/show_bug.cgi?id=68235
Reviewed by Martin Robinson.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::WebInspectorProxy): Initialize the native window handles of GTK.
* UIProcess/WebInspectorProxy.h: Add native window handle for inspector window.
* UIProcess/gtk/WebInspectorGtk.cpp:
(WebKit::inspectorFilesBasePath): Base folder for inspector resources.
(WebKit::inspectorWindowDestroyed): Invoked when inspector window is closed by user.
(WebKit::WebInspectorProxy::windowDestroyed): Resets the native handles to 0 when user closes the window.
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Create the WebView for inspector.
(WebKit::WebInspectorProxy::platformOpen): Create the window for inspector.
(WebKit::WebInspectorProxy::platformDidClose): Close both WebView & window of inspector.
(WebKit::WebInspectorProxy::platformInspectedURLChanged): Update the title of inspector window.
(WebKit::WebInspectorProxy::inspectorPageURL): Return the absolute URL of inspector.html.
(WebKit::WebInspectorProxy::inspectorBaseURL): Return the location where inspector resources are present.
WebProcess is given read access to this folder only for loading file URLs by sandboxed extension.
2011-09-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Fix build against Qt5 after refactor of widgets out of QtGUi
QWidget and friends now live in the QtWidgets library. We update
includes in implementation files and private headers to us the
non-module-prefixed path, and leave the lookup for the include
path. For public headers we have to ifdef the includes as the
user might now have the modules we need in his QT config.
Finally, QSGCanvas is no longer a QWidget but a QWindow, so we
have to update our code and use windowHandle() for setting the
parent relationships.
https://bugs.webkit.org/show_bug.cgi?id=68687
Reviewed by Andreas Kling.
* UIProcess/API/qt/qdesktopwebview.cpp:
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/tests/tests.pro:
* UIProcess/qt/ViewInterface.h:
* UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
2011-09-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Force single header include in WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=69084
Reviewed by Martin Robinson.
Only <webkit2/webkit2.h> will be allowed for API users.
* GNUmakefile.am:
* UIProcess/API/gtk/WebKitError.h:
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/WebKitWebLoaderClient.h:
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewBase.h:
* UIProcess/API/gtk/webkit2.h:
2011-09-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Explicitly call destructors for objects initialized with placement new syntax
https://bugs.webkit.org/show_bug.cgi?id=69079
Reviewed by Xan Lopez.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextFinalize): Call ~WebKitWebContextPrivate().
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
(webkitWebLoaderClientFinalize): Call ~WebKitWebLoaderClient().
(webkit_web_loader_client_class_init):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewFinalize): Call ~WebKitWebViewPrivate().
(webkit_web_view_class_init):
2011-09-28 Martin Robinson <mrobinson@igalia.com>
Fix the WebGL build on WebKit2 GTK+.
* GNUmakefile.am: Add OPENGL_LIBS to WebKit2 targets.
2011-09-28 Brent Fulgham <bfulgham@webkit.org>
WinCairo build fix.
* WebProcess/WebPage/WebFrame.h: Add include of <wtc/RetainPtr.h>
2011-09-28 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
One more shot at fixing GTK+, this seems to make the dependencies
work.
* GNUmakefile.am:
2011-09-28 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
GTK+ build fix 3 - the return of the marshal.
* GNUmakefile.am:
2011-09-28 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
Second try at fixing the GTK+ build.
* GNUmakefile.am:
2011-09-28 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
Try to fix GTK+ build.
* GNUmakefile.am:
2011-09-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix webkit2 unit tests in debug builds
https://bugs.webkit.org/show_bug.cgi?id=69006
Reviewed by Martin Robinson.
We are currently using the WorQueue name as thread name which in
this moment can be com.apple.WebKit.ProcessLauncher or
com.apple.CoreIPC.ReceiveQueue. Both names are longer than 31
characters which is the limit of Visual Studio for thread
names. When log is enabled createThread() will assert instead of
truncate the name, so we need to make sure we don't use a name
longer than 31 characters.
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::platformInitialize):
2011-09-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Loader client implementation for WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=68085
Reviewed by Martin Robinson.
Adds a new object, WebKitWebLoaderClient, that emits signals for
every page loader callback.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitWebLoaderClient.cpp: Added.
(didStartProvisionalLoadForFrame):
(didReceiveServerRedirectForProvisionalLoadForFrame):
(didFailProvisionalLoadWithErrorForFrame):
(didCommitLoadForFrame):
(didFinishLoadForFrame):
(didFailLoadWithErrorForFrame):
(webkitWebLoaderClientConstructed):
(webkitWebLoaderClientSetProperty):
(webkitWebLoaderClientGetProperty):
(webkit_web_loader_client_init):
(webkit_web_loader_client_class_init):
* UIProcess/API/gtk/WebKitWebLoaderClient.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed): Create the loader client for the view.
(webkit_web_view_init):
(webkit_web_view_get_loader_client): Get the current loader client.
(webkit_web_view_set_loader_client): Set a new loader client.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/tests/testloading.c: Added.
(serverCallback):
(webLoadingFixtureSetup):
(webLoadingFixtureTeardown):
(getURIForPath):
(loadStatusProvisionalLoadStarted):
(loadStatusProvisionalLoadReceivedServerRedirect):
(loadStatusProvisionalLoadFailed):
(loadStatusLoadCommitted):
(loadStatusLoadFinished):
(loadStatusLoadFailed):
(testLoadingStatus):
(loadErrorProvisionalLoadStarted):
(loadErrorProvisionalLoadFailed):
(loadErrorLoadFinished):
(testLoadingError):
(main):
* UIProcess/API/gtk/webkit2marshal.list: Added.
2011-09-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add WebKitError to GTK+ WebKit2 API
https://bugs.webkit.org/show_bug.cgi?id=68508
Reviewed by Martin Robinson.
Add WebKitNetworkError enum to define network errors.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitError.cpp: Added.
(webkit_network_error_quark):
* UIProcess/API/gtk/WebKitError.h:
* UIProcess/API/gtk/WebKitPrivate.h: Add
COMPILE_ASSERT_MATCHING_ENUM macro.
* UIProcess/API/gtk/webkit2.h: Add WebKitError.h and
WebKitEnumTypes.h
2011-09-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix Programs/unittests/webkit2/testwebview
https://bugs.webkit.org/show_bug.cgi?id=68993
Reviewed by Philippe Normand.
* GNUmakefile.am: Add -DWEBKIT_EXEC_PATH.
* UIProcess/API/gtk/tests/testwebview.c:
(main): Get WebProcess path from WEBKIT_EXEC_PATH environment
variable.
2011-09-27 Mark Hahnenberg <mhahnenberg@apple.com>
Add static version of JSCell::getCallData
https://bugs.webkit.org/show_bug.cgi?id=68741
Reviewed by Darin Adler.
In this patch we just extract the bodies of the virtual getCallData methods
throughout the JSCell inheritance hierarchy out into static methods, which are
now called from the virtual methods. This is an intermediate step in trying to
move the virtual-ness of getCallData into our own method table stored in
ClassInfo. We need to convert the methods to static methods because static methods
can be represented as function pointers rather than pointers to member functions, and
function pointers are smaller and faster to call than pointers to member functions.
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::JSNPMethod::getCallDataVirtual):
(WebKit::JSNPMethod::getCallData):
* WebProcess/Plugins/Netscape/JSNPMethod.h:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getCallDataVirtual):
(WebKit::JSNPObject::getCallData):
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-09-27 Gopal Raghavan <gopal.1.raghavan@nokia.com>
[Qt] QDesktopWebView load zero size view test missing
https://bugs.webkit.org/show_bug.cgi?id=68655
Reviewed by Chang Shu.
Added test case to check load behavior with zero size view.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadZeroSizeView.qml: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2011-09-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use WebKitWebContext in WebKitWebView
https://bugs.webkit.org/show_bug.cgi?id=67990
Reviewed by Martin Robinson.
Use webkit_web_context_get_default() instead of
WKContextGetSharedProcessContext() and add API to create a view
with a given web context and to return the current context
associated to the view.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitPrivate.h: Added.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextGetWKContext): Private API to get the WKContext
wrapped by the WebKitWebContext.
* UIProcess/API/gtk/WebKitWebContextPrivate.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed): Create the webpage using the web
context of the view.
(webkitWebViewSetProperty):
(webkitWebViewGetProperty):
(webkit_web_view_init):
(webkit_web_view_class_init):
(webkit_web_view_new): Create a new view with the default context.
(webkit_web_view_new_with_context): Create a new view with the
given context.
(webkit_web_view_get_context): Return the context.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/tests/testwebview.c: Added.
(testWebViewDefaultContext):
(main):
2011-09-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add WebKitWebContext to GTK API
https://bugs.webkit.org/show_bug.cgi?id=67931
Reviewed by Philippe Normand.
Initial implementation of WebKitWebContext for WebKit2 GTK API.
* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitWebContext.cpp: Added.
(webkitWebContextFinalize):
(webkit_web_context_init):
(webkit_web_context_class_init):
(createDefaultWebContext):
(webkit_web_context_get_default):
* UIProcess/API/gtk/WebKitWebContext.h: Added.
* UIProcess/API/gtk/tests/testwebcontext.c:
(testWebContextDefault):
(main):
* UIProcess/API/gtk/webkit2.h: Add <webkit2/WebKitWebContext.h>.
2011-09-27 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r96108, r96111, r96113, and r96116.
http://trac.webkit.org/changeset/96108
http://trac.webkit.org/changeset/96111
http://trac.webkit.org/changeset/96113
http://trac.webkit.org/changeset/96116
https://bugs.webkit.org/show_bug.cgi?id=68913
Wait for working Qt5 (Requested by ossy on #webkit).
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::startDrag):
(QDesktopWebViewPrivate::didChangeToolTip):
(QDesktopWebViewPrivate::didChangeCursor):
(QDesktopWebViewPrivate::showContextMenu):
(QDesktopWebViewPrivate::chooseFiles):
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/tests/tests.pri:
* UIProcess/API/qt/tests/tests.pro:
* UIProcess/qt/ViewInterface.h:
* UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
(WebKit::WebPopupMenuProxyQtDesktop::WebPopupMenuProxyQtDesktop):
2011-09-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Rename WebKit2 GTK+ API main header as webkit2.h
https://bugs.webkit.org/show_bug.cgi?id=65178
Reviewed by Martin Robinson.
* GNUmakefile.am: Add webkit2.h.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/webkit2.h: Renamed from Source/WebKit2/UIProcess/API/gtk/webkit/webkit.h.
* webkit2gtk.pc.in: Use webkitgtk-<api-version> as include dir.
2011-09-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Fix build of WebKit2 unit-tests after r96108
Reviewed by Andreas Kling.
* UIProcess/API/qt/tests/tests.pri:
2011-09-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Fix build against Qt5 after refactor of widgets out of QtGUi
QWidget and friends now live in the QtWidgets library. We update
includes in implementation files and private headers to us the
non-module-prefixed path, and leave the lookup for the include
path. For public headers we have to ifdef the includes as the
user might now have the modules we need in his QT config.
Finally, QSGCanvas is no longer a QWidget but a QWindow, so we
have to update our code and use windowHandle() for setting the
parent relationships.
https://bugs.webkit.org/show_bug.cgi?id=68687
Reviewed by Andreas Kling.
* UIProcess/API/qt/qdesktopwebview.cpp:
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/tests/tests.pro:
* UIProcess/qt/ViewInterface.h:
* UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
2011-09-26 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt][WK2] Add support for hover API in Qt WebKit2
https://bugs.webkit.org/show_bug.cgi?id=68369
Reviewed by Andreas Kling.
Based on the patch from Igor Oliveira in the same bug.
Expose a linkHovered() signal in QDesktopWebView, that passes the QUrl and the
QString corresponding to the link title. I left textContent out because was
unsure of its use case.
In QDesktopWebView we store the last URL and title emitted to make sure we send
the signal only if either value changes. Tests were added to the QML element to
check: if values are correctly emitted and if we don't emit more signals than
necessary.
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::didMouseMoveOverElement):
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/test2.html:
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/qt/ClientImpl.cpp:
(qt_wk_mouseDidMoveOverElement):
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::init):
* UIProcess/qt/TouchViewInterface.h:
(WebKit::TouchViewInterface::didMouseMoveOverElement):
* UIProcess/qt/ViewInterface.h:
2011-09-27 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] API fixes for QML, the signal parameters needs to be named.
https://bugs.webkit.org/show_bug.cgi?id=68889
Reviewed by Andreas Kling.
Signal parameters needs to be explicitly named in QML to be accessible.
This patch fix this problem.
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qtouchwebpage.h:
2011-09-27 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] Mark FINAL properties which can't be overridden by a subclass.
https://bugs.webkit.org/show_bug.cgi?id=68848
Reviewed by Andreas Kling.
The presence of the FINAL attribute indicates that the property will not be
overridden by a derived class. This can be used for performance optimizations
by QML.
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qtouchwebview.h:
* UIProcess/API/qt/qwebnavigationcontroller.h:
2011-09-26 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Fix WK2 build after r96014
https://bugs.webkit.org/show_bug.cgi?id=68856
Reviewed by Gustavo Noronha Silva.
Commit r96014 added inspectorBaseURL for Qt but removed
inspectorPageURL, adding it back.
* UIProcess/qt/WebInspectorProxyQt.cpp:
(WebKit::WebInspectorProxy::inspectorPageURL):
2011-09-26 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Fix build after r95982
https://bugs.webkit.org/show_bug.cgi?id=68842
Reviewed by Anders Carlsson.
The patch in r95982 removed the paint() function, because it was doing
nothing (in both implementations). This patch remove the call we had
for it to fix the build.
* UIProcess/qt/qtouchwebpageproxy.cpp:
(QTouchWebPageProxy::paintContent):
2011-09-26 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r95747): Activating the web inspector causes the web process to be killed
https://bugs.webkit.org/show_bug.cgi?id=68762
Reviewed by Anders Carlsson.
* UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::createInspectorPage):
Tell Web process that loading resources from WebCore resources directory is OK.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadHTMLString):
(WebKit::WebPageProxy::loadAlternateHTMLString):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::assumeReadAccessToBaseURL):
* UIProcess/WebProcessProxy.h:
Renamed willLoadHTMLStringWithBaseURL to more generic assumeReadAccessToBaseURL.
* UIProcess/WebInspectorProxy.h:
* UIProcess/efl/WebInspectorEfl.cpp:
(WebKit::WebInspectorProxy::inspectorBaseURL):
* UIProcess/gtk/WebInspectorGtk.cpp:
(WebKit::WebInspectorProxy::inspectorBaseURL):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectorBaseURL):
* UIProcess/qt/WebInspectorProxyQt.cpp:
(WebKit::WebInspectorProxy::inspectorBaseURL):
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::inspectorBaseURL):
Report what base directory Inspector has access to.
2011-09-26 Nayan Kumar K <nayankk@motorola.com>
Added WKHitTestResult API's.
WKHitTestResult API's are added. These API's can be used to
get the hover'ed link/image/media URL as well as link lable and
title.
https://bugs.webkit.org/show_bug.cgi?id=68426
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* GNUmakefile.am:
* UIProcess/API/C/WKHitTestResult.cpp: Added.
(WKHitTestResultGetTypeID):
(WKHitTestResultCopyAbsoluteImageURL):
(WKHitTestResultCopyAbsoluteLinkURL):
(WKHitTestResultCopyAbsoluteMediaURL):
(WKHitTestResultCopyLinkLabel):
(WKHitTestResultCopyLinkTitle):
* UIProcess/API/C/WKHitTestResult.h: Added.
* UIProcess/API/C/WebKit2.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebKit2API.pri:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
2011-09-26 Csaba Osztrogonác <ossy@webkit.org>
[Qt][WK2]Unreviewed speculative buildfix after r95968.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):
2011-09-26 Anders Carlsson <andersca@apple.com>
Remove an old DrawingAreaProxy::paint member function
https://bugs.webkit.org/show_bug.cgi?id=68825
Reviewed by Dan Bernstein.
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/TiledDrawingAreaProxy.cpp:
* UIProcess/TiledDrawingAreaProxy.h:
2011-09-26 Jer Noble <jer.noble@apple.com>
White flash when entering full-screen using element.webkitRequestFullScreen()
https://bugs.webkit.org/show_bug.cgi?id=68481
Reviewed by Simon Fraser.
Do not re-enable screen updates after exiting compositing mode until a repaint has completed.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController exitAcceleratedCompositingMode]):
(continueExitCompositingModeAfterRepaintCallback):
(-[WKFullScreenWindowController _continueExitCompositingModeAfterRepaint]):
2011-09-23 Simon Fraser <simon.fraser@apple.com>
Repaint tests don't work in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=68453
Reviewed by Sam Weinig.
Expose WKBundlePage methods to turn on repaint rect tracking
in WebKit2, for WebKitTestRunner.
As part of the change, expose utility methods on WebPage
to get the main Frame and FrameView, which required renaming
the exisiting method that returns a WebFrame. Fix callers
of that method to handle null when necessary.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageGetMainFrame):
(WKBundlePageSetTracksRepaints):
(WKBundlePageIsTrackingRepaints):
(WKBundlePageResetTrackedRepaints):
(WKBundlePageCopyTrackedRepaintRects):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::findLargestFrameInFrameSet):
(WebKit::WebChromeClient::closeWindowSoon):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::frameLoadCompleted):
(WebKit::WebFrameLoaderClient::restoreViewState):
(WebKit::WebFrameLoaderClient::provisionalLoadStarted):
(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
(WebKit::WebFrameLoaderClient::createPlugin):
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::documentFragmentFromAttributedString):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::isMainFrame):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setTracksRepaints):
(WebKit::WebPage::isTrackingRepaints):
(WebKit::WebPage::resetTrackedRepaints):
(WebKit::WebPage::trackedRepaintRects):
(WebKit::WebPage::clearMainFrameName):
(WebKit::WebPage::layoutIfNeeded):
(WebKit::WebPage::mainFrameHasCustomRepresentation):
(WebKit::WebPage::mainFrame):
(WebKit::WebPage::mainFrameView):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::mainWebFrame):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2011-09-25 Mark Hahnenberg <mhahnenberg@apple.com>
Add custom vtable struct to ClassInfo struct
https://bugs.webkit.org/show_bug.cgi?id=68567
Reviewed by Oliver Hunt.
Added CREATE_METHOD_TABLE macro to generate the custom vtable for the
specified class in its ClassInfo. Also added to it the first function to use
this macro, visitChildren. This is part of the process of getting rid of all
C++ virtual methods in JSCell. Eventually all virtual functions in JSCell
that can't easily be converted to non-virtual functions will be put into
this custom vtable structure.
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
2011-09-25 Adam Barth <abarth@webkit.org>
Finish removing PLATFORM(BREWMP) by removing associated code
https://bugs.webkit.org/show_bug.cgi?id=68779
Reviewed by Sam Weinig.
* Scripts/generate-forwarding-headers.pl:
2011-09-25 Adam Barth <abarth@webkit.org>
Remove PLATFORM(HAIKU) and associated code
https://bugs.webkit.org/show_bug.cgi?id=68774
Reviewed by Sam Weinig.
* Scripts/generate-forwarding-headers.pl:
2011-09-24 Adam Barth <abarth@webkit.org>
Always enable ENABLE(OFFLINE_WEB_APPLICATIONS)
https://bugs.webkit.org/show_bug.cgi?id=68767
Reviewed by Eric Seidel.
* Configurations/FeatureDefines.xcconfig:
* UIProcess/qt/WebContextQt.cpp:
(WebKit::WebContext::applicationCacheDirectory):
* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
(WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
(WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
(WebKit::WebApplicationCacheManager::deleteAllEntries):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::clearApplicationCache):
* WebProcess/WebProcess.h:
2011-09-23 Adam Klein <adamk@chromium.org>
Add ENABLE_MUTATION_OBSERVERS feature flag
https://bugs.webkit.org/show_bug.cgi?id=68732
Reviewed by Ojan Vafai.
This flag will guard an implementation of the "Mutation Observers" proposed in
http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1622.html
* Configurations/FeatureDefines.xcconfig:
2011-09-23 Varun Jain <varunjain@google.com>
Refactor WebViewImpl::scrollFocusedNodeIntoRect to a better place and add tests
https://bugs.webkit.org/show_bug.cgi?id=68198
Reviewed by Dimitri Glazkov.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-09-23 Chang Shu <cshu@webkit.org>
[WK2] [Qt] Implement MouseDown/MouseUp/MouseMoveTo functions for WebKit2 EventSender
https://bugs.webkit.org/show_bug.cgi?id=68556
Implement the MouseDown/MouseUp/MouseMoveTo functions on Qt platform.
Reviewed by Darin Adler.
* Shared/API/c/WKGeometry.h:
(operator==):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEventSyncForTesting): initialize "handled"
2011-09-23 Anders Carlsson <andersca@apple.com>
Move WebHitTestResult files to Shared/ in the Xcode project
https://bugs.webkit.org/show_bug.cgi?id=68718
Reviewed by Sam Weinig.
* WebKit2.xcodeproj/project.pbxproj:
2011-09-23 Anders Carlsson <andersca@apple.com>
Add OVERRIDE to overrides of virtual member functions in client classes
https://bugs.webkit.org/show_bug.cgi?id=68702
Reviewed by Darin Adler.
Disable the warning in Xcode and VS2005 for using override and final when compiling as C++98,
and remove WebEditorClient::isEditable, WebChromeClient::formDidFocus,
WebChromeClient::formDidBlur and WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest since
they have been removed from their respective base classes.
* Configurations/Base.xcconfig:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebCoreSupport/WebGeolocationClient.h:
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPopupMenu.h:
* WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
* win/WebKit2Common.vsprops:
2011-09-23 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] QtFileDownloader ctor shouldn't call QtFileDownloader::onReadyRead()
https://bugs.webkit.org/show_bug.cgi?id=68696
Reviewed by Andreas Kling.
Instead of connecting signals and calling QtFileDownloader::onReadyRead()
on its constructor, QtFileDownloader will now handle this in start().
* WebProcess/Downloads/qt/DownloadQt.cpp:
(WebKit::Download::start):
* WebProcess/Downloads/qt/QtFileDownloader.cpp:
(WebKit::QtFileDownloader::QtFileDownloader):
(WebKit::QtFileDownloader::start):
* WebProcess/Downloads/qt/QtFileDownloader.h:
2011-09-22 Gopal Raghavan <gopal.1.raghavan@nokia.com>
[Qt] TouchWebView load test not running
https://bugs.webkit.org/show_bug.cgi?id=68620
Reviewed by Chang Shu.
Load test was not executed since it was missing in pro file. Added tst_load.qml to qmltests.pro
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2011-09-22 Dean Jackson <dino@apple.com>
Add ENABLE_CSS_FILTERS
https://bugs.webkit.org/show_bug.cgi?id=68652
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig:
2011-09-22 Simon Fraser <simon.fraser@apple.com>
Add APIObjects for Size, Point, Rect
https://bugs.webkit.org/show_bug.cgi?id=68644
Reviewed by Sam Weinig.
Make APIObjects for size, point and rect so that they can be
used in WKArrayRefs.
Make some inline helper methods to create WKSize, WKPoint and WKRect
types.
* GNUmakefile.am:
* Shared/API/c/WKBase.h:
* Shared/API/c/WKGeometry.cpp: Copied from Source/WebKit2/Shared/API/c/WKGeometry.h.
(WKSizeGetTypeID):
(WKPointGetTypeID):
(WKRectGetTypeID):
(WKPointCreate):
(WKSizeCreate):
(WKRectCreate):
(WKSizeGetValue):
(WKPointGetValue):
(WKRectGetValue):
* Shared/API/c/WKGeometry.h:
(WKPoint::WKPointMake):
(WKPoint::WKSizeMake):
(WKPoint::WKRectMake):
* Shared/API/c/WKSharedAPICast.h:
* Shared/APIObject.h:
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):
* Shared/WebGeometry.h: Added.
(WebKit::WebSize::create):
(WebKit::WebSize::size):
(WebKit::WebSize::WebSize):
(WebKit::WebSize::type):
(WebKit::WebPoint::create):
(WebKit::WebPoint::point):
(WebKit::WebPoint::WebPoint):
(WebKit::WebPoint::type):
(WebKit::WebRect::create):
(WebKit::WebRect::rect):
(WebKit::WebRect::WebRect):
(WebKit::WebRect::type):
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebKit2API.pri:
* win/WebKit2.vcproj:
2011-09-22 Alexey Proskuryakov <ap@apple.com>
[WK2] UIProcess should check that WebProcess isn't sending unexpected file: URLs to it
https://bugs.webkit.org/show_bug.cgi?id=68573
Reviewed by Anders Carlsson.
Re-landing with a slightly less aggressive check.
* UIProcess/API/mac/WKView.mm:
(maybeCreateSandboxExtensionFromPasteboard): Return a boolean, telling the caller whether
an extension actually needed to be created
(-[WKView performDragOperation:]): Tell process proxy when the process is going to get
universal file read sandbox extension.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didPerformClientRedirect): Check the URLs.
(WebKit::WebContext::didPerformServerRedirect): Ditto.
(WebKit::WebContext::didUpdateHistoryTitle): Ditto.
(WebKit::WebContext::getPluginPath): Ditto. Also, properly parse the URL - we can never
assume that a string coming from WebProcess is a ParsedURLString.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessWithItem): Tell process proxy when the process
is going to get universal file read sandbox extension.
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle): Changed to return a boolean,
telling the caller whether an extension actually needed to be created.
(WebKit::WebPageProxy::loadURL): Tell process proxy about extension.
(WebKit::WebPageProxy::loadURLRequest): Ditto.
(WebKit::WebPageProxy::loadHTMLString): Tell process proxy if a file URL was used as a base
one for a string. In this case, WebKit2 assumes that WebProcess has access to a subdirectory,
(typically, one where error page resources live), and can load from it.
(WebKit::WebPageProxy::loadAlternateHTMLString): Ditto.
(WebKit::WebPageProxy::goForward): Tell process proxy about extension.
(WebKit::WebPageProxy::goBack): Tell process proxy about extension.
(WebKit::WebPageProxy::goToBackForwardItem): Tell process proxy about extension.
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Check the URL.
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): Ditto.
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Ditto.
(WebKit::WebPageProxy::decidePolicyForNewWindowAction): Ditto.
(WebKit::WebPageProxy::decidePolicyForResponse): Ditto.
(WebKit::WebPageProxy::didInitiateLoadForResource): Ditto.
(WebKit::WebPageProxy::didSendRequestForResource): Ditto.
(WebKit::WebPageProxy::didReceiveResponseForResource): Ditto.
(WebKit::WebPageProxy::missingPluginButtonClicked): Ditto.
* UIProcess/WebPageProxy.h: Changed initializeSandboxExtensionHandle() to return a bool,
and renamed to maybeInitializeSandboxExtensionHandle (matching WKView counterpart).
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy): Initialize m_mayHaveUniversalFileReadSandboxExtension.
It's going to be true if we ever granted an extension for "/".
(WebKit::WebProcessProxy::willLoadHTMLStringWithBaseURL): Remember the path, we should expect
that WebProcess will load subresources from it.
(WebKit::WebProcessProxy::checkURLReceivedFromWebProcess): Check that it's reasonable to expect
WebProcess send us a URL like this.
(WebKit::WebProcessProxy::addBackForwardItem): Check the URLs.
* UIProcess/WebProcessProxy.h: Added data members remembering what to expect from this process.
* UIProcess/cf/WebPageProxyCF.cpp: (WebKit::WebPageProxy::restoreFromSessionStateData):
Tell process proxy when the process is going to get universal file read sandbox extension.
2011-09-22 Alpha Lam <hclam@chromium.org>
https://bugs.webkit.org/show_bug.cgi?id=68081
Fix scroll in page scaling mode.
Reviewed by Simon Fraser.
* WebProcess/Plugins/PluginView.cpp: Rename pageScaleFactor to frameScaleFactor.
(WebKit::PluginView::handleEvent):
(WebKit::PluginView::viewGeometryDidChange):
(WebKit::PluginView::clipRectInWindowCoordinates):
2011-09-22 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt] Redirection overflow errors have wrong error domain
https://bugs.webkit.org/show_bug.cgi?id=68612
Reviewed by Andreas Kling.
Redirection overflow currently puts the URL hostname in the errorDomain field
and therefore are treated as a QWebError::EngineError. From now on they
will be treated as QWebError::HttpError, since their error domain was modified
to "HTTP" in QNetworkReplyHandler::redirect().
* UIProcess/API/qt/qweberror.cpp:
(QWebError::type):
2011-09-22 Csaba Osztrogonác <ossy@webkit.org>
REGRESSION(r95679): It broke everything.
https://bugs.webkit.org/show_bug.cgi?id=68611
Unreviewed rolling out r95679 and r95690, because it broke everything.
* UIProcess/API/mac/WKView.mm:
(maybeCreateSandboxExtensionFromPasteboard):
(-[WKView performDragOperation:]):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didPerformClientRedirect):
(WebKit::WebContext::didPerformServerRedirect):
(WebKit::WebContext::didUpdateHistoryTitle):
(WebKit::WebContext::getPluginPath):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::initializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadURL):
(WebKit::WebPageProxy::loadURLRequest):
(WebKit::WebPageProxy::loadHTMLString):
(WebKit::WebPageProxy::loadAlternateHTMLString):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::didInitiateLoadForResource):
(WebKit::WebPageProxy::didSendRequestForResource):
(WebKit::WebPageProxy::didReceiveResponseForResource):
(WebKit::WebPageProxy::missingPluginButtonClicked):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/WebProcessProxy.h:
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData):
2011-09-21 Alexey Proskuryakov <ap@apple.com>
[WK2] UIProcess should check that WebProcess isn't sending unexpected file: URLs to it
https://bugs.webkit.org/show_bug.cgi?id=68573
Unreviewed follow-up fix.
* UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
Just like we allow null URLs, also allow empty strings.
2011-09-21 Julien Chaffraix <jchaffraix@webkit.org>
Crash in RenderBox::paintMaskImages when GraphicsContext's painting is disabled
https://bugs.webkit.org/show_bug.cgi?id=68133
Reviewed by Darin Adler.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
Exported the new FrameView::paintControlTints function.
2011-09-21 Alexey Proskuryakov <ap@apple.com>
[WK2] UIProcess should check that WebProcess isn't sending unexpected file: URLs to it
https://bugs.webkit.org/show_bug.cgi?id=68573
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(maybeCreateSandboxExtensionFromPasteboard): Return a boolean, telling the caller whether
an extension actually needed to be created
(-[WKView performDragOperation:]): Tell process proxy when the process is going to get
universal file read sandbox extension.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didPerformClientRedirect): Check the URLs.
(WebKit::WebContext::didPerformServerRedirect): Ditto.
(WebKit::WebContext::didUpdateHistoryTitle): Ditto.
(WebKit::WebContext::getPluginPath): Ditto. Also, properly parse the URL - we can never
assume that a string coming from WebProcess is a ParsedURLString.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessWithItem): Tell process proxy when the process
is going to get universal file read sandbox extension.
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle): Changed to return a boolean,
telling the caller whether an extension actually needed to be created.
(WebKit::WebPageProxy::loadURL): Tell process proxy about extension.
(WebKit::WebPageProxy::loadURLRequest): Ditto.
(WebKit::WebPageProxy::loadHTMLString): Tell process proxy if a file URL was used as a base
one for a string. In this case, WebKit2 assumes that WebProcess has access to a subdirectory,
(typically, one where error page resources live), and can load from it.
(WebKit::WebPageProxy::loadAlternateHTMLString): Ditto.
(WebKit::WebPageProxy::goForward): Tell process proxy about extension.
(WebKit::WebPageProxy::goBack): Tell process proxy about extension.
(WebKit::WebPageProxy::goToBackForwardItem): Tell process proxy about extension.
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Check the URL.
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): Ditto.
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Ditto.
(WebKit::WebPageProxy::decidePolicyForNewWindowAction): Ditto.
(WebKit::WebPageProxy::decidePolicyForResponse): Ditto.
(WebKit::WebPageProxy::didInitiateLoadForResource): Ditto.
(WebKit::WebPageProxy::didSendRequestForResource): Ditto.
(WebKit::WebPageProxy::didReceiveResponseForResource): Ditto.
(WebKit::WebPageProxy::missingPluginButtonClicked): Ditto.
* UIProcess/WebPageProxy.h: Changed initializeSandboxExtensionHandle() to return a bool,
and renamed to maybeInitializeSandboxExtensionHandle (matching WKView counterpart).
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy): Initialize m_mayHaveUniversalFileReadSandboxExtension.
It's going to be true if we ever granted an extension for "/".
(WebKit::WebProcessProxy::willLoadHTMLStringWithBaseURL): Remember the path, we should expect
that WebProcess will load subresources from it.
(WebKit::WebProcessProxy::checkURLReceivedFromWebProcess): Check that it's reasonable to expect
WebProcess send us a URL like this.
(WebKit::WebProcessProxy::addBackForwardItem): Check the URLs.
* UIProcess/WebProcessProxy.h: Added data members remembering what to expect from this process.
* UIProcess/cf/WebPageProxyCF.cpp: (WebKit::WebPageProxy::restoreFromSessionStateData):
Tell process proxy when the process is going to get universal file read sandbox extension.
2011-09-19 Jer Noble <jer.noble@apple.com>
Add settings to control the availability of the Web Audio API to WebKit and WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=68382
Add support for the webAudioEnabled preference in WebKit2.
Reviewed by Darin Adler.
* Shared/WebPreferencesStore.h: Add WebAudioEnabled getter and setter macro.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetWebAudioEnabled): Added.
(WKPreferencesGetWebAudioEnabled): Added.
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Update the webAudioEnabled preference.
2011-09-21 Dan Bernstein <mitz@apple.com>
Use the prefix "WK" instead of "Web" for Objective-C classes defined in WebKit2.
Reviewed by Anders Carlsson.
Renamed WebInspectorProxyObjCAdapter to WKWebInspectorProxyObjCAdapter.
Renamed WebInspectorWKView to WKWebInspectorWKView.
Renamed WebFindIndicatorWindowAnimation to WKFindIndicatorWindowAnimation.
Renamed WebFindIndicatorView to WKFindIndicatorView.
Renamed WebUserDataWrapper to WKUserDataWrapper.
Updated the build phase checking for inappropriate Objective-C class names to disallow the prefix
"Web" and only allow "WK".
* UIProcess/API/mac/FindIndicatorWindow.h:
* UIProcess/API/mac/FindIndicatorWindow.mm:
(WebKit::FindIndicatorWindow::setFindIndicator):
(WebKit::FindIndicatorWindow::startFadeOutTimerFired):
* UIProcess/WebInspectorProxy.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKMenuTarget forwardContextMenuAction:]):
(WebKit::nsMenuItemVector):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformOpen):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
(WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac):
2011-09-21 Chang Shu <cshu@webkit.org>
[WK2] [Mac] Implement a more-complete MouseDown/MouseUp/MouseMoveTo functions for WebKit2 EventSender
https://bugs.webkit.org/show_bug.cgi?id=68108
This patch implements the event sender mouse events through WebKit2 UIProcess which is
closer to the real simulation than a WebProcess-only approach. The patch only supports Mac
platform as the first step so the existing code is still kept for other platforms.
Reviewed by Darin Adler.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetShouldSendEventsSynchronously):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::handleMouseEvent):
(WebKit::WebPageProxy::handleKeyboardEvent):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::setShouldSendEventsSynchronously):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEventSyncForTesting):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-09-21 Dan Bernstein <mitz@apple.com>
WebKit2 part of: Prevent the WebKit frameworks from defining inappropriately-named Objective-C classes
https://bugs.webkit.org/show_bug.cgi?id=68451
Reviewed by Darin Adler.
* WebKit2.xcodeproj/project.pbxproj: Added a script build phase that invokes
check-for-inappropriate-objc-class-names, allowing only class names prefixed with "WK" or "Web".
2011-09-21 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Implement Download support in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=68153
Reviewed by Andreas Kling.
We implement the necessary functions of Download.h, and our QtFileDownloader
to handle all network communication and call the necessary functions of Download.
We use the download policy for any MIME type not supported by WebKit. This
behaves like Qt non-WebKit2 except that we don't force download when
we encounter Content-Disposition: attachment. We still use the "filename="
field for file name suggestion though.
Based on original patches by: Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>,
Jocelyn Turcotte <jocelyn.turcotte@nokia.com>, Simon Hausmann <simon.hausmann@nokia.com>
and Zalan Bujtas <zalan.bujtas@nokia.com>.
* UIProcess/API/qt/qweberror.cpp: Adding DownloadError
(QWebError::type):
* UIProcess/API/qt/qweberror.h: Adding DownloadError
* WebKit2.pro:
* WebProcess/Downloads/Download.cpp: Adding QtFileDownloader, Qt platform specific
(WebKit::Download::Download):
* WebProcess/Downloads/Download.h: Adding QtFileDownloader, Qt platform specific
* WebProcess/Downloads/qt/DownloadQt.cpp:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::cancel):
(WebKit::Download::platformInvalidate):
(WebKit::Download::didDecideDestination):
* WebProcess/Downloads/qt/QtFileDownloader.cpp: Added.
(WebKit::QtFileDownloader::QtFileDownloader):
(WebKit::QtFileDownloader::~QtFileDownloader):
(WebKit::QtFileDownloader::determineFilename):
(WebKit::QtFileDownloader::decidedDestination):
(WebKit::QtFileDownloader::abortDownloadWritingAndEmitError):
(WebKit::QtFileDownloader::onReadyRead):
(WebKit::QtFileDownloader::onFinished):
(WebKit::QtFileDownloader::onError):
(WebKit::QtFileDownloader::cancel):
* WebProcess/Downloads/qt/QtFileDownloader.h: Added.
2011-09-21 Mark Rowe <mrowe@apple.com>
<rdar://problem/9890932> "Open PDF in Preview" on two PDFs of the same name does nothing the second time
The logic in PDFViewController::pathToPDFOnDisk that deals with constructing a unique
file name if a file of the suggested name already exists was incorrect. It was appending
the template used by mkstemps to the directory name component of the path rather than
using it as a prefix on the filename portion of the path. This resulted in a template path
like WebKitPDFs-ABCDEFXXXXXX-/foo.pdf where WebKitPDFs-ABCDEF/XXXXXX-foo.pdf was expected.
Reviewed by Jon Honeycutt.
* UIProcess/API/mac/PDFViewController.mm:
(WebKit::PDFViewController::pathToPDFOnDisk): Append the template as a new path component,
then append the suggested file name to that component.
2011-09-21 Andras Becsi <andras.becsi@nokia.com>
[Qt] Remove Qt specific code from css/SelectorChecker.cpp
https://bugs.webkit.org/show_bug.cgi?id=67702
Reviewed by Csaba Osztrogonác.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Modify to match new prototype.
(WebKit::WebPlatformStrategies::isLinkVisited):
(WebKit::WebPlatformStrategies::addVisitedLink):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h: Ditto.
2011-09-20 Anders Carlsson <andersca@apple.com>
Get rid of PluginView::setBoundsSize from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=68489
Reviewed by Dan Bernstein.
Remove m_boundsSize and the setter since they aren't used anywhere.
* WebProcess/Plugins/PluginView.cpp:
* WebProcess/Plugins/PluginView.h:
2011-09-20 Gopal Raghavan <gopal.1.raghavan@nokia.com>
[Qt] QTouchWebView missing signal tests for loadProgress
https://bugs.webkit.org/show_bug.cgi?id=68442
Reviewed by Chang Shu.
Added test case to check load progress signal for QTouchWebView
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2011-09-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r95565.
http://trac.webkit.org/changeset/95565
https://bugs.webkit.org/show_bug.cgi?id=68470
Broke builds (Requested by andersca on #webkit).
* GNUmakefile.am:
* Shared/API/c/WKHitTestResult.cpp: Removed.
* Shared/API/c/WKHitTestResult.h: Removed.
* UIProcess/API/C/WebKit2.h:
2011-09-20 Alexis Menard <alexis.menard@openbossa.org>
[Qt] [WK2] Implement a persistent cookie storage.
https://bugs.webkit.org/show_bug.cgi?id=65309
Reviewed by Chang Shu.
Add parameter to the WebProcess creation to specify where cookies should be saved.
It also use the new cookie storage implementation and set it to our network stack
so cookies are used when using it.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/qt/WebContextQt.cpp:
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/qt/WebProcessQt.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::platformTerminate):
2011-09-20 Nayan Kumar K <nayankk@motorola.com>
Added WKHitTestResult API's.
WKHitTestResult API's are added. These API's can be used to
get the hover'ed link/image/media URL as well as link lable and
title.
https://bugs.webkit.org/show_bug.cgi?id=68426
Reviewed by Anders Carlsson.
* GNUmakefile.am:
* Shared/API/c/WKHitTestResult.cpp: Copied from Source/WebKit2/UIProcess/API/C/WebKit2.h.
(WKHitTestResultGetTypeID):
(WKHitTestResultCopyAbsoluteImageURL):
(WKHitTestResultCopyAbsoluteLinkURL):
(WKHitTestResultCopyAbsoluteMediaURL):
(WKHitTestResultCopyLinkLabel):
(WKHitTestResultCopyLinkTitle):
* Shared/API/c/WKHitTestResult.h: Copied from Source/WebKit2/UIProcess/API/C/WebKit2.h.
* UIProcess/API/C/WebKit2.h:
2011-09-20 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] Add stubs for FULLSCREEN_API on Qt.
https://bugs.webkit.org/show_bug.cgi?id=68444
Reviewed by Andreas Kling.
Create all the stubs necessary for enabling FULLSCREEN_API on the Qt port.
* UIProcess/qt/WebFullScreenManagerProxyQt.cpp: Added.
(WebKit::WebFullScreenManagerProxy::invalidate):
(WebKit::WebFullScreenManagerProxy::enterFullScreen):
(WebKit::WebFullScreenManagerProxy::exitFullScreen):
(WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation):
(WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation):
(WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation):
(WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation):
(WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode):
(WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode):
(WebKit::WebFullScreenManagerProxy::getFullScreenRect):
* WebKit2.pro:
* WebProcess/FullScreen/qt: Added.
* WebProcess/FullScreen/qt/WebFullScreenManagerQt.cpp: Added.
(WebKit::WebFullScreenManagerQt::WebFullScreenManagerQt):
(WebKit::WebFullScreenManager::create):
(WebKit::WebFullScreenManagerQt::setRootFullScreenLayer):
(WebKit::WebFullScreenManagerQt::beginEnterFullScreenAnimation):
(WebKit::WebFullScreenManagerQt::beginExitFullScreenAnimation):
* WebProcess/FullScreen/qt/WebFullScreenManagerQt.h: Added.
2011-09-20 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] Export QNetworkReply in the QtWebKit QML module.
https://bugs.webkit.org/show_bug.cgi?id=68401
Reviewed by Simon Hausmann.
Add QNetworkReply in the QtWebKit module. We use the enum QNetworkReply::NetworkError
as the error code when the load fails. It is not used in the QtQuick module therefore
the QML team thinks it should belong here. Also added some auto-tests to cover the
loading errors.
* UIProcess/API/qt/qmlplugin/plugin.cpp:
(WebKit2QmlPlugin::registerTypes):
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadFail.qml: Added.
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml: Added.
2011-09-20 Csaba Osztrogonác <ossy@webkit.org>
[Qt][Mac] Buildfix after r95513.
Rubber-stamped by Andras Becsi.
* Scripts/generate-forwarding-headers.pl: Add mm file supporting.
2011-09-20 Gopal Raghavan <gopal.1.raghavan@nokia.com>
[Qt] QDesktopWebView missing loadProgress tests
https://bugs.webkit.org/show_bug.cgi?id=68280
Reviewed by Andreas Kling.
Added test case to check load progress property and signal for QDesktopWebView
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml: Added.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2011-09-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebProcess shouldn't use the GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=68062
Reviewed by Martin Robinson.
Use WebCore API to create errors in WebProcess.
* GNUmakefile.am: Don't use webkit/webkierror.h.
* WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
(WebKit::cancelledError):
(WebKit::blockedError):
(WebKit::cannotShowURLError):
(WebKit::interruptedForPolicyChangeError):
(WebKit::cannotShowMIMETypeError):
(WebKit::fileDoesNotExistError):
(WebKit::pluginWillHandleLoadError):
2011-09-19 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/68421> Stop calling UpdateSystemActivity in places where we hold power assertions that achieve the same effect
On SnowLeopard and newer it's not necessary to call UpdateSystemActivity to prevent the screensaver from kicking
in as the NoDisplaySleep assertion now has that effect. It's also not necessary to hold both a NoDisplaySleep and
a NoIdleSleep assertion as the latter is implied by the former.
Adopt the DisplaySleepDisabler class that was added to WebCore and remove all of duplicated logic from WKFullScreenWindowController.
Reviewed by Dan Bernstein.
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController _updatePowerAssertions]): Create a DisplaySleepDisabler instance when transitioning from permitting
display sleep to disabling display sleep. Clear out our reference when sleep should be permitted, destroying any
disabler that we own. Also adds a FIXME about an error that was noticed while working in this code.
2011-09-19 Adam Barth <abarth@webkit.org>
Always enable ENABLE(EVENTSOURCE)
https://bugs.webkit.org/show_bug.cgi?id=68414
Reviewed by Eric Seidel.
* Configurations/FeatureDefines.xcconfig:
2011-09-19 Alexis Menard <alexis.menard@openbossa.org>
[Qt] Unreviewed coding style fix.
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qweberror.h:
2011-09-19 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] Make loading errors API easier to use.
https://bugs.webkit.org/show_bug.cgi?id=68357
Reviewed by Tor Arne Vestbø.
Make the API to get loading errors easier to use. 95197 introduced
a QJSValue API that is a bit opaque for the client code. Rather than
using a dedicated object, we can just pass the needed information as
parameters of the slot.
* 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/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/QtWebPageProxy.cpp:
(QtWebPageProxy::loadDidFail):
* UIProcess/qt/TouchViewInterface.cpp:
(WebKit::TouchViewInterface::loadDidFail):
* UIProcess/qt/TouchViewInterface.h:
* UIProcess/qt/ViewInterface.h:
2011-09-19 Dan Bernstein <mitz@apple.com>
WebKit2 part of [mac] WebKit contains Objective-C classes that are not prefixed with its standard prefixes
https://bugs.webkit.org/show_bug.cgi?id=68323
Reviewed by Sam Weinig.
Renamed FullKeyboardAccessWatcher to WKFullKeyboardAccessWatcher.
Renamed AccessibilityWebPageObject to WKAccessibilityWebPageObject.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/AccessibilityWebPageObject.h: Removed.
* WebProcess/WebPage/mac/AccessibilityWebPageObject.mm: Removed.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h: Copied from Source/WebKit2/WebProcess/WebPage/mac/AccessibilityWebPageObject.h.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: Copied from Source/WebKit2/WebProcess/WebPage/mac/AccessibilityWebPageObject.mm.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::accessibilityRemoteObject):
* WebProcess/mac/FullKeyboardAccessWatcher.h: Removed.
* WebProcess/mac/FullKeyboardAccessWatcher.mm: Removed.
* WebProcess/mac/WKFullKeyboardAccessWatcher.h: Copied from Source/WebKit2/WebProcess/mac/FullKeyboardAccessWatcher.h.
* WebProcess/mac/WKFullKeyboardAccessWatcher.mm: Copied from Source/WebKit2/WebProcess/mac/FullKeyboardAccessWatcher.mm.
(+[WKFullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::fullKeyboardAccessEnabled):
2011-09-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] [WK2] Implement popup menus in QDesktopWebView using QComboBox
https://bugs.webkit.org/show_bug.cgi?id=67938
Reviewed by Andreas Kling.
Implement a WebPopupMenuProxy that uses QtWebComboBox (a QComboBox subclass we
have for WK1). Then use this WebPopupMenuProxy in QDesktopWebView. The implementation
explicitly avoids running a nested mainloop.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenu):
Since we don't run a nested mainloop, we need to keep the client pointer to call
valueChangedForPopupMenu().
* UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp: Added.
(WebKit::WebPopupMenuProxyQtDesktop::WebPopupMenuProxyQtDesktop):
(WebKit::WebPopupMenuProxyQtDesktop::~WebPopupMenuProxyQtDesktop):
(WebKit::WebPopupMenuProxyQtDesktop::showPopupMenu):
(WebKit::WebPopupMenuProxyQtDesktop::hidePopupMenu):
(WebKit::WebPopupMenuProxyQtDesktop::setSelectedIndex):
(WebKit::WebPopupMenuProxyQtDesktop::onPopupMenuHidden):
(WebKit::WebPopupMenuProxyQtDesktop::populate):
* UIProcess/qt/WebPopupMenuProxyQtDesktop.h: Added.
(WebKit::WebPopupMenuProxyQtDesktop::create):
* UIProcess/qt/qdesktopwebpageproxy.cpp:
(QDesktopWebPageProxy::createPopupMenuProxy):
* UIProcess/qt/qdesktopwebpageproxy.h:
* WebKit2.pro:
2011-09-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix distcheck build
https://bugs.webkit.org/show_bug.cgi?id=68241
Reviewed by Martin Robinson.
* GNUmakefile.am:
2011-09-17 Mihai Parparita <mihaip@chromium.org>
FrameLoaderClient BackForwardList-related methods are unsued
https://bugs.webkit.org/show_bug.cgi?id=68293
Reviewed by Darin Adler.
Remove FrameLoaderClient methods that were added by r51629, since only
the old (since-deleted) Android port needed them.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2011-09-16 Gopal Raghavan <gopal.1.raghavan@nokia.com>
[Qt] QTouchWebView missing loadProgress tests
https://bugs.webkit.org/show_bug.cgi?id=68183
Reviewed by Chang Shu.
Added test case to check load progress for QTouchWebView
* UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2011-09-16 Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
Removed unwanted NotImplemented.h inclusion in WebKit2 GTK port & platform independent files
https://bugs.webkit.org/show_bug.cgi?id=68249
Reviewed by Martin Robinson.
* Shared/Plugins/NPIdentifierData.cpp: Removed NotImplemented.h inclusion.
* Shared/Plugins/NPRemoteObjectMap.cpp: Removed NotImplemented.h inclusion.
* Shared/Plugins/NPVariantData.cpp: Removed NotImplemented.h inclusion.
* UIProcess/gtk/WebContextGtk.cpp: Removed NotImplemented.h inclusion.
* WebProcess/Cookies/WebCookieManager.cpp: Removed NotImplemented.h inclusion.
* WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: Removed NotImplemented.h inclusion.
* WebProcess/Plugins/Netscape/JSNPMethod.cpp: Removed NotImplemented.h inclusion.
* WebProcess/Plugins/Netscape/NPJSObject.cpp: Removed NotImplemented.h inclusion.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Removed NotImplemented.h inclusion.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp: Removed NotImplemented.h inclusion.
2011-09-16 Simon Fraser <simon.fraser@apple.com>
Make custom scrollbar theme for use in DRT, to reduce pixel diffs between platforms
https://bugs.webkit.org/show_bug.cgi?id=68134
Reviewed by Sam Weinig.
Hook up a private preference that enables the mock scrollbar theme.
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetMockScrollbarsEnabled):
(WKPreferencesGetMockScrollbarsEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2011-09-16 Mark Rowe <mrowe@apple.com>
Stop installing source and header files in to WebKit2.framework after r95303.
* WebKit2.xcodeproj/project.pbxproj:
2011-09-16 Anders Carlsson <andersca@apple.com>
Add back the WKHitTestResultRef parameter to mouseDidMoveOverElement in an ABI preserving way
https://bugs.webkit.org/show_bug.cgi?id=68269
Reviewed by Geoffrey Garen.
Add back WKPageMouseDidMoveOverElementCallback last and deprecate the current callback.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::mouseDidMoveOverElement):
2011-09-16 Alexey Proskuryakov <ap@apple.com>
Give local builds of WebProcess different icon to distinguish them from built-in Safari’s WebProcess
https://bugs.webkit.org/show_bug.cgi?id=68268
Reviewed by Darin Adler.
* Configurations/WebProcess.xcconfig: Add an icon in Debug and Release builds. The empty
value for production resulted in WebKit not adding the key to plist at all, which is what
we want (but I don't know if it's a supported feature).
Also, don't copy the icon file to built framework in production builds.
* WebKit2.xcodeproj/project.pbxproj: Added WebKit.icns.
* WebProcess/Info.plist: Added a key for the icon.
* WebProcess/mac/WebKit.icns: Copied from Websites/webkit.org/images/surfin-safari.icns.
2011-09-16 Anders Carlsson <andersca@apple.com>
Temporarily remove the WKHitTestResultRef parameter to avoid breaking the WK2 ABI/API
https://bugs.webkit.org/show_bug.cgi?id=68266
Reviewed by John Sullivan.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::mouseDidMoveOverElement):
2011-09-16 Filip Pizlo <fpizlo@apple.com>
DFG JIT should inline Math.abs
https://bugs.webkit.org/show_bug.cgi?id=68227
Reviewed by Oliver Hunt.
Added JavaScriptCore/dfg to include path path.
* CMakeLists.txt:
2011-09-16 Igor Oliveira <igor.oliveira@openbossa.org>
[WK2] mouseDidMoveOverElement needs to send more information about hovered element to UiProcess.
https://bugs.webkit.org/show_bug.cgi?id=68125
This patch implements support for the UiProcess to know what is the link url of a hovered element.
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* GNUmakefile.am:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* Shared/WebHitTestResult.cpp: Added.
WebHitTestResult has hovered element information.
(WebKit::WebHitTestResult::create):
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h: Added.
(WebKit::WebHitTestResult::absoluteImageURL):
(WebKit::WebHitTestResult::absoluteLinkURL):
(WebKit::WebHitTestResult::absoluteMediaURL):
(WebKit::WebHitTestResult::linkLabel):
(WebKit::WebHitTestResult::linkTitle):
(WebKit::WebHitTestResult::WebHitTestResult):
(WebKit::WebHitTestResult::type):
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::mouseDidMoveOverElement):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::mouseDidMoveOverElement):
* UIProcess/WebUIClient.h:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mouseDidMoveOverElement):
* win/WebKit2.vcproj:
2011-09-15 Adam Roben <aroben@apple.com>
Add support for attributes on message parameters
Parameter attributes are specified as a space-separated list inside square brackets before
the parameter's type. WebKit2 doesn't use this, but other projects that use these scripts
would like to.
Fixes <http://webkit.org/b/68219> Would like a way to specify attributes on message
parameters
Reviewed by Sam Weinig.
* Scripts/webkit2/messages_unittest.py: Added tests for parameter attributes.
* Scripts/webkit2/model.py:
(Parameter.__init__): Added a new attributes parameter, which is stored in the self.attributes
property.
(Parameter.has_attribute): Added. Returns true if this parameter has the given attribute.
* Scripts/webkit2/parser.py:
(parse): Moved attributes-parsing code from here...
(parse_attributes_string): ...to here.
(parse_parameters_string): Renamed from parse_parameter_string. Now also parses parameter
attributes.
2011-09-15 Adam Roben <aroben@apple.com>
Make WebKit2's message-generation model and parser scripts accessible to other projects
We copy them into the build products directory so other projects can find them.
Fixes <http://webkit.org/b/68169> Would like to be able to use WebKit2's message-generation
scripts in other projects
Reviewed by Darin Adler.
* WebKit2.xcodeproj/project.pbxproj: Copy the scripts to PrivateHeaders.
* win/WebKit2.make: Copy the scripts from obj/WebKit2/scripts to
tools/scripts, like WebCore does.
* win/WebKit2Generated.make: Copy the scripts to obj/WebKit2/scripts, which is similar to what
WebCore does for its bindings scripts.
2011-09-15 Adam Roben <aroben@apple.com>
Split some of the message-generation code into separate modules
This is in preparation for making these modules scripts usable by other projects.
Fixes <http://webkit.org/b/68217> Model and parsing functionality for WebKit2's
message-generation scripts is trapped inside a much larger module
Reviewed by Darin Adler.
* DerivedSources.make:
* DerivedSources.pro:
* GNUmakefile.am:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Generated.vcproj:
Added new files.
* Scripts/webkit2/messages.py: Moved some code from here...
* Scripts/webkit2/model.py: Added.
* Scripts/webkit2/parser.py: Added.
...to here. MessageReceiver.parse was split out into a function in the new parser module.
* Scripts/webkit2/messages_unittest.py: Updated for renames.
2011-09-16 Martin Robinson <mrobinson@igalia.com>
[GTK] Disable WebKit2 by default in configure.ac, but enable it with build-webkit
https://bugs.webkit.org/show_bug.cgi?id=68178
Reviewed by Xan Lopez.
* GNUmakefile.am: Do not build WebKit2 by default. Re-add pkgconfig support
for WebKit2.
2011-09-15 Adam Barth <abarth@webkit.org>
Rename ENABLE(DATABASE) to ENABLE(SQL_DATABASE)
https://bugs.webkit.org/show_bug.cgi?id=68205
Reviewed by Eric Seidel.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
2011-09-15 Eric Seidel <eric@webkit.org>
Remove ENABLE(SVG_AS_IMAGE) since all major ports have it on by default
https://bugs.webkit.org/show_bug.cgi?id=68182
Reviewed by Adam Barth.
* Configurations/FeatureDefines.xcconfig:
2011-09-15 Eric Seidel <eric@webkit.org>
Remove ENABLE_SVG_ANIMATION as all major ports have it on by default
https://bugs.webkit.org/show_bug.cgi?id=68022
Reviewed by Ryosuke Niwa.
* Configurations/FeatureDefines.xcconfig:
2011-09-15 Alexis Menard <alexis.menard@openbossa.org>
[Qt][WK2] Make QWebError more friendly to QML.
https://bugs.webkit.org/show_bug.cgi?id=67785
Reviewed by Simon Hausmann.
Make sure that we can use the loading errors in QML. We send it via a QJSValue which
has the properties needed to get the error code, the url and the type of error.
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::loadDidFail):
(QDesktopWebViewPrivate::engine):
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/API/qt/qtouchwebpage.h:
* 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/API/qt/tests/testwindow.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::loadDidFail):
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/qt/TouchViewInterface.cpp:
(WebKit::TouchViewInterface::loadDidFail):
(WebKit::TouchViewInterface::engine):
* UIProcess/qt/TouchViewInterface.h:
* UIProcess/qt/ViewInterface.h:
2011-09-15 Adam Roben <aroben@apple.com>
Remove WebKit2-specific knowledge from the Message class
This is in preparation for making some of our message-generations scripts usable by other
projects.
Fixes <http://webkit.org/b/68170> Model classes in WebKit2's message-generation scripts know
too much about WebKit2 details
Reviewed by Anders Carlsson.
* Scripts/webkit2/messages.py: Added constants for the message attributes we support.
(MessageReceiver.parse): Instead of recognizing individual attributes, just stick the
attributes into a set and pass it to the Message constructor.
(Message.__init__): Changed to take a generic set of attributes instead of individual
attributes.
(Message.has_attribute): Added. Returns true if the message has an attribute.
(message_is_variadic): Renamed from parameter_type_is_variadic. Code came from
Message.__init__, which set the old message.is_variadic property.
(decode_type):
(message_to_struct_declaration):
(forward_declarations_and_headers):
(async_case_statement):
(sync_case_statement):
(generate_message_handler):
Updated to use Message.has_attribute and message_is_variadic.
2011-09-14 Wajahat Siddiqui <mdwajahatali.siddiqui@motorola.com>
Eliminate WebKit2 compilation warnings.
https://bugs.webkit.org/show_bug.cgi?id=65025
Warnings found with gcc on linux.
Reviewed by Sam Weinig.
* Platform/CoreIPC/ArgumentEncoder.cpp:
(CoreIPC::ArgumentEncoder::~ArgumentEncoder):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createPlugin):
2011-09-14 Ada Chan <adachan@apple.com>
Implement WKBundleFrameCopyWebArchive().
http://bugs.webkit.org/show_bug.cgi?id=67857
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameCopyWebArchive): Call WebFrame::webArchiveData() and create a WKDataRef from the returned CFDataRef.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::webArchiveData): Add WebFrame::webArchiveData().
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getWebArchiveOfFrame): Move the logic to WebFrame::webArchiveData() and call that method here.
2011-09-14 Alexey Proskuryakov <ap@apple.com>
Web Process doesn't need a permission to look up WebProcess service any more
https://bugs.webkit.org/show_bug.cgi?id=68101
Reviewed by Anders Carlsson.
* WebProcess/com.apple.WebProcess.sb:
2011-09-14 Mark Hahnenberg <mhahnenberg@apple.com>
Unzip initialization lists and constructors in JSCell hierarchy (6/7)
https://bugs.webkit.org/show_bug.cgi?id=67692
Reviewed by Geoffrey Garen.
Completed the sixth 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 fifth 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/JSNPMethod.cpp:
(WebKit::JSNPMethod::JSNPMethod):
* WebProcess/Plugins/Netscape/JSNPMethod.h:
(WebKit::JSNPMethod::create):
2011-09-13 Eric Seidel <eric@webkit.org>
Remove ENABLE_SVG_USE as <use> is required by HTML5
https://bugs.webkit.org/show_bug.cgi?id=68019
Reviewed by Ryosuke Niwa.
* Configurations/FeatureDefines.xcconfig:
2011-09-13 Anders Carlsson <andersca@apple.com>
Disable C++ exceptions when building with clang
https://bugs.webkit.org/show_bug.cgi?id=68031
<rdar://problem/9556880>
Reviewed by Mark Rowe.
* Configurations/Base.xcconfig:
2011-09-13 Eric Seidel <eric@webkit.org>
Remove ENABLE_SVG_FOREIGN_OBJECT as it is a required part of HTML5
https://bugs.webkit.org/show_bug.cgi?id=68018
Reviewed by Ryosuke Niwa.
* Configurations/FeatureDefines.xcconfig:
2011-09-13 Chang Shu <cshu@webkit.org>
[WK2] [Mac] Implement KeyDown function for WebKit2 EventSender.
https://bugs.webkit.org/show_bug.cgi?id=57515
The code change in WebKit2 allows key events being sent to WebProcess from UIProcess synchronously.
Reviewed by Darin Adler.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetShouldSendKeyboardEventSynchronously):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::handleKeyboardEvent):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::setShouldSendKeyboardEventSynchronously):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::keyEventSyncForTesting):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-09-12 Ryuan Choi <ryuan.choi@samsung.com>
Reviewed by Eric Seidel.
[CMAKE][WK2] include cmakeconfig.h in WebKit2/config.h
https://bugs.webkit.org/show_bug.cgi?id=62692
* CMakeLists.txt: define WTF_USE_JSC=1.
* config.h: add cmakeconfig.h and define necessary macros for CMake build.
2011-09-12 Igor Oliveira <igor.oliveira@openbossa.org>
[Qt] [WK2] implement support to upload files in Qt WebKit2
https://bugs.webkit.org/show_bug.cgi?id=67228
This patch implements support to upload files in the Desktop Qt WebKit2 implementation.
Reviewed by Andreas Kling.
* Shared/WebOpenPanelParameters.h:
(WebKit::WebOpenPanelParameters::selectedFileNames):
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::chooseFiles):
(QDesktopWebViewPrivate::onOpenPanelFilesSelected):
(QDesktopWebViewPrivate::onOpenPanelFinished):
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/qt/ClientImpl.cpp:
qt_wk_runOpenPanel supports single and multiple files selection.
(qt_wk_runOpenPanel):
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::init):
* UIProcess/qt/TouchViewInterface.h:
(WebKit::TouchViewInterface::chooseFiles):
* UIProcess/qt/ViewInterface.h:
2011-09-12 Alexis Menard <alexis.menard@openbossa.org>
[Qt]Style error fix.
Reviewed by Andreas Kling.
* UIProcess/qt/QtWebPageProxy.cpp:
2011-09-11 Mark Rowe <mrowe@apple.com>
<rdar://problem/9878268> Pressing caps lock after closing a showModalDialog window results in WebProcess exiting
It's incorrect to try and use -[NSApplication run] to run nested runloops as it is not possible to
interrupt a nested invocation of -run without also causing outer invocations to exit after processing
their next event. We can avoid this issue by using -[NSApplication run] for the outermost invocation
of the main runloop, while using CFRunLoopRun for any nested invocations.
Reviewed by Anders Carlsson.
* Platform/RunLoop.h:
* Platform/mac/RunLoopMac.mm:
(RunLoop::RunLoop): Initialize the nesting level to 0.
(RunLoop::run): Bump the nesting level, and only use -[NSApplication run] for the outermost invocation of the
runloop. We also switch from -[NSRunloop run] to CFRunLoopRun as the former will only exit when it has no sources
left to process, while CFRunLoopRun will return immediately after CFRunLoopStop is called on it.
(RunLoop::stop): Only go down the NSApp path for the outermost invocation of the runloop.
2011-09-11 Balazs Kelemen <kbalazs@webkit.org>
[Qt][WK2] Qt layer should be hardened against C API versioning in the sense of build failures
https://bugs.webkit.org/show_bug.cgi?id=67094
Reviewed by Andreas Kling.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::init):
2011-09-09 Oliver Hunt <oliver@apple.com>
Remove support for anonymous storage from jsobjects
https://bugs.webkit.org/show_bug.cgi?id=67881
Reviewed by Sam Weinig.
Remove the use of AnonymousSlotCount.
* WebProcess/Plugins/Netscape/JSNPMethod.h:
(WebKit::JSNPMethod::createStructure):
* WebProcess/Plugins/Netscape/JSNPObject.h:
(WebKit::JSNPObject::createStructure):
2011-09-09 Chris Marrin <cmarrin@apple.com>
requestAnimationFrame doesn't throttle on Mac
https://bugs.webkit.org/show_bug.cgi?id=67171
Reviewed by Simon Fraser.
Removed runLoopObserver for requestAnimationFrame. It's now
done by a Timer in ScriptedAnimationController in WebCore.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::~WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
2011-09-09 Fady Samuel <fsamuel@chromium.org>
Move pageScaleFactor code from Frame.{h|cpp} to Page.{h|cpp}
https://bugs.webkit.org/show_bug.cgi?id=67250
Reviewed by Simon Fraser.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scalePage):
(WebKit::WebPage::pageScaleFactor):
2011-09-09 Mark Hahnenberg <mhahnenberg@apple.com>
Unzip initialization lists and constructors in JSCell hierarchy (5/7)
https://bugs.webkit.org/show_bug.cgi?id=67420
Reviewed by Geoffrey Garen.
Completed the fifth 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/JSNPMethod.cpp:
(WebKit::JSNPMethod::JSNPMethod):
(WebKit::JSNPMethod::finishCreation):
* WebProcess/Plugins/Netscape/JSNPMethod.h:
(WebKit::JSNPMethod::create):
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::JSNPObject):
* WebProcess/Plugins/Netscape/JSNPObject.h:
(WebKit::JSNPObject::create):
2011-09-08 Mark Rowe <mrowe@apple.com>
<rdar://problem/9742393> Spell checking a text area causes the page to reload
Ensure that m_pendingLearnOrIgnoreWordMessageCount is incremented when we use
executeEditCommand to ignore a word. This will ensure that WebPageProxy::ignoreWord
is expecting to be called, and will not turn around and terminate the web process.
Reviewed by Anders Carlsson.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::executeEditCommand):
2011-09-08 Sam Weinig <sam@webkit.org>
Remove accidentally committed typo.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::waitForSyncReply):
2011-09-08 Brian Weinstein <bweinstein@apple.com>
WebKit2: Assertion when calling didPerform*Redirect on null source/destination URL string
https://bugs.webkit.org/show_bug.cgi?id=67794
<rdar://problem/9892024>
Don't call didPerformClientRedirect or didPerformServerRedirect when source or destination URL string
is empty or null.
If we call didPerformClientRedirect or didPerformServerRedirect when the source or destination is null,
it causes an assert in WKURLCF::WKURLCopyCFURL when we try to convert the WKURLRef into a CFURLRef.
Reviewed by Brady Eidson.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didPerformClientRedirect): Return early if the source or destination URL string is empty or null.
(WebKit::WebContext::didPerformServerRedirect): Ditto.
2011-09-08 Sam Weinig <sam@webkit.org>
Remove the Completion object from JSC, I have never liked it
https://bugs.webkit.org/show_bug.cgi?id=67755
Reviewed by Gavin Barraclough.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::evaluate):
2011-09-08 Anders Carlsson <andersca@apple.com>
Don't release the modal placeholder window if it's closed
https://bugs.webkit.org/show_bug.cgi?id=67801
<rdar://problem/10088059>
Reviewed by Adam Roben.
This is a speculative fix - nothing should really be able to close the modal placeholder window.
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::beginModal):
2011-09-07 Alexei Svitkine <asvitkine@chromium.org>
Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path.
https://bugs.webkit.org/show_bug.cgi?id=67511
Reviewed by Dimitri Glazkov.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-09-06 Oliver Hunt <oliver@apple.com>
Remove JSObjectWithGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=67689
Reviewed by Geoff Garen.
Remove JSObjectWithGlobalObject usage.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::JSNPObject):
(WebKit::JSNPObject::finishCreation):
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-09-05 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt][WK2] Make TiledDrawingArea request tiles only in the direction the viewport is panned to.
https://bugs.webkit.org/show_bug.cgi?id=67606
TiledBackingStore previously used different values for horizontal and vertial multiplication
to calculate the cover area.
This patch replaces this mechanism, used to give a bigger panning range to vertical panning,
with the possibility to use the motion vector of the viewport to request tiles ahead instead.
This allows economies on rendering resources as tiles won't be rendered beside the trajectory
of the viewport.
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::QTouchWebViewPrivate):
(QTouchWebViewPrivate::_q_viewportMotionVectorChanged):
* UIProcess/API/qt/qtouchwebview.h:
* UIProcess/API/qt/qtouchwebview_p.h:
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::setVisibleContentRectMotionVector):
* UIProcess/TiledDrawingAreaProxy.h:
* UIProcess/qt/ViewportInteractionEngine.cpp:
(WebKit::ViewportInteractionEngine::panGestureRequestUpdate):
(WebKit::ViewportInteractionEngine::panGestureEnded):
(WebKit::ViewportInteractionEngine::pinchGestureStarted):
* UIProcess/qt/ViewportInteractionEngine.h:
* UIProcess/qt/qtouchwebpageproxy.cpp:
(QTouchWebPageProxy::setVisibleContentRectMotionVector):
* UIProcess/qt/qtouchwebpageproxy.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setVisibleContentRectMotionVector):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::setVisibleContentRectMotionVector):
* WebProcess/WebPage/TiledDrawingArea.h:
2011-09-01 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt] TiledBackingStore: Import the resizeEdgeTiles logic from TiledDrawindAreaProxy.
https://bugs.webkit.org/show_bug.cgi?id=67416
Reviewed by Kenneth Rohde Christiansen.
Original code by Antti Koivisto.
With the current code, when the page is layouted during load, edge tiles will
get removed instead of continuing to show their front buffer while the tile
is being rendered for the new size.
* WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
(WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
(WebKit::TiledBackingStoreRemoteTile::resize):
* WebProcess/WebPage/TiledBackingStoreRemoteTile.h:
2011-09-01 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
TiledDrawingArea: Fix issues where the tiles of the previous scale would be removed too early.
https://bugs.webkit.org/show_bug.cgi?id=67390
Reviewed by Tor Arne Vestbø.
The two issues addresssed are:
- The previous instance of the tile backing store would be destroyed in createTile which
would send removeTile messages for all its tiles before the DidRenderFrame message is sent for the new tiles.
- When quickly changing the scale a second time after a scale change, the previous tile set would
be replaced by the current incomplete tile set which may contain no tiles at all.
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::setVisibleContentRectAndScale):
(WebKit::TiledDrawingArea::tiledBackingStorePaintEnd):
(WebKit::TiledDrawingArea::createTile):
2011-08-30 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt][WK2] The scene graph is rendered continuously even when the page is idle.
https://bugs.webkit.org/show_bug.cgi?id=67195
Reviewed by Tor Arne Vestbø.
Since tiledBackingStorePaintEnd is called even when no tile is dirty, the TiledDrawingArea
and its proxy are looping over DidRenderFrame and RenderNextFrame messages.
This causes QSGItem::update() to be called and consumes a lot of useless CPU cycles on the UI process.
Introduce a bool to send DidRenderFrame only when dirty content was rendered.
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::TiledDrawingArea):
(WebKit::TiledDrawingArea::tiledBackingStorePaint):
(WebKit::TiledDrawingArea::tiledBackingStorePaintEnd):
* WebProcess/WebPage/TiledDrawingArea.h:
2011-08-30 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt][WK2] Make sure that the visible content rect and the content scale get to the web process in one single message.
https://bugs.webkit.org/show_bug.cgi?id=67189
Reviewed by Kenneth Rohde Christiansen.
The TiledBackingStore needs to know the screen size of the viewport to know how many tiles to
create, and since the visible content rect is given in page coordinates, the contents scale is
necessary to calculate the viewport size.
Both the rect and the scale then need to arrive to the web process at the same time to prevent
picking the new visible rect with the old scale or vice-versa which can produce a huge viewport size
and create/render an insane amount of tiles.
Things this patch does:
- Merge the visible contents rect and content scale handling together.
- Make QTouchWebView responsible for telling those viewport values to the web process instead of QTouchWebPage.
- Prevent updating the viewport in ViewportInteractionEngine while a pinch is in progress and update the viewport at the end.
* UIProcess/API/qt/qtouchwebpage.cpp:
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qtouchwebpage_p.h:
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::QTouchWebViewPrivate):
(QTouchWebViewPrivate::_q_viewportUpdated):
(QTouchWebView::geometryChanged):
* UIProcess/API/qt/qtouchwebview.h:
* UIProcess/API/qt/qtouchwebview_p.h:
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::setVisibleContentRectAndScale):
* UIProcess/TiledDrawingAreaProxy.h:
* UIProcess/qt/ViewportInteractionEngine.cpp:
(WebKit::ViewportInteractionEngine::ViewportInteractionEngine):
(WebKit::ViewportInteractionEngine::~ViewportInteractionEngine): Allows OwnPtr with the forward declaration of ViewportUpdateGuard.
(WebKit::ViewportInteractionEngine::setConstraints):
(WebKit::ViewportInteractionEngine::pinchGestureStarted):
(WebKit::ViewportInteractionEngine::pinchGestureEnded):
(WebKit::ViewportInteractionEngine::contentViewportChanged):
* UIProcess/qt/ViewportInteractionEngine.h:
* UIProcess/qt/qtouchwebpageproxy.cpp:
(QTouchWebPageProxy::setVisibleContentRectAndScale):
* UIProcess/qt/qtouchwebpageproxy.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setVisibleContentRectAndScale):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::setVisibleContentRectAndScale):
* WebProcess/WebPage/TiledDrawingArea.h:
2011-08-29 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
[Qt][WK2] Rename SGAgent to SGUpdateQueue to sharpen it's responsability.
https://bugs.webkit.org/show_bug.cgi?id=67122
Reviewed by Tor Arne Vestbø.
* UIProcess/API/qt/qtouchwebpage.cpp:
(QTouchWebPage::updatePaintNode):
(QTouchWebPagePrivate::QTouchWebPagePrivate):
* UIProcess/API/qt/qtouchwebpage_p.h:
* UIProcess/qt/SGUpdateQueue.cpp: Renamed from Source/WebKit2/UIProcess/qt/SGAgent.cpp.
(WebKit::NodeUpdateCreateTile::NodeUpdateCreateTile):
(WebKit::NodeUpdateRemoveTile::NodeUpdateRemoveTile):
(WebKit::NodeUpdateSetBackBuffer::NodeUpdateSetBackBuffer):
(WebKit::NodeUpdateSwapTileBuffers::NodeUpdateSwapTileBuffers):
(WebKit::SGUpdateQueue::SGUpdateQueue):
(WebKit::SGUpdateQueue::createTileNode):
(WebKit::SGUpdateQueue::removeTileNode):
(WebKit::SGUpdateQueue::setNodeBackBuffer):
(WebKit::SGUpdateQueue::swapTileBuffers):
(WebKit::SGUpdateQueue::applyUpdates):
(WebKit::SGUpdateQueue::getScaleNode):
* UIProcess/qt/SGUpdateQueue.h: Renamed from Source/WebKit2/UIProcess/qt/SGAgent.h.
(WebKit::SGUpdateQueue::isSwapPending):
(WebKit::NodeUpdate::NodeUpdate):
(WebKit::NodeUpdate::~NodeUpdate):
* UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
(WebKit::TiledDrawingAreaProxy::updateWebView):
(WebKit::TiledDrawingAreaProxy::createTile):
(WebKit::TiledDrawingAreaProxy::updateTile):
(WebKit::TiledDrawingAreaProxy::didRenderFrame):
(WebKit::TiledDrawingAreaProxy::removeTile):
* UIProcess/qt/TouchViewInterface.cpp:
(WebKit::TouchViewInterface::sceneGraphUpdateQueue):
* UIProcess/qt/TouchViewInterface.h:
* WebKit2.pro:
2011-09-07 Alexis Menard <alexis.menard@openbossa.org>
[Qt] Unreviewed suppression of an unnecessary debug output.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
2011-09-07 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r94627 and r94632.
http://trac.webkit.org/changeset/94627
http://trac.webkit.org/changeset/94632
https://bugs.webkit.org/show_bug.cgi?id=67698
It broke tests on GTK and Qt (Requested by Ossy on #webkit).
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::JSNPMethod::JSNPMethod):
(WebKit::JSNPMethod::create):
* WebProcess/Plugins/Netscape/JSNPMethod.h:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::JSNPObject):
(WebKit::JSNPObject::create):
* WebProcess/Plugins/Netscape/JSNPObject.h:
2011-09-06 Ryosuke Niwa <rniwa@webkit.org>
fast/forms/suggested-value-crash.html crashes on Windows
https://bugs.webkit.org/show_bug.cgi?id=67688
Reviewed by Adam Barth.
Removed sybmols for inputTag and textareaTag. Added the symbol for StringImpl::equal.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-09-06 Mark Hahnenberg <mhahnenberg@apple.com>
Unzip initialization lists and constructors in JSCell hierarchy (5/7)
https://bugs.webkit.org/show_bug.cgi?id=67420
Reviewed by Geoffrey Garen.
Completed the fifth 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/JSNPMethod.cpp:
(WebKit::JSNPMethod::JSNPMethod):
(WebKit::JSNPMethod::finishCreation):
* WebProcess/Plugins/Netscape/JSNPMethod.h:
(WebKit::JSNPMethod::create):
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::JSNPObject):
* WebProcess/Plugins/Netscape/JSNPObject.h:
(WebKit::JSNPObject::create):
2011-09-06 Ryosuke Niwa <rniwa@webkit.org>
Rename confirmCompositionWithoutDisturbingSelection to cancelComposition
https://bugs.webkit.org/show_bug.cgi?id=67569
Reviewed by Antonio Gomes.
* UIProcess/API/mac/WKView.mm:
(-[WKView resignFirstResponder]):
(-[WKView _updateTextInputStateIncludingSecureInputState:]):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::cancelComposition):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::cancelComposition):
2011-09-05 Oliver Hunt <oliver@apple.com>
An object's structure should reference the global object responsible for its creation
https://bugs.webkit.org/show_bug.cgi?id=67624
Reviewed by Gavin Barraclough.
Update for new Structure::create globalObject parameter.
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::JSNPMethod::create):
* WebProcess/Plugins/Netscape/JSNPMethod.h:
(WebKit::JSNPMethod::createStructure):
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::create):
* WebProcess/Plugins/Netscape/JSNPObject.h:
(WebKit::JSNPObject::createStructure):
2011-09-06 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium
https://bugs.webkit.org/show_bug.cgi?id=67453
Reviewed by Kent Tamura.
Add symbols for internals.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-09-06 Wajahat Siddiqui <mdwajahatali.siddiqui@motorola.com>
[GTK] Use soup_session_add_feature_by_type uniformly in WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=67593
Reviewed by Martin Robinson.
Using soup_session_add_feature_by_type for adding all soup features
instead of adding using GRefPtr.
* WebProcess/gtk/WebProcessMainGtk.cpp:
(WebKit::WebProcessMainGtk):
2011-09-05 Balazs Kelemen <kbalazs@webkit.org>
[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 <andras.becsi@nokia.com>
[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 <webkit.review.bot@gmail.com>
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 <webkit.review.bot@gmail.com>
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 <msaboff@apple.com>
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 <andersca@apple.com>
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 <adachan@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <ravi.kasibhatla@motorola.com>
[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 <kbalazs@webkit.org>
[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 <mrowe@apple.com>
<http://webkit.org/b/67467> 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 <adachan@apple.com>
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 <mhahnenberg@apple.com>
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 <adachan@apple.com>
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 <timothy_horton@apple.com>
REGRESSION: Rendering artifacts on a rotated, pattern filled shape
https://bugs.webkit.org/show_bug.cgi?id=53055
<rdar://problem/8910917>
Reviewed by Simon Fraser.
Introduce wkCGPatternCreateWithImageAndTransform.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2011-09-01 Gopal Raghavan <gopal.1.raghavan@nokia.com>
[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 <adachan@apple.com>
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 <xlopez@igalia.com>
[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 <andersca@apple.com>
Jagged text shown in find-in-page highlight
https://bugs.webkit.org/show_bug.cgi?id=67347
<rdar://problem/9870444>
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 <bdakin@apple.com>
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 <andersca@apple.com>
REGRESSION(r93902): Can't open external links on gmail
https://bugs.webkit.org/show_bug.cgi?id=67234
<rdar://problem/10053636>
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 <bdakin@apple.com>
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-
<rdar://problem/10041016>
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 <acolwell@chromium.org>
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 <adachan@apple.com>
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 <ap@apple.com>
DumpRenderTree should begin each test with an empty cookie store
https://bugs.webkit.org/show_bug.cgi?id=63545
<rdar://problem/5666907>
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 <alexis.menard@openbossa.org>
[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 <kaustubh@motorola.com>
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 <rniwa@webkit.org>
Another Windows build fix after r94047.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-08-29 Ryosuke Niwa <rniwa@webkit.org>
Export more symbols for r94038.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-08-29 Ryosuke Niwa <rniwa@webkit.org>
Windows build fix for r94038.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-08-29 Gopal Raghavan <gopal.1.raghavan@nokia.com>
[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 <gopal.1.raghavan@nokia.com>
[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 <webkit.review.bot@gmail.com>
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 <mrobinson@igalia.com>
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 <ap@apple.com>
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 <ap@apple.com>
DumpRenderTree should begin each test with an empty cookie store
https://bugs.webkit.org/show_bug.cgi?id=63545
<rdar://problem/5666907>
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 <cmarrin@apple.com>
Fixed a build problem caused by http://trac.webkit.org/changeset/93980
Unreviewed.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
2011-08-23 Chris Marrin <cmarrin@apple.com>
[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 <pierre.rossi@gmail.com>
[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 <vamshi@motorola.com>
[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 <WebCore/ResourceError.h> explicitly to remove WebCore::ResourceError
inclusion error.
2011-08-28 Balazs Kelemen <kbalazs@webkit.org>
[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 <sam@webkit.org>
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 <andersca@apple.com>
Fix build.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
2011-08-26 Sam Weinig <sam@webkit.org>
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 <andersca@apple.com>
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 <sam@webkit.org>
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 <alice.liu@apple.com>
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 <alexis.menard@openbossa.org>
[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 <andersca@apple.com>
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 <jberlin@apple.com>
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 <andersca@apple.com>
kNPEventStartIME doesn't work correctly for NPAPI
https://bugs.webkit.org/show_bug.cgi?id=65264
<rdar://problem/9996476>
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 <andersca@apple.com>
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 <jeffm@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <alexis.menard@openbossa.org>
[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 <jocelyn.turcotte@nokia.com>
[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 <msaboff@apple.com>
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 <andersca@apple.com>
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 <oliver@apple.com>
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 <andersca@apple.com>
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 <amruthraj@motorola.com>
[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 <andersca@apple.com>
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 <gopal.1.raghavan@nokia.com>
[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 <jocelyn.turcotte@nokia.com>
[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 <steveblock@google.com>
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 <benjamin@webkit.org>
[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 <oliver@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <msaboff@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
Another attempt at fixing the Windows build.
* UIProcess/PageClient.h:
2011-08-19 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* WebProcess/Plugins/PluginController.h:
2011-08-19 Anders Carlsson <andersca@apple.com>
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 <caio.oliveira@openbossa.org>
[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 <andersca@apple.com>
WebProcess crashes during startup if libdispatch is initialized by WebProcessShim.dylib
https://bugs.webkit.org/show_bug.cgi?id=66508
<rdar://problem/9828476>
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 <benjamin@webkit.org>
[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 <lars.knudsen@nokia.com>
[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 <morrita@google.com>
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 <bdakin@apple.com>
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 <darin@apple.com>
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 <amruthraj@motorola.com>
[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 <aroben@apple.com>
Update the device scale factor when the WKView's window changes
Fixes <http://webkit.org/b/66412> <rdar://problem/9971958> 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 <aroben@apple.com>
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 <http://webkit.org/b/66466> 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 <aroben@apple.com>
Make WebCore keep track of the current device scale factor
Fixes <http://webkit.org/b/66413> 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 <andersca@apple.com>
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 <dimich@chromium.org>
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 <kbalazs@webkit.org>
[Qt][WK2] Unreviewed build fix after r93058.
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::deviceScaleFactorDidChange):
* UIProcess/TiledDrawingAreaProxy.h:
2011-08-15 Adam Roben <aroben@apple.com>
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 <http://webkit.org/b/66229> <rdar://problem/9906269> 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 <benjamin@webkit.org>
[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 <kbalazs@webkit.org>
Unreviewed.
Fix Qt-WK2 build after r93040.
* UIProcess/qt/QtWebPageProxy.h:
(QtWebPageProxy::deviceScaleFactor):
2011-08-10 Adam Roben <aroben@apple.com>
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 <http://webkit.org/b/55787> 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 <sam@webkit.org>
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 <mitz@apple.com>
<rdar://problem/7337717> 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 <mrowe@apple.com>
Be more forward-looking in the choice of compiler.
Rubber-stamped by Jon Honeycutt.
* Configurations/CompilerVersion.xcconfig:
2011-08-11 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
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 <thakis@chromium.org>
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 <kenneth@webkit.org>
[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 <hyatt@apple.com>
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 <ap@apple.com>
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 <lars.knudsen@nokia.com>
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 <sullivan@apple.com>
WKPageCopyPendingAPIRequestURL returns stale result if policy decision set to Ignore
https://bugs.webkit.org/show_bug.cgi?id=65950
<rdar://problem/9925931>
Reviewed by Anders Carlsson.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):
Call clearPendingAPIRequestURL() if the policy decision is PolicyIgnore.
2011-08-09 Anders Carlsson <andersca@apple.com>
Add a WebKit prefix to the user default.
Reviewed by Dan Bernstein.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
2011-08-09 Anders Carlsson <andersca@apple.com>
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 <mhahnenberg@apple.com>
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 <enne@google.com>
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 <kenneth@webkit.org>
[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 <kenneth@webkit.org>
[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 <cmarrin@apple.com>
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 <mitz@apple.com>
<rdar://problem/9652350> 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 <pfeldman@chromium.org>
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 <joepeck@webkit.org>
[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 <mrowe@apple.com>
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 <arosenberg@logitech.com>
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 <darin@apple.com>
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 <mrowe@apple.com>
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 <bweinstein@apple.com>
WebKit2: Web Inspector always starts in undocked mode
https://bugs.webkit.org/show_bug.cgi?id=65493
<rdar://problem/9353114>
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 <jocelyn.turcotte@nokia.com>
[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 <alexis.menard@openbossa.org>
[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 <jeffm@apple.com>
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 <mrowe@apple.com>
Bring some order to FeatureDefines.xcconfig to make it easier to follow.
Reviewed by Sam Weinig.
* Configurations/FeatureDefines.xcconfig:
2011-08-03 Mark Rowe <mrowe@apple.com>
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 <caio.oliveira@openbossa.org>
[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 <andersca@apple.com>
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 <pfeldman@google.com>
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 <caio.oliveira@openbossa.org>
[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 <cgarcia@igalia.com>
[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 <pfeldman@chromium.org>
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 <cgarcia@igalia.com>
[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 <msaboff@apple.com>
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 <jocelyn.turcotte@nokia.com>
[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 <jocelyn.turcotte@nokia.com>
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 <amruthraj@motorola.com>
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 <scottmg@chromium.org>
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 <hayato@chromium.org>
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 <webkit.review.bot@gmail.com>
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 <amruthraj@motorola.com>
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 <dbates@webkit.org>
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 <mitz@apple.com>
Try to fix the Windows build after r92059.
* win/WebKit2.def: Export symbols needed by Internals.
2011-07-30 Patrick Gansterer <paroga@webkit.org>
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 <kbalazs@webkit.org>
[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 <sam@webkit.org>
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 <andersca@apple.com>
Pass the HTTP referrer header for URLs loaded by plug-ins
https://bugs.webkit.org/show_bug.cgi?id=65379
<rdar://problem/9822116>
Reviewed by Sam Weinig.
Set the HTTP referrer if necessary.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::loadURL):
2011-07-29 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
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 <jocelyn.turcotte@nokia.com>
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 <alexis.menard@openbossa.org>
[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 <jocelyn.turcotte@nokia.com>
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 <timothy_horton@apple.com>
REGRESSION (5.1): CJK input broken after clicking on Flash content
<rdar://problem/9854447>
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 <andersca@apple.com>
Crash when trying to encode FontInfo with a null font attribute descriptor
https://bugs.webkit.org/show_bug.cgi?id=65350
<rdar://problem/9520670>
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 <cfleizach@apple.com>
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 <ravi.kasibhatla@motorola.com>
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 <mitz@apple.com>
<rdar://problem/9589433> 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 <beidson@apple.com>
<rdar://problem/9714337> 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 <mhahnenberg@apple.com>
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 <benjamin@webkit.org>
[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 <simon.hausmann@nokia.com>
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 <benjamin@webkit.org>
[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 <caio.oliveira@openbossa.org>
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 <benjamin@webkit.org>
[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 <sadrul@chromium.org>
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 <timothy_horton@apple.com>
Apply r40940 to WebKit2 to work around a Silverlight crash.
https://bugs.webkit.org/show_bug.cgi?id=65205
<rdar://problem/9058370>
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 <mitz@apple.com>
<rdar://problem/9842889> 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 <abecsi@webkit.org>
[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 <benjamin@webkit.org>
[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 <cgarcia@igalia.com>
[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 <jberlin@apple.com>
[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 <yael.aharon@nokia.com>
[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 <timothy_horton@apple.com>
Scrollbar color heuristic needs to be hooked up in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=64220
<rdar://problem/9589140>
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 <jamesr@chromium.org>
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 <rniwa@webkit.org>
Build fix after r91307.
* Platform/Logging.h:
2011-07-19 Lukasz Slachciak <lukasz.slachciak@gmail.com>
[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 <bweinstein@apple.com>
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 <bweinstein@apple.com>
Speculative fix for: Crash under WebPage::platformDragEnded when dragging on Mac
https://bugs.webkit.org/show_bug.cgi?id=64766
<rdar://problem/9548174>
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 <alexis.menard@openbossa.org>
[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 <morrita@google.com>
[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 <dino@apple.com>
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 <jamesr@chromium.org>
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 <andersca@apple.com>
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 <jocelyn.turcotte@nokia.com>
[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 <jocelyn.turcotte@nokia.com>
[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 <jocelyn.turcotte@nokia.com>
[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 <jocelyn.turcotte@nokia.com>
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 <amruthraj@motorola.com>
[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 <l.slachciak@samsung.com>
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 <dbates@webkit.org>
Fix Win Cairo Debug build after <http://trac.webkit.org/changeset/91085>.
Add stub implementation of scale factor overloaded ShareableBitmap::paint() for
Cairo WebKit2 port after its usage in changeset <http://trac.webkit.org/changeset/91085>.
Also add stub implementation for GTK.
We'll need to actually implement this. See <https://bugs.webkit.org/show_bug.cgi?id=64664>
and <https://bugs.webkit.org/show_bug.cgi?id=64665> 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 <dbates@webkit.org>
Fix Qt Linux Release build after changeset <http://trac.webkit.org/changeset/91085>
(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 <https://bugs.webkit.org/show_bug.cgi?id=64663>
for more details.
* Shared/qt/ShareableBitmapQt.cpp:
(WebKit::ShareableBitmap::paint): Added scale-factor variant.
2011-07-16 Simon Fraser <simon.fraser@apple.com>
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 <dbates@webkit.org>
Attempt to fix the Qt Linux Release build after changeset <http://trac.webkit.org/changeset/91097>
(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 <psolanki@apple.com>
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 <timothy_horton@apple.com>
Overlay scrollbars in overflow areas no longer pulse when revealed
https://bugs.webkit.org/show_bug.cgi?id=64606
<rdar://problem/9390674>
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 <simon.fraser@apple.com>
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 <adachan@apple.com>
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 <mitz@apple.com>
Windows build fix.
* UIProcess/win/WebView.cpp:
2011-07-15 Dan Bernstein <mitz@apple.com>
Windows build fix.
* UIProcess/win/WebView.h:
2011-07-15 Dan Bernstein <mitz@apple.com>
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 <barraclough@apple.com>
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 <andersca@apple.com>
Find indicator should take scale factor into account
https://bugs.webkit.org/show_bug.cgi?id=64611
<rdar://problem/9761020>
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 <mrobinson@igalia.com>
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 <kenneth@webkit.org>
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 <cgarcia@igalia.com>
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 <cgarcia@igalia.com>
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 <cgarcia@igalia.com>
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 <kbalazs@webkit.org> and Carlos Garcia Campos <cgarcia@igalia.com>
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 <adachan@apple.com>
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 <morrita@google.com>
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 <morrita@google.com>
Unreviewed attempt at a build fix.
* win/WebKit2CFLite.def:
2011-07-13 MORITA Hajime <morrita@google.com>
[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 <levin@chromium.org>
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 <kling@webkit.org>
[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 <kling@webkit.org>
[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 <jocelyn.turcotte@nokia.com>
[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 <joepeck@webkit.org>
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 <jer.noble@apple.com>
Full-screen: Don't change the collectionBehavior of the WebView's NSWindow if not necessary
https://bugs.webkit.org/show_bug.cgi?id=63217
<rdar://problem/9660291>
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 <kling@webkit.org>
[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 <benjamin@webkit.org>
[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 <kling@webkit.org>
[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 <kling@webkit.org>
[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 <kling@webkit.org>
[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 <jocelyn.turcotte@nokia.com>
[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 <aroben@apple.com>
Export some symbols needed by TestWebKitAPI
Part of <http://webkit.org/b/63330> Concatenating string literals and WTF::Strings using
operator+ is suboptimal
Reviewed by Darin Adler.
* win/WebKit2.def:
2011-07-11 Hironori Bono <hbono@chromium.org>
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 <benjamin@webkit.org>
[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 <andersca@apple.com>
Implement getFormValue for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=64294
<rdar://problem/3964087>
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 <adachan@apple.com>
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 <benjamin@webkit.org>
[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 <kling@webkit.org>
[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 <andersca@apple.com>
WebKit2 is leaking NSCursors created by leakNamedCursor
https://bugs.webkit.org/show_bug.cgi?id=64241
<rdar://problem/9507151>
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 <benjamin@webkit.org>
[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 <noel.gordon@gmail.com>
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 <kling@webkit.org>
[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 <benjamin@webkit.org>
[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 <benjamin@webkit.org>
[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 <benjamin@webkit.org>
[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 <kling@webkit.org>
[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 <kling@webkit.org>
[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 <kling@webkit.org>
[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 <benjamin@webkit.org>
[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 <kling@webkit.org>
[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 <benjamin@webkit.org>.
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 <jeffm@apple.com>
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 <vsevik@chromium.org>
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 <webkit.review.bot@gmail.com>
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 <vsevik@chromium.org>
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 <andersca@apple.com>
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
<rdar://problem/7124300>
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 <robert@webkit.org>
Reviewed by Simon Hausmann.
[Qt] Windowless Plugins : <input> 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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <darin@apple.com>
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 <bweinstein@apple.com>
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 <kbalazs@webkit.org>
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 <mrowe@apple.com>
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 <darin@apple.com>
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 <mrowe@apple.com>
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 <mrowe@apple.com>
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 <mrowe@apple.com>
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 <mrowe@apple.com>
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 <andersca@apple.com>
Build fix.
* UIProcess/win/WebPopupMenuProxyWin.h:
(WebKit::WebPopupMenuProxyWin::enclosingScrollableArea):
2011-06-30 Martin Robinson <mrobinson@igalia.com>
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 <mrowe@apple.com>
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 <darin@apple.com>
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 <darin@apple.com>
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 <cshu@webkit.org>
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 <kbalazs@webkit.org>
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 <kbalazs@webkit.org>
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 <yutak@chromium.org>
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 <jeffm@apple.com>
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 <luxtella@company100.net>
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 <mrowe@apple.com>
Reviewed by Dan Bernstein.
Use a separate file name for Lion's WebKitSystemInterface.
* Configurations/DebugRelease.xcconfig:
2011-06-26 Mark Rowe <mrowe@apple.com>
Rubber-stamped by Maciej Stachowiak.
<rdar://problem/9679221&9679235> Work around an issue with sandbox.h.
* WebProcess/mac/WebProcessMac.mm:
2011-06-26 Anders Carlsson <andersca@apple.com>
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 <bfulgham@webkit.org>
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 <bfulgham@webkit.org>
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 <bfulgham@webkit.org>
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 <andersca@apple.com>
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
<rdar://problem/9673120>
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 <andersca@apple.com>
Reviewed by Kevin Decker.
Not possible for plug-ins to override the internal PDF viewer
https://bugs.webkit.org/show_bug.cgi?id=63356
<rdar://problem/9673382>
* 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 <aroben@apple.com>
Mac build fix after r89685
* WebProcess/WebKitMain.cpp: Make a Windows-only #include really be Windows-only.
2011-06-24 Adam Roben <aroben@apple.com>
Make the web process pause dialog look better on Vista/7 and robust against executable
renames
Fixes <http://webkit.org/b/63335> 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 <dominicc@chromium.org>
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 <cgarcia@igalia.com>
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 <james.cooley@nokia.com>
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 <yael.aharon@nokia.com>
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 <cgarcia@igalia.com>
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 <cgarcia@igalia.com>
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 <cgarcia@igalia.com>
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 <japhet@chromium.org>
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 <kbalazs@webkit.org>
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 <ggaren@apple.com>
Reviewed by Oliver Hunt.
Removed unnecessary #include <stdio.h>.
* 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 <kbalazs@webkit.org>
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 <kbalazs@webkit.org>
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 <eunmi15.lee@samsung.com>
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 <aroben@apple.com>
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 <http://webkit.org/b/63075> <rdar://problem/9648113> 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 <cgarcia@igalia.com>
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 <dglazkov@chromium.org>
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 <mrobinson@igalia.com>
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 <morrita@google.com>
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 <morrita@google.com>
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 <jer.noble@apple.com>
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
<rdar://problem/9645393>
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 <yael.aharon@nokia.com>
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 <l.slachciak@samsung.com>
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 <mrobinson@igalia.com>
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 <cgarcia@igalia.com>
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 <cgarcia@igalia.com>
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 <morrita@google.com>
Unreviewed wincairo build fix.
* win/WebKit2CFLite.def:
2011-06-19 MORITA Hajime <morrita@google.com>
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 <dglazkov@chromium.org>
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 <eunmi15.lee@samsung.com>
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 <eunmi15.lee@samsung.com>
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 <bfulgham@webkit.org>
[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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
Fix Qt build.
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2011-06-17 Anders Carlsson <andersca@apple.com>
Windows build fix.
* UIProcess/win/WebView.cpp:
2011-06-17 Anders Carlsson <andersca@apple.com>
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 <cshu@webkit.org>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <cshu@webkit.org>
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 <cgarcia@igalia.com>
Unreviewed. Fix WebKit2 GTK build after r89060.
* Shared/gtk/WebCoreArgumentCodersGtk.cpp:
(CoreIPC::::encode):
2011-06-16 Anders Carlsson <andersca@apple.com>
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 <andersca@apple.com>
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 <cshu@webkit.org>
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 <andersca@apple.com>
Fix build.
* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebCoreArgumentCoders.h:
2011-06-15 Anders Carlsson <andersca@apple.com>
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 <sy302.park@gmail.com>
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 <cgarcia@igalia.com>
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 <abarth@webkit.org>
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 <ryuan.choi@samsung.com>
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 <sullivan@apple.com>
Reviewed by Sam Weinig.
WKSecurityOriginGetProtocol and WKSecurityOriginGetHost are named wrong because they return copied strings
<https://bugs.webkit.org/show_bug.cgi?id=62763>
<rdar://problem/9618071>
* 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 <jhoneycutt@apple.com>
REGRESSION(78201): Windowless Flash plug-ins are transparent on some sites
https://bugs.webkit.org/show_bug.cgi?id=62690
<rdar://problem/9512026>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
Reviewed by Sam Weinig.
Fix possible null dereference in webSecKeychainItemCreateFromContentOnMainThread
https://bugs.webkit.org/show_bug.cgi?id=62736
<rdar://problem/9601595>
* 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 <andersca@apple.com>
Reviewed by Dan Bernstein.
Ignore responsiveness timer callbacks on closed pages
https://bugs.webkit.org/show_bug.cgi?id=62735
<rdar://problem/9511295>
* 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 <webkit.review.bot@gmail.com>
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 <ossy@webkit.org>
[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 <eunmi15.lee@samsung.com>
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 <sam@webkit.org>
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 <sullivan@apple.com>
Reviewed by Ada Chan.
<https://bugs.webkit.org/show_bug.cgi?id=62693>
<rdar://problem/9601436>
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 <andersca@apple.com>
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 <noam.rosenthal@nokia.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <sullivan@apple.com>
Reviewed by Dan Bernstein.
<https://bugs.webkit.org/show_bug.cgi?id=62666>
<rdar://problem/9606676>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <andersca@apple.com>
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 <slewis@apple.com>
Rubber stamped by Oliver Hunt.
<rdar://problem/9511169>
Update order files.
* mac/WebKit2.order:
2011-06-14 Anders Carlsson <andersca@apple.com>
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 <andersca@apple.com>
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 <cgarcia@igalia.com>
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 <cgarcia@igalia.com>
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 <cgarcia@igalia.com>
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 <noam.rosenthal@nokia.com> and Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
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 <noam.rosenthal@nokia.com>
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 <andersca@apple.com>
Reviewed by Sam Weinig.
Crash when trying to use Netflix Watch Instantly with Silverlight 3
https://bugs.webkit.org/show_bug.cgi?id=62611
<rdar://problem/9058370>
* 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 <ryuan.choi@samsung.com>
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 <eunmi15.lee@samsung.com>
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 <eunmi15.lee@samsung.com>
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 <sy302.park@gmail.com>
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 <eunmi15.lee@samsung.com>
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 <noam.rosenthal@nokia.com>
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 <andersca@apple.com>
Reviewed by Dan Bernstein.
BankID plug-in isn't instantiated correctly
https://bugs.webkit.org/show_bug.cgi?id=62588
<rdar://problem/9586600>
* 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 <cfleizach@apple.com>
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 <sam@webkit.org>
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
<rdar://problem/9580237>
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::shouldUseSelection):
Return early if the selection we are using is not a range.
2011-06-13 Tony Chang <tony@chromium.org>
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 <noam.rosenthal@nokia.com>
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 <noam.rosenthal@nokia.com>
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 <jer.noble@apple.com>
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 <tony@chromium.org>
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 <andersca@apple.com>
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
<rdar://problem/9599243>
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 <cgarcia@igalia.com>
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 <eunmi15.lee@samsung.com>
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 <eunmi15.lee@samsung.com>
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 <cgarcia@igalia.com>
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 <cgarcia@igalia.com>
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 <abarth@webkit.org>
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 <abarth@webkit.org>
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 <abarth@webkit.org>
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 <slewis@apple.com>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=62480
part of <rdar://problem/8675177>
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 <jer.noble@apple.com>
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 <andersca@apple.com>
Reviewed by Sam Weinig.
REGRESSION (WebKit2): window.showModalDialog() broken
https://bugs.webkit.org/show_bug.cgi?id=62496
<rdar://problem/9581492>
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 <sam@webkit.org>
Reviewed by Anders Carlsson.
Unresponsive cursor is shown when displaying a modal dialog
Part of <rdar://problem/9581492>
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 <tony@chromium.org>
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 <ryuan.choi@samsung.com>
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 <kling@webkit.org>
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 <kling@webkit.org>
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 <kling@webkit.org>
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 <eunmi15.lee@samsung.com>
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 <sullivan@apple.com>
Reviewed by Darin Adler.
<https://bugs.webkit.org/show_bug.cgi?id=62332>
<rdar://problem/9355199>
[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 <noam.rosenthal@nokia.com>
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 <noam.rosenthal@nokia.com>
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 <yael.aharon@nokia.com>
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 <timothy_horton@apple.com>
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 <sullivan@apple.com>
Reviewed by Darin Adler.
<https://bugs.webkit.org/show_bug.cgi?id=62248>
<rdar://problem/9568516>
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 <sam@webkit.org>
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 <zbujtas@gmail.com>
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 <webkit.review.bot@gmail.com>
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 <timothy_horton@apple.com>
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 <cgarcia@igalia.com>
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 <webkit.review.bot@gmail.com>
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 <noam.rosenthal@nokia.com>
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 <sullivan@apple.com>
Reviewed by Dan Bernstein.
<https://bugs.webkit.org/show_bug.cgi?id=62165>
<rdar://problem/9555835>
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 <cgarcia@igalia.com>
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 <dominicc@chromium.org>
Unreviewed WinCairo build fix after r88159.
* win/WebKit2CFLite.def: Export symbols for WebCoreTestSupport.
2011-06-04 Dominic Cooney <dominicc@chromium.org>
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 <achicu@adobe.com>
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 <mihnea@adobe.com>
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 <cgarcia@igalia.com>
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 ==