blob: 56dc1101a308d3a046c7bc59d16cb845231b545c [file] [log] [blame]
2011-02-16 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Always disable the responsiveness timer when showing a popup menu
https://bugs.webkit.org/show_bug.cgi?id=54578
<rdar://problem/9009170>
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenu):
2011-02-16 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Assertion failure in DrawingAreaImpl::display when calling WKPageForceRepaint on a page that uses accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=54575
<rdar://problem/8979594>
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::forceRepaint):
If there is a layer tree host, ask it to force a repaint instead.
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::forceRepaint):
Flush any layer changes, then flush and synchronize the current CA transaction.
2011-02-16 Alexey Proskuryakov <ap@apple.com>
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=54572
REGRESSION (WebKit2): Print Backgrounds checkbox has no effect for DOM initiated printing
* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::preferencesDidChange): Preferences need
to be propagated to Web process during synchronous printing.
2011-02-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
WebPluginSiteDataManager should work with plug-in process
https://bugs.webkit.org/show_bug.cgi?id=54523
<rdar://problem/8689312>
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::removeWebProcessConnection):
Call startShutdownTimerIfNecessary().
(WebKit::PluginProcess::getSitesWithData):
Ask the plug-in module for the sites with data and send them back
in a PluginProcessProxy::DidGetSitesWithData message.
(WebKit::PluginProcess::clearSiteData):
Clear site data and send back a DidClearSiteData message.
(WebKit::PluginProcess::startShutdownTimerIfNecessary):
Factor code out from removeWebProcessConnection.
* PluginProcess/PluginProcess.messages.in:
Add new messages.
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::plugins):
New function for getting all plug-ins.
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::getPluginProcessConnection):
Call getOrCreatePluginProcess.
(WebKit::PluginProcessManager::getSitesWithData):
Get a plug-in process proxy and call getSitesWithData.
(WebKit::PluginProcessManager::clearSiteData):
Get a plug-in process proxy and call clearSiteData.
(WebKit::PluginProcessManager::getOrCreatePluginProcess):
Factor code to create a plug-in process out into a separate function.
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::getSitesWithData):
(WebKit::PluginProcessProxy::clearSiteData):
Update the pending reply struct. If the process is still launching,
enqueue the request. Otherwise, just send the message.
(WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
Make sure that pending replies are sent out.
(WebKit::PluginProcessProxy::didFinishLaunching):
Send our pending requests.
(WebKit::PluginProcessProxy::didGetSitesWithData):
(WebKit::PluginProcessProxy::didClearSiteData):
Call down to the plug-in site data manager.
* UIProcess/Plugins/PluginProcessProxy.messages.in:
Add DidGetSitesWithData and DidClearSiteData messages.
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::GetSitesWithDataState::GetSitesWithDataState):
Initialize the state.
(WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin):
If the plug-in queue is empty, call didGetSitesWithDataForAllPlugins. Otherwise, ask
the plug-in process manager to get sites for the next plug-in.
(WebKit::WebPluginSiteDataManager::GetSitesWithDataState::didGetSitesWithDataForSinglePlugin):
Update the sites set and get sites for the next plug-in.
(WebKit::WebPluginSiteDataManager::ClearSiteDataState::ClearSiteDataState):
Initialize the state.
(WebKit::WebPluginSiteDataManager::ClearSiteDataState::clearSiteDataForNextPlugin):
If the plug-in queue is empty, call didClearSiteDataForAllPlugins. Otherwise, ask
the plug-in process manager to get sites for the next plug-in.
(WebKit::WebPluginSiteDataManager::ClearSiteDataState::didClearSiteDataForSinglePlugin):
Update the sites set and ask the next plug-in to clear site data.
(WebKit::WebPluginSiteDataManager::~WebPluginSiteDataManager):
Assert that all maps are empty.
(WebKit::WebPluginSiteDataManager::invalidate):
Delete and clear the pending state maps.
(WebKit::WebPluginSiteDataManager::getSitesWithData):
In the ENABLE(PLUGIN_PROCESS) case, allocate a new GetSitesWithDataState object and
tell it to get sites for the next plug-in. Otherwise, make sure that the web process
is alive before sending a GetSitesWithPluginData message.
(WebKit::WebPluginSiteDataManager::clearSiteData):
In the ENABLE(PLUGIN_PROCESS) case, allocate a new ClearSiteDataState object and
tell it to get sites for the next plug-in. Otherwise, make sure that the web process
is alive before sending a ClearPluginSiteData message.
(WebKit::WebPluginSiteDataManager::didGetSitesWithDataForSinglePlugin):
Call down to the GetSitesWithDataState object.
(WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins):
Free the GetSitesWithDataState object and invoke the callback.
(WebKit::WebPluginSiteDataManager::didClearSiteDataForSinglePlugin):
Call down to the GetSitesWithDataState object.
(WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins):
Free the GetSitesWithDataState object and invoke the callback.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::processDidClose):
Don't invalidate the plug-in site data manager if we're using a plug-in process.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getSitesWithPluginData):
(WebKit::WebProcess::clearPluginSiteData):
Call shutdownIfPossible().
2011-02-15 Jon Honeycutt <jhoneycutt@apple.com>
Copy over new WebKit 2 header.
Rubber-stamped by Alice Liu.
* win/WebKit2Generated.make:
2011-02-15 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Implement WKPluginSiteDataManagerClearSiteData
https://bugs.webkit.org/show_bug.cgi?id=54512
<rdar://problem/8689312>
* UIProcess/API/C/WKPluginSiteDataManager.cpp:
(WKPluginSiteDataManagerGetTypeID):
Implement this.
(toNPClearSiteDataFlags):
Convert WKClearSiteDataFlags to NPP_ClearSiteData flags.
(WKPluginSiteDataManagerClearSiteData):
(WKPluginSiteDataManagerClearAllSiteData):
Call through to WebPluginSiteDataManager::clearSiteData.
* UIProcess/API/C/WKPluginSiteDataManager.h:
Change the clear functions to take a completion callback.
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::clearSiteData):
Ask the plug-in info store for all plug-in paths and send a
ClearPluginSiteData message to the web process.
(WebKit::WebPluginSiteDataManager::didClearSiteData):
call the callback.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didClearPluginSiteData):
Call through to the plug-in site data manager.
* UIProcess/WebContext.messages.in:
Add ClearPluginSiteData message.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearPluginSiteData):
Iterate over all the plug-in paths, creating plug-in modules and calling
clearSiteData for each one.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
Add DidClearPluginSiteData message.
2011-02-15 Anders Carlsson <andersca@apple.com>
Reviewed by Jon Honeycutt.
Implement WKPluginSiteDataManagerGetSitesWithData
https://bugs.webkit.org/show_bug.cgi?id=54510
<rdar://problem/8689312>
* UIProcess/API/C/WKContext.cpp:
(WKContextGetPluginSiteDataManager):
Call WebContext::pluginSiteDataManager.
* UIProcess/API/C/WKPluginSiteDataManager.cpp:
(WKPluginSiteDataManagerGetSitesWithData):
Call WebPluginSiteDataManager::getSitesWithData.
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::getPluginPaths):
* UIProcess/Plugins/PluginInfoStore.h:
Populate the paths argument with the paths of all plug-ins.
* UIProcess/Plugins/WebPluginSiteDataManager.cpp: Added.
(WebKit::WebPluginSiteDataManager::invalidate):
Invalidate the callbacks map.
(WebKit::WebPluginSiteDataManager::getSitesWithData):
Ask the plug-in info store for all plug-in paths and send a
GetSitesWithPluginData message to the web process.
(WebKit::WebPluginSiteDataManager::didGetSitesWithPluginData):
Call the callback.
* UIProcess/Plugins/WebPluginSiteDataManager.h: Added.
(WebKit::WebPluginSiteDataManager::clearContext):
Clear the context.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
Initialize m_pluginSiteDataManager.
(WebKit::WebContext::~WebContext):
Invalidate the plug-in site data manager and clear its context.
(WebKit::WebContext::processDidClose):
Invalidate the plug-in site data manager.
(WebKit::WebContext::didGetSitesWithPluginData):
Call through to the plug-in site data manager.
* UIProcess/WebContext.h:
* UIProcess/WebContext.messages.in:
Add GetSitesWithPluginData message.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add new files.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getSitesWithPluginData):
Iterate over all plug-in paths and get the sites from all plug-ins.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
Add DidGetSitesWithPluginData.
2011-02-15 Anders Carlsson <andersca@apple.com>
Fix Qt build.
* WebKit2.pro:
2011-02-15 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* win/WebKit2.vcproj:
2011-02-14 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough and Geoff Garen.
Refactor handles and weak pointers to become nicer and more automatic
https://bugs.webkit.org/show_bug.cgi?id=54415
Update code to new Global<> API, and refactor to get global data to
necessary points.
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::create):
(WebKit::NPJSObject::NPJSObject):
(WebKit::NPJSObject::initialize):
(WebKit::NPJSObject::invokeDefault):
(WebKit::NPJSObject::construct):
(WebKit::NPJSObject::invoke):
* WebProcess/Plugins/Netscape/NPJSObject.h:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
(WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
(WebKit::NPRuntimeObjectMap::evaluate):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::windowScriptNPObject):
(WebKit::PluginView::pluginElementNPObject):
2011-02-15 Anders Carlsson <andersca@apple.com>
Reviewed by Jon Honeycutt.
Add stubbed out WKPluginSiteDataManagerRef API
https://bugs.webkit.org/show_bug.cgi?id=54504
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetPluginSiteDataManager):
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKPluginSiteDataManager.cpp: Added.
(WKPluginSiteDataManagerGetTypeID):
(WKPluginSiteDataManagerGetSitesWithData):
(WKPluginSiteDataManagerClearSiteData):
(WKPluginSiteDataManagerClearAllSiteData):
* UIProcess/API/C/WKPluginSiteDataManager.h: Added.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
2011-02-15 Jia Pu <jpu@apple.com>
Reviewed by Darin Adler.
Autocorrection should respect undo.
https://bugs.webkit.org/show_bug.cgi?id=52221
<rdar://problem/8663399>
Please see WebCore/ChangeLog for detailed description.
* WebProcess/WebCoreSupport/WebEditorClient.h: Updated for the new function declared in EditorClient.
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::recordAutocorrectionResponse): Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::replaceSelectionWithText): Adopted new signature of ReplaceSelectionCommand::create().
2011-02-15 Jessie Berlin <jberlin@apple.com>
Reviewed by Darin Adler.
WebKit2: Use the Database directory location specified in NSUserDefaults.
https://bugs.webkit.org/show_bug.cgi?id=54496
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultDatabaseDirectory):
Use the same logic as WebKit1's WebDatabaseManager::databasesDirectoryPath.
2011-02-15 Simon Fraser <simon.fraser@apple.com>
Reviewed by Anders Carlsson, Darin Adler.
Layers stick around in DrawingAreaImpl until we switch out of compositing
https://bugs.webkit.org/show_bug.cgi?id=54498
When leaving compositing mode soon, remove all the child layers
of the nonCompositedContent layer right away, so they don't stick
around.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setRootCompositingLayer):
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::setRootCompositingLayer):
2011-02-15 Kenneth Russell <kbr@google.com>
Reviewed by Darin Fisher.
Allow controlling minimum DOMTimer interval on a per-page basis
https://bugs.webkit.org/show_bug.cgi?id=54312
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2011-02-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add sitesWithData and clearSiteData to NetscapePluginModule
https://bugs.webkit.org/show_bug.cgi?id=54492
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
(WebKit::NetscapePluginModule::NetscapePluginModule):
(WebKit::NetscapePluginModule::pluginCreated):
(WebKit::NetscapePluginModule::pluginDestroyed):
(WebKit::NetscapePluginModule::sitesWithData):
(WebKit::NetscapePluginModule::clearSiteData):
(WebKit::NetscapePluginModule::tryGetSitesWithData):
(WebKit::NetscapePluginModule::tryClearSiteData):
(WebKit::NetscapePluginModule::incrementLoadCount):
(WebKit::NetscapePluginModule::decrementLoadCount):
* Shared/Plugins/Netscape/NetscapePluginModule.h:
2011-02-15 Sam Weinig <sam@webkit.org>
Fix windows build.
* Shared/win/WebCoreArgumentCodersWin.cpp:
(CoreIPC::encodeResourceRequest):
2011-02-15 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=54480
<rdar://problem/8975229> REGRESSION (WebKit2): A web page remains unresponsive for a long
time after printing
Nothing was painted until moving the mouse over browser chrome, deactivating the window,
or taking some other drastic measure like that.
* UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setAutodisplay):
Call -[NSView displayIfNeeded] after enabling autodisplay. For some reason, this makes
WebCore push updates again.
2011-02-15 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
Crash loading fast/loader/empty-embed-src-attribute.html
<rdar://problem/9005541>
https://bugs.webkit.org/show_bug.cgi?id=54483
Add the ability to encode/decode and empty ResourceRequest.
* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::encodeResourceRequest):
(CoreIPC::decodeResourceRequest):
(CoreIPC::decodeResourceResponse): Add missing false check for the
decode step.
* Shared/win/WebCoreArgumentCodersWin.cpp:
(CoreIPC::encodeResourceRequest):
(CoreIPC::decodeResourceRequest):
(CoreIPC::decodeResourceResponse): Add missing false check for the
decode step.
2011-02-15 Andreas Kling <kling@webkit.org>
Unreviewed Qt build fix after r78588.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::QWKPage): Add WKPageLoaderClient::shouldGoToHistoryItem.
2011-02-15 Enrica Casucci <enrica@apple.com>
Reviewed by Darin Adler.
Stop using deprecated API to flip the dragImage.
<rdar://problem/8930897>
https://bugs.webkit.org/show_bug.cgi?id=54477
NSImage setFlipped is a deprecated API. We replace it with
drawInRect:fromRect:operation:fraction:respectFlipped:hints.
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setDragImage): Removed call to setFlipped.
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::startDrag): The image is now drawn with
drawInRect:fromRect:operation:fraction:respectFlipped:hints.
2011-02-15 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
<rdar://problem/9002047> and https://bugs.webkit.org/show_bug.cgi?id=54426
WebFrameLoaderClient::shouldGoToHistoryItem needs implementation
Expose HistoryItem -> ItemID mapping for the message:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::idForItem):
* WebProcess/WebPage/WebBackForwardListProxy.h:
Sync message to the UIProcess for the answer:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
Call out to the WebLoaderClient for the answer:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::shouldGoToBackForwardListItem):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Call out to the client application for the answer:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::shouldGoToBackForwardListItem):
* UIProcess/WebLoaderClient.h:
Add API for the client application to listen for this:
* UIProcess/API/C/WKPage.h:
2011-02-15 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Fix Anders typo. false -> 0.
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::create):
2011-02-15 Andras Becsi <abecsi@webkit.org>
Reviewed by NOBODY Csaba Osztrogonác.
[Qt] Redesign the build system
https://bugs.webkit.org/show_bug.cgi?id=51339
Part 1.
Introduce CodeGenerators.pri and add common includepaths to WebCore.pri,
thus unnecessary duplications can be removed from project files.
* WebKit2.pro: Simplify and deduplicate includepaths.
2011-01-26 MORITA Hajime <morrita@google.com>
Reviewed by Ryosuke Niwa.
Refactoring: Extract TextCheckerClient from EditorClient
https://bugs.webkit.org/show_bug.cgi?id=53213
* Shared/WebCoreArgumentCoders.h:
* UIProcess/TextChecker.h:
* WebProcess/WebCoreSupport/WebEditorClient.h:
(WebKit::WebEditorClient::textChecker):
* Scripts/webkit2/messages.py: Re-arranged the include file
2011-02-07 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Adam Barth.
Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
https://bugs.webkit.org/show_bug.cgi?id=52417
Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
not implemented.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::canCopyCut): Added.
(WebKit::WebEditorClient::canPaste): Added.
* WebProcess/WebCoreSupport/WebEditorClient.h:
2011-02-14 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Add WKPageSetMemoryCacheClientCallsEnabled API
https://bugs.webkit.org/show_bug.cgi?id=54422
* UIProcess/API/C/WKPage.cpp:
(WKPageSetMemoryCacheClientCallsEnabled):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setMemoryCacheMessagesEnabled):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-02-14 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2: View not updated completely when coming back from a cached back/forward navigation
<rdar://problem/8787264>
https://bugs.webkit.org/show_bug.cgi?id=54419
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::restoreViewState): Invalidate the entire page
when completing a restore from the back/forward cache.
2011-02-14 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Shared memory should be made shared immediately
https://bugs.webkit.org/show_bug.cgi?id=54413
<rdar://problem/8972153>
Under some circumstances, mach_make_memory_entry_64 may only return parts of a
memory allocation. Work around this by creating a mach port representing the shared memory
right away. Also, hand out this mach port in createHandle when using the default memory protection.
* Platform/SharedMemory.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::create):
(WebKit::SharedMemory::~SharedMemory):
(WebKit::SharedMemory::createHandle):
2011-02-14 Adam Roben <aroben@apple.com>
React to accelerated compositing changes and allocation failures in DrawingAreaImpl::display
Fixes <http://webkit.org/b/54398> DrawingAreaImpl::display handles error cases poorly.
Reviewed by Darin Adler and Anders Carlsson.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::display): Bail out if the layout we perform puts us into
accelerated compositing mode. Moved the layout earlier in this function so we can bail
before doing other work that would be unnecessary in this case. Moved the allocation of the
ShareableBitmap earlier so we will leave our state (e.g., dirty region) intact even if the
allocation fails.
2011-02-14 Adam Roben <aroben@apple.com>
Add a way to flash backing store and view updates
The new WKPageSetDebugPaintFlags SPI can be used to control whether backing store and/or
view updates are flashed. A blueish color is used for view updates, and a purpleish color is
used for backing store updates. The flashing currently only works on Windows.
Fixes <http://webkit.org/b/54303>.
Reviewed by Anders Carlsson.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetDebugPaintFlags):
(WKPageGetDebugPaintFlags):
* UIProcess/API/C/WKPagePrivate.h:
Added. These call through to WebPageProxy.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::flashBackingStoreUpdates):
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::flashBackingStoreUpdates):
* UIProcess/API/qt/qwkpage_p.h:
Stubbed out new PageClient functions.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate): Tell the WebPageProxy to flash the
backing store updates we're performing.
* UIProcess/PageClient.h: Added flashBackingStoreUpdates.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::flashBackingStoreUpdates): Call through to the PageClient.
(WebKit::WebPageProxy::viewUpdatesFlashColor): Return the blueish color used for view
updates.
(WebKit::WebPageProxy::backingStoreUpdatesFlashColor): Return the purpleish color used for
backing store updates.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::setDebugPaintFlags):
(WebKit::WebPageProxy::debugPaintFlags):
Added these simple accessors.
* UIProcess/win/WebView.cpp:
(WebKit::flashRects):
(WebKit::createBrush):
New helper functions.
(WebKit::WebView::onPaintEvent): Flash the dirty region if requested.
(WebKit::WebView::flashBackingStoreUpdates): Added. Calls through to flashRects.
* UIProcess/win/WebView.h: Added flashBackingStoreUpdates.
* win/WebKit2Generated.make: Export WKPagePrivate.h so clients can use it.
2011-02-14 Adam Roben <aroben@apple.com>
Add some .messages.in and script files to WebKit2 projects
This is just for convenience. It doesn't affect the build.
* win/WebKit2.vcproj: Also let VS resort some files.
* win/WebKit2Generated.vcproj:
2011-02-14 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt] Need implementation of ResourceRequest and ResourceResponse serialization
https://bugs.webkit.org/show_bug.cgi?id=54339
Add dummy implementation with FIXME and let the core go with it for now.
* Shared/qt/WebCoreArgumentCodersQt.cpp:
(CoreIPC::decodeResourceRequest):
(CoreIPC::decodeResourceResponse):
2011-02-13 Anders Carlsson <andersca@apple.com>
Reviewed by Maciej Stachowiak.
Speculative fix for
<rdar://problem/8995361>
CrashTracer: [USER] 47 crashes in WebProcess at com.apple.WebKit2: WebKit::WebPage::layoutIfNeeded + 4
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::~DrawingAreaImpl):
Invalidate the layer tree host.
2011-02-13 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
The plug-in process heap should be executable by default
https://bugs.webkit.org/show_bug.cgi?id=54364
<rdar://problem/8990563>
* UIProcess/Launcher/ProcessLauncher.h:
Add executableHeap flag.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):
Set the right posix_spawn flag if executableHeap is true.
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::PluginProcessProxy):
Initialize executableHeap to true.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connect):
Initialize executableHeap to false.
2011-02-13 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Messages waited on are never dispatched
https://bugs.webkit.org/show_bug.cgi?id=54362
<rdar://problem/8995051>
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::processIncomingMessage):
Get the argument encoder from the incoming message.
2011-02-13 Jeremy Moskovich <jeremy@chromium.org>
Reviewed by Adam Barth.
Add a compile-time option to completely disable WebArchive support.
https://bugs.webkit.org/show_bug.cgi?id=52712
Add an ENABLE(WEB_ARCHIVE) compile-time setting and use it for all WebArchive code.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2011-02-13 Alexey Proskuryakov <ap@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=54348
Crash when printing a document with no pages
* WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawPagesToPDF): Don't fail on a fake
page that computePagesForPrinting() added to a pageless document.
2011-02-13 Chris Fleizach <cfleizach@apple.com>
Reviewed and landed by Sam Weinig.
AX: Update WK2 usage of remote accessibility api
https://bugs.webkit.org/show_bug.cgi?id=54220
Rename some of the remote accessibility methods to be more accurate.
Make sure to unregister the AccessibilityWebPageObject on dealloc.
Send the window remote token along with the WKView remote token.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateRemoteAccessibilityRegistration:]):
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView viewDidMoveToWindow]):
(-[WKView _processDidCrash]):
(-[WKView _pageClosed]):
(-[WKView _setAccessibilityWebProcessToken:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
(WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
(-[AccessibilityWebPageObject dealloc]):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::registerUIProcessAccessibilityTokens):
2011-02-11 Alexey Proskuryakov <ap@apple.com>
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=54335
<rdar://problem/8895141> Make window.print() work with WebKit2
* Platform/CoreIPC/Connection.h: Corrected a typo in FIXME comment.
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
(WebKit::ChunkedUpdateDrawingAreaProxy::update):
(WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::sizeDidChange):
(WebKit::TiledDrawingAreaProxy::setPageIsVisible):
(WebKit::TiledDrawingAreaProxy::takeSnapshot):
(WebKit::TiledDrawingAreaProxy::removeTile):
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
(WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
(WebKit::LayerBackedDrawingAreaProxy::update):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess):
(WebKit::WebContext::postMessageToInjectedBundle):
Updated for send() -> deprecatedSend() rename.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Added a flag that's true while serving window.print().
(WebKit::WebPageProxy::printFrame): Set and unset m_isPerformingDOMPrintOperation.
(WebKit::WebPageProxy::beginPrinting): Force message processing in web process when serving
window.print().
(WebKit::WebPageProxy::endPrinting): Ditto.
(WebKit::WebPageProxy::computePagesForPrinting): Ditto.
(WebKit::WebPageProxy::drawRectToPDF): Ditto.
(WebKit::WebPageProxy::drawPagesToPDF): Ditto.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::~WebProcessProxy):
(WebKit::WebProcessProxy::sendMessage):
(WebKit::WebProcessProxy::didFinishLaunching):
When waiting for a web process to launch, store message flags, too. This is not practically
important for DispatchMessageEvenWhenWaitingForSyncReply, but it's easier to store flags
than to remember about this pitfall.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::send): Added a flags argument, matching Connection::send().
(WebKit::WebProcessProxy::deprecatedSend): Renamed one of send() overloads, because it was
conflicting with the other one after adding a flags argument. This matches a change previously
made to CoreIPC::Connection.
2011-02-12 Chris Marrin <cmarrin@apple.com>
Reviewed by Dan Bernstein.
Crash in RenderLayerCompositor::updateCompositingLayers when loading some sites
https://bugs.webkit.org/show_bug.cgi?id=54345
Some sites flip between composited and non-comosited state while loading. When the timing is
right, when we flip out of compositing we will need to do a display while tossing all the
compositing layers. This causes us to reenter RenderLayerCompositor::computeCompositingRequirements()
while we are in the middle of tossing layers, which leads to a crash.
The solution is to defer the logic of exiting compositing mode until the DrawingArea is finished
doing its display, using a timer.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
(WebKit::DrawingAreaImpl::setRootCompositingLayer):
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingModeSoon):
* WebProcess/WebPage/DrawingAreaImpl.h:
2011-02-12 Kevin Decker <kdecker@apple.com>
Reviewed by Dan Bernstein.
Follow up fix to:
https://bugs.webkit.org/show_bug.cgi?id=54341 - optionally scale snapshots in document view coordinates
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotInDocumentCoordinates): Fixed the order of the scale and translate.
2011-02-12 Kevin Decker <kdecker@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=54341 - optionally scale snapshots in document view coordinates
<rdar://problem/8990069>
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCreateScaledSnapshotInDocumentCoordinates): Added.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h: Added above new function.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotInDocumentCoordinates): Added.
(WebKit::WebPage::snapshotInDocumentCoordinates): Call scaledSnapshotInDocumentCoordinates with a scale of 1.
* WebProcess/WebPage/WebPage.h: Added scaledSnapshotInDocumentCoordinates().
2011-02-11 Anders Carlsson <andersca@apple.com>
Reviewed by Maciej Stachowiak.
Can’t open local files on reload or navigation from the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=54332
<rdar://problem/8903076>
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::isInspectorPage):
* UIProcess/WebInspectorProxy.h:
Check whether the given page is a web inspector page.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeSandboxExtensionHandle):
If this is a web inspector page, we don't want to make a sandbox extension.
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
Pass a sandbox extension along when sending the message.
* UIProcess/WebPageProxy.h:
Make initializeSandboxExtensionHandle a member function.
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData):
Pass a sandbox extension along.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::goForward):
(WebKit::WebPage::goBack):
(WebKit::WebPage::goToBackForwardItem):
Hand the sandbox extension to the sandbox extension tracker.
(WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
Pass the sandbox extension to goToBackForwardItem.
(WebKit::shouldReuseCommittedSandboxExtension):
New function that checks whether a committed sandbox extension should be re-used. We
do this for page reloads, as well as regular page navigations when both the committed
and provisional documents have file URLs.
(WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
Reuse the committed sandbox extension if necessary.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-02-11 Anders Carlsson <andersca@apple.com>
Fix Snow Leopard build.
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::didFailToSendSyncMessage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didFailToSendSyncMessage):
2011-02-11 Yael Aharon <yael.aharon@nokia.com>
Unreviewed Qt webkit2 build fix after r78392.
* WebProcess/WebProcess.h:
2011-02-11 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
WebProcess hung communicating with the plug-in process
https://bugs.webkit.org/show_bug.cgi?id=54328
<rdar://problem/8854075>
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::createWebProcessConnection):
Add the DispatchMessageEvenWhenWaitingForSyncReply message send flag when sending the
PluginProcess::CreateWebProcessConnection message, since the plug-in process can be busy waiting
for a sync reply from the web process.
2011-02-11 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Incoming synchronous messages should always be processed regardless of connection waiting for a reply
https://bugs.webkit.org/show_bug.cgi?id=54326
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::SyncMessageState::getOrCreate):
Assert that the map has a non-null SyncMessageState object.
(CoreIPC::Connection::SyncMessageState::SyncMessageState):
Initialize m_waitForSyncReplyCount.
(CoreIPC::Connection::SyncMessageState::beginWaitForSyncReply):
Increment m_waitForSyncReplyCount.
(CoreIPC::Connection::SyncMessageState::endWaitForSyncReply):
Decrement m_waitForSyncReplyCount. If it's 0, enqueue any incoming sync messages.
(CoreIPC::Connection::SyncMessageState::processIncomingMessage):
If this is a message that needs to be dispatched, add it to the queue and wake up the client run loop.
(CoreIPC::Connection::SyncMessageState::dispatchMessages):
Go through the queue of incoming messages and dispatch them.
(CoreIPC::Connection::sendSyncMessage):
call beginWaitForSyncReply/endWaitForSyncReply.
(CoreIPC::Connection::waitForSyncReply):
Dispatch messages.
(CoreIPC::Connection::processIncomingMessage):
Call SyncMessageState::processIncomingMessage.
(CoreIPC::Connection::enqueueIncomingMessage):
Add helper function for enqueuing an incoming message.
* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::Message::destinationID):
2011-02-11 Sam Weinig <sam@webkit.org>
Reviewed by Maciej Stachowiak.
WebKit2: Going to Ars Technica crashes WebProcess in WebCore::ResourceRequestBase::url() const + 9
<rdar://problem/8978832>
Speculative fix for crash accessing a bad ResourceRequest in policy
client code. Remove early returns from dispatchDecidePolicyForMIMEType
and dispatchDecidePolicyForNavigationAction that are not present in the WebKit1
equivalent code. This should be safe, now that the IPC calls are synchronous.
Also removes some invalid assertions in WebFrameProxy that were getting hit. It is okay
for the url to empty.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameProxy::didFailProvisionalLoad):
(WebKit::WebFrameProxy::didFailLoad):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2011-02-11 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler and Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=53593
<rdar://problem/8948380> Crash beneath HistoryController::recursiveSetProvisionalItem in web
process (preceded by assertion failure) if UI process exits while
Messages::WebPage::RestoreSessionAndNavigateToCurrentItem is being handled
Can't test exiting the UI process.
* Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessage):
* Platform/CoreIPC/Connection.h: (CoreIPC::Connection::Client::didFailToSendSyncMessage):
Notify connection client when the connection fails to send a sync message.
* WebProcess/WebProcess.cpp: (WebKit::WebProcess::didFailToSendSyncMessage):
* WebProcess/WebProcess.h:
Quit the web process immediately if it tried to send a sync message to a dead UI process.
It never needs to continue and handle an unexpected null "reply".
* PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::didFailToSendSyncMessage):
* PluginProcess/PluginProcess.h:
Ditto. There is no need for a plug-in to keep running even briefly if it couldn't get a
reply to a sync message.
2011-02-11 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add a way to send async messages that can't get out of order with sync ones
https://bugs.webkit.org/show_bug.cgi?id=54319
<rdar://problem/8894844>
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::sendMessage):
sendMessage now takes a messageSendFlags. Update the messageID if the
messageSendFlags contain DispatchMessageEvenWhenWaitingForSyncReply.
(CoreIPC::Connection::waitForSyncReply):
Process asynchronous messages as well.
(CoreIPC::Connection::processIncomingMessage):
Check if a message should be dispatched even when we're waiting for a
synchronous reply.
* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::send):
Send now takes a messageSendFlags parameter.
* Platform/CoreIPC/MessageID.h:
(CoreIPC::MessageID::messageIDWithAddedFlags):
Return a new MessageID object with the given flags added.
(CoreIPC::MessageID::shouldDispatchMessageWhenWaitingForSyncReply):
Add getter.
2011-02-11 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Crash with dynamic popup menu use
<rdar://problem/8716952>
Invalidate popup menus when forcing them closed, since they might still be
in their tracking loop.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenu):
(WebKit::WebPageProxy::hidePopupMenu):
* UIProcess/WebPopupMenuProxy.h:
(WebKit::WebPopupMenuProxy::invalidate):
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::showPopupMenu):
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::showPopupMenu):
(WebKit::WebPopupMenuProxyWin::setFocusedIndex):
2011-02-11 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Actually initialize m_syncMessageState.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::Connection):
2011-02-11 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Move the binary semaphore into SyncMessageState
https://bugs.webkit.org/show_bug.cgi?id=54311
With this change, all connections that belong to the same run loop will use same binary semaphore.
This is in preparation for making any connection be able to wakeup the client run loop.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::SyncMessageState::wakeUpClientRunLoop):
(CoreIPC::Connection::SyncMessageState::wait):
(CoreIPC::Connection::waitForSyncReply):
(CoreIPC::Connection::processIncomingMessage):
(CoreIPC::Connection::connectionDidClose):
* Platform/CoreIPC/Connection.h:
2011-02-11 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Add a SyncMessageState class to CoreIPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=54309
SyncMessageState objects are shared between all connections scheduled on
a given run loop. It will be used to keep track of state when waiting
for replies for a synchronous message.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::SyncMessageState::syncMessageStateMap):
(CoreIPC::Connection::SyncMessageState::syncMessageStateMapMutex):
Add a global RunLoop -> SyncMessageState map and a mutex for locking.
(CoreIPC::Connection::SyncMessageState::getOrCreate):
Look in the map for an existing SyncMessageState object and create a new
one if none is found.
(CoreIPC::Connection::SyncMessageState::SyncMessageState):
Initialize m_runLoop.
(CoreIPC::Connection::SyncMessageState::~SyncMessageState):
Remove the object from the map.
2011-02-11 Enrica Casucci <enrica@apple.com>
Reviewed by Darin Adler.
crashes in WebProcess at WebCore::Range::startPosition const + 16
https://bugs.webkit.org/show_bug.cgi?id=54294
<rdar://problem/8982710>
I don't have a repro case for this bugs, but the side-by-side
comparison of the IME support implementation in WebKit and WebKi2
shows a missing null check on a Range that could very well explain
this crash.
I tried running platform/mac/editing/input tests with a version of WebKit
without the null check and I can reproduce a crash with the same signature.
These tests are not yet enabled for WebKit2.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::firstRectForCharacterRange):
2011-02-11 Jeff Miller <jeffm@apple.com>
Reviewed by Steve Falkenburg.
Eliminate /DELAYLOAD:msimg32.dll ignored warning when building WebKit project
https://bugs.webkit.org/show_bug.cgi?id=54296
* win/WebKit2Common.vsprops: Remove msimg32.dll from the list of DelayLoadDLLs.
2011-02-11 Chandra Vallala <chandra.vallala@motorola.com> and Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
[GTK] Implement UpdateChunk, ChunkedUpdateDrawingArea/Proxy
classes for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=54080
* GNUmakefile.am:
* Shared/gtk/UpdateChunk.cpp: Added.
(WebKit::UpdateChunk::UpdateChunk):
(WebKit::UpdateChunk::~UpdateChunk):
(WebKit::UpdateChunk::encode):
(WebKit::UpdateChunk::decode):
(WebKit::UpdateChunk::createImage):
* Shared/gtk/UpdateChunk.h: Added.
(WebKit::UpdateChunk::rect):
(WebKit::UpdateChunk::isEmpty):
(WebKit::UpdateChunk::size):
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
Initialize the surface.
* UIProcess/ChunkedUpdateDrawingAreaProxy.h:
* UIProcess/DrawingAreaProxy.h: Added cairo variables.
* UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: Added.
(WebKit::ChunkedUpdateDrawingAreaProxy::page):
(WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
(WebKit::ChunkedUpdateDrawingAreaProxy::invalidateBackingStore):
(WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
(WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
* WebProcess/WebPage/gtk/ChunkedUpdateDrawingAreaGtk.cpp: Added.
(WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
2011-02-10 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Repro crash with Sony Google TV ad at Gizmodo
https://bugs.webkit.org/show_bug.cgi?id=54150
<rdar://problem/8782346>
Re-landing this fix, bug without the test case, since it causes hangs on the bots.
https://bugs.webkit.org/show_bug.cgi?id=54171 tracks adding back the test.
Since PluginView::evaluate can cause the plug-in element to go away, we need to protect it.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::~PluginView):
Null out m_pluginElement here so we'll catch crashes earlier.
(WebKit::PluginView::evaluate):
Add a plug-in protector.
2011-02-10 Alice Liu <alice.liu@apple.com>
Reviewed by Enrica Casucci and Adele Peterson.
WebKit2 pages gobble up cmd-I as an editing command in some cases where it shouldn't
https://bugs.webkit.org/show_bug.cgi?id=54254
* UIProcess/API/mac/WKView.mm:
(-[WKView _handleStyleKeyEquivalent:]):
Return early if we're not in an editable region.
2011-02-10 Andreas Kling <kling@webkit.org>
Unreviewed Qt build fix.
waitFor() -> deprecatedWaitFor()
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
2011-02-10 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Move code to dispatch an incoming message out into a new function
https://bugs.webkit.org/show_bug.cgi?id=54239
This also fixes a leak where we wouldn't free ArgumentDecoder objects
after a connection has been invalidated.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::dispatchMessage):
(CoreIPC::Connection::dispatchMessages):
* Platform/CoreIPC/Connection.h:
2011-02-10 Anders Carlsson <andersca@apple.com>
Try again to fix the Qt build.
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::sizeDidChange):
(WebKit::TiledDrawingAreaProxy::setPageIsVisible):
(WebKit::TiledDrawingAreaProxy::takeSnapshot):
(WebKit::TiledDrawingAreaProxy::removeTile):
2011-02-10 Anders Carlsson <andersca@apple.com>
Attempt to fix the Qt build.
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::sizeDidChange):
(WebKit::TiledDrawingAreaProxy::setPageIsVisible):
(WebKit::TiledDrawingAreaProxy::requestTileUpdate):
(WebKit::TiledDrawingAreaProxy::takeSnapshot):
(WebKit::TiledDrawingAreaProxy::removeTile):
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::display):
(WebKit::TiledDrawingArea::setSize):
(WebKit::TiledDrawingArea::updateTile):
(WebKit::TiledDrawingArea::tileUpdateTimerFired):
(WebKit::TiledDrawingArea::didReceiveMessage):
2011-02-10 Adam Roben <aroben@apple.com>
Handle a null FindIndicator correctly
We are passed a null FindIndicator when the find indicator becomes hidden.
Fixes <http://webkit.org/b/54213> <rdar://problem/8983261> REGRESSION (r78198): Crash in
FindIndicator::contentImage when scrolling page
Reviewed by Steve Falkenburg.
* Platform/win/SharedMemoryWin.cpp:
(WebKit::SharedMemory::Handle::isNull): Implemented.
(WebKit::SharedMemory::create): Bail out if the handle is null, just like Mac does.
Otherwise assert that ::MapViewOfFile succeeded. This doesn't fix the bug, but should help
catch other errors.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::setFindIndicator): Null-check the FindIndicator before dereferencing it.
Also changed the function to store the FindIndicator in a RefPtr.
2011-02-10 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add 'deprecated' to the deprecated CoreIPC functions
https://bugs.webkit.org/show_bug.cgi?id=54223
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::sendMessage):
* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::send):
(CoreIPC::Connection::deprecatedSendSync):
(CoreIPC::Connection::deprecatedSend):
(CoreIPC::Connection::deprecatedWaitFor):
* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC::Connection::open):
* PluginProcess/PluginProcess.cpp:
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::paint):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::createWebProcessConnection):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::postMessage):
(WebKit::InjectedBundle::postSynchronousMessage):
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::display):
(WebKit::ChunkedUpdateDrawingArea::setSize):
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::setSize):
* WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
(WebKit::LayerBackedDrawingArea::attachCompositingContext):
2011-02-10 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Window resizer does not have a border when there are scrollbars in WebKit2 windows
<rdar://problem/8488476>
https://bugs.webkit.org/show_bug.cgi?id=54222
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didChangeScrollbarsForMainFrame):
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateGrowBoxForWindowFrameChange]):
(-[WKView _didChangeScrollbarsForMainFrame]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/API/qt/qwkpage_p.h:
(QWKPagePrivate::didChangeScrollbarsForMainFrame):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeScrollbarsForMainFrame):
* UIProcess/win/WebView.cpp:
(WebKit::WebView::didChangeScrollbarsForMainFrame):
* UIProcess/win/WebView.h:
2011-02-10 Ivan Krstić <ike@apple.com>
Reviewed by Adam Roben.
Rename remaining instances of _HOME sandbox parameter.
<rdar://problem/8983428>
* WebProcess/com.apple.WebProcess.sb:
2011-02-10 Chris Fleizach <cfleizach@apple.com>
Reviewed by Anders Carlsson.
AX: AX needs to stop using WebCoreViewFactory
https://bugs.webkit.org/show_bug.cgi?id=54153
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2011-02-10 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Sandbox violations trying to read crypto preferences.
<rdar://problem/8981151>
* WebProcess/com.apple.WebProcess.sb:
2011-02-10 Peter Varga <pvarga@webkit.org>
Reviewed by Csaba Osztrogonác.
Remove PCRE source from trunk
https://bugs.webkit.org/show_bug.cgi?id=54188
* WebKit2.pro:
2011-02-09 Adam Roben <aroben@apple.com>
Turn on the new drawing area on Windows
Fixes <http://webkit.org/b/53805> <rdar://problem/8960666> WebKit2 on Windows should use
DrawingAreaProxyImpl
Reviewed by Darin Adler.
* UIProcess/win/WebView.cpp:
(WebKit::useNewDrawingArea): Return true!
2011-02-09 Adam Roben <aroben@apple.com>
Hook up WM_PRINT to the new drawing area
Fixes <http://webkit.org/b/54145> <rdar://problem/8979559> WM_PRINT doesn't work with new
drawing area (assertion failure in DrawingAreaProxyImpl in Debug builds)
Reviewed by Darin Adler.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::paint): Added. Code came from onPaintEvent.
(WebKit::WebView::onPaintEvent):
(WebKit::WebView::onPrintClientEvent):
Changed to call paint.
* UIProcess/win/WebView.h: Added paint. Also separated message handler functions into their
own paragraph.
2011-02-09 Adam Roben <aroben@apple.com>
Notice when the backing store goes away after DidSetSize
Fixes <http://webkit.org/b/54142> <rdar://problem/8979365> Crash in
DrawingAreaProxyImpl::paint when WKView paints after being resized while hidden
Reviewed by Darin Adler.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::paint): Null-check m_backingStore after waiting for
DidSetSize, as m_backingStore can go away when we receive that message. This is the bug fix.
Also moved the accelerated compositing check inside the block where we wait for DidSetSize.
If we didn't wait for DidSetSize, we already know that we're not in accelerated compositing
mode (and asserted so earlier in this function).
2011-02-09 Adam Roben <aroben@apple.com>
Decode a null SharedMemory::Handle correctly on Windows
Fixes <http://webkit.org/b/54141> <rdar://problem/8979195> WKView draws at wrong size,
performs badly if is resized while hidden (assertion fails in
BackingStore::incorporateUpdate in Debug builds)
Reviewed by Darin Adler.
* Platform/win/SharedMemoryWin.cpp:
(WebKit::getDuplicatedHandle): Added. Code came from decode. The only changes were to
null-check sourceHandle (this is the bug fix) and to assert when ::DuplicateHandle fails
(which would have caught the bug earlier).
(WebKit::SharedMemory::Handle::decode): Changed to use getDuplicatedHandle.
2011-02-09 Adam Roben <aroben@apple.com>
Don't invalidate outside of the WebPage's bounds
Fixes <http://webkit.org/b/54123> <rdar://problem/8978383> Assertion failure in
BackingStore::BackingStore if a new WebPage becomes active before receiving a size
Reviewed by Darin Adler.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setNeedsDisplay): Intersect the dirty rect with our bounds before
doing anything else.
(WebKit::DrawingAreaImpl::display): Added an assertion to help catch the bad case a little
earlier.
2011-02-10 Eric Seidel <eric@webkit.org>
Unreviewed, rolling out r78157.
http://trac.webkit.org/changeset/78157
https://bugs.webkit.org/show_bug.cgi?id=54150
Fails on a bunch of bots
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::~PluginView):
(WebKit::PluginView::evaluate):
2011-02-09 Brian Weinstein <bweinstein@apple.com>
Rubber-stamped by Sam Weinig.
Fix a typo in WebSecurityOrigin::protocol.
* Shared/WebSecurityOrigin.h:
(WebKit::WebSecurityOrigin::protocol): This should return the protocol, not the domain.
2011-02-09 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
File uploads do not work within the sandbox
<rdar://problem/8950518>
https://bugs.webkit.org/show_bug.cgi?id=54154
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChooseFilesForOpenPanel):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::extendSandboxForFileFromOpenPanel):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-02-09 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=54148
<rdar://problem/8973887> REGRESSION (WebKit2): Opening two print dialogs causes havoc
* UIProcess/API/mac/WKPrintingView.h: Moved _isForcingPreviewUpdate into a static variable,
because dispatching a notification affects all WKPrintingViews at once.
* UIProcess/API/mac/WKPrintingView.mm:
(-[WKPrintingView _updatePreview]): Updated for new variable name.
(-[WKPrintingView knowsPageRange:]): Don't break if the method is called twice in a row
(we already had this logic when printing from separate thread, but not for preview).
(-[WKPrintingView drawRect:]): Changed all LOG messages to have view object address for
easier matching.
(-[WKPrintingView rectForPage:]): Ditto.
(-[WKPrintingView beginDocument]): Ditto.
(-[WKPrintingView endDocument]): Ditto.
2011-02-09 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Repro crash with Sony Google TV ad at Gizmodo
https://bugs.webkit.org/show_bug.cgi?id=54150
Since PluginView::evaluate can cause the plug-in element to go away, we need to protect it.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::~PluginView):
Null out m_pluginElement here so we'll catch crashes earlier.
(WebKit::PluginView::evaluate):
Add a plug-in protector.
2011-02-09 Sam Weinig <sam@webkit.org>
Reviewed by Maciej Stachowiak.
Google Maps says it has horizontal scrollbars when it doesn't
<rdar://problem/8978005>
We were updating the main frame's scrollbar state for changes to
frames other than the main frame.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebKit::WebChromeClient::WebChromeClient):
Change to bail out early if we are not looking at the main frame. Also
fix some silly typos and rename the variables to be more specific.
2011-02-09 Ivan Krstić <ike@apple.com>
Reviewed by Sam Weinig.
Allow read-only access to mouse preferences from sandboxed WebProcess.
<rdar://problem/8975279>
* WebProcess/com.apple.WebProcess.sb:
2011-02-09 Steve Falkenburg <sfalken@apple.com>
Build fix.
* win/MainWin.cpp:
(wWinMain):
2011-02-09 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
Reviewed by Martin Robinson.
[GTK] Implement Module class for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=48510
* GNUmakefile.am:
* Platform/Module.h: Added GModule handle for GTK port.
* Platform/gtk/ModuleGtk.cpp: Initial code using GModule calls.
(WebKit::Module::load):
(WebKit::Module::unload):
(WebKit::Module::platformFunctionPointer):
2011-02-09 Chandra Vallala <chandra.vallala@motorola.com> and Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
[GTK] Implement WKBaseGtk API for Webkit2
https://bugs.webkit.org/show_bug.cgi?id=54081
* GNUmakefile.am: Added new files to compilation.
* Shared/API/c/WKBase.h: Included WKBaseGtk.h in this file.
* Shared/API/c/gtk: Added.
* Shared/API/c/gtk/WKBaseGtk.h: Added. Declaration of WKViewRef
for GTK port.
* UIProcess/API/C/WKAPICast.h: Included WKAPICastGtk.h in this
file.
* UIProcess/API/C/gtk: Added.
* UIProcess/API/C/gtk/WKAPICastGtk.h: Added. Type definition
template for WKViewRef to WebView and vice-versa.
* UIProcess/API/C/gtk/WKView.cpp: Added. Implementation of WKView
API interface.
(WKViewCreate):
(WKViewGetWindow):
(WKViewGetPage):
(WKURLCreateWithURL):
* UIProcess/API/C/gtk/WKView.h: Added. Declaration of WKView API
interface.
2011-02-09 Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
[GTK] Add WebGraphicsContext stub to the compilation
https://bugs.webkit.org/show_bug.cgi?id=54078
* GNUmakefile.am:
* Shared/API/c/gtk/WKGraphicsContextGtk.cpp: Added stub just for
compilation.
(WKGraphicsContextGetGtkContext):
* Shared/API/c/gtk/WKGraphicsContextGtk.h: Added stub just for
compilation.
* Shared/WebGraphicsContext.cpp:
(WebKit::WebGraphicsContext::WebGraphicsContext):
* Shared/WebGraphicsContext.h:
(WebKit::WebGraphicsContext::platformContext):
2011-02-09 Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
[GTK] Add geolocation support to the webkit2 compilation
https://bugs.webkit.org/show_bug.cgi?id=54077
Add Geolocation files to the GTK compilation.
* GNUmakefile.am:
2011-02-09 Andras Becsi <abecsi@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt][WK2] Don't generate superfluous forwarding header for config.h.
* Scripts/generate-forwarding-headers.pl:
2011-02-09 Adam Roben <aroben@apple.com>
Hide the ugly details of WebView::m_window initialization from WebPageProxy, and make it
less ugly
WebView::WebView was initially creating a hidden window, then showing it. It would tell
WebPageProxy about the window while it was still hidden, and then have to inform
WebPageProxy that the window had become shown. This resulted in WebPageProxy sending
unnecessary messages to the web process, and confused code that assumed that the window
would be in the same state after WebView's constructor exited as it was when WebPageProxy
first found out about the window.
We now don't hide the window when creating it, which simplifies the code, and only tell
WebPageProxy about the window after we're done modifying it, which fixes the bug.
Fixes <http://webkit.org/b/53878> <rdar://problem/8977306> Assertion failure in
DrawingAreaImpl::resumePainting after window.open or when opening Web Inspector
Reviewed by Anders Carlsson.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView): Changed ::CreateWindowEx to ::CreateWindowExW, to match other
Win32 API calls in WebKit2. Pass WS_VISIBLE to ::CreateWindowExW rather than waiting until
later to show the window. Added an assertion that m_isVisible matches the window's visible
state. Don't even create our WebPageProxy, or tell it about our window, until we're done
initializing our window, so that it doesn't get informed about our window's internal state
changes that happen beneath ::CreateWindowExW.
(WebKit::WebView::onSizeEvent): Null-check m_page since we can receive this message beneath
::CreateWindowExW.
(WebKit::WebView::onShowWindowEvent): Ditto. Replaced one FIXME with another. Always set
handled to false so that ::DefWindowProcW can do its thing. (MSDN says this is when it
actually shows/hides the window, though I couldn't find any consequences of not calling
::DefWindowProcW here.)
2011-02-09 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: follow up on InspectorAgent split -
removing unnecessary methods from InspectorController.
https://bugs.webkit.org/show_bug.cgi?id=54093
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::showConsole):
(WebKit::WebInspector::stopJavaScriptProfiling):
2011-02-09 Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
[GTK] Avoid WebProcessMain compilation, we are used a gtk specific main
https://bugs.webkit.org/show_bug.cgi?id=54015
Avoided the compilation of the general WebProcessMain, and added
soup initialization to WebProcessMainGtk.cpp.
* GNUmakefile.am:
* WebProcess/gtk/WebProcessMainGtk.cpp:
(WebKit::WebProcessMainGtk):
2011-02-08 Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
[GTK] Incorrect assertion in WorkQueueGtk, we need to register
more than one handle
https://bugs.webkit.org/show_bug.cgi?id=54014
Fixed assertion condition we need to register more than one
handler for the same file descriptor.
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::registerEventSourceHandler):
2011-02-08 Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
Fix typo in the include guards name in ChunkedUpdateDrawingAreaProxy.h
https://bugs.webkit.org/show_bug.cgi?id=54013
* UIProcess/ChunkedUpdateDrawingAreaProxy.h:
2011-02-08 Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
[GTK] Fix after r77874, m_isConnected is initialized before the
socket is opened
https://bugs.webkit.org/show_bug.cgi?id=54011
Fixed connection breakage after r77874, we have to wait until open
the socket to open the connection.
* Platform/CoreIPC/gtk/ConnectionGtk.cpp:
(CoreIPC::Connection::platformInitialize):
(CoreIPC::Connection::open):
2011-02-08 Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
[WK2] LayerTreeContext is used outside the ACCELERATED_COMPOSITING
guards but not defined in DrawingAreaProxy.h
https://bugs.webkit.org/show_bug.cgi?id=54009
Removed the guards in the forward declaration, this will fail if
the class is finally used in the function, but it works for the
moment.
* UIProcess/DrawingAreaProxy.h:
2011-02-08 Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
WebKit2 GTK Fails to Build #include nested too deeply
https://bugs.webkit.org/show_bug.cgi?id=52219
* GNUmakefile.am: Removed the commands to create the directories
for the forwarding headers, the script already does it for us.
* config.h: Removed the config.h inclusion and added the
autotoolsconfig.h directly, also added a condition to share the
defines with QT.
2011-02-08 Maciej Stachowiak <mjs@apple.com>
Reviewed by Mark Rowe.
Crash when going back/forward when back/forward list is in a bad state.
https://bugs.webkit.org/show_bug.cgi?id=54059
<rdar://problem/8975244>
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::goForward): Add a null check.
(WebKit::WebPageProxy::goBack): ditto
2011-02-08 Anders Carlsson <andersca@apple.com>
Reviewed by Beth Dakin.
Assertion failure !isInAcceleratedCompositingMode() in DrawingAreaProxyImpl::incorporateUpdate()
https://bugs.webkit.org/show_bug.cgi?id=54046
<rdar://problem/8973960>
DrawingAreaImpl::setRootCompositingLayer can be called with a new layer even when already
in accelerated compositing mode. Similarly, it can be called with a null layer even when not
in accelerated compositing mode. Make the drawing area and layer tree host handle both these cases.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setRootCompositingLayer):
Only call enterAcceleratedCompositingMode if there is no layer tree host, otherwise
just call LayerTreeHost::setRootCompositingLayer.
(WebKit::DrawingAreaImpl::setSize):
Add an assert.
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
Assert that we don't have a layer tree host.
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
Assert that we do have a layer tree host.
(WebKit::DrawingAreaImpl::display):
If the call to display caused the page to enter accelerated compositing mode, we don't
want to send back an Update message.
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/LayerTreeHost.h:
Create no longer takes a graphics layer.
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::create):
(WebKit::LayerTreeHostMac::LayerTreeHostMac):
Create no longer takes a graphics layer.
(WebKit::LayerTreeHostMac::setRootCompositingLayer):
Set the new root compositing layer.
2011-02-08 Adam Roben <aroben@apple.com>
Implement WorkQueue::scheduleWorkAfterDelay on Windows
Each WorkQueue now owns its own timer queue. When scheduleWorkAfterDelay is called, we
create a timer-queue timer with the given delay. When the timer fires, we schedule the work
on the queue and clean up the timer.
Fixes <http://webkit.org/b/54040> <rdar://problem/8974230> Web process sticks around forever
if it's hung when UI process goes away
Reviewed by Anders Carlsson.
* Platform/WorkQueue.h: Added timerCallback and m_timerQueue.
* Platform/win/WorkQueueWin.cpp:
(WorkQueue::platformInitialize): Initialize m_timerQueue.
(WorkQueue::platformInvalidate): Clean up m_timerQueue.
(TimerContext::TimerContext): Added this helper object to hold the context needed by the
timer callback.
(WorkQueue::timerCallback): Added. Schedules the WorkItem on the WorkQueue and cleans up the
timer.
(WorkQueue::scheduleWorkAfterDelay): Create a timer-queue timer on our timer queue that will
fire after the given delay. Pass a new TimerContext object to the timer callback that
contains the information it needs.
2011-02-08 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Rename PluginProcess::initializeConnection to PluginProcess::initialize
https://bugs.webkit.org/show_bug.cgi?id=54039
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::initialize):
* PluginProcess/PluginProcess.h:
* PluginProcess/mac/PluginProcessMainMac.mm:
(WebKit::PluginProcessMain):
* WebProcess/WebProcess.h:
2011-02-08 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
<rdar://problem/8972913> and https://bugs.webkit.org/show_bug.cgi?id=54036
didChangeBackForwardList should include some context about what changed
Update the implementation of this API to include the new item (if any) and removed items (if any):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didChangeBackForwardList):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeBackForwardList):
* UIProcess/WebPageProxy.h:
Have WebBackForwardList pass the new items and/or removed items when calling the notifier:
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addItem):
(WebKit::WebBackForwardList::goToItem):
(WebKit::WebBackForwardList::clear):
2011-02-08 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Sandbox violations visiting MobileMe.
<rdar://problem/8961330>
* WebProcess/com.apple.WebProcess.sb:
2011-02-08 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Rename PluginProcess::initialize to PluginProcess::initializePluginProcess
https://bugs.webkit.org/show_bug.cgi?id=54037
Rename PluginProcess::initialize to PluginProcess::initializePluginProcess to better
match the WebProcess initialization code, in preparation of sharing more code.
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::initializePluginProcess):
* PluginProcess/PluginProcess.h:
* PluginProcess/PluginProcess.messages.in:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
2011-02-08 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WK2: Add ability to pass context to policy delegate methods
https://bugs.webkit.org/show_bug.cgi?id=54031
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction):
(CoreIPC::handleMessageVariadic):
* Scripts/webkit2/messages.py:
Add ability to pass variadic messages to sync messages.
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
Add WKBundleNavigation type.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForMIMEType):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebPolicyClient.cpp:
(WebKit::WebPolicyClient::decidePolicyForNavigationAction):
(WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
(WebKit::WebPolicyClient::decidePolicyForMIMEType):
* UIProcess/WebPolicyClient.h:
Update policy client for new data.
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp: Added.
(WKBundleNavigationActionGetTypeID):
(WKBundleNavigationActionGetNavigationType):
(WKBundleNavigationActionGetEventModifiers):
(WKBundleNavigationActionGetEventMouseButton):
(WKBundleNavigationActionCopyHitTestResult):
(WKBundleNavigationActionCopyFormElement):
* WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.h: Added.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetPolicyClient):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: Added.
(WebKit::mouseEventForNavigationAction):
(WebKit::mouseButtonForMouseEvent):
(WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction):
(WebKit::InjectedBundleNavigationAction::mouseButtonForNavigationAction):
(WebKit::InjectedBundleNavigationAction::create):
(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.h: Added.
(WebKit::InjectedBundleNavigationAction::navigationType):
(WebKit::InjectedBundleNavigationAction::modifiers):
(WebKit::InjectedBundleNavigationAction::mouseButton):
(WebKit::InjectedBundleNavigationAction::hitTestResult):
(WebKit::InjectedBundleNavigationAction::formElement):
(WebKit::InjectedBundleNavigationAction::type):
* WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp: Added.
(WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
(WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
(WebKit::InjectedBundlePagePolicyClient::decidePolicyForMIMEType):
* WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h: Added.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::initializeInjectedBundlePolicyClient):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundlePolicyClient):
Pipe the policy client through the bundle to allow setting user data.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
Add new files.
2011-02-08 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Crash calling -setFrame:andScrollBy: in windowDidResize
https://bugs.webkit.org/show_bug.cgi?id=54030
<rdar://problem/8969760>
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::create):
Assert that size is not zero here; we never want to try to create shared memory with a zero size.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setSize):
Always invalidate the entire visible page when resizing.
2011-02-08 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Remove orphan code from old parser
https://bugs.webkit.org/show_bug.cgi?id=53984
* WebProcess/WebCoreSupport/WebChromeClient.cpp
* WebProcess/WebCoreSupport/WebChromeClient.h
2011-02-08 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
UI process crashes if web process crashes while web inspector is focused
https://bugs.webkit.org/show_bug.cgi?id=53965
<rdar://problem/8961633>
Make sure to close the web inspector web page proxy before calling platformClose, since
platformClose can cause the web page proxy to try to send messages (such as SetActive)
to the web process while it's in a bad state.
The original fix, http://trac.webkit.org/changeset/77866, put the call to m_page->close() in
WebInspectorProxy::didClose, which was wrong and lead to crashes. The right place to close the page
is in WebInspectorProxy::invalidate.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::invalidate):
2011-02-08 Jessie Berlin <jberlin@apple.com>
Reviewed by Adam Roben.
ASSERTION FAILURE: ASSERT_NOT_REACHED() in Connection::writeEventHandler() after the Web
Process crashes.
https://bugs.webkit.org/show_bug.cgi?id=54005
* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::writeEventHandler):
Handle ERROR_BROKEN_PIPE by calling connectionDidClose() and returning early.
2011-02-08 Adam Roben <aroben@apple.com>
Handle WM_TIMER messages for stopped timers
Whenever we stop a timer, we call ::KillTimer to cancel any future firings of the timer. But
::KillTimer doesn't do anything about WM_TIMER messages that have already been posted to the
message queue. We need to handle those, too.
Fixes <http://webkit.org/b/53999> Occasional assertion failures in
RunLoop::TimerBase::timerFired
Reviewed by Darin Adler.
* Platform/win/RunLoopWin.cpp:
(RunLoop::TimerBase::timerFired): Just bail if the timer has already been stopped.
2011-02-08 Adam Roben <aroben@apple.com>
Don't mark a Connection as connected until open() is called on Windows
This matches Mac. Even though the Connection's pipe is connected before open() is called,
the Connection itself isn't really connected to the pipe until then, and we won't actually
read any data from before that point.
Fixes <http://webkit.org/b/53998> <rdar://problem/8971207> REGRESSION (r77874): Assertion
failure on launch in Connection::setDidCloseOnConnectionWorkQueueCallback on Windows
Reviewed by Darin Adler.
* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::platformInitialize): Moved code to set m_isConnected from here to
open.
(CoreIPC::Connection::platformInvalidate): Unset m_isConnected, to match Mac. (This isn't
part of the bug fix, but seemed worthwhile.)
(CoreIPC::Connection::open): Set m_isConnected now that we're going to listen on the pipe.
2011-02-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r77866.
http://trac.webkit.org/changeset/77866
https://bugs.webkit.org/show_bug.cgi?id=53981
caused all WebKit2 inspector tests to crash (Requested by
othermaciej on #webkit).
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::didClose):
2011-02-07 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dan Bernstein.
Add resource load client for injected bundle and move willSendRequest there
https://bugs.webkit.org/show_bug.cgi?id=53972
* GNUmakefile.am:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetPageLoaderClient):
(WKBundlePageSetResourceLoadClient):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp: Added.
(WebKit::InjectedBundlePageResourceLoadClient::didInitiateLoadForResource):
(WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
(WebKit::InjectedBundlePageResourceLoadClient::didReceiveResponseForResource):
(WebKit::InjectedBundlePageResourceLoadClient::didReceiveContentLengthForResource):
(WebKit::InjectedBundlePageResourceLoadClient::didFinishLoadForResource):
(WebKit::InjectedBundlePageResourceLoadClient::didFailLoadForResource):
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h: Added.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoading):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::initializeInjectedBundleResourceLoadClient):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleResourceLoadClient):
* win/WebKit2.vcproj:
2011-02-07 Mark Rowe <mrowe@apple.com>
Fix the 32-bit build.
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): Add some casts
to prevent warnings about mixing signed and unsigned comparisons.
2011-02-07 Qi Zhang <qi.2.zhang@nokia.com>
Reviewed by Andreas Kling.
[Qt] enum QWebPage::WebAction doesn't have value QWebPage::CopyImageUrl
https://bugs.webkit.org/show_bug.cgi?id=52974
Add ContextMenuItemTagCopyImageUrlToClipboard into standard action but Qt platform specific.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::contextMenuItemTagCopyImageUrlToClipboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2011-02-07 Enrica Casucci <enrica@apple.com>
Reviewed by Sam Weinig.
Fixing a build break on Mac caused by http://trac.webkit.org/changeset/77874
Removed unused static function.
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2011-02-07 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8969888>
The WebProcess should set LSFileQuarantineEnabled to true
* WebProcess/Info.plist:
2011-02-07 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Crash in web process after the connection had been closed
https://bugs.webkit.org/show_bug.cgi?id=51115
<rdar://problem/8964255>
Remove didCloseOnConnectionWorkQueue from Connection::Client and add
Connection::setDidCloseOnConnectionWorkQueueCallback which takes a static
function, eliminating the race condition in connectionDidClose where m_client could be
nulled out in the client thread right before we try to dereference it.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::Connection):
Initialize m_didCloseOnConnectionWorkQueueCallback.
(CoreIPC::Connection::setDidCloseOnConnectionWorkQueueCallback):
Update m_didCloseOnConnectionWorkQueueCallback.
(CoreIPC::Connection::connectionDidClose):
Call m_didCloseOnConnectionWorkQueueCallback.
* Platform/WorkQueue.h:
Make WorkQueue noncopyable.
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::initializeConnection):
Call setDidCloseOnConnectionWorkQueueCallback.
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::didCloseOnConnectionWorkQueue):
* Shared/ChildProcess.h:
didCloseOnConnectionWorkQueue is now a static member function.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initialize):
Call setDidCloseOnConnectionWorkQueueCallback.
2011-02-07 Enrica Casucci <enrica@apple.com>
Reviewed Adam Roben and Darin Adler.
WebKit2: drag and drop support on Windows.
https://bugs.webkit.org/show_bug.cgi?id=52775
<rdar://problem/8514409>
This patch contains the remaining work to support
a WebKit window as drag source on Windows.
I've added the code to generate the image for dragging a link as
well as the steps necessary to package the HBITMAP into a SharedMemory
object and send it over to the UI process where DoDragDrop is performed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setDragImage):
(WebKit::WebPageProxy::startDragDrop):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebDragClient.cpp:
(WebKit::WebDragClient::startDrag): Made startDrag for
platforms other than Windows and Mac.
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::startDrag):
* WebProcess/WebCoreSupport/win/WebDragClientWin.cpp: Added.
(WebKit::draggingSourceOperationMaskToDragCursors):
(WebKit::WebDragClient::startDrag):
* WebProcess/WebCoreSupport/win/WebDragSource.cpp: Added.
This object implements the IDropSource interface.
(WebDragSource::createInstance):
(WebDragSource::WebDragSource):
(WebDragSource::QueryInterface):
(WebDragSource::AddRef):
(WebDragSource::Release):
(WebDragSource::QueryContinueDrag):
(WebDragSource::GiveFeedback):
* WebProcess/WebCoreSupport/win/WebDragSource.h: Added.
* win/WebKit2.vcproj:
2011-02-07 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
UI process crashes if web process crashes while web inspector is focused
https://bugs.webkit.org/show_bug.cgi?id=53965
<rdar://problem/8961633>
Make sure to close the web inspector web page proxy before calling platformClose, since
platformClose can cause the web page proxy to try to send messages (such as SetActive)
to the web process while it's in a bad state.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::didClose):
2011-02-07 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Find bouncy is missing content on pages with framesets
https://bugs.webkit.org/show_bug.cgi?id=53958
<rdar://problem/8904447>
Fix paint rect computation; FrameView::paint expects the paint rect to be in the
parent widget's coordinate system.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
2011-02-07 Brady Eidson <beidson@apple.com>
Reviewed by Anders Carlsson.
<rdar://problem/8960434> and https://bugs.webkit.org/show_bug.cgi?id=53957
Crash after incorrectly restoring bogus session state.
In some cases we're writing an invalid session state for a back/forward list where the current entry is 0
but the number of entries is also 0.
In such cases the current entry should be "NoCurrentEntryIndex."
When we later read this state in, we set ourselves up to crash later.
Amusingly an ASSERT caught this, but we should've rejected it before the ASSERT fired.
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): Fail the restore if the "current index past the end
of the list" case occurs, and speculatively bail out of the case where we have no current index but do have a list.
Also remove the unhelpful ASSERT.
2011-02-07 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Add bundle API to get the background color of a frame
<rdar://problem/8962670>
https://bugs.webkit.org/show_bug.cgi?id=53952
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetBodyBackgroundColor):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
Add API function.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::getDocumentBackgroundColor):
* WebProcess/WebPage/WebFrame.h:
Call down into the document to get either the body's, or if there is no body,
the root element's, background color.
2011-02-07 Sam Weinig <sam@webkit.org>
Fix typo. vectical -> vertical.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeScrollbarsForMainFrame):
2011-02-07 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Inform the UIProcess when main frame scrollbars change
<rdar://problem/8967496>
https://bugs.webkit.org/show_bug.cgi?id=53941
* UIProcess/API/C/WKPage.cpp:
(WKPageHasHorizontalScrollbar):
(WKPageHasVerticalScrollbar):
* UIProcess/API/C/WKPage.h:
Add API to query whether the main frame has scrollbars.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::didChangeScrollbarsForMainFrame):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::hasHorizontalScrollbar):
(WebKit::WebPageProxy::hasVerticalScrollbar):
Store/update main frame scrollbar state.
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebKit::WebChromeClient::WebChromeClient):
Post message when main frame scrollbar state changes.
2011-02-07 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Some content is not covered by Find-on-page overlay
https://bugs.webkit.org/show_bug.cgi?id=53937
<rdar://problem/8711353>
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::didInstallPageOverlay):
Call LayerTreeHost::didInstallPageOverlay.
(WebKit::DrawingAreaImpl::didUninstallPageOverlay):
Call LayerTreeHost::didUninstallPageOverlay.
(WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
Call LayerTreeHost::setPageOverlayNeedsDisplay.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::drawRect):
Remove a bogus assertion.
* WebProcess/WebPage/LayerTreeHost.h:
Add new pure virtual member functions.
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::setNeedsDisplay):
Call DrawingArea::setPageOverlayNeedsDisplay.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::installPageOverlay):
Make sure to call PageOverlay::setNeedsDisplay after the page overlay has been installed.
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::LayerTreeHostMac):
Create the page overlay layer if needed.
(WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
Invalidate the page overlay layer as well.
(WebKit::LayerTreeHostMac::sizeDidChange):
Resize the page overlay layer.
(WebKit::LayerTreeHostMac::didInstallPageOverlay):
Create the page overlay layer.
(WebKit::LayerTreeHostMac::didUninstallPageOverlay):
Destroy the page overlay layer.
(WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay):
Call setNeedsDisplay on the page overlay layer.
(WebKit::LayerTreeHostMac::paintContents):
Handle painting the page overlay layer.
(WebKit::LayerTreeHostMac::flushPendingLayerChanges):
Flush the page overlay layer changes as well.
(WebKit::LayerTreeHostMac::createPageOverlayLayer):
Create a layer and add it as a sublayer of the root layer.
(WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
Destroy the page overlay layer.
2011-02-06 Adam Roben <aroben@apple.com>
Make it possible to use DrawingAreaProxyImpl on Windows
It can be optionally turned on by setting the WEBKIT2_USE_NEW_DRAWING_AREA environment
variable. Turning it on by default is covered by <http://webkit.org/b/53805>.
Fixes <http://webkit.org/b/53879>.
Reviewed by Anders Carlsson.
* UIProcess/BackingStore.h: Add an m_bitmap member on Windows.
* UIProcess/win/BackingStoreWin.cpp:
(WebKit::BitmapDC::operator HDC):
(WebKit::BitmapDC::BitmapDC):
(WebKit::BitmapDC::~BitmapDC):
Added this helper class, which uses RAII to select a bitmap into a new memory DC.
(WebKit::BackingStore::paint): Wrap our bitmap in a BitmapDC and use ::BitBlt to copy the
specified rect into the destination DC.
(WebKit::createBitmap): New helper function, just creates a DIB section with the specified
size.
(WebKit::BackingStore::incorporateUpdate): Ported from BackingStoreMac.mm. It seems like
this code could be shared at some point.
(WebKit::BackingStore::scroll): Wrap our bitmap in a BitmapDC and use ::ScrollDC to scroll
the specified rect.
* UIProcess/win/WebView.cpp:
(WebKit::useNewDrawingArea): Added. Returns true if the WEBKIT2_USE_NEW_DRAWING_AREA
environment variable is set.
(WebKit::drawPageBackground): New helper function. Code came from onPaintEvent.
(WebKit::WebView::onPaintEvent): Ported from -[WKView drawRect:].
(WebKit::WebView::createDrawingAreaProxy): Create a DrawingAreaProxyImpl if we're using the
new drawing area.
(WebKit::WebView::enterAcceleratedCompositingMode):
(WebKit::WebView::exitAcceleratedCompositingMode):
(WebKit::WebView::pageDidEnterAcceleratedCompositing):
(WebKit::WebView::pageDidLeaveAcceleratedCompositing):
Added some assertions to make sure these are only called when expected. We don't expect
enter/exitAcceleratedCompositingMode to be called at all right now, because accelerated
compositing is turned off in WebKit2 on Windows.
(WebKit::WebView::switchToDrawingAreaTypeIfNecessary): Ditto, and added a case for the
DrawingAreaInfo::Impl constant.
2011-02-07 Adam Roben <aroben@apple.com>
Start compiling DrawingArea[Proxy]Impl and dependencies on Windows
Fixes <http://webkit.org/b/53875> WebKit2 on Windows should build DrawingArea[Proxy]Impl
Reviewed by Sam Weinig and Darin Adler.
* Platform/Region.cpp:
(WebKit::Region::Shape::shapeOperation): Initialize variable to avoid a bogus "potentially
uninitialized variable" warning.
* UIProcess/BackingStore.cpp: Removed #error for non-Mac platforms.
* UIProcess/BackingStore.h: Added a PlatformGraphicsContext typedef for Windows.
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
Allow Windows to compile the new drawing area code.
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create): Allow creating a DrawingAreaImpl on Windows, too.
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
* WebProcess/WebPage/LayerTreeHost.cpp:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage):
Allow Windows to compile the new drawing area code.
* Shared/win/LayerTreeContextWin.cpp: Added.
* UIProcess/win/BackingStoreWin.cpp: Added.
Stubbed out these files.
* win/WebKit2.vcproj: Added new files.
2011-02-07 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Rename some drawing area related member functions
https://bugs.webkit.org/show_bug.cgi?id=53935
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setPageOverlayNeedsDisplay):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setNeedsDisplay):
(WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
(WebKit::LayerTreeHostMac::scrollNonCompositedContents):
2011-02-07 Adam Roben <aroben@apple.com>
Use the right calling convention when calling WebKitMain
Fixes <http://webkit.org/b/53923> REGRESSION (r77678): Crash on quit in web process in
wWinMain
Reviewed by Steve Falkenburg.
* win/MainWin.cpp:
(wWinMain): Use __cdecl instead of WINAPI (__stdcall) when calling WebKitMain, since that is
how that function is declared.
2011-02-07 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
The drawing area should be in charge of drawing the page overlay
https://bugs.webkit.org/show_bug.cgi?id=53927
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::didInstallPageOverlay):
(WebKit::DrawingArea::didUninstallPageOverlay):
(WebKit::DrawingArea::setOverlayNeedsDisplay):
Add empty stubs.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::didInstallPageOverlay):
Add empty function. This will eventually ask the layer tree host to
create a GraphicsLayer for the page overlay.
(WebKit::DrawingAreaImpl::didUninstallPageOverlay):
Tell the page that it needs to be repainted.
(WebKit::DrawingAreaImpl::setOverlayNeedsDisplay):
Just call setNeedsDisplay for now.
(WebKit::DrawingAreaImpl::display):
Paint the page overlay too.
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawRect):
Only call drawPageOverlay if we have an old drawing area.
(WebKit::WebPage::drawPageOverlay):
Draw the page overlay. Code moved here from WebPage::drawRect.
(WebKit::WebPage::installPageOverlay):
Call DrawingArea::installPageOverlay.
(WebKit::WebPage::uninstallPageOverlay):
Call DrawingArea::uninstallPageOverlay.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::hasPageOverlay):
Add getter.
2011-02-07 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add WebPage::bounds and use it
https://bugs.webkit.org/show_bug.cgi?id=53926
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::resumePainting):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::resumePainting):
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::bounds):
2011-02-07 Anders Carlsson <andersca@apple.com>
Reviewed by Maciej Stachowiak.
Don't exclude overlay scrollers from the page overlay bounds
https://bugs.webkit.org/show_bug.cgi?id=53924
Don't subtract the scrollbars from the page overlay bounds if
overlay scrollers are enabled.
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::bounds):
2011-02-07 Adam Roben <aroben@apple.com>
Windows build fix after r77794
* win/WebKit2.def: Export WebCore symbols used by WebKitTestRunner.
2011-02-07 Maciej Stachowiak <mjs@apple.com>
Reviewed by Antti Koivisto.
Add WKURLRequestCopyURL API (needed for tests and also generally useful)
https://bugs.webkit.org/show_bug.cgi?id=53909
* Shared/API/c/WKURLRequest.cpp:
(WKURLRequestCopyURL):
* Shared/API/c/WKURLRequest.h:
* Shared/WebURLRequest.h:
(WebKit::WebURLRequest::url):
2011-02-06 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed; speculative Qt build fix.
* WebKit2.pro:
2011-02-06 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
https://bugs.webkit.org/show_bug.cgi?id=52867
* Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
(WebKit::NetscapePluginModule::getPluginInfo): Calls adoptArrayPtr.
2011-02-06 Benjamin Poulain <ikipou@gmail.com>
Reviewed by Andreas Kling.
[Qt] WebKit does not build on Mac with WebKit 2
https://bugs.webkit.org/show_bug.cgi?id=53380
* Platform/CoreIPC/qt/ConnectionQt.cpp: Use fcntl() to set close on exec so
we do not rely on recent kernel.
(CoreIPC::Connection::readyReadHandler):
* Platform/qt/SharedMemoryQt.cpp: ditto
(WebKit::SharedMemory::create):
(WebKit::SharedMemory::createHandle):
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp: Guard prctl() since it is
a Linux specific function.
(WebKit::QtWebProcess::setupChildProcess):
* UIProcess/DrawingAreaProxy.h: Differentiate between building on Mac
and the Mac port.
* UIProcess/DrawingAreaProxyImpl.cpp: ditto
* UIProcess/WebPageProxy.cpp: ditto
(WebKit::WebPageProxy::didReceiveMessage):
* WebProcess/WebPage/DrawingArea.cpp: ditto
(WebKit::DrawingArea::create):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp: ditto
* WebProcess/WebPage/WebPage.cpp: ditto
(WebKit::WebPage::didReceiveMessage):
2011-02-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dan Bernstein.
REGRESSION: New drawing area is causing some WebProcess crashes in layout tests
https://bugs.webkit.org/show_bug.cgi?id=53865
<rdar://problem/8963148>
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): Handle the case
where this is called repeatedly without exiting accelerated composting mode
first.
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Handle the case
of being called more than once.
2011-02-05 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Need a way to resize and scroll the page at the same time
https://bugs.webkit.org/show_bug.cgi?id=53814
<rdar://problem/8498008>
Add -[WKView setFrame:andScrollBy:].
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView setFrame:andScrollBy:]):
Stash away the scroll offset and call setFrame:.
(-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
(-[WKView _setDrawingAreaSize:]):
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::setViewportSize):
DrawingAreaProxy::setSize now takes a scroll offset.
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::setSize):
This now takes a scroll offset and stores it in m_scrollOffset.
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::sendSetSize):
Send along the scroll offset and set it back to zero.
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::didSetSize):
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::didSetSize):
* UIProcess/win/WebView.cpp:
(WebKit::WebView::onSizeEvent):
(WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
DrawingAreaProxy::setSize now takes a scroll offset.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setSize):
Add a scrollOffset parameter.
* WebProcess/WebPage/DrawingArea.messages.in:
Add a scroll offset parameter to the SetSize message.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setSize):
Call WebPage::scrollMainFrameIfNotAtMaxScrollPosition.
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scrollMainFrameIfNotAtMaxScrollPosition):
Compute a scroll offset and call setScrollPosition on the main frame view.
2011-02-04 Brian Weinstein <bweinstein@apple.com>
Reviewed by Maciej Stachowiak.
WebKit2: Crash when InjectedBundlePageLoaderClient::willSendRequestForFrame returns a null WKURLRequestRef
https://bugs.webkit.org/show_bug.cgi?id=53829
Store the result of m_client.willSendRequestForFrame in a RefPtr, and null check it before
calling resourceRequest() on it.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::willSendRequestForFrame):
2011-02-04 Anders Carlsson <andersca@apple.com>
Fix build.
* WebProcess/mac/WebProcessMac.mm:
2011-02-04 Anders Carlsson <andersca@apple.com>
Reviewed by Mark Rowe.
Link opened in background tab fails to paint when activated if it completes loading before tab is selected
https://bugs.webkit.org/show_bug.cgi?id=53827
<rdar://problem/8962355>
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::resumePainting):
Invalidate the entire page.
2011-02-04 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Fix <rdar://problem/8961227> WebKit2 does not work with symlinked home directories.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformSetCacheModel):
Don't adopt an autoreleased pointer, this would lead to a crash.
(WebKit::appendSandboxParameterPath):
(WebKit::appendSandboxParameterConfPath):
(WebKit::initializeSandbox):
Clean up the sandbox parameter code and make sure that realpath is called for all parameters.
2011-02-04 Sam Weinig <sam@webkit.org>
Reviewed by Mark Rowe.
Sandbox violations when visiting a site using HTTP authentication
<rdar://problem/8951079>
* WebProcess/com.apple.WebProcess.sb:
2011-02-04 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=53823
Print layout sometimes seen on screen
<rdar://problem/8948742> REGRESSION (WebKit2) - When I print a page, I visually see it re-layout
<rdar://problem/8899389> REGRESSION(WebKit2): Wrong content can appear when print dialog is up
* UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setAutodisplay): Removed a
branch that didn't do anything useful.
* UIProcess/API/mac/WKPrintingView.h:
* UIProcess/API/mac/WKPrintingView.mm:
(-[WKPrintingView _suspendAutodisplay]):
(-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
(-[WKPrintingView _delayedResumeAutodisplay]):
(-[WKPrintingView knowsPageRange:]):
(-[WKPrintingView beginDocument]):
(-[WKPrintingView endDocument]):
When page setup changes, or when going from print preview to actual printing, AppKit calls
-endDocument just to begin it again. Delay resuming autodisplay until the next run loop
iteration.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::invalidateContentsAndWindow):
(WebKit::WebChromeClient::invalidateContentsForSlowScroll):
Tightened it up from other side - we should never send pixels to UI process while in
printing mode. This is not 100% reliable, because relayout doesn't happen immediately,
and we can still have print layout in screen mode - but it helps.
2011-02-04 Sam Weinig <sam@webkit.org>
Reviewed by Mark Rowe.
Fix for <rdar://problem/8961580>.
Work around for <rdar://problem/8957845>.
* WebProcess/com.apple.WebProcess.sb:
2011-02-04 Darin Adler <darin@apple.com>
Reviewed by Dan Bernstein.
WebKit2 doesn't hide mouse pointer on keypress
https://bugs.webkit.org/show_bug.cgi?id=53821
rdar://problem/8630895
* UIProcess/PageClient.h: Renamed didNotHandleKeyEvent to
doneWithKeyEvent and added a bool wasEventHandled argument.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent): Changed code to call
doneWithKeyEvent and call even if event was handled.
* UIProcess/API/mac/PageClientImpl.h: Updated for above change.
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::doneWithKeyEvent): Ditto. But also
call [NSCursor setHiddenUntilMouseMoves:YES] when a key down
event was handled. This matches what -[WebHTMLView keyDown:] does.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::doneWithKeyEvent): Ditto.
* UIProcess/API/qt/qwkpage_p.h: Ditto.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::doneWithKeyEvent): Ditto.
* UIProcess/win/WebView.h: Ditto.
2011-02-04 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
WebKit2 clients fail to launch on Windows if client exe is in a different directory from WebKit
https://bugs.webkit.org/show_bug.cgi?id=53810
<rdar://problem/8946085>
If WebKit2WebProcess.exe is in a different directory from the client process, and that
client process uses CreateProcess to launch WebKit2WebProcess, the DLL search path may
end up excluding the directory containing WebKit. To address this, we use SetDllDirectory
to explicitly include the WebKit directory in the DLL search path.
* win/MainWin.cpp:
(wWinMain): Use SetDllDirectory and LoadLibrary to load WebKit.dll from WebKit2WebProcess.exe
* win/WebKit2WebProcessCommon.vsprops: Don't link directly to WebKit. Link against shlwapi.
2011-02-04 Adam Roben <aroben@apple.com>
Allow passing a null filter callback to WKPageCopySessionState
WebKit2 part of <http://webkit.org/b/53616> <rdar://problem/8949883>.
Reviewed by Sam Weinig.
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation): Check if the filter is null
before calling it.
2011-02-04 Brian Weinstein <bweinstein@apple.com>
Reviewed by John Sullivan.
WebKit2: DidInitiateLoadForResource needs to know if the resource is being loaded by a committed or provisional frame
https://bugs.webkit.org/show_bug.cgi?id=53794
When we navigate from one page to another, there can be multiple subresource requests between when
the new page has started its provisional load and when it has committed the load.
There can be:
- The main resource load of the provisional page
- Synchronous XHR from the unload event of the loaded page.
WebKit clients need to be able to differentiate between these loads.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didInitiateLoadForResource): Pass whether or not the page is provisionally loading
to the client.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Add a new parameter to DidInitiateLoadForResource.
* UIProcess/WebResourceLoadClient.cpp:
(WebKit::WebResourceLoadClient::didInitiateLoadForResource): a new parameter to didInitiateLoadForResource.
* UIProcess/WebResourceLoadClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest): Pass whether or not the page is currently
in a provisional load (checked by seeing if the DocumentLoader matches the FrameLoader's provisionalDocumentLoader)
to the UI Process.
2011-02-04 Anders Carlsson <andersca@apple.com>
Reviewed by Mark Rowe.
Mac WebKit2 should use the new drawing area
https://bugs.webkit.org/show_bug.cgi?id=53802
<rdar://problem/7881419>
<rdar://problem/7881447>
<rdar://problem/8252632>
<rdar://problem/8479422>
<rdar://problem/8633813>
<rdar://problem/8734512>
<rdar://problem/8787660>
* UIProcess/API/mac/WKView.mm:
(useNewDrawingArea):
Return true. Eventually this function should be removed, but let's keep it for now so
we can go back to the old drawing area if necessary.
2011-02-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders Carlsson.
WebKit2: Crash in WebPageProxy::setPendingAPIRequestURL after web process crashed
https://bugs.webkit.org/show_bug.cgi?id=53799
<rdar://problem/8943956>
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reload):
2011-02-04 Anders Carlsson <andersca@apple.com>
Reviewed by Maciej Stachowiak.
Fix a shared memory leak
https://bugs.webkit.org/show_bug.cgi?id=53800
Move the send right representing the shared memory.
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::Handle::encode):
2011-02-04 Brady Eidson <beidson@apple.com>
Reviewed by Anders Carlsson.
<rdar://problem/8636239> and https://bugs.webkit.org/show_bug.cgi?id=53785
WebKit2: Pages with dynamically inserted iframes can add extraneous back/forward items.
WebCore doesn't gracefully handle the case where the decidePolicyForNavigationAction callback
does not occur synchronously. Let's make it synchronous.
Change WebPageProxy to handle this message reply synchronously:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Make the navigation policy action message be synchronous.
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction): Add a 6-argument varient
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Send the message synchronously.
2011-02-04 Steve Falkenburg <sfalken@apple.com>
Windows build fix.
Correct prebuild build-stopping rule to allow project only rebuilds.
* win/WebKit2WebProcessPreBuild.cmd:
2011-02-04 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben.
Assertion failure in WebInspectorProxy::platformClose closing main window when inspecting a popup
window, or when running regression tests.
https://bugs.webkit.org/show_bug.cgi?id=53798
<rdar://problem/8814364>
Only assert about the state of m_inspectorWindow and m_inspectorView if the inspector is visible.
Also, only call ::DestroyWindow if the HWND is non-null, just to be safe.
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformClose):
2011-02-04 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Go out of accelerated compositing mode when the drawing area is destroyed
https://bugs.webkit.org/show_bug.cgi?id=53788
This fixes a crash in the UI process if a web process crashes while in accelerated compositing mode.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
2011-02-03 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: remove settings related methods from InspectorClient
https://bugs.webkit.org/show_bug.cgi?id=53686
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient):
2011-02-03 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dan Bernstein.
WebKit2: Need WebKit2 equivalent of WebResourceLoadDelegate::willSendRequest in the Bundle
https://bugs.webkit.org/show_bug.cgi?id=52897
<rdar://problem/8898294>
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::willSendRequestForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
2011-02-03 Ivan Krstić <ike@apple.com>
Reviewed by Maciej Stachowiak.
Make WebProcess pass explicit homedir parameter to the sandbox
<rdar://problem/8405760>
<https://webkit.org/b/53558>
* WebProcess/com.apple.WebProcess.sb:
* WebProcess/mac/WebProcessMac.mm:
(WebKit::initializeSandbox):
2011-02-03 James Kozianski <koz@chromium.org>
Reviewed by Dimitri Glazkov.
Add navigator.registerProtocolHandler behind a flag.
https://bugs.webkit.org/show_bug.cgi?id=52609
* Configurations/FeatureDefines.xcconfig:
2011-02-03 Adam Langley <agl@chromium.org>
Reviewed by Adam Barth.
Plumb mixed script URL to FrameLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=52384
Regressions covered by http/tests/security/mixedContent/*
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didRunInsecureContent):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2011-02-03 Jon Honeycutt <jhoneycutt@apple.com>
Download bundles should be moved to their final destination when they
finish.
https://bugs.webkit.org/show_bug.cgi?id=53668
Reviewed by Adam Roben.
* WebProcess/Downloads/Download.cpp:
(WebKit::Download::Download):
Initialize m_allowOverwrite.
(WebKit::Download::retrieveDestinationWithSuggestedFilename):
Return the result of requesting the destination filename from the UI
process.
(WebKit::Download::decideDestinationWithSuggestedFilename):
Call retrieveDestinationWithSuggestedFilename().
(WebKit::Download::didFinish):
Call platformDidFinish().
* WebProcess/Downloads/Download.h:
Declare retrieveDestinationWithSuggestedFilename() and
platformDidFinish(). Add a member variable to store whether the UI
process would like us to overwrite existing files.
* WebProcess/Downloads/cf/DownloadCFNet.cpp:
(WebKit::willResumeWithResponseCallback):
Remove some trailing whitespace.
* WebProcess/Downloads/curl/DownloadCurl.cpp:
(WebKit::Download::platformDidFinish):
Stubbed.
* WebProcess/Downloads/mac/DownloadMac.mm:
(WebKit::Download::platformDidFinish):
Stubbed.
* WebProcess/Downloads/qt/DownloadQt.cpp:
(WebKit::Download::platformDidFinish):
Stubbed.
* WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp:
(WebKit::Download::didDecideDestination):
Store whether the UI process would like us to overwrite existing files.
(WebKit::Download::platformDidFinish):
Try to move the bundle to the final destination. If that fails, ask the
UI process for a new destination. If we receive one, try again to move
the bundle. Call didCreateDestination() to report the updated path of
file whether it's the bundle that we failed to move, or the new final
destination.
This is similar to what is done by WebKit 1's CFNetwork port.
* win/WebKit2.vcproj:
Add DownloadWin.cpp.
2011-02-01 Jon Honeycutt <jhoneycutt@apple.com>
Small clean-up in DownloadCFNet.cpp.
Rubber-stamped by Mark Rowe.
* WebProcess/Downloads/cf/DownloadCFNet.cpp:
(WebKit::Download::didDecideDestination):
Moved out of the section labeled "CFURLDownload callbacks" and up near
the other member functions.
2011-02-03 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Paint non-composited contents in a layer
https://bugs.webkit.org/show_bug.cgi?id=53742
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setNeedsDisplay):
Call LayerTreeHost::setNonCompositedContentsNeedDisplayInRect.
(WebKit::DrawingAreaImpl::scroll):
Call LayerTreeHost::scrollNonCompositedContents.
(WebKit::DrawingAreaImpl::setSize):
Call LayerTreeHost::sizeDidChange.
* WebProcess/WebPage/LayerTreeHost.h:
Add new pure virtual member functions.
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::LayerTreeHostMac):
Create the non-composited content layer.
(WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
Call setNeedsDisplay on the GraphicsLayer.
(WebKit::LayerTreeHostMac::scrollNonCompositedContents):
Just call setNonCompositedContentsNeedDisplayInRect.
(WebKit::LayerTreeHostMac::sizeDidChange):
Resize the layers and flush any changes.
(WebKit::LayerTreeHostMac::paintContents):
Call WebPage::drawRect.
(WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
Lay out the web page.
(WebKit::LayerTreeHostMac::flushPendingLayerChanges):
Call syncCompositingStateForThisLayerOnly on the non-composited content layer.
2011-02-03 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
When in accelerated compositing mode, wait for DidSetSize messages
https://bugs.webkit.org/show_bug.cgi?id=53736
Normally we wait for DidSetSize messages from ::paint, but that's never called in
accelerated compositing mode so we just do it right after sending the SetSize message.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::paint):
Call waitForAndDispatchDidSetSize.
(WebKit::DrawingAreaProxyImpl::sendSetSize):
Call waitForAndDispatchDidSetSize when in accelerated compositing mode.
(WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidSetSize):
New utility function which waits for and dispatches a DidSetSize message.
* UIProcess/DrawingAreaProxyImpl.h:
2011-02-03 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Pass along an UpdateInfo object to the ExitAcceleratedCompositingMode message
https://bugs.webkit.org/show_bug.cgi?id=53734
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode):
Add an UpdateInfo parameter.
* UIProcess/DrawingAreaProxy.messages.in:
Add an UpdateInfo parameter to the ExitAcceleratedCompositingMode message.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
Incorporate the passed in update.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
Create a new UpdateInfo object, paint into it and pass it along as a parameter
to the ExitAcceleratedCompositingMode message.
2011-02-03 Beth Dakin <bdakin@apple.com>
Reviewed by Sam Weinig.
Fix for <rdar://problem/8944544> Ability to animate track
for WKPainter scrollers
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2011-02-03 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Change DidSetSize to take a LayerTreeContext parameter
https://bugs.webkit.org/show_bug.cgi?id=53724
Since SetSize can cause layout to happen, we need to pass along a layer tree context to
the DidSetSize message so the UI process can enter/exit accelerated compositing mode appropriately.
* Shared/LayerTreeContext.h:
* Shared/mac/LayerTreeContextMac.mm:
Add equality operators to LayerTreeContext.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::didSetSize):
This now takes a LayerTreeContext parameter.
* UIProcess/DrawingAreaProxy.messages.in:
Add LayerTreeContext parameter.
* UIProcess/DrawingAreaProxyImpl.cpp:
Get rid of m_isInAcceleratedCompositingMode and use the current layer context instead.
(WebKit::DrawingAreaProxyImpl::paint):
Bail if the call to DidSetSize ended up entering accelerated compositing mode.
(WebKit::DrawingAreaProxyImpl::didSetSize):
If the new layer tree context is different, enter/exit accelerated compositing mode accordingly.
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
Update the layer tree context.
* UIProcess/DrawingAreaProxyImpl.h:
(WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode):
Add simple getter.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setSize):
Pass along the layer tree context.
2011-02-03 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Get rid of LayerTreeContext::seed on Mac.
Add sequence checks to enterAcceleratedCompositingMode and exitAcceleratedCompositingMode and
have them call newly added overloads that don't have the checks.
* Shared/LayerTreeContext.h:
* Shared/mac/LayerTreeContextMac.mm:
(WebKit::LayerTreeContext::LayerTreeContext):
(WebKit::LayerTreeContext::encode):
(WebKit::LayerTreeContext::decode):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxyImpl.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::LayerTreeHostMac):
2011-02-03 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Get rid of timestamps in UpdateInfo
https://bugs.webkit.org/show_bug.cgi?id=53713
Add a 64-bit sequence number to all DrawingAreaProxy messages, and use it to
check whether Update messages should be handled or not.
* Shared/UpdateInfo.cpp:
(WebKit::UpdateInfo::encode):
(WebKit::UpdateInfo::decode):
* Shared/UpdateInfo.h:
(WebKit::UpdateInfo::UpdateInfo):
* UIProcess/BackingStore.cpp:
(WebKit::BackingStore::BackingStore):
(WebKit::BackingStore::incorporateUpdate):
* UIProcess/BackingStore.h:
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::update):
(WebKit::DrawingAreaProxy::didSetSize):
(WebKit::DrawingAreaProxy::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxy.messages.in:
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::update):
(WebKit::DrawingAreaProxyImpl::didSetSize):
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxyImpl.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::generateSequenceNumber):
(WebKit::DrawingAreaImpl::setSize):
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaImpl::display):
2011-02-03 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Don't send enter/exit accelerated compositing mode messages when handling setSize
https://bugs.webkit.org/show_bug.cgi?id=53706
Don't send EnterAcceleratedCompositingMode/ExitAcceleratedCompositing mode when
the mode changes happen as a result of relayout in setSize, since an updated state
is going to be sent back in the DidSetSize message.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::didSetSize):
Add an assert.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
Initialize m_inSetSize.
(WebKit::DrawingAreaImpl::setRootCompositingLayer):
Factor out code into enterAcceleratedCompositingMode and exitAcceleratedCompositingMode.
(WebKit::DrawingAreaImpl::setSize):
Set m_inSetSize to true while handling setSize.
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
Take over the message sending responsibility from LayerTreeHostMac, and don't send messages
if we're currently handling a SetSize message.
* WebProcess/WebPage/DrawingAreaImpl.h:
Add m_inSetSize.
* WebProcess/WebPage/LayerTreeHost.h:
Add layerTreeHost getter.
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::LayerTreeHostMac):
Don't send EnterAcceleratedCompositingMode messages.
(WebKit::LayerTreeHostMac::layerTreeContext):
Add getter for the current layer tree context.
(WebKit::LayerTreeHostMac::invalidate):
Don't send ExitAcceleratedCompositingMode messages.
2011-02-03 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Make the layer tree host keep track of the layer tree context
https://bugs.webkit.org/show_bug.cgi?id=53698
Add a LayerTreeContext member variable to the LayerTreeHost object,
and also add a seed count to the LayerTreeContext so we can keep track of
how layer tree contexts relate to each other.
* Shared/LayerTreeContext.h:
* Shared/mac/LayerTreeContextMac.mm:
(WebKit::LayerTreeContext::LayerTreeContext):
(WebKit::LayerTreeContext::makeWithSeed):
(WebKit::LayerTreeContext::encode):
(WebKit::LayerTreeContext::decode):
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
Add the layer tree context as a member variable.
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::LayerTreeHostMac):
Initialize the layer tree context.
2011-02-03 Sam Weinig <sam@webkit.org>
Fix Qt build.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::QWKPage):
2011-02-02 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Add notification of the end of a rubber band.
<rdar://problem/8940648>
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::drawHeader):
(WebKit::WebPageProxy::drawFooter):
(WebKit::WebPageProxy::didCompleteRubberBandForMainFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::didCompleteRubberBandForMainFrame):
* UIProcess/WebUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::didCompleteRubberBandForMainFrame):
* WebProcess/WebCoreSupport/WebChromeClient.h:
Pipe the notification up to the WKUIClient.
2011-02-03 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r77449.
http://trac.webkit.org/changeset/77449
https://bugs.webkit.org/show_bug.cgi?id=53663
causes many WebKit2 tests to crash (Requested by othermaciej
on #webkit).
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toCopiedAPI):
(WebKit::toURLRef):
(WebKit::toCopiedURLAPI):
* Shared/WebString.h:
(WebKit::WebString::isNull):
(WebKit::WebString::WebString):
2011-02-02 Sam Weinig <sam@webkit.org>
Fix license block issues pointed out by Daniel Bates.
* Shared/API/c/WKGraphicsContext.cpp:
* Shared/API/c/WKGraphicsContext.h:
* Shared/API/c/cg/WKGraphicsContextCG.cpp:
* Shared/API/c/cg/WKGraphicsContextCG.h:
* Shared/WebGraphicsContext.cpp:
2011-02-02 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
Add WKBundleFrameGetVisibleContentBoundsExcludingScrollbars API for WebKit2.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetContentBounds):
(WKBundleFrameGetVisibleContentBounds):
(WKBundleFrameGetVisibleContentBoundsExcludingScrollbars):
(WKBundleFrameGetScrollOffset):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::contentBounds):
(WebKit::WebFrame::visibleContentBounds):
(WebKit::WebFrame::visibleContentBoundsExcludingScrollbars):
(WebKit::WebFrame::scrollOffset):
* WebProcess/WebPage/WebFrame.h:
Move implementation of frame geometry to the implementation file
instead of keeping it in the API file.
2011-02-02 Stephanie Lewis <slewis@apple.com>
Reviewed by Geoff Garen.
https://bugs.webkit.org/show_bug.cgi?id=53361
<rdar://problem/8921729> REGRESSION: Membuster accumulates 1GB+ memory due to autorelease
pools not being drained.
Call into AppKit to add observers that push and pop autorelease pools on entry
and exit from the CFRunLoop. This will prevent memory from accumulating.
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain):
2011-02-02 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Make null WTF::String objects turn into 0 pointers for WKStringRef and WKURLRef.
rdar://problem/8948688
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI): Return 0 if the passed in string is 0.
(WebKit::toCopiedAPI): Ditto.
(WebKit::toURLRef): Ditto. Old code was trying to do this but was missing a return.
(WebKit::toCopiedURLAPI): Ditto. Old code was trying to do this but had incorrect
nll check.
* Shared/WebString.h: Removed isNull function. It can never return true.
Removed constructor code that turns the null string into the empty string.
Instead assert that the passed in string is not null.
2011-02-02 Mark Rowe <mrowe@apple.com>
Reviewed by Beth Dakin.
<rdar://problem/8928367> Crash when loading canvas pages inside HTMLCanvasElement::createImageBuffer().
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Add some missing initializers.
2011-02-02 Sam Weinig <sam@webkit.org>
Reviewed by Beth Dakin.
Add ChromeClient function to paint custom overhang areas.
https://bugs.webkit.org/show_bug.cgi?id=53639
* Shared/API/c/WKBase.h:
* Shared/API/c/WKGraphicsContext.cpp: Added.
(WKGraphicsContextGetTypeID):
* Shared/API/c/WKGraphicsContext.h: Added.
* Shared/API/c/WKSharedAPICast.h:
* Shared/API/c/cg/WKGraphicsContextCG.cpp: Added.
(WKGraphicsContextGetCGContext):
* Shared/API/c/cg/WKGraphicsContextCG.h: Added.
* Shared/APIObject.h:
* Shared/WebGraphicsContext.cpp: Added.
(WebKit::WebGraphicsContext::WebGraphicsContext):
* Shared/WebGraphicsContext.h: Added.
(WebKit::WebGraphicsContext::create):
(WebKit::WebGraphicsContext::platformContext):
(WebKit::WebGraphicsContext::type):
Add WebGraphicsContext API type.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::pageDidScroll):
(WebKit::InjectedBundlePageUIClient::shouldPaintCustomOverhangArea):
(WebKit::InjectedBundlePageUIClient::paintCustomOverhangArea):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::paintCustomOverhangArea):
* WebProcess/WebCoreSupport/WebChromeClient.h:
Pipe paintCustomOverhangArea to the InjectedBundlePageUIClient.
* UIProcess/API/C/WebKit2.h:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
Add new files.
2011-02-02 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Work towards making the layer tree host be in charge of all painting
https://bugs.webkit.org/show_bug.cgi?id=53636
Make sure that DrawingAreaImpl::display is never called when in accelerated compositing mode,
since the layer tree host is supposed to handle all drawing in that case.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::scroll):
(WebKit::DrawingAreaImpl::setRootCompositingLayer):
(WebKit::DrawingAreaImpl::setSize):
(WebKit::DrawingAreaImpl::didUpdate):
2011-02-02 Mark Rowe <mrowe@apple.com>
Fix the 32-bit build.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::computeFakeWindowBoundsRect):
2011-02-02 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Make sure that we don't try to call display() when in accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=53629
When in accelerated compositing mode, the layer tree host should handle all painting, so make sure that display() is never called.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setNeedsDisplay):
(WebKit::DrawingAreaImpl::setRootCompositingLayer):
(WebKit::DrawingAreaImpl::display):
2011-02-02 Adam Roben <aroben@apple.com>
Assert WebBackForwardList's current index is valid to help catch errors
Hopefully this will help catch a crash I saw once but haven't yet been able to reproduce.
Fixes <http://webkit.org/b/53622>.
Reviewed by Brady Eidson.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::WebBackForwardList):
(WebKit::WebBackForwardList::addItem):
(WebKit::WebBackForwardList::goToItem):
(WebKit::WebBackForwardList::currentItem):
(WebKit::WebBackForwardList::backItem):
(WebKit::WebBackForwardList::forwardItem):
(WebKit::WebBackForwardList::itemAtIndex):
(WebKit::WebBackForwardList::backListCount):
(WebKit::WebBackForwardList::forwardListCount):
(WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
(WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
(WebKit::WebBackForwardList::clear):
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
(WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
Assert that m_current is valid.
* UIProcess/WebBackForwardList.h: Moved the NoCurrentItemIndex to a static data member so
that it can be used from WebBackForwardListCF.cpp.
2011-02-02 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
The drawing area proxy should keep track of the accelerated compositing state
https://bugs.webkit.org/show_bug.cgi?id=53624
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
Initialize m_isInAcceleratedCompositingMode to false.
(WebKit::DrawingAreaProxyImpl::paint):
Don't try to paint if we're in accelerated compositing mode.
(WebKit::DrawingAreaProxyImpl::didSetSize):
Bail if we're in accelerated compositing mode.
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
Set m_isInAcceleratedCompositingMode to true, null out the backing store.
(WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
Set m_isInAcceleratedCompositingMode back to false.
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
Assert that we're not in accelerated compositing mode.
* UIProcess/DrawingAreaProxyImpl.h:
2011-02-02 Timothy Hatcher <timothy@apple.com>
Give the Web Process access to the Safari RSS preferences.
<rdar://problem/8916870> Sandbox violation related to RSS during initial
page load with WebKit2 (prevents RSS from working)
Reviewed by Darin Adler.
* WebProcess/com.apple.WebProcess.sb:
2011-02-02 Steve Lacey <sjl@chromium.org>
Reviewed by Eric Carlson.
Implement basic media statistics on media elements.
https://bugs.webkit.org/show_bug.cgi?id=53322
* Configurations/FeatureDefines.xcconfig:
2011-02-01 Alexey Proskuryakov <ap@apple.com>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=53561
<rdar://problem/8900228> Stepping through print previews in WebKit2 mode steps in and out of
printing mode a lot
Disable NSView autodisplay, so that -[WKView drawRect:] isn't called (other than when
resizing the window), so that we don't have to switch modes all the time.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setAutodisplay):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setAutodisplay):
* UIProcess/WebPageProxy.h:
Pipe the call from WKPrintingView down to WKView.
* UIProcess/API/mac/WKPrintingView.mm:
(-[WKPrintingView beginDocument]): Added. We don't want to autodisplay WKView while printing,
because layout is changed to print at the time, and drawing to screen requires relayout.
(-[WKPrintingView endDocument]): When not printing, turn autodisplay back on. Also, call
-[super endDocument] for unknown but definitive good (oops!).
2011-02-02 David Hyatt <hyatt@apple.com>
Reviewed by Darin Adler.
Conversion of right()/bottom() to maxX()/maxY() as part of the removal of those accessors.
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::calculatePositionAndSize):
* UIProcess/win/WebView.cpp:
(WebKit::WebView::prepareCandidateWindow):
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
(WebKit::NetscapePlugin::platformGeometryDidChange):
2011-02-01 Darin Adler <darin@apple.com>
Reviewed by Anders Carlsson.
Overflow in WebKit2 argument decoder buffer checking
https://bugs.webkit.org/show_bug.cgi?id=53536
* Platform/CoreIPC/ArgumentDecoder.cpp:
(CoreIPC::roundUpToAlignment): Tweak code a bit for clarity and to replace
C casts with C++ casts.
(CoreIPC::ArgumentDecoder::alignBufferPosition): Rearrange buffer calculation
so we don't do any math with the passed-in size, because that could overflow.
(CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain): Ditto.
2011-02-01 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed.
Fix Qt build after r77339.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::enterAcceleratedCompositingMode):
(QWKPagePrivate::exitAcceleratedCompositingMode):
* UIProcess/API/qt/qwkpage_p.h:
2011-02-01 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Attach the layer tree in the UI process
https://bugs.webkit.org/show_bug.cgi?id=53560
* UIProcess/API/mac/WKView.mm:
(-[WKView _enterAcceleratedCompositingMode:]):
Make a render layer and add it as a sublayer of our root layer.
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
Make LayerTreeHostMac a GraphicsLayerClient.
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::LayerTreeHostMac):
Create a root layer, add the layer subtree as a child of the root layer.
(WebKit::LayerTreeHostMac::~LayerTreeHostMac):
Assert that m_rootLayer is null.
(WebKit::LayerTreeHostMac::invalidate):
Null out m_rootLayer.
(WebKit::LayerTreeHostMac::notifyAnimationStarted):
(WebKit::LayerTreeHostMac::notifySyncRequired):
(WebKit::LayerTreeHostMac::paintContents):
Add stubs.
(WebKit::LayerTreeHostMac::showDebugBorders):
(WebKit::LayerTreeHostMac::showRepaintCounter):
Return the correct settings.
(WebKit::LayerTreeHostMac::flushPendingLayerChanges):
Flush the root layer changes.
2011-02-01 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::enterAcceleratedCompositingMode):
(WebKit::WebView::exitAcceleratedCompositingMode):
* UIProcess/win/WebView.h:
2011-02-01 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Add a layer backed NSView for accelerated content
https://bugs.webkit.org/show_bug.cgi?id=53555
Rename the current _layerHostingView to _oldLayerHostingView and
add a new _layerHostingView to be used with the new drawing area.
* UIProcess/API/mac/WKView.mm:
(-[WKView hitTest:]):
(-[WKView _startAcceleratedCompositing:]):
(-[WKView _stopAcceleratedCompositing]):
(-[WKView _enterAcceleratedCompositingMode:]):
(-[WKView _exitAcceleratedCompositingMode]):
2011-02-01 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Pass enter/exit accelerated compositing mode to the WKView
https://bugs.webkit.org/show_bug.cgi?id=53552
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::enterAcceleratedCompositingMode):
(WebKit::PageClientImpl::exitAcceleratedCompositingMode):
* UIProcess/API/mac/WKView.mm:
(-[WKView _enterAcceleratedCompositingMode:]):
(-[WKView _exitAcceleratedCompositingMode]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::enterAcceleratedCompositingMode):
(WebKit::WebPageProxy::exitAcceleratedCompositingMode):
* UIProcess/WebPageProxy.h:
2011-02-01 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed Qt buildfix after r77286.
https://bugs.webkit.org/show_bug.cgi?id=53520
Remove the physical terminology from IntRect and FloatRect.
* UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
2011-02-01 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Send messages when entering/exiting accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=53534
* Shared/LayerTreeContext.h: Added.
* Shared/mac/LayerTreeContextMac.mm: Added.
Add new LayerTreeContext which holds all information needed to enter
accelerated compositing mode.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode):
Add empty stubs.
* UIProcess/DrawingAreaProxy.messages.in:
Add new messgaes.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxyImpl.h:
Add empty stubs.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::LayerTreeHostMac):
(WebKit::LayerTreeHostMac::invalidate):
Send messages.
2011-02-01 Alexey Proskuryakov <ap@apple.com>
Reviewed by Dan Bernstein and Darin Adler.
<rdar://problem/8830594> Printed page is sometimes shifted down, making footer invisible
* UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView locationOfPrintRect:]): Instead of
letting AppKit compute content position on page, make the view provide it. We can do this
because WK(Printing)Views are always printed on their own, not as part of other views.
2011-02-01 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Make LayerTreeHost ref counted
https://bugs.webkit.org/show_bug.cgi?id=53530
LayerTreeHostMac will soon be able to trigger layout, which could cause
the page to leave accelerated compositing mode and free the LayerTreeHostMac object.
Making LayerTreeHost ref counted will let LayerTreeHostMac protect itself while triggering layout.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setRootCompositingLayer):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::create):
(WebKit::LayerTreeHostMac::LayerTreeHostMac):
(WebKit::LayerTreeHostMac::~LayerTreeHostMac):
(WebKit::LayerTreeHostMac::invalidate):
2011-02-01 Sam Weinig <sam@webkit.org>
Reviewed by Beth Dakin.
Part 2 for <rdar://problem/8492788>
Adopt WKScrollbarPainterController
Use header detection to define scrollbar painting controller #define.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2011-02-01 David Hyatt <hyatt@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=53520
Remove the physical terminology from IntRect and FloatRect.
Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
we need to update our terminology to be more accurate.
I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
renaming right() and bottom() to maxX() and maxY(). These terms remain accurate
even for flipped rectangles.
* Platform/Region.cpp:
(WebKit::Region::Shape::Shape):
* UIProcess/API/mac/WKPrintingView.mm:
(pageDidComputePageRects):
* UIProcess/FindIndicator.cpp:
(WebKit::FindIndicator::draw):
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::invalidate):
(WebKit::TiledDrawingAreaProxy::paint):
(WebKit::TiledDrawingAreaProxy::createTiles):
* UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
(WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::callSetWindow):
2011-02-01 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Move flushPendingLayerChanges to LayerTreeHostMac
https://bugs.webkit.org/show_bug.cgi?id=53525
In preparation for adding more Mac specific code to flushPendingLayerChanges.
* WebProcess/WebPage/LayerTreeHost.cpp:
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::flushPendingLayerChanges):
2011-02-01 Beth Dakin <bdakin@apple.com>
Reviewed by Sam Weinig.
Fix for <rdar://problem/8492788> Adopt WKScrollbarPainterController
Implement NSView's viewWillStartLiveResize and
viewDidEndLiveResize and propagate the messages down
to WebCore.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewWillStartLiveResize]):
(-[WKView viewDidEndLiveResize]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewWillStartLiveResize):
(WebKit::WebPageProxy::viewWillEndLiveResize):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::viewWillStartLiveResize):
(WebKit::WebPage::viewWillEndLiveResize):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
A bunch of new WebKitSystemInterface functions.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2011-02-01 Dave Hyatt <hyatt@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=46422, make printing and pagination work
with vertical text.
Change printing functions to check writing-mode and properly swap width and height
as needed.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::computePagesForPrinting):
2011-01-31 Alexey Proskuryakov <ap@apple.com>
Reviewed by Maciej Stachowiak.
https://bugs.webkit.org/show_bug.cgi?id=53466
Move WebKit2 to printing via API methods
Also fixes <rdar://problem/8933724> REGRESSION: Wrong pages are printed when not printing from page 1
Also fixes horizontal tiling (no bug filed).
The main idea here is that we don't force AppKit to use a different scaling factor when
a Web view can't be resized to exact page size, and scale when drawing instead.
* UIProcess/API/mac/WKPrintingView.mm:
(-[WKPrintingView _firstPrintedPageNumber]): Factored out into a separate method.
(-[WKPrintingView _lastPrintedPageNumber]): Ditto.
(pageDidDrawToPDF): Avoid crashing if data is null.
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Use -_firstPrintedPageNumber
and -_lastPrintedPageNumber.
(pageDidComputePageRects): Set frame size to what it would have been for a normal NSView
that's been asked to resize.
(-[WKPrintingView _pageForRect:]): Check x(), because several pages can be at the same y()
when tiling horizontally.
(-[WKPrintingView _drawPDFDocument:page:atPoint:]): Point to draw at and frame size are
now using different units, translate as appropriate.
(-[WKPrintingView _drawPreview:]): Scale the rect to WebCore units.
(-[WKPrintingView drawRect:]): Correctly calculate page number when the first page to print
isn't page 1.
(-[WKPrintingView rectForPage:]): Scale the rect to AppKit units.
2011-01-31 Darin Adler <darin@apple.com>
Reviewed by Adele Peterson.
WKView should support scrollPageDown:, scrollPageUp:, scrollToBeg and other similar selectors
https://bugs.webkit.org/show_bug.cgi?id=53460
* UIProcess/API/mac/WKView.mm: Added WEBCORE_COMMAND macro for lots of editor commands that
are implemented in WebCore so they will get forwarded. Many of these will probably work without
any further changes required. Added comments about the methods that we do not yet forward.
(createSelectorExceptionMap): Map scrollPageDown: to ScrollPageForward and
scrollPageUp: to ScrollPageBackward because we want the page up and page down
keys to follow the document logical order, not physical order. This is equivalent
to what we do in WebPage::performDefaultBehaviorForKeyEvent.
2011-01-31 Jessie Berlin <jberlin@apple.com>
Reviewed by Steve Falkenburg.
WebKit2: the cookies used by the WebKit2 Web Process should not go in a top-level
directory.
https://bugs.webkit.org/show_bug.cgi?id=53278
Use the name WebKit2WebProcess since the default location for the cookies is determined
based on the process name (which is WebKit2WebProcess.exe on Windows).
* win/WebKit2.make:
Copy the WebKit2WebProcess.resources directory into the AppleInternal bin.
* win/WebKit2WebProcess.resources: Added.
* win/WebKit2WebProcess.resources/Info.plist: Added.
Copied from the WebKit version of Info.plist.
* win/WebKit2WebProcessPostBuild.cmd:
Copy the WebKit2WebProcess.resources directory into the WebKitOutPutDir's bin.
2011-01-31 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Make LayerTreeHost an abstract base class and make LayerTreeHostMac inherit from it
https://bugs.webkit.org/show_bug.cgi?id=53432
* WebKit2.xcodeproj/project.pbxproj:
Add LayerTreeHostMac.h.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
* WebProcess/WebPage/DrawingAreaImpl.h:
Make m_layerTreeHost an OwnPtr and initialize/destroy it appropriately.
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
On Mac, create a LayerTreeHostMac instance.
(WebKit::LayerTreeHost::~LayerTreeHost):
No need to call platformInvalidate anymore.
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.h: Added.
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::~LayerTreeHostMac):
Invalidate the run loop observer here instead of in platformInvalidate.
(WebKit::LayerTreeHostMac::scheduleLayerFlush):
(WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
These are now members of LayerTreeHostMac.
2011-01-30 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
[Take 2!]
Fixed crash on window close (maybe crash on launch?) due to missing frame null checks
https://bugs.webkit.org/show_bug.cgi?id=53408
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didNavigateWithNavigationData):
(WebKit::WebContext::didPerformClientRedirect):
(WebKit::WebContext::didPerformServerRedirect):
(WebKit::WebContext::didUpdateHistoryTitle): Use MESSAGE_CHECK because
we don't think we should be able to reach this state under normal conditions.
2011-01-30 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
Fixed crash on window close (maybe crash on launch?) due to missing
frame null checks
https://bugs.webkit.org/show_bug.cgi?id=53408
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didNavigateWithNavigationData):
(WebKit::WebContext::didPerformClientRedirect):
(WebKit::WebContext::didPerformServerRedirect):
(WebKit::WebContext::didUpdateHistoryTitle): Check for NULL, since we're
calling a function that can return it.
2011-01-30 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt][WK2]REGRESSION (r76991): Fix build errors
https://bugs.webkit.org/show_bug.cgi?id=53400
Revert the temporary build fix (http://trac.webkit.org/changeset/77088)
and remove WebKit2Prefix.h from the build.
* UIProcess/API/qt/qwkhistory.h:
* UIProcess/API/qt/qwkpage.h:
* WebKit2.pro:
2011-01-30 Jeff Miller <jeffm@apple.com>
Reviewed by Dan Bernstein.
FindController::updateFindIndicator() crashes if selection isn't visible
https://bugs.webkit.org/show_bug.cgi?id=53399
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator): Return false if ShareableBitmap::createShareable() returns null (typically because the selection rect is empty).
2011-01-30 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed.
[Qt][WK2] Buildfix.
* UIProcess/API/qt/qwkhistory.h:
* UIProcess/API/qt/qwkpage.h:
2011-01-29 Maciej Stachowiak <mjs@apple.com>
Reviewed by Geoffrey Garen.
Add WKPageCopyPendingAPIRequestURL API
https://bugs.webkit.org/show_bug.cgi?id=53383
This API returns the last URL requested for load via API, if neither that load nor any
other load subsequently reaches the provisional state.
This is useful to be able to track loads initiated via the API
* UIProcess/API/C/WKPage.cpp:
(WKPageCopyPendingAPIRequestURL): Retrieve the pending URL.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadURL): Set pending URL.
(WebKit::WebPageProxy::loadURLRequest): ditto
(WebKit::WebPageProxy::reload): ditto
(WebKit::WebPageProxy::goForward): ditto
(WebKit::WebPageProxy::goBack): ditto
(WebKit::WebPageProxy::estimatedProgress): Assume the initial
progress value when there is a pending URL.
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Clear
pending URL; clients should look at the provisional URL now.
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Clear
pending URL if it doesn't match the policy URL; this means we
were interrupted by another load.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::pendingAPIRequestURL): Helper function.
(WebKit::WebPageProxy::clearPendingAPIRequestURL): ditto
(WebKit::WebPageProxy::setPendingAPIRequestURL): ditto
2011-01-28 Jon Honeycutt <jhoneycutt@apple.com>
Downloads in WK2 on Windows should write resume data to bundle
https://bugs.webkit.org/show_bug.cgi?id=53282
<rdar://problem/8753077>
Reviewed by Alice Liu.
* WebProcess/Downloads/Download.cpp:
(WebKit::Download::decideDestinationWithSuggestedFilename):
Call didDecideDestination(), now that the destination is decided.
* WebProcess/Downloads/Download.h:
Declare didDecideDestination(). Added member variables to hold the
destination file path and the download bundle path.
(WebKit::Download::destination):
Return the path to the final destination for this download.
* WebProcess/Downloads/cf/DownloadCFNet.cpp:
(WebKit::Download::start):
Remove the name of an unused param.
(WebKit::Download::startWithHandle):
Ditto.
(WebKit::Download::cancel):
Tell CFNetwork not to delete the file upon failure, and tell it to
cancel the download. Copy the resume data for the download, and append
it to the download bundle. Call didCancel() with an empty
DataReference, since we have written our own resume data.
(WebKit::decideDestinationWithSuggestedObjectNameCallback):
Remove some unused param names. Removed the call to
CFURLDownloadSetDestination() - this is now handled in
Download::didDecideDestination().
(WebKit::didCreateDestinationCallback):
Report that the final destination was created, rather than the download
bundle, matching old WebKit.
(WebKit::Download::didDecideDestination):
Store the final destination and the download bundle paths, and call
CFURLDownloadSetDestination(), passing the path to the download bundle.
* WebProcess/Downloads/curl/DownloadCurl.cpp:
(WebKit::Download::didDecideDestination):
Stubbed.
* WebProcess/Downloads/mac/DownloadMac.mm:
(WebKit::Download::didDecideDestination):
Stubbed - unneeded on the Mac.
* WebProcess/Downloads/qt/DownloadQt.cpp:
(WebKit::Download::didDecideDestination):
Stubbed.
2011-01-29 Jeff Miller <jeffm@apple.com>
Reviewed by Anders Carlsson.
Support find bouncy in WebKit2 on Windows
https://bugs.webkit.org/show_bug.cgi?id=53329
<rdar://problem/8565843>
The Mac implements the find bouncy inside of WebKit in the UI process for WebKit2, but we need to do this inside Safari for WebKit2 on Windows.
Add infrastructure to call back into the app when the find indicator changes.
* UIProcess/API/C/win/WKView.cpp: Cleanup some code style violations.
(WKViewSetFindIndicatorCallback): Added.
(WKViewGetFindIndicatorCallback): Added.
* UIProcess/API/C/win/WKView.h: Cleanup some code style violations.
* UIProcess/FindIndicator.cpp:
(WebKit::FindIndicator::create):
(WebKit::FindIndicator::FindIndicator):
(WebKit::FindIndicator::frameRect):
(WebKit::FindIndicator::draw):
Rename m_selectionRect to m_selectionRectInWindowCoordinates and m_textRects to m_textRectsInSelectionRectCoordinates (along with similarly named local variables) to be more explict about the coordinate system.
* UIProcess/FindIndicator.h:
(WebKit::FindIndicator::selectionRectInWindowCoordinates): Added.
(WebKit::FindIndicator::textRects): Rename m_textRects to m_textRectsInSelectionRectCoordinates.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setFindIndicator): Rename selectionRect to selectionRectInWindowCoordinates and textRects to textRectsInSelectionRectCoordinates to be more explict about the coordinate system.
* UIProcess/WebPageProxy.h: Ditto.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
(WebKit::WebView::setFindIndicator): Added.
(WebKit::WebView::setFindIndicatorCallback): Added.
(WebKit::WebView::getFindIndicatorCallback): Added.
* UIProcess/win/WebView.h:
2011-01-28 Alexey Proskuryakov <ap@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=53367
<rdar://problem/8926460> Remove dysfunctional code from -[WKPrintingView _isPrintingPreview].
* UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _isPrintingPreview]): The common
branch works fine for now, no need to make platforms different.
2011-01-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dan Bernstein.
WKPageGetEstimatedProgress returns wrong value after a mainframe provisional load has started
https://bugs.webkit.org/show_bug.cgi?id=53358
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didStartProgress): Start progress at the magic initial value, not 0.
2011-01-28 Anders Carlsson <andersca@apple.com>
Yet another build fix (What was I thinking?)
* WebProcess/Downloads/Download.h:
* WebProcess/Plugins/PluginProxy.h:
2011-01-28 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* Shared/PrintInfo.h:
2011-01-28 Anders Carlsson <andersca@apple.com>
Fix tyop.
* Shared/mac/CoreAnimationRenderer.mm:
2011-01-28 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add CoreAnimationRenderer class
https://bugs.webkit.org/show_bug.cgi?id=53343
* Shared/mac/CoreAnimationRenderer.h: Added.
* Shared/mac/CoreAnimationRenderer.mm: Added.
(WebKit::CoreAnimationRenderer::CoreAnimationRenderer):
Initialize the underlying CARenderer object and hook up a notification observer.
(WebKit::CoreAnimationRenderer::~CoreAnimationRenderer):
Assert that the client is null. It has been set to null by the call to invalidate().
(WebKit::CoreAnimationRenderer::setBounds):
Update the bounds on the CARenderer and the root layer.
(WebKit::CoreAnimationRenderer::render):
Ask the renderer to render and return the next frame time.
(WebKit::CoreAnimationRenderer::invalidate):
Remove the change observer and reset the client.
(WebKit::CoreAnimationRenderer::rendererDidChange):
Call the client member function.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2011-01-28 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add an OBJC_CLASS macro for forward declaring an Objective-C class
https://bugs.webkit.org/show_bug.cgi?id=53337
* Shared/NativeWebKeyboardEvent.h:
* Shared/PrintInfo.h:
* UIProcess/ChunkedUpdateDrawingAreaProxy.h:
* UIProcess/LayerBackedDrawingAreaProxy.h:
* UIProcess/WebInspectorProxy.h:
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebPopupMenuProxyMac.h:
* WebProcess/Downloads/Download.h:
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/WebPage/LayerBackedDrawingArea.h:
* WebProcess/WebPage/WebPage.h:
* config.h:
2011-01-28 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Don't put config.h in the message headers.
* Scripts/webkit2/messages.py:
* Scripts/webkit2/messages_unittest.py:
2011-01-28 Anders Carlsson <andersca@apple.com>
Fix build.
* Shared/mac/ShareableSurface.cpp:
2011-01-28 Anders Carlsson <andersca@apple.com>
Try to unbreak the Windows build.
* UIProcess/cf/WebPageProxyCF.cpp:
2011-01-28 Brady Eidson <beidson@apple.com>
Reviewed by John Sullivan.
https://bugs.webkit.org/show_bug.cgi?id=53330
Need InjectedBundle API to get the response MIMEType for a URL
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameCopyMIMETypeForResourceWithURL):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
Get the MIMEType from the in-memory cache, or cachedResponseMIMETypeForURL() if not available:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::mimeTypeForResourceWithURL):
* WebProcess/WebPage/WebFrame.h:
Get the MIMEType from the platform's disk cache if available:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::cachedResponseMIMETypeForURL):
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::cachedResponseMIMETypeForURL):
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::cachedResponseMIMETypeForURL):
2011-01-28 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Clean up the mess introduced when config.h was added to the project:
- Remove the contents of WebKit2Prefix.h that is now in config.h, to avoid including everything
twice in each file, probably slowing down compile time.
- Add config.h to all the files that were forgotten in order to keep the build from breaking.
- Added trap to ensure that config.h is included at the top of every implementation file. If this
had been added it would have caught the previous issue.
2011-01-28 Stephanie Lewis <slewis@apple.com>
Reviewed by Geoff Garen.
<rdar://problem/8857651> Implement unregisterWorld for WebKit2
Rename unregisterWorld to clearWrappers. Clearing the wrappers reduces the
memory use of isolated worlds.
* WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
(WKBundleScriptWorldClearWrappers):
* WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
* WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
(WebKit::InjectedBundleScriptWorld::clearWrappers):
* WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
2011-01-28 Dan Bernstein <mitz@apple.com>
Reviewed by Sam Weinig.
<select> can't display right-to-left (rtl) languages
https://bugs.webkit.org/show_bug.cgi?id=19785
* Shared/WebPopupItem.cpp:
(WebKit::WebPopupItem::WebPopupItem): Added initializers for m_textDirection and m_hasTextDirectionOverride.
(WebKit::WebPopupItem::encode): Encode the item's writing direction and direction override values.
(WebKit::WebPopupItem::decode): Decode the item's writing direction and direction override values.
* Shared/WebPopupItem.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenu): Added a parameter for the menu's text direction.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Ditto.
* UIProcess/WebPopupMenuProxy.h:
* UIProcess/mac/WebPopupMenuProxyMac.h:
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::populate): Added a parameter for the menu's text direction.
Set items' text alignment to match the menu's writing direction. Set items' writing direction
and direction override according to their styles.
(WebKit::WebPopupMenuProxyMac::showPopupMenu): Set the pop-up's layout direction.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::selectItemWritingDirectionIsNatural): Changed to return false.
(WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebPopupMenu.cpp:
(WebKit::WebPopupMenu::populateItems): Initialize items' writing direction and direction override
values.
(WebKit::WebPopupMenu::show): Pass the menu's writing direction.
2011-01-28 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Add ShareableSurface class
https://bugs.webkit.org/show_bug.cgi?id=53313
* Shared/mac/ShareableSurface.cpp: Added.
(WebKit::ShareableSurface::Handle::Handle):
Initialize the mach port.
(WebKit::ShareableSurface::Handle::~Handle):
Deallocate our send right if needed.
(WebKit::ShareableSurface::Handle::encode):
Encode the send right, and then null it out.
(WebKit::ShareableSurface::Handle::decode):
Decode the send right.
(WebKit::createIOSurface):
Create an IOSurface with the given size.
(WebKit::ShareableSurface::create):
Create an IOSurface, either from a size or from a handle.
(WebKit::ShareableSurface::~ShareableSurface):
Delete the texture and framebuffer.
(WebKit::ShareableSurface::createHandle):
Create a mach port from the surface.
(WebKit::ShareableSurface::attach):
Create an FBO if needed and bind it.
(WebKit::ShareableSurface::detach):
Unbind the FBO.
(WebKit::ShareableSurface::textureID):
Generate a new texture and bind it to the IOSurface.
* Shared/mac/ShareableSurface.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2011-01-27 Adam Roben <aroben@apple.com>
Change BinarySemaphore to wrap an auto-reset Win32 event on Windows
Fixes <http://webkit.org/b/53208> <rdar://problem/8922490>.
Reviewed by Dave Hyatt.
* Platform/CoreIPC/BinarySemaphore.cpp: Wrap this implementation in #if !PLATFORM(WIN).
* Platform/CoreIPC/BinarySemaphore.h: Make the Windows implementation have a single HANDLE
member that holds the event.
* Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Copied from Source/WebKit2/Platform/CoreIPC/BinarySemaphore.cpp.
(CoreIPC::BinarySemaphore::BinarySemaphore): Create our event.
(CoreIPC::BinarySemaphore::~BinarySemaphore): Destory our event.
(CoreIPC::BinarySemaphore::signal): Signal the event.
(CoreIPC::BinarySemaphore::wait): Convert the absolute time to a wait interval, then wait
for the event to be signaled or for the interval to elapse.
* win/WebKit2.vcproj: Added BinarySemaphoreWin.cpp. Also let VS have its way with the file.
2011-01-27 Chris Marrin <cmarrin@apple.com>
Reviewed by Anders Carlsson.
WebKit2: Page flashes just before accelerated compositing animation
https://bugs.webkit.org/show_bug.cgi?id=53274
When switching out of compositing mode, the new ChunkedUpdateDrawingAreaProxy
is getting created with the current page size. When the setSize() call is
subsequently made, the sizeDidChange() call is not made (which does the initial
render of the page) because the old size and new size are the same. The solution
is to skip the setting of the size in the ctor and let it go through a size
change sequence.
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
2011-01-28 Alejandro G. Castro <alex@igalia.com>
Reviewed by Xan Lopez.
[GTK] Fix dist compilation for the release
https://bugs.webkit.org/show_bug.cgi?id=53290
* GNUmakefile.am: Remove a file that is not in the repository
anymore.
2011-01-28 Andreas Kling <kling@webkit.org>
Rubber-stamped by Simon Hausmann.
[Qt][WK2] Combine QWKPage::engine{Connected,Disconnected} into one signal.
Having two signals for this is redundant, combine them into
QWKPage::engineConnectionChanged(bool connected).
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::didRelaunchProcess):
(QWKPagePrivate::processDidCrash):
* UIProcess/API/qt/qwkpage.h:
2011-01-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Maciej Stachowiak.
Build fix for Mac Intel Debug after r76916
https://bugs.webkit.org/show_bug.cgi?id=53284
Fix macro redefinition by guarding the redefined macros.
* config.h:
2011-01-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Unreviewed build fix for Mac Intel Debug after r76916.
Fix macro redefinition by guarding the redefined macros.
Check if the macro is already defined before defininig it.
c++config.h has the same macros with the same values.
* config.h:
2011-01-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Adam Barth.
Update the expected results for test-webkitpy after r76916.
Include "config.h" in the expected results as well.
* Scripts/webkit2/messages_unittest.py:
2011-01-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Unreviewed buildfix for SnowLeopard Intel Debug.
Fix macro redefinition by not including config.h.
Revert previous change in WebPageProxyCF.cpp.
* UIProcess/cf/WebPageProxyCF.cpp:
2011-01-27 Greg Coletta <greg.coletta@nokia.com>
Reviewed by Laszlo Gombos.
Get rid of prefix header dependency for WebKit2 build system.
https://bugs.webkit.org/show_bug.cgi?id=50174
Add config.h include explicitelly.
* Platform/CoreIPC/ArgumentDecoder.cpp:
* Platform/CoreIPC/ArgumentEncoder.cpp:
* Platform/CoreIPC/Attachment.cpp:
* Platform/CoreIPC/BinarySemaphore.cpp:
* Platform/CoreIPC/Connection.cpp:
* Platform/CoreIPC/DataReference.cpp:
* Platform/CoreIPC/gtk/ConnectionGtk.cpp:
* Platform/CoreIPC/mac/ConnectionMac.cpp:
* Platform/CoreIPC/qt/ConnectionQt.cpp:
* Platform/CoreIPC/win/ConnectionWin.cpp:
* Platform/Logging.cpp:
* Platform/Module.cpp:
* Platform/Region.cpp:
* Platform/RunLoop.cpp:
* Platform/WorkQueue.cpp:
* Platform/cg/CGUtilities.cpp:
* Platform/gtk/RunLoopGtk.cpp:
* Platform/gtk/SharedMemoryGtk.cpp:
* Platform/gtk/WorkQueueGtk.cpp:
* Platform/mac/MachUtilities.cpp:
* Platform/mac/SharedMemoryMac.cpp:
* Platform/mac/WorkQueueMac.cpp:
* Platform/qt/MappedMemoryPool.cpp:
* Platform/qt/ModuleQt.cpp:
* Platform/qt/RunLoopQt.cpp:
* Platform/qt/WorkQueueQt.cpp:
* Platform/win/ModuleWin.cpp:
* Platform/win/RunLoopWin.cpp:
* Platform/win/SharedMemoryWin.cpp:
* Platform/win/WorkQueueWin.cpp:
* PluginProcess/PluginControllerProxy.cpp:
* PluginProcess/PluginProcess.cpp:
* PluginProcess/WebProcessConnection.cpp:
* Scripts/webkit2/messages.py:
* Shared/API/c/WKArray.cpp:
* Shared/API/c/WKCertificateInfo.cpp:
* Shared/API/c/WKContextMenuItem.cpp:
* Shared/API/c/WKData.cpp:
* Shared/API/c/WKDictionary.cpp:
* Shared/API/c/WKError.cpp:
* Shared/API/c/WKImage.cpp:
* Shared/API/c/WKMutableArray.cpp:
* Shared/API/c/WKMutableDictionary.cpp:
* Shared/API/c/WKNumber.cpp:
* Shared/API/c/WKSecurityOrigin.cpp:
* Shared/API/c/WKSerializedScriptValue.cpp:
* Shared/API/c/WKString.cpp:
* Shared/API/c/WKType.cpp:
* Shared/API/c/WKURL.cpp:
* Shared/API/c/WKURLRequest.cpp:
* Shared/API/c/WKURLResponse.cpp:
* Shared/API/c/WKUserContentURLPattern.cpp:
* Shared/API/c/cf/WKStringCF.cpp:
* Shared/API/c/cf/WKURLCF.cpp:
* Shared/API/c/cf/WKURLRequestCF.cpp:
* Shared/API/c/cf/WKURLResponseCF.cpp:
* Shared/API/c/cg/WKImageCG.cpp:
* Shared/API/c/win/WKCertificateInfoWin.cpp:
* Shared/ChildProcess.cpp:
* Shared/ImmutableArray.cpp:
* Shared/ImmutableDictionary.cpp:
* Shared/MutableArray.cpp:
* Shared/MutableDictionary.cpp:
* Shared/OriginAndDatabases.cpp:
* Shared/PlatformPopupMenuData.cpp:
* Shared/Plugins/NPIdentifierData.cpp:
* Shared/Plugins/NPObjectMessageReceiver.cpp:
* Shared/Plugins/NPObjectProxy.cpp:
* Shared/Plugins/NPRemoteObjectMap.cpp:
* Shared/Plugins/NPVariantData.cpp:
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
* Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
* Shared/Plugins/PluginProcessCreationParameters.cpp:
* Shared/PrintInfo.cpp:
* Shared/SessionState.cpp:
* Shared/ShareableBitmap.cpp:
* Shared/UpdateInfo.cpp:
* Shared/VisitedLinkTable.cpp:
* Shared/WebBackForwardListItem.cpp:
* Shared/WebContextMenuItem.cpp:
* Shared/WebContextMenuItemData.cpp:
* Shared/WebError.cpp:
* Shared/WebEvent.cpp:
* Shared/WebEventConversion.cpp:
* Shared/WebGeolocationPosition.cpp:
* Shared/WebImage.cpp:
* Shared/WebKeyboardEvent.cpp:
* Shared/WebMemorySampler.cpp:
* Shared/WebMouseEvent.cpp:
* Shared/WebOpenPanelParameters.cpp:
* Shared/WebPageCreationParameters.cpp:
* Shared/WebPageGroupData.cpp:
* Shared/WebPlatformTouchPoint.cpp:
* Shared/WebPopupItem.cpp:
* Shared/WebPreferencesStore.cpp:
* Shared/WebProcessCreationParameters.cpp:
* Shared/WebTouchEvent.cpp:
* Shared/WebURLRequest.cpp:
* Shared/WebURLResponse.cpp:
* Shared/WebWheelEvent.cpp:
* Shared/cairo/ShareableBitmapCairo.cpp:
* Shared/cf/ArgumentCodersCF.cpp:
* Shared/cg/ShareableBitmapCG.cpp:
* Shared/gtk/ShareableBitmapGtk.cpp:
* Shared/gtk/WebCoreArgumentCodersGtk.cpp:
* Shared/mac/CommandLineMac.cpp:
* Shared/mac/UpdateChunk.cpp:
* Shared/qt/CleanupHandler.cpp:
* Shared/qt/NativeWebKeyboardEventQt.cpp:
* Shared/qt/ShareableBitmapQt.cpp:
* Shared/qt/UpdateChunk.cpp:
* Shared/qt/WebCoreArgumentCodersQt.cpp:
* Shared/qt/WebEventFactoryQt.cpp:
* Shared/qt/WebURLRequestQt.cpp:
* Shared/qt/WebURLResponseQt.cpp:
* Shared/win/CommandLineWin.cpp:
* Shared/win/NativeWebKeyboardEventWin.cpp:
* Shared/win/PlatformCertificateInfo.cpp:
* Shared/win/UpdateChunk.cpp:
* Shared/win/WebCoreArgumentCodersWin.cpp:
* Shared/win/WebEventFactory.cpp:
* Shared/win/WebURLRequestWin.cpp:
* Shared/win/WebURLResponseWin.cpp:
* UIProcess/API/C/WKAuthenticationChallenge.cpp:
* UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
* UIProcess/API/C/WKBackForwardList.cpp:
* UIProcess/API/C/WKBackForwardListItem.cpp:
* UIProcess/API/C/WKContext.cpp:
* UIProcess/API/C/WKCredential.cpp:
* UIProcess/API/C/WKDatabaseManager.cpp:
* UIProcess/API/C/WKDownload.cpp:
* UIProcess/API/C/WKFormSubmissionListener.cpp:
* UIProcess/API/C/WKFrame.cpp:
* UIProcess/API/C/WKFramePolicyListener.cpp:
* UIProcess/API/C/WKGeolocationManager.cpp:
* UIProcess/API/C/WKGeolocationPermissionRequest.cpp:
* UIProcess/API/C/WKGeolocationPosition.cpp:
* UIProcess/API/C/WKInspector.cpp:
* UIProcess/API/C/WKNavigationData.cpp:
* UIProcess/API/C/WKOpenPanelParameters.cpp:
* UIProcess/API/C/WKOpenPanelResultListener.cpp:
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/WKPageGroup.cpp:
* UIProcess/API/C/WKPreferences.cpp:
* UIProcess/API/C/WKProtectionSpace.cpp:
* UIProcess/API/C/win/WKContextWin.cpp:
* UIProcess/API/C/win/WKView.cpp:
* UIProcess/API/C/win/WKViewPrivate.cpp:
* UIProcess/API/cpp/qt/WKStringQt.cpp:
* UIProcess/API/cpp/qt/WKURLQt.cpp:
* UIProcess/API/qt/ClientImpl.cpp:
* UIProcess/API/qt/qgraphicswkview.cpp:
* UIProcess/API/qt/qwkcontext.cpp:
* UIProcess/API/qt/qwkpage.cpp:
* UIProcess/API/qt/qwkpreferences.cpp:
* UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
* UIProcess/Authentication/AuthenticationDecisionListener.cpp:
* UIProcess/Authentication/WebCredential.cpp:
* UIProcess/Authentication/WebProtectionSpace.cpp:
* UIProcess/BackingStore.cpp:
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
* UIProcess/Downloads/DownloadProxy.cpp:
* UIProcess/DrawingAreaProxy.cpp:
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/FindIndicator.cpp:
* UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
* UIProcess/GeolocationPermissionRequestProxy.cpp:
* UIProcess/Launcher/ProcessLauncher.cpp:
* UIProcess/Launcher/ThreadLauncher.cpp:
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
* UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
* UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
* UIProcess/Launcher/win/ProcessLauncherWin.cpp:
* UIProcess/Launcher/win/ThreadLauncherWin.cpp:
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
* UIProcess/Plugins/PluginInfoStore.cpp:
* UIProcess/Plugins/PluginProcessManager.cpp:
* UIProcess/Plugins/PluginProcessProxy.cpp:
* UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
* UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
* UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
* UIProcess/ResponsivenessTimer.cpp:
* UIProcess/TiledDrawingAreaProxy.cpp:
* UIProcess/VisitedLinkProvider.cpp:
* UIProcess/WebBackForwardList.cpp:
* UIProcess/WebContext.cpp:
* UIProcess/WebContextInjectedBundleClient.cpp:
* UIProcess/WebContextMenuProxy.cpp:
* UIProcess/WebDatabaseManagerProxy.cpp:
* UIProcess/WebDatabaseManagerProxyClient.cpp:
* UIProcess/WebDownloadClient.cpp:
* UIProcess/WebEditCommandProxy.cpp:
* UIProcess/WebFindClient.cpp:
* UIProcess/WebFormClient.cpp:
* UIProcess/WebFormSubmissionListenerProxy.cpp:
* UIProcess/WebFrameListenerProxy.cpp:
* UIProcess/WebFramePolicyListenerProxy.cpp:
* UIProcess/WebFrameProxy.cpp:
* UIProcess/WebGeolocationManagerProxy.cpp:
* UIProcess/WebGeolocationProvider.cpp:
* UIProcess/WebHistoryClient.cpp:
* UIProcess/WebInspectorProxy.cpp:
* UIProcess/WebLoaderClient.cpp:
* UIProcess/WebNavigationData.cpp:
* UIProcess/WebOpenPanelResultListenerProxy.cpp:
* UIProcess/WebPageContextMenuClient.cpp:
* UIProcess/WebPageGroup.cpp:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPolicyClient.cpp:
* UIProcess/WebPreferences.cpp:
* UIProcess/WebProcessManager.cpp:
* UIProcess/WebProcessProxy.cpp:
* UIProcess/WebResourceLoadClient.cpp:
* UIProcess/WebUIClient.cpp:
* UIProcess/cf/WebBackForwardListCF.cpp:
* UIProcess/cf/WebPageProxyCF.cpp:
* UIProcess/cf/WebPreferencesCF.cpp:
* UIProcess/gtk/TextCheckerGtk.cpp:
* UIProcess/gtk/WebInspectorGtk.cpp:
* UIProcess/gtk/WebPageProxyGtk.cpp:
* UIProcess/gtk/WebPreferencesGtk.cpp:
* UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
* UIProcess/qt/TextCheckerQt.cpp:
* UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
* UIProcess/qt/TiledDrawingAreaTileQt.cpp:
* UIProcess/qt/WebContextMenuProxyQt.cpp:
* UIProcess/qt/WebContextQt.cpp:
* UIProcess/qt/WebInspectorProxyQt.cpp:
* UIProcess/qt/WebPageProxyQt.cpp:
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
* UIProcess/qt/WebPreferencesQt.cpp:
* UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
* UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp:
* UIProcess/win/TextCheckerWin.cpp:
* UIProcess/win/WebContextMenuProxyWin.cpp:
* UIProcess/win/WebContextWin.cpp:
* UIProcess/win/WebInspectorProxyWin.cpp:
* UIProcess/win/WebPageProxyWin.cpp:
* UIProcess/win/WebPopupMenuProxyWin.cpp:
* UIProcess/win/WebView.cpp:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Authentication/AuthenticationManager.cpp:
* WebProcess/Downloads/Download.cpp:
* WebProcess/Downloads/DownloadManager.cpp:
* WebProcess/Downloads/cf/DownloadCFNet.cpp:
* WebProcess/Downloads/curl/DownloadCurl.cpp:
* WebProcess/Downloads/qt/DownloadQt.cpp:
* WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
* WebProcess/Geolocation/WebGeolocationManager.cpp:
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
* WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
* WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
* WebProcess/InjectedBundle/InjectedBundleClient.cpp:
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
* WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
* WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
* WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
* WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
* WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
* WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
* WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
* WebProcess/Plugins/Plugin.cpp:
* WebProcess/Plugins/PluginProcessConnection.cpp:
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
* WebProcess/Plugins/PluginProxy.cpp:
* WebProcess/Plugins/PluginView.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
* WebProcess/WebCoreSupport/WebDragClient.cpp:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
* WebProcess/WebCoreSupport/WebPopupMenu.cpp:
* WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
* WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
* WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
* WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
* WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
* WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp:
* WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp:
* WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
* WebProcess/WebKitMain.cpp:
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
* WebProcess/WebPage/DecoderAdapter.cpp:
* WebProcess/WebPage/DrawingArea.cpp:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
* WebProcess/WebPage/EncoderAdapter.cpp:
* WebProcess/WebPage/FindController.cpp:
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
* WebProcess/WebPage/PageOverlay.cpp:
* WebProcess/WebPage/TiledDrawingArea.cpp:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
* WebProcess/WebPage/WebContextMenu.cpp:
* WebProcess/WebPage/WebEditCommand.cpp:
* WebProcess/WebPage/WebFrame.cpp:
* WebProcess/WebPage/WebInspector.cpp:
* WebProcess/WebPage/WebOpenPanelResultListener.cpp:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPageGroupProxy.cpp:
* WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
* WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
* WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp:
* WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp:
* WebProcess/WebPage/qt/WebInspectorQt.cpp:
* WebProcess/WebPage/qt/WebPageQt.cpp:
* WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp:
* WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp:
* WebProcess/WebPage/win/WebInspectorWin.cpp:
* WebProcess/WebPage/win/WebPageWin.cpp:
* WebProcess/WebProcess.cpp:
* WebProcess/gtk/WebProcessGtk.cpp:
* WebProcess/gtk/WebProcessMainGtk.cpp:
* WebProcess/qt/WebProcessMainQt.cpp:
* WebProcess/qt/WebProcessQt.cpp:
* WebProcess/win/WebProcessMainWin.cpp:
* WebProcess/win/WebProcessWin.cpp:
* config.h: Copied from Source/WebKit2/WebKit2Prefix.h.
* win/WebKit2Common.vsprops:
2011-01-27 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin Adler.
execCommand("Paste") doesn't work in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=52785
Thread through the new JavaScriptCanAccessClipboard setting.
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetJavaScriptCanAccessClipboard):
(WKPreferencesGetJavaScriptCanAccessClipboard):
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2011-01-27 Nate Chapin <japhet@chromium.org>
Reviewed by Adam Barth.
Use Document::url() instead of FrameLoader::url().
https://bugs.webkit.org/show_bug.cgi?id=41165
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::url):
2011-01-27 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Encode/Decode hasPreciseScrollingDeltas bit in WebWheelEvent
https://bugs.webkit.org/show_bug.cgi?id=53254
* Shared/WebWheelEvent.cpp:
(WebKit::WebWheelEvent::WebWheelEvent):
Initialize m_phase and m_hasPreciseScrollingDeltas.
(WebKit::WebWheelEvent::encode):
(WebKit::WebWheelEvent::decode):
Add missing coding for m_hasPreciseScrollingDeltas.
2011-01-26 Enrica Casucci <enrica@apple.com>
Reviewed by Darin Adler and Adam Roben.
WebKit2: add support for drag and drop on Windows
https://bugs.webkit.org/show_bug.cgi?id=52775
<rdar://problem/8514409>
On Windows the access to the content being dragged is
provided via the IDataObject interface that is made available
to the window that registers itself as drop target.
Since this interface cannot be accessed from the WebProcess,
in every call to one of the methods of the IDropTarget interface
we serialize the content of the drag clipboard and send it over to
the WebProcess. The implementation uses the same messages as the
Mac one, with slightly different parameters to pass the serialized
clipboard.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performDragControllerAction): Added Windows
specific implementation.
* UIProcess/WebPageProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView): Added dropTargetHelper object creation.
(WebKit::WebView::initialize): Added to register for drag/drop with out
refcount issues.
(WebKit::WebView::close):
(WebKit::WebView::windowReceivedMessage):
(WebKit::WebView::QueryInterface):
(WebKit::WebView::AddRef):
(WebKit::WebView::Release):
(WebKit::dragOperationToDragCursor):
(WebKit::WebView::keyStateToDragOperation):
(WebKit::WebView::DragEnter):
(WebKit::WebView::DragOver):
(WebKit::WebView::DragLeave):
(WebKit::WebView::Drop):
* UIProcess/win/WebView.h:
(WebKit::WebView::create):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-01-26 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=53197
<rdar://problem/8895682> Make WebKit2 printing asynchronous
<rdar://problem/8899988> REGRESSION(WebKit2): Attempting to print WHATWG HTML spec shows
1-page blank preview
<rdar://problem/8900078> WebKit2 printing has a separate message exchange per page when
printing instead of printing all at once
* UIProcess/API/mac/WKPrintingView.h: Store a lot more cached information.
* UIProcess/API/mac/WKPrintingView.mm:
(-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): Use PrintOperation stored in
class. We generally want that now, because current operation will not be set up on other threads.
(-[WKPrintingView _isPrintingPreview]): Added. Preview is different, because it can draw
a placeholder - but actual printing need to wait until UI process has data.
(-[WKPrintingView _updatePreview]): Force AppKit to update print preview when we have real
data to replace placeholder with.
(-[WKPrintingView _hasPageRects]): Return if page rects have already been computed.
(-[WKPrintingView _expectedPreviewCallbackForRect:]): Find an existing request for this rect,
if any.
(pageDidDrawToPDF): Update preview - or if actually printing, release control to printing thread.
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ask for a PDF document with
pages the user asked to print.
(pageDidComputePageRects): When web process returns page geometry data, we update preview to display
a page count (which indirectly triggers a request for a preview). When actually printing,
request a PDF right away, we'll need it later.
(-[WKPrintingView _askPageToComputePageRects]): Ask web process for page geometry.
(prepareDataForPrintingOnSecondaryThread): This function starts preparing all data necessary
for actual printing on main thread.
(-[WKPrintingView knowsPageRange:]): Changed to be async for preview, and to call main
thread for actual printing.
(-[WKPrintingView _pageForRect:]): Find page number for a given range, assuming that AppKit
always asks for full pages.
(-[WKPrintingView _drawPDFDocument:page:atPoint:]): A helper function to draw a PDF document.
(-[WKPrintingView _drawPreview:]): Draw the whole page for preview.
(-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
Draw the whole page for actual printing.
(-[WKPrintingView _drawPageBorderWithSizeOnMainThread:]): Call drawPageBorderWithSize: with
correct graphics context and print operation.
(-[WKPrintingView drawPageBorderWithSize:]): Delegate work to main thread when called from a
secondary one.
(-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]): Added an assertion that
our stored NSPrintOperation isn't out of sync with reality.
(-[WKPrintingView rectForPage:]): Handle the case where we don't have the data yet, drawing
a placeholder.
(-[WKPrintingView endDocument]): When page setup changes, we must reset all state.
* UIProcess/API/mac/WKView.mm: (-[WKView printOperationWithPrintInfo:forFrame:]): Tell
NSPrintingView which operation it's serving, so that it knows it even when current operation
isn't set.
* UIProcess/GenericCallback.h:
(WebKit::ComputedPagesCallback::create):
(WebKit::ComputedPagesCallback::~ComputedPagesCallback):
(WebKit::ComputedPagesCallback::performCallbackWithReturnValue):
(WebKit::ComputedPagesCallback::invalidate):
(WebKit::ComputedPagesCallback::callbackID):
(WebKit::ComputedPagesCallback::generateCallbackID):
(WebKit::ComputedPagesCallback::ComputedPagesCallback):
Added ComputedPagesCallback, which returns a vector of IntRects and a double. Hopefully,
it will become a specialization of GenericCallback one day.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close): Added m_voidCallbacks - it looks like they were omitted
by accident.
(WebKit::WebPageProxy::computedPagesCallback): Added.
(WebKit::WebPageProxy::processDidCrash): Added m_computedPagesCallbacks.
(WebKit::WebPageProxy::computePagesForPrinting): Async now!
(WebKit::WebPageProxy::drawRectToPDF): Ditto.
(WebKit::WebPageProxy::drawPagesToPDF): Added.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Added ComputedPagesCallback.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::beginPriting): Compute page rects right away - we'll need them in
drawPagesToPDF(), which doesn't have a PrintInfo.
(WebKit::WebPage::computePagesForPrinting): Send async response.
(WebKit::WebPage::drawRectToPDF): This function used to draw into original
location at frame coordinates, and now it draws at (0, 0).
(WebKit::WebPage::drawPagesToPDF): Added - make a multi-page PDF.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added DrawPagesToPDF.
2011-01-27 Alejandro G. Castro <alex@igalia.com>
Unreviewed GTK build fix after r76797.
* Shared/WebPreferencesStore.h: Use Qt fonts preference for the moment.
2011-01-27 Dan Bernstein <mitz@apple.com>
Reviewed by Anders Carlsson.
Allow pop-up menus to contain multiple items that have the same title.
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::populate): Set the item’s title after adding it rather than
when adding it, so that it will not replace any existing item with the same title.
2011-01-27 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt][WK2] Add QWKPage APIs regarding engine process availability
https://bugs.webkit.org/show_bug.cgi?id=53237
QWKPage will now emit engineConnected() and engineDisconnected()
when the web process crashes and is relaunched respectively.
Also added QWKPage::isConnectedToEngine() for convenience.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::QWKPagePrivate):
(QWKPagePrivate::didRelaunchProcess):
(QWKPagePrivate::processDidCrash):
(QWKPage::isConnectedToEngine):
* UIProcess/API/qt/qwkpage.h:
* UIProcess/API/qt/qwkpage_p.h:
2011-01-27 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Andreas Kling.
[Qt][WK2] Lots of layout test failures due to wrong font type
https://bugs.webkit.org/show_bug.cgi?id=53233
* Shared/WebPreferencesStore.h:
Specialize default font families for Qt.
2011-01-26 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dan Bernstein.
WebKitTestRunner needs to support layoutTestController.evaluateInWebInspector
https://bugs.webkit.org/show_bug.cgi?id=42319
Add WKBundleInspector and APIs needed to implement WebKitTestRunner APIs.
* GNUmakefile.am:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp: Added.
(WKBundleInspectorGetTypeID):
(WKBundleInspectorShow):
(WKBundleInspectorClose):
(WKBundleInspectorEvaluateScriptForTest):
(WKBundleInspectorSetPageProfilingEnabled):
* WebProcess/InjectedBundle/API/c/WKBundleInspector.h: Added.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageGetInspector):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::create):
(WebKit::WebInspector::evaluateScriptForTest):
* WebProcess/WebPage/WebInspector.h:
(WebKit::WebInspector::type):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::inspector):
* WebProcess/WebPage/WebPage.h:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
2011-01-26 David Kilzer <ddkilzer@apple.com>
<http://webkit.org/b/53192> Add experimental support for HTTP pipelining in CFNetwork
<rdar://problem/8821760>
Reviewed by Antti Koivisto.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Added initialization for
GetHTTPPipeliningPriority and SetHTTPPipeliningPriority.
2011-01-26 Beth Dakin <bdakin@apple.com>
Reviewed by Darin Adler.
Fix for <rdar://problem/8895140> Adopt WKScrollbar metrics
when using WKScrollbars.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2011-01-26 Sam Weinig <sam@webkit.org>
Reviewed by Maciej Stachowiak.
Add events to represent the start/end of a gesture scroll
https://bugs.webkit.org/show_bug.cgi?id=53215
* Scripts/webkit2/messages.py:
* Shared/WebEvent.h:
(WebKit::WebGestureEvent::WebGestureEvent):
(WebKit::WebGestureEvent::position):
(WebKit::WebGestureEvent::globalPosition):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
(WebKit::platform):
* Shared/WebEventConversion.h:
* Shared/WebGestureEvent.cpp: Added.
(WebKit::WebGestureEvent::WebGestureEvent):
(WebKit::WebGestureEvent::encode):
(WebKit::WebGestureEvent::decode):
(WebKit::WebGestureEvent::isGestureEventType):
* Shared/mac/WebEventFactory.h:
* Shared/mac/WebEventFactory.mm:
(WebKit::gestureEventTypeForEvent):
(WebKit::WebEventFactory::createWebGestureEvent):
* UIProcess/API/mac/WKView.mm:
(-[WKView shortCircuitedEndGestureWithEvent:]):
(-[WKView beginGestureWithEvent:]):
(-[WKView viewDidMoveToWindow]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleGestureEvent):
(WebKit::WebPageProxy::didReceiveEvent):
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleGestureEvent):
(WebKit::WebPage::gestureEvent):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Pipe gesture events down to WebCore.
2011-01-26 Dan Bernstein <mitz@apple.com>
Reviewed by Dave Hyatt.
<rdar://problem/8446709> Allow inter-ideograph justification for CJK
https://bugs.webkit.org/show_bug.cgi?id=53184
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData): Added a TrailingExpansionBehavior parameter to the
RenderText constructor.
2011-01-26 Jing Jin <jjin@apple.com>
Reviewed by Darin Adler.
Methods to temporarily disable size updates to the page drawing area in WKView.
https://bugs.webkit.org/show_bug.cgi?id=53206
Part of <rdar://problem/8818585>
* UIProcess/API/mac/WKView.h: Added _frameSizeUpdateDisabledCount.
* UIProcess/API/mac/WKView.mm:
(-[WKView setFrameSize:]): Only update page size if frame size updates are enabled.
(-[WKView _setDrawingAreaSize:]): Helper method to set the page's drawing area's size.
(-[WKView disableFrameSizeUpdates]): Increment _frameSizeUpdateDisabledCount
(-[WKView enableFrameSizeUpdates]): Decrement _frameSizeUpdateDisabledCount, and if the count is 0, meaning
that no one is disabling frame size updates anymore, update the drawing area's size to match the current frame.
(-[WKView frameSizeUpdatesDisabled]): Returns YES if at least one caller is disabling frame size updates.
* UIProcess/API/mac/WKViewInternal.h: Declared -disableFrameSizeUpdates, -enableFrameSizeUpdates, and -frameSizeUpdatesDisabled.
* UIProcess/API/mac/WKViewPrivate.h: Added.
* WebKit2.xcodeproj/project.pbxproj: Added WKViewPrivate.h
2011-01-26 Jing Jin <jjin@apple.com>
Rubber-stamped by Dan Bernstein.
Several WKView Internal category methods are implemented in the main category.
https://bugs.webkit.org/show_bug.cgi?id=53195
* UIProcess/API/mac/WKView.mm:
(-[WKView _setEventBeingResent:]): Moved into implementation of WKView (Internal).
(-[WKView _interceptKeyEvent:]): Moved into implementation of WKView (Internal).
(-[WKView _getTextInputState:selectionEnd:underlines:WebCore::]): Moved into implementation of WKView (Internal).
(-[WKView _setAccessibilityChildToken:]): Moved into implementation of WKView (Internal).
2011-01-26 Brian Weinstein <bweinstein@apple.com>
Reviewed by John Sullivan.
WebKit2: Need API to get the frame load state of a BundleFrame
https://bugs.webkit.org/show_bug.cgi?id=53193
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetFrameLoadState): Call through to the FrameLoader to get the frame load state.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2011-01-25 Brian Weinstein <bweinstein@apple.com>
Reviewed by Antti Koivisto.
Crashes loading pages when cancelling subresource loads through WebKit
https://bugs.webkit.org/show_bug.cgi?id=53123
<rdar://problem/8914361>
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): If our URL is null, return early instead of dispatching
a message.
2011-01-25 Chris Fleizach <cfleizach@apple.com>
Reviewed by Darin Adler.
WK2 leaks when a page is closed
https://bugs.webkit.org/show_bug.cgi?id=53100
Allow the WKView a chance to clean up on a page close. In this case,
cleaning up means removing the references the accessibility token has
to the window.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::pageClosed):
* UIProcess/API/mac/WKView.mm:
(-[WKView _setRemoteAccessibilityWindow:]):
(-[WKView _setAccessibilityChildToken:]):
(-[WKView _processDidCrash]):
(-[WKView _pageClosed]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/API/qt/qwkpage_p.h:
(QWKPagePrivate::pageClosed):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
* UIProcess/win/WebView.cpp:
(WebKit::WebView::pageClosed):
* UIProcess/win/WebView.h:
2011-01-25 Chris Marrin <cmarrin@apple.com>
Reviewed by Adam Roben.
Expose WebGL flag set/get in WK2
https://bugs.webkit.org/show_bug.cgi?id=53096
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetWebGLEnabled):
(WKPreferencesGetWebGLEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2011-01-25 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Add and implement LayerTreeHost::scheduleLayerFlush
https://bugs.webkit.org/show_bug.cgi?id=53135
* WebKit2.xcodeproj/project.pbxproj:
Add LayerTreeHostMac.mm.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::scheduleCompositingLayerSync):
Call LayerTreeHost::scheduleLayerFlush.
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::~LayerTreeHost):
Call platformInvalidate().
(WebKit::LayerTreeHost::flushPendingLayerChanges):
Rename from syncCompositingLayers.
* WebProcess/WebPage/mac/LayerTreeHostMac.mm: Added.
(WebKit::LayerTreeHost::scheduleLayerFlush):
Create a run loop observer if needed. This code is copied from LayerBackedDrawingAreaMac.mm
(WebKit::LayerTreeHost::platformInvalidate):
Invalidate the run loop observer.
(WebKit::LayerTreeHost::flushPendingLayerChangesRunLoopObserverCallback):
Call flushPendingChanges() and remove the run loop observer if it succeeded.
2011-01-25 Anders Carlsson <andersca@apple.com>
Reviewed by Simon Fraser.
Add LayerTreeHost class
https://bugs.webkit.org/show_bug.cgi?id=53132
* WebKit2.xcodeproj/project.pbxproj:
Add LayerTreeHost files.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
Initialize m_layerTreeHost.
(WebKit::DrawingAreaImpl::setRootCompositingLayer):
Call the m_layerTreeHost.
* WebProcess/WebPage/LayerTreeHost.cpp: Added.
(WebKit::LayerTreeHost::attachRootCompositingLayer):
(WebKit::LayerTreeHost::detachRootCompositingLayer):
Add stubbed out functions.
(WebKit::LayerTreeHost::syncCompositingLayers):
Sync the compositing layers in the main frame.
* WebProcess/WebPage/LayerTreeHost.h: Added.
2011-01-25 Steve Falkenburg <sfalken@apple.com>
Rubber-stamped by Adam Roben.
Windows production build fix.
Use correct environment variable escaping
* win/WebKit2.make:
* win/WebKit2Generated.make:
2011-01-25 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Don't inform the UI process about compositing changes when using the new drawing area
https://bugs.webkit.org/show_bug.cgi?id=53120
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::changeAcceleratedCompositingMode):
Return early if we're using the new drawing area.
(WebKit::WebPage::exitAcceleratedCompositingMode):
Call setRootCompositingLayer(0) so the drawing area knows when we leave accelerated compositing.
2011-01-25 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Pipe a timestamp down into the PlatformWheelEvent for the Mac.
https://bugs.webkit.org/show_bug.cgi?id=53111
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
Assign the timestamp.
2011-01-25 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac.
https://bugs.webkit.org/show_bug.cgi?id=53107
* Shared/WebEvent.h:
(WebKit::WebWheelEvent::hasPreciseScrollingDeltas):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
* Shared/WebWheelEvent.cpp:
(WebKit::WebWheelEvent::WebWheelEvent):
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebWheelEvent):
2011-01-25 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
need a way to request the host CALayer render server port
https://bugs.webkit.org/show_bug.cgi?id=53101
<rdar://problem/8913620>
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::compositingRenderServerPort):
Get the render server port from the plug-in process.
* PluginProcess/PluginControllerProxy.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
Call NetscapePlugin::compositingRenderServerPort.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::compositingRenderServerPort):
Call PluginController::compositingRenderServerPort.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::compositingRenderServerPort):
Get the render server port from the web process.
* WebProcess/Plugins/PluginView.h:
Add compositingRenderServerPort.
2011-01-25 Maciej Stachowiak <mjs@apple.com>
Rubber stamped by Dan Bernstein.
Change some floating point constants from 1.0 to 1.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2011-01-25 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders Carlsson.
Improve scale factor resetting
https://bugs.webkit.org/show_bug.cgi?id=53093
Two key changes:
- Don't set the scale factor to what it already is, as this causes an
uneeded force layout and scroll
- Don't ever set the scale factor based on a non-main frame committing
This fixes two WebKit2 layout tests.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2011-01-24 Chris Marrin <cmarrin@apple.com>
Reviewed by Eric Seidel.
Change ENABLE_3D_CANVAS to ENABLE_WEBGL
https://bugs.webkit.org/show_bug.cgi?id=53041
* Configurations/FeatureDefines.xcconfig:
2011-01-25 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt][WK2] Add QWKPage::processCrashed() signal
https://bugs.webkit.org/show_bug.cgi?id=53076
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::processDidCrash):
* UIProcess/API/qt/qwkpage.h:
* UIProcess/API/qt/qwkpage_p.h:
2011-01-24 Anders Carlsson <andersca@apple.com>
Fix build.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::initializeSandbox):
2011-01-24 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Reset the page scale factor on standard frame loads
https://bugs.webkit.org/show_bug.cgi?id=53058
<rdar://problem/8908844>
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scaleWebView):
Don't set m_viewScaleFactor here. It will be set in viewScaleFactorDidChange.
(WebKit::WebPageProxy::viewScaleFactorDidChange):
Update m_viewScaleFactor.
* UIProcess/WebPageProxy.h:
Add viewScaleFactorDidChange.
* UIProcess/WebPageProxy.messages.in:
Add ViewScaleFactorDidChange message.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
Set the scale factor.
(WebKit::WebFrameLoaderClient::restoreViewState):
Inform the UI process about the new view scale factor.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaleWebView):
Send a ViewScaleFactorDidChange message.
2011-01-24 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders Carlsson.
Use designated temp directory for the database for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=53052
Add the API necessary to support this. Database path is now
determined on the UI process side and passed to the Web process.
Reviewed by Anders Carlsson.
* GNUmakefile.am:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetDatabaseDirectory):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess):
(WebKit::WebContext::databaseDirectory):
* UIProcess/WebContext.h:
(WebKit::WebContext::setDatabaseDirectory):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultDatabaseDirectory):
* UIProcess/qt/WebContextQt.cpp:
(WebKit::WebContext::platformDefaultDatabaseDirectory):
* UIProcess/win/WebContextWin.cpp:
(WebKit::WebContext::platformDefaultDatabaseDirectory):
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::initialize):
(WebKit::WebDatabaseManager::WebDatabaseManager):
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebCoreSupport/gtk/WebDatabaseManagerGtk.cpp: Removed.
* WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: Removed.
* WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp: Removed.
* WebProcess/WebCoreSupport/win/WebDatabaseManagerWin.cpp: Removed.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/com.apple.WebProcess.sb:
* WebProcess/mac/WebProcessMac.mm:
(WebKit::initializeSandbox):
* win/WebKit2.vcproj:
2011-01-24 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build fix.
* win/WebKit2.vcproj: Don't build the CG Utilities when building
without CG support.
2011-01-24 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Don't use the timeout checker for non-user-interaction messages
https://bugs.webkit.org/show_bug.cgi?id=53046
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
(WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
(WebKit::LayerBackedDrawingAreaProxy::didSetSize):
2011-01-24 Adam Roben <aroben@apple.com>
Windows Production build fix
* win/WebKit2.make: Update for move of WebKit2 into Source.
2011-01-24 Jessie Berlin <jberlin@apple.com>
Reviewed by Adam Roben.
WebKit2: LayoutTests: The UNIMPLEMENTED warnings in TextCheckerWin should be disabled
https://bugs.webkit.org/show_bug.cgi?id=53029
* UIProcess/win/TextCheckerWin.cpp:
Disable the warnings for this file.
2011-01-24 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Wait for half a second if we're asked to paint when receiving a DidSetSize message
https://bugs.webkit.org/show_bug.cgi?id=53028
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::paint):
2011-01-24 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Implement forceRedisplay in the new drawing area
https://bugs.webkit.org/show_bug.cgi?id=53026
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::forceRepaint):
* WebProcess/WebPage/DrawingAreaImpl.h:
2011-01-24 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Fill unpainted rects with the background color.
https://bugs.webkit.org/show_bug.cgi?id=53025
* UIProcess/API/mac/WKView.mm:
(drawPageBackground):
Add new helper function.
(-[WKView drawRect:]):
Iterate over the unpainted rects and fill them with the background color.
2011-01-24 Dan Bernstein <mitz@apple.com>
Reviewed by John Sullivan.
WebKit2 version of <rdar://problem/6097826> Mail's cursor does not become a resize cursor when moving mouse from scrolled email to the horizontal splitter
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setCursor): If the current cursor comes from a cursor rect, do not override it.
2011-01-24 Balazs Kelemen <kbalazs@webkit.org>
Rubber-stamped by Csaba Osztrogonác.
Typo fix.
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncher::launchProcess): Move the bracket to the right place.
2011-01-24 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Remove CleanupHandler by passing file descriptors.
Deleting files in signal handler of UI process is not a good idea,
because the memory where filenames are stored might not be valid
after a crash.
To avoid the need of using signal handlers for cleanup,
change following:
1) Avoid passing filenames between processes, pass fds
2) When mmap'ing files, delete them immediately after
opening and mmap'ing them.
3) Pass sockets with fds during fork+exec instead of
passing them via the filesystem.
4) Use mmap'ed files for implementation of SharedMemory.
QSharedMemory does not support cleanup correctly.
Consquences:
- Move MappedMemory to SharedMemory, make UpdateChunk use this.
- Implement CoreIPC::Attachment using mmaped files.
- Send messages using datagram socket. This solution works
similiarly to Mach ports on Mac.
- Send big messages out-of-line and thus avoid increasing
the receive buffer.
- Remove MemoryMappedPool and rely on libc/kernel caching
of mmapped areas.
- Unmap memory areas after use.
- When UI process crashes, kill the web process using SIGKILL.
This is possible again because cleanup handler is not needed.
[WK2][Qt] Multiple problems with MemoryMappedPool
https://bugs.webkit.org/show_bug.cgi?id=51984
* Platform/CoreIPC/Attachment.cpp:
(CoreIPC::Attachment::Attachment):
* Platform/CoreIPC/Attachment.h:
(CoreIPC::Attachment::size):
(CoreIPC::Attachment::releaseFileDescriptor):
(CoreIPC::Attachment::fileDescriptor):
* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/qt/ConnectionQt.cpp:
(CoreIPC::MessageInfo::MessageInfo):
(CoreIPC::MessageInfo::setMessageBodyOOL):
(CoreIPC::MessageInfo::isMessageBodyOOL):
(CoreIPC::MessageInfo::bodySize):
(CoreIPC::MessageInfo::messageID):
(CoreIPC::MessageInfo::attachmentCount):
(CoreIPC::Connection::platformInitialize):
(CoreIPC::Connection::platformInvalidate):
(CoreIPC::SocketNotifierDisableGuard::SocketNotifierDisableGuard):
(CoreIPC::SocketNotifierDisableGuard::~SocketNotifierDisableGuard):
(CoreIPC::Connection::readyReadHandler):
(CoreIPC::Connection::open):
(CoreIPC::Connection::platformCanSendOutgoingMessages):
(CoreIPC::Connection::sendOutgoingMessage):
* Platform/SharedMemory.h:
* Platform/WorkQueue.h:
* Platform/qt/MappedMemoryPool.cpp: Removed.
* Platform/qt/MappedMemoryPool.h: Removed.
* Platform/qt/SharedMemoryQt.cpp:
(WebKit::SharedMemory::Handle::Handle):
(WebKit::SharedMemory::Handle::~Handle):
(WebKit::SharedMemory::Handle::isNull):
(WebKit::SharedMemory::Handle::encode):
(WebKit::SharedMemory::Handle::decode):
(WebKit::SharedMemory::Handle::releaseToAttachment):
(WebKit::SharedMemory::Handle::adoptFromAttachment):
(WebKit::SharedMemory::create):
(WebKit::accessModeMMap):
(WebKit::SharedMemory::~SharedMemory):
(WebKit::accessModeFile):
(WebKit::SharedMemory::createHandle):
* Platform/qt/WorkQueueQt.cpp:
(WorkQueue::registerSocketEventHandler):
* Shared/qt/UpdateChunk.cpp:
(WebKit::UpdateChunk::UpdateChunk):
(WebKit::UpdateChunk::~UpdateChunk):
(WebKit::UpdateChunk::encode):
(WebKit::UpdateChunk::decode):
(WebKit::UpdateChunk::createImage):
* Shared/qt/UpdateChunk.h:
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::QtWebProcess::QtWebProcess):
(WebKit::QtWebProcess::setupChildProcess):
(WebKit::ProcessLauncher::launchProcess):
(WebKit::ProcessLauncher::platformInvalidate):
* UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
(WebKit::webThreadBody):
(WebKit::ThreadLauncher::createWebThread):
* WebKit2.pro:
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):
2011-01-24 Andras Becsi <abecsi@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt] Move project files into Source
https://bugs.webkit.org/show_bug.cgi?id=52891
* DerivedSources.pro:
* WebKit2.pro:
* WebProcess.pro:
2011-01-23 Damian Kaleta <dkaleta@apple.com>
Reviewed by Kevin Decker.
<rdar://problem/8905171>
https://bugs.webkit.org/show_bug.cgi?id=52985
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scaleWebView): Eliminated early return inside WebPageProxy::scaleWebView, making it
consistent with WebKit1.
2011-01-23 Alexey Proskuryakov <ap@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=52968
Use a separate NSView for printing
Also addresses <rdar://problem/8900148> Improper check for
-[NSGraphicsContext currentContextDrawingToScreen]
* UIProcess/API/mac/WKPrintingView.h: Added.
* UIProcess/API/mac/WKPrintingView.mm: Added.
(-[WKPrintingView initWithFrameProxy:]):
(-[WKPrintingView isFlipped]):
(-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]):
(-[WKPrintingView knowsPageRange:]):
(-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
(-[WKPrintingView drawPageBorderWithSize:]):
(-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]):
(-[WKPrintingView rectForPage:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView drawRect:]):
(-[WKView canChangeFrameLayout:]):
(-[WKView printOperationWithPrintInfo:forFrame:]):
* WebKit2.xcodeproj/project.pbxproj:
Moved printing code to a separate view, simplifying as appropriate. The view is currently not
referenced by anything in WebKit2 directly, being owned by NSPrintOperation.
2011-01-22 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Transparent windows with compositing WebKit2 content show garbage
https://bugs.webkit.org/show_bug.cgi?id=52966
<rdar://problem/8765051>
* UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
(WebKit::LayerBackedDrawingAreaProxy::paint):
If the WKView should draw transparent background, do so.
2011-01-22 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add an asynchronous WKPageForceRepaint
https://bugs.webkit.org/show_bug.cgi?id=52964
<rdar://problem/8898527>
* UIProcess/API/C/WKPage.cpp:
(WKPageForceRepaint):
Call WebPageProxy::forceRepaint.
* UIProcess/API/C/WKPage.h:
Add WKPageForceRepaint.
* UIProcess/GenericCallback.h:
Add a "generic" VoidCallback class.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::forceRepaint):
Insert the callback in the m_voidCallbacks map and send a forceRepaint message.
(WebKit::WebPageProxy::voidCallback):
Call the right void callback.
(WebKit::WebPageProxy::processDidCrash):
Invalidate m_voidCallbacks.
* UIProcess/WebPageProxy.messages.in:
Add a VoidCallback message.
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::forceRepaint):
Force a repaint.
* WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
Add forceRepaint.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::forceRepaint):
Call forceRepaint on the drawing area.
* WebProcess/WebPage/WebPage.messages.in:
Add a ForceRepaint message.
2011-01-21 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Dirk Schulze.
Introduce FontMetrics abstraction
https://bugs.webkit.org/show_bug.cgi?id=51456
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Use FontMetrics instead of Font to access the metrics.
(WebKit::WebPopupMenu::setUpPlatformData):
2011-01-22 Alexey Proskuryakov <ap@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=52950
Leak in WebPage::drawRectToPDF
* WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToPDF): Use RetainPtr here, too.
2011-01-22 Alexey Proskuryakov <ap@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=52951
WebKit2 generates a bad PDF for cross process messaging
* UIProcess/API/mac/WKView.mm:
(-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
Use a correct offset when flipping.
2011-01-21 Alexey Proskuryakov <ap@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=52943
Objective-C files should use #import, not #include
* UIProcess/API/C/WebKit2.h: This is an interesting one, because it's cross-platform, and
there is more than one WKView.h.
* Platform/mac/ModuleMac.mm:
* Platform/mac/RunLoopMac.mm:
* PluginProcess/mac/PluginControllerProxyMac.mm:
* PluginProcess/mac/PluginProcessMac.mm:
* PluginProcess/mac/PluginProcessMainMac.mm:
* Shared/API/c/mac/WKCertificateInfoMac.mm:
* Shared/API/c/mac/WKURLRequestNS.mm:
* Shared/API/c/mac/WKURLResponseNS.mm:
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
* Shared/mac/PlatformCertificateInfo.mm:
* Shared/mac/SandboxExtensionMac.mm:
* Shared/mac/WebCoreArgumentCodersMac.mm:
* Shared/mac/WebMemorySampler.mac.mm:
* Shared/mac/WebURLRequestMac.mm:
* Shared/mac/WebURLResponseMac.mm:
* UIProcess/API/mac/FindIndicatorWindow.mm:
* UIProcess/API/mac/WKTextInputWindowController.mm:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
* UIProcess/Launcher/mac/ThreadLauncherMac.mm:
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
* UIProcess/mac/BackingStoreMac.mm:
* UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
* UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
* UIProcess/mac/TextCheckerMac.mm:
* UIProcess/mac/WebContextMac.mm:
* UIProcess/mac/WebContextMenuProxyMac.mm:
* UIProcess/mac/WebPageProxyMac.mm:
* UIProcess/mac/WebPopupMenuProxyMac.mm:
* UIProcess/mac/WebPreferencesMac.mm:
* WebProcess/Downloads/mac/DownloadMac.mm:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
* WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
* WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
* WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
* WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
* WebProcess/WebPage/mac/WebPageMac.mm:
* WebProcess/mac/WebProcessMac.mm:
2011-01-21 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
Fix the WebKit2 build with clang.
* Scripts/webkit2/messages.py: Add some more structs to the list.
* UIProcess/DrawingAreaProxy.h: Forward-declare UpdateInfo as a class.
* UIProcess/TextChecker.h: Forward-declare TextCheckerState as a struct.
* UIProcess/WebPageProxy.h: Forward-declare ContextMenuState as a struct.
* UIProcess/mac/TextCheckerMac.mm: Fix the type of the string constants so that they can be passed to
functions expecting NSString* without generating warnings.
* WebProcess/WebPage/DrawingArea.h: Forward-declare WebPageCreationParameters as a struct.
* WebProcess/WebPage/DrawingAreaImpl.h: Forward-declare UpdateInfo as a class.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getResourceDataFromFrame): Add parens around the assignment in the condition of
the if statement to suppress a warning.
2011-01-21 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben.
WebKit2: Need API to stop loading a WKFrame
https://bugs.webkit.org/show_bug.cgi?id=52925
* UIProcess/API/C/WKFrame.cpp:
(WKFrameStopLoading): Call through to WebFrameProxy::stopLoading.
* UIProcess/API/C/WKFrame.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::stopLoading): Send a message to the WebProcess to stop loading the frame
with the passed in ID.
* UIProcess/WebFrameProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::stopLoadingFrame): Call stopForUserCancel on the passed-in frame.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add StopLoadingFrame.
2011-01-21 Brady Eidson <beidson@apple.com>
Reviewed by Adam Roben.
<rdar://problem/8894125> and https://bugs.webkit.org/show_bug.cgi?id=52916
Expose "suggested filename" for a resource based on its resource response.
API pieces:
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameCopySuggestedFilenameForResourceURL):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
Implementation:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::suggestedFilenameForResourceURL): See if the DocumentLoader has
a resource for this URL and, if so, return the response's suggested filename.
* WebProcess/WebPage/WebFrame.h:
2011-01-21 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
DrawingAreaProxyImpl::paint should return the unpainted region
https://bugs.webkit.org/show_bug.cgi?id=52918
* UIProcess/API/mac/WKView.mm:
(-[WKView drawRect:]):
Add unpaintedRegion parameter.
* UIProcess/BackingStore.h:
(WebKit::BackingStore::size):
Add a size getter.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::paint):
Initialize the unpainted region to the dirty region, then subtract the painted region.
2011-01-21 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein and Maciej Stachowiak.
Fix for <rdar://problem/8896057>
Give the Web Process access to the PubSub agent.
* WebProcess/com.apple.WebProcess.sb:
2011-01-21 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Part 2 of "Cleanup Scrollbar/ScrollbarClient relationship"
https://bugs.webkit.org/show_bug.cgi?id=52779
Rename ScrollbarClient -> ScrollableArea.
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::onMouseWheel):
(WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
* UIProcess/win/WebPopupMenuProxyWin.h:
2011-01-21 Adam Roben <aroben@apple.com>
Update for WKCACFLayerRenderer -> CACFLayerView rename
Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't
Reviewed by Simon Fraser.
* WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Just removed all the unnecessary
#includes.
2011-01-20 Darin Adler <darin@apple.com>
Reviewed by Dan Bernstein.
WebKit2: Implement showModalDialog
https://bugs.webkit.org/show_bug.cgi?id=52855
* Shared/WebPageCreationParameters.h: Added canRunModal.
* UIProcess/API/C/WKPage.h: Added a runModal function pointer to
WKPageUIClient. Also removed a lot of redundant typedefs and added
a new one, WKPageCallback, for callbacks without arguments or return
values.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::QWKPage): Added a runModal function pointer of 0.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters): Set canRunModal
based on return value of WebUIClient::canRunModal.
* UIProcess/WebPageProxy.h: Added runModal.
Calls WebUIClient::runModal.
* UIProcess/WebPageProxy.messages.in: Added RunModal message.
Also removed the periods from the phrases in the comments
as Maciej requested a while back.
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::canRunModal): Added. Returns true or false
based on whether a runModal function was supplied in the
WKPageUIClient structure.
(WebKit::WebUIClient::runModal): Added. Calls the runModal
function from the WKPageUIClient structure.
* UIProcess/WebUIClient.h: Declared the above functions.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::canRunModal): Call through to WebPage.
(WebKit::WebChromeClient::runModal): Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize m_canRunModal based on the
creation parameters. Initialize m_isRunningModal to false.
(WebKit::WebPage::close): Stop the nested run loop if we are running modal.
(WebKit::WebPage::runModal): Send a message to ask the UI process to run
modal and then start a nested run loop. It gets stopped when the page is closed.
* WebProcess/WebPage/WebPage.h: Defined the canRunModal function
and declared the runModal function.
2011-01-20 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=52849
Make window.print work with WebKit2
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::QWKPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::printFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::printFrame):
* UIProcess/WebUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::print):
Just pass through deelagte call to a WebKit2 client.
* UIProcess/API/C/WKPage.h: Also added "Callback" suffix to other printing related function
types.
2011-01-20 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Keep track of the latest update timestamp in the backing store
https://bugs.webkit.org/show_bug.cgi?id=52848
* Shared/UpdateInfo.h:
(WebKit::UpdateInfo::UpdateInfo):
Initialize timestamp to 0.
* UIProcess/BackingStore.cpp:
(WebKit::BackingStore::BackingStore):
Initialize m_latestUpdateTimestamp to 0.
(WebKit::BackingStore::incorporateUpdate):
If the update is too old, discard it. Otherwise, create a bitmap
and pass it to platformIncorporateUpdate. Finally update the timestamp.
* UIProcess/BackingStore.h:
Add m_latestUpdateTimestamp.
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::platformIncorporateUpdate):
Update now that we are already given the shareable bitmap.
2011-01-20 Beth Dakin <bdakin@apple.com>
Reviewed by Geoffrey Garen.
Fix for <rdar://problem/8890255>
Allow WebKitSystemInterface to draw scrollbars
when appropriate.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2011-01-20 Sam Weinig <sam@webkit.org>
Reviewed by Dave Hyatt.
Cleanup Scrollbar/ScrollbarClient relationship
https://bugs.webkit.org/show_bug.cgi?id=52779
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::scrollPosition):
(WebKit::WebPopupMenuProxyWin::setScrollOffset):
(WebKit::WebPopupMenuProxyWin::scrollTo):
(WebKit::WebPopupMenuProxyWin::onMouseWheel):
(WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
* UIProcess/win/WebPopupMenuProxyWin.h:
(WebKit::WebPopupMenuProxyWin::verticalScrollbar):
2011-01-20 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Add a timestamp to UpdateInfo
https://bugs.webkit.org/show_bug.cgi?id=52844
* Shared/UpdateInfo.cpp:
(WebKit::UpdateInfo::encode):
(WebKit::UpdateInfo::decode):
* Shared/UpdateInfo.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setSize):
(WebKit::DrawingAreaImpl::display):
2011-01-20 Anders Carlsson <andersca@apple.com>
Reviewed by Beth Dakin.
Add Connection::waitForAndDispatchImmediately
https://bugs.webkit.org/show_bug.cgi?id=52841
* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::waitForAndDispatchImmediately):
2011-01-20 Kevin Decker <kdecker@apple.com>
Reviewed by Anders Carlsson.
<rdar://problem/8880689> need a way to obtain the rendered rectangle for box elements
https://bugs.webkit.org/show_bug.cgi?id=52823
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
(WKBundleNodeHandleGetRenderRect): Added new method that will return a rendered rectangle for box elements
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: Ditto.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Ditto.
(WebKit::InjectedBundleNodeHandle::renderRect): Ditto.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.
2011-01-20 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
Reviewed by Andreas Kling.
Remove null ptr deref that happens when reattaching to
a new web process.
Implement didRelaunchProcess that sets the drawing area size
after the drawing area is re-instantiated.
[Qt][WK2] Null ptr deref in UI process after web process has crashed
https://bugs.webkit.org/show_bug.cgi?id=52796
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::QGraphicsWKView):
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::QWKPagePrivate):
(QWKPagePrivate::init):
(QWKPagePrivate::createDrawingAreaProxy):
(QWKPagePrivate::didRelaunchProcess): Reset drawing area size after crash.
* UIProcess/API/qt/qwkpage_p.h:
2011-01-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Adam Roben.
WebKitTestRunner needs to support layoutTestController.evaluateScriptInIsolatedWorld
https://bugs.webkit.org/show_bug.cgi?id=42327
Added a new API call, WKBundleFrameForJavaScriptContext, that gets the WKBundleFrameRef
that corresponds to a JSContextRef (or null if none).
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameForJavaScriptContext): Simple wrapper, defers to a WebFrame
static method.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::frameForContext): Follow the maze of twisty pointers.
* WebProcess/WebPage/WebFrame.h:
2011-01-20 Alejandro G. Castro <alex@igalia.com>
Fix compilation error in GTK WebKit2.
* Platform/CoreIPC/gtk/ConnectionGtk.cpp:
(CoreIPC::readBytesFromSocket):
(CoreIPC::writeBytesToSocket):
2011-01-20 Zoltan Horvath <zoltan@webkit.org>
Reviewed by Csaba Osztrogonác.
Refactoring of the custom allocation framework
https://bugs.webkit.org/show_bug.cgi?id=49897
Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
equivalent macro implementation at the necessary places.
2011-01-19 Simon Fraser <simon.fraser@apple.com>
Fix the WebKit2 build.
* WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
(WebKit::LayerBackedDrawingArea::syncCompositingLayers):
2011-01-19 Brian Weinstein <bweinstein@apple.com>
Reviewed by Darin Adler.
WebKit2: Need API to get the parent frame of a frame
https://bugs.webkit.org/show_bug.cgi?id=52774
Add the API to get the parent frame of a frame.
* UIProcess/API/C/WKFrame.cpp:
(WKFrameGetParentFrame):
* UIProcess/API/C/WKFrame.h:
2011-01-19 Enrica Casucci <enrica@apple.com>
Reviewed by Darin Adler.
WebKit2: add support for drag and drop
https://bugs.webkit.org/show_bug.cgi?id=52343
<rdar://problem/7660558>
This patch contains the remaining work to support drag and drop on Mac.
I've added a PasteboardTypes class to encapsulate all the pasteboard formats
supported for drag and drop.
In this implementation we don't support the promised types, since I could not
find an efficient way to do this across processes.
The bulk of the patch consists in creating a shareable bitmap for the drag image,
pass its handle to the UI process and create a new NSImage from it to be given to
AppKit for dragging.
I've added the missing implementation of the methods in the drag client to hook
up the placement of the data in the pasteboard.
* Shared/mac/PasteboardTypes.h: Added.
* Shared/mac/PasteboardTypes.mm: Added.
(WebKit::PasteboardTypes::forEditing):
(WebKit::PasteboardTypes::forURL):
(WebKit::PasteboardTypes::forImages):
(WebKit::PasteboardTypes::forImagesWithArchive):
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setDragImage): Added.
* UIProcess/API/mac/WKView.mm:
(-[WKView _registerDraggedTypes]): Refactored to use the new PasteboardTypes class.
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView _setMouseDownEvent:]):
(-[WKView _mouseHandler:]):
(-[WKView mouseDown:]):
(-[WKView mouseUp:]):
(-[WKView mouseDragged:]):
(-[WKView draggedImage:endedAt:operation:]):
(-[WKView draggingEntered:]):
(-[WKView _setDragImage:at:linkDrag:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setDragImage):
(WebKit::WebPageProxy::dragEnded):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebDragClient.cpp:
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: Added.
(WebKit::fontFromNSFont):
(WebKit::WebDragClient::startDrag): Added implementation.
(WebKit::WebDragClient::createDragImageForLink): Ditto.
(WebKit::writeURL): Helper function.
(WebKit::writeImage): Helper function.
(WebKit::WebDragClient::declareAndWriteDragImage): Added implementation.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::dragEnded):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-01-19 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Put the deprecated Connection member functions next to eachother
https://bugs.webkit.org/show_bug.cgi?id=52767
* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::sendSync):
(CoreIPC::Connection::send):
2011-01-19 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
When resizing, the web process should repaint the page
https://bugs.webkit.org/show_bug.cgi?id=52764
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::didSetSize):
Incorporate the update.
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
Return early if the update bounds rect is empty. This can happen if painting is
disabled and we get a DidSetSize message.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setSize):
If painting is disabled, just send back an empty UpdateInfo struct. Otherwise,
paint and fill in the UpdateInfo struct.
(WebKit::DrawingAreaImpl::display):
Assert that painting is not disabled.
2011-01-19 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=52739
Make it possible for a WebKit2 client to print headers and footers
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::headerHeight):
(WebKit::WebPageProxy::footerHeight):
(WebKit::WebPageProxy::drawHeader):
(WebKit::WebPageProxy::drawFooter):
* UIProcess/WebPageProxy.h:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::headerHeight):
(WebKit::WebUIClient::footerHeight):
(WebKit::WebUIClient::drawHeader):
(WebKit::WebUIClient::drawFooter):
* UIProcess/WebUIClient.h:
Pass UIClient calls through.
* UIProcess/API/mac/WKView.mm:
(currentPrintOperationScale): A helper to extract scale factor from the current NSPrintOperation.
(-[WKView _adjustPrintingMarginsForHeaderAndFooter]): Copied from WebKit1. Change current
print info to account for header and footer height as provided by the client.
(-[WKView knowsPageRange:]): Call -[self _adjustPrintingMarginsForHeaderAndFooter].
(-[WKView drawPageBorderWithSize:]): When AppKit asks to print page border, call the client
to do that. Code adapted form WebKit1.
* UIProcess/API/qt/qwkpage:
(QWKPage::QWKPage): Added zeroes for new WKPageUIClient members to avoid breaking the build.
2011-01-19 Jessie Berlin <jberlin@apple.com>
Reviewed by Darin Adler.
Crash in WebDatabaseManagerProxy::getDatabaseOrigins when called after the WebProcess has
died at least once
https://bugs.webkit.org/show_bug.cgi?id=52730
WebDatabaseManagerProxy::invalidate was setting m_webContext to 0, and invalidate gets
called in WebContext::processDidClose. However, m_webContext is only set in the
constructor, which is only called from the constructor of WebContext, so attempting to send
a message to any new WebProcess after the first one died was causing a null deref.
This patch moves setting m_webcontext into clearContext and clearContext is only called in
the WebContext destructor.
This patch also adds checks for a valid WebProcessProxy before attempting to send messages to
the WebProcessProxy so that if the WebProcess has died and has not been revived, it does not
attempt to dereference a null WebProcessProxy.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::~WebContext):
Call WebDatabaseManagerProxy::clearContext.
* UIProcess/WebContext.h:
(WebKit::WebContext::hasValidProcess):
Make this method public so that it can be called from WebDatabaseManagerProxy.
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
If there isn't a valid process, invalidate the callback and return early.
(WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
Ditto.
(WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
If tehre isn't a valid process return early.
(WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
Ditto.
(WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
Ditto.
(WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
Ditto.
(WebKit::WebDatabaseManagerProxy::invalidate):
Move setting m_webContext to 0 from here ...
* UIProcess/WebDatabaseManagerProxy.h:
(WebKit::WebDatabaseManagerProxy::clearContext):
... to here.
2011-01-19 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Suspend/resume painting as the WKView visibility changes
https://bugs.webkit.org/show_bug.cgi?id=52738
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::visibilityDidChange):
Add new member function. It should really be pure virtual once setPageIsVisible
is removed.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::visibilityDidChange):
Send SuspendPainting/ResumePainting messages based on whether the view is visible or not.
(WebKit::DrawingAreaProxyImpl::setPageIsVisible):
Make this a stub; it should really be removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
Call visibilityDidChange.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isViewVisible):
Add new getter.
* WebProcess/WebPage/DrawingArea.messages.in:
Add SuspendPainting and ResumePainting messages.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
Initialize m_isPaintingSuspended.
(WebKit::DrawingAreaImpl::suspendPainting):
Set m_isPaintingSuspended to true and stop the display timer.
(WebKit::DrawingAreaImpl::resumePainting):
Set m_isPaintingSuspended to false.
(WebKit::DrawingAreaImpl::scheduleDisplay):
(WebKit::DrawingAreaImpl::display):
Bail if m_isPaintingSuspended is true.
2011-01-19 Andreas Kling <kling@webkit.org>
Reviewed by Simon Hausmann.
[Qt][WK2] Implement formatLocalizedString() for Qt.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::formatLocalizedString):
2011-01-19 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
WK2 - Multiple crashes in PlatformCALayer::replaceSublayer
https://bugs.webkit.org/show_bug.cgi?id=52695
Added a hostingLayer as the parent of the existing drawingLayer.
The hostingLayer is now the root which is passed to the
remote context. It never changes except to track the size
of the window. The backingLayer is now a child of the
hostingLayer, which allow it to switch between tiled and
non-tiled.
I also now give back accurate settings for debug borders and
repaint counters.
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
(WebKit::LayerBackedDrawingArea::setSize):
(WebKit::LayerBackedDrawingArea::showDebugBorders):
(WebKit::LayerBackedDrawingArea::showRepaintCounter):
* WebProcess/WebPage/LayerBackedDrawingArea.h:
* WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
(WebKit::LayerBackedDrawingArea::platformInit):
(WebKit::LayerBackedDrawingArea::attachCompositingContext):
(WebKit::LayerBackedDrawingArea::syncCompositingLayers):
2011-01-19 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Send a new SetSize message if the size differs from the current size
https://bugs.webkit.org/show_bug.cgi?id=52728
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::didSetSize):
Add UpdateInfo parameter.
* UIProcess/DrawingAreaProxy.messages.in:
Add UpdateInfo parameter to the DidSetSize message.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::didSetSize):
If the view size differs from the current size send another SetSize message.
* UIProcess/DrawingAreaProxyImpl.h:
Add UpdateInfo parameter to didSetSize.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setSize):
The DidSetSize message now takes an UpdateInfo parameter.
2011-01-19 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Throttle sending of SetSize messages
https://bugs.webkit.org/show_bug.cgi?id=52727
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
Initialize m_isWaitingForDidSetSize to false.
(WebKit::DrawingAreaProxyImpl::didSetSize):
Null out the backing store.
(WebKit::DrawingAreaProxyImpl::sendSetSize):
If m_isWaitingForDidSetSize is true, do nothing. Otherwise, set m_isWaitingForDidSetSize
to true and send a SetSize message.
* UIProcess/DrawingAreaProxyImpl.h:
Add m_isWaitingForDidSetSize.
2011-01-19 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Pass WebPageCreationParameters to DrawingArea::create
https://bugs.webkit.org/show_bug.cgi?id=52726
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::create):
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::changeAcceleratedCompositingMode):
2011-01-19 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Laszlo Gombos and Tor Arne Vestbø.
[Qt] Remove unnecessary "../Source" from paths
after moving source files into Source is finished.
* DerivedSources.pro:
* WebKit2.pro:
2011-01-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by Sam Weinig.
WebKitTestRunner should track loading more like DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=52692
Relax the message check in didSaveFrameToPageCache a bit more, since
layout tests were still hitting the old one.
* UIProcess/WebPageProxy.cpp:
(WebKit::isDisconnectedFrame):
(WebKit::WebPageProxy::didSaveFrameToPageCache):
2011-01-18 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
<rdar://problem/8860833> and https://bugs.webkit.org/show_bug.cgi?id=52599
UIProcess crash in WebPageProxy::reattachToWebProcess when web process crashes with a new tab/window.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessWithItem): Null check item *both* places it is used.
2011-01-18 Brady Eidson <beidson@apple.com>
Reviewed by Maciej Stachowiak.
<rdar://problem/8752200> and https://bugs.webkit.org/show_bug.cgi?id=52664
Need WebKit2 API to asynchronously get the resource data for a URL
Rename WKFrameGetMainResourceDataFunction to WKFrameGetResourceDataFunction, and add
new API to get a resource by URL:
* UIProcess/API/C/WKFrame.cpp:
(WKFrameGetMainResourceData):
(WKFrameGetResourceData):
(callGetResourceDataBlockAndDispose):
(WKFrameGetMainResourceData_b):
(WKFrameGetResourceData_b):
* UIProcess/API/C/WKFrame.h:
Implement the new API in the UIProcess side:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::getResourceData):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getResourceDataFromFrame):
* UIProcess/WebPageProxy.h:
Have the WebProcess get the data and call back to the UIProcess:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getResourceDataFromFrame):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Make PageClientImpl::scrollView do hardware blitting
https://bugs.webkit.org/show_bug.cgi?id=52689
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::scrollView):
Clip the scroll rect and scroll the view.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
Scroll before painting.
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Artifacts when scrolling with new drawing area
https://bugs.webkit.org/show_bug.cgi?id=52682
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::scroll):
When scrolling, we want the intersection of the scroll rect and clip rect.
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Use a CGLayer for the backing store when possible
https://bugs.webkit.org/show_bug.cgi?id=52679
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::paint):
If there is a layer, paint it into the given context.
(WebKit::BackingStore::backingStoreContext):
If we can get the containing window graphics context, use it to create a
CGLayer that we'll use for the backing store.
(WebKit::BackingStore::scroll):
Paint the layer into itself.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::containingWindowGraphicsContext):
Call the page client.
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Pass the web page proxy to BackingStore::create
https://bugs.webkit.org/show_bug.cgi?id=52673
* UIProcess/BackingStore.cpp:
(WebKit::BackingStore::create):
Add WebPageProxy parameter.
(WebKit::BackingStore::BackingStore):
Add WebPageProxy parameter.
* UIProcess/BackingStore.h:
Add WebPageProxy member variable.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
Pass the web page proxy when creating the backing store.
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::backingStoreContext):
Set the default blend mode.
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Factor code to create the backing store bitmap context out into a new function
https://bugs.webkit.org/show_bug.cgi?id=52670
* UIProcess/BackingStore.h:
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::backingStoreContext):
Create the backing store context.
(WebKit::BackingStore::incorporateUpdate):
Call backingStoreContext.
(WebKit::BackingStore::scroll):
Assert that the context is not null.
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Add PageClientImpl::containingWindowGraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=52666
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::containingWindowGraphicsContext):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
2011-01-18 Damian Kaleta <dkaleta@apple.com>
Reviewed by Sam Weinig.
WK2 methods WKPageScaleWebView and WKPageGetViewScaleFactor need to have consistent names
https://bugs.webkit.org/show_bug.cgi?id=52647
* UIProcess/API/C/WKPage.cpp:
(WKPageSetScaleFactor):
(WKPageGetScaleFactor):
* UIProcess/API/C/WKPage.h:
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Ask the web page proxy to scroll the view when needed
https://bugs.webkit.org/show_bug.cgi?id=52665
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scrollView):
* UIProcess/WebPageProxy.h:
2011-01-18 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::scrollView):
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add PageClient::scrollView
https://bugs.webkit.org/show_bug.cgi?id=52663
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::scrollView):
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::scrollView):
* UIProcess/API/qt/qwkpage_p.h:
* UIProcess/PageClient.h:
* UIProcess/win/WebView.cpp:
(WebKit::PageClientImpl::scrollView):
* UIProcess/win/WebView.h:
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Rename scrollDelta to scrollOffset everywhere.
* Shared/UpdateInfo.cpp:
(WebKit::UpdateInfo::encode):
(WebKit::UpdateInfo::decode):
* Shared/UpdateInfo.h:
* UIProcess/BackingStore.h:
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::incorporateUpdate):
(WebKit::BackingStore::scroll):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::scroll):
(WebKit::WebChromeClient::delegatedScrollRequested):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::scroll):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::scroll):
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::scroll):
* WebProcess/WebPage/LayerBackedDrawingArea.h:
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Get and paint each individual rect in -[WKView drawRect:]
https://bugs.webkit.org/show_bug.cgi?id=52660
* UIProcess/API/mac/WKView.mm:
(-[WKView drawRect:]):
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Assertion when loading two URLs in quick succession
https://bugs.webkit.org/show_bug.cgi?id=52649
<rdar://problem/8764645>
If beginLoad is called twice without didStartProvisionalLoad being called in between,
m_pendingProvisionalSandboxExtension would be non-null and an assert would fire.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::SandboxExtensionTracker::beginLoad):
Instead of asserting that m_pendingProvisionalSandboxExtension is null, invalidate it
if it is not null, since that's valid.
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Implement NPN_PopUpContextMenu
https://bugs.webkit.org/show_bug.cgi?id=52646
<rdar://problem/8735616>
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_PopUpContextMenu):
Call NetscapePlugin::popUpContextMenu.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
Initialize m_currentMouseEvent.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
Add m_currentMouseEvent.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::popUpContextMenu):
Convert the coordinates from the current mouse event to screen coordinates and call
WKPopupContextMenu.
(WebKit::NetscapePlugin::platformHandleMouseEvent):
Update m_currentMouseEvent.
2011-01-18 Jessie Berlin <jberlin@apple.com>
Reviewed by Darin Adler.
WebKit2: Do not assert that the provisional and committed URLs cannot be empty/null
https://bugs.webkit.org/show_bug.cgi?id=52641
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didStartProvisionalLoad):
(WebKit::WebFrameProxy::didCommitLoad):
(WebKit::WebFrameProxy::didFinishLoad):
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
ASSERT in plug-in code when going to youtube
https://bugs.webkit.org/show_bug.cgi?id=52638
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::paintEntirePlugin):
Don't try to paint the plug-in if the plug-in frame is empty.
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Plug-in hosting WebProcess instances appear in Activity Monitor as WebProcess
https://bugs.webkit.org/show_bug.cgi?id=52635
<rdar://problem/8731337>
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::initialize):
Call platformInitialize.
* PluginProcess/PluginProcess.h:
Add platformInitialize.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitialize):
Set the compositing render server port and the visible application name.
* Shared/Plugins/PluginProcessCreationParameters.cpp:
(WebKit::PluginProcessCreationParameters::encode):
(WebKit::PluginProcessCreationParameters::decode):
Encode/decode the parent process name.
* Shared/Plugins/PluginProcessCreationParameters.h:
Add parentProcessName.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
Encode/decode the parent process name.
* Shared/WebProcessCreationParameters.h:
Add parentProcessName.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):
Don't pass the parent process name here.
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
Set the visible name.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
Pass along the parent process name.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Set the visible name.
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain):
Don't set the visible name here. It's done in platformInitializeWebProcess.
2011-01-18 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt][WK2] Not implemented warnings should not break layout tests
https://bugs.webkit.org/show_bug.cgi?id=52616
* WebKit2Prefix.h: Define DISABLE_NOT_IMPLEMENTED_WARNINGS on Qt.
2011-01-17 Jon Honeycutt <jhoneycutt@apple.com>
Windows build fix. Unreviewed.
* Shared/PrintInfo.cpp:
Use #include, not #import.
2011-01-17 Alexey Proskuryakov <ap@apple.com>
Actually wrote a FIXME promised for a review comment.
* UIProcess/API/mac/WKView.mm:
(-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
2011-01-17 Alexey Proskuryakov <ap@apple.com>
Reviewed by Anders Carlsson and Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=52595
Make basic printing work in WebKit2
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetShouldPrintBackgrounds):
(WKPreferencesGetShouldPrintBackgrounds):
* UIProcess/API/C/WKPreferences.h:
Implement a preference for printing backgrounds.
* Shared/PrintInfo.cpp: Added.
(WebKit::PrintInfo::encode):
(WebKit::PrintInfo::decode):
* Shared/PrintInfo.h: Added.
* Shared/mac/PrintInfoMac.mm: Added.
(WebKit::PrintInfo::PrintInfo):
A new class for passing page setup information down to the web process.
* WebKit2.xcodeproj/project.pbxproj:
* GNUmakefile.am:
* WebKit2.pro:
* win/WebKit2.vcproj:
Added PrintInfo.
* Scripts/webkit2/messages.py: Added PrintInfo.h to a list of structs.
* UIProcess/API/mac/WKView.mm:
(WKViewData): Cache page count and geometry.
(WebFrameWrapper): Added a wrapper class for adding a WebFrameProxy to an NSDictionary.
(-[WKView drawRect:]): Added logging.
(setFrameBeingPrinted): Store a frame into NSPrintOperation's NSPrintInfo, so that all
methods invoked for this operation would know what's being printed.
(frameBeingPrinted): Retrieve this data.
(-[WKView printOperationWithPrintInfo:forFrame:]): Create a print operation that's appropriate
for the frame.
(-[WKView knowsPageRange:]): Ask the web process.
(-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
Take over printing, because I couldn't make drawRect: work correctly with WebKit custom fit
to page implementation.
(-[WKView _provideTotalScaleFactorForPrintOperation:]): Help AppKit clip correctly.
(-[WKView rectForPage:]): Return a pre-calculated rect.
* UIProcess/WebPageProxy.h: Added m_isInPrintingMode to track whether the web page is in
printing mode. The UI process controls that.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize m_isInPrintingMode.
(WebKit::WebPageProxy::beginPrinting): Change printing mode in web process if the value changes.
(WebKit::WebPageProxy::endPrinting): Ditto.
(WebKit::WebPageProxy::computePagesForPrinting): Ask the web process about output page geometry.
(WebKit::WebPageProxy::drawRectToPDF): Ask the web process about printed page data.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close): Delete m_printContext while there is still a Frame pointer.
(WebKit::WebPage::updatePreferences): Pass through ShouldPrintBackgrounds.
(WebKit::WebPage::beginPrinting): Switch into printing mode (or update parameters if we're
already in printing mode).
(WebKit::WebPage::endPrinting): Delete m_printContext, implicitly calling end().
(WebKit::WebPage::computePagesForPrinting): Make sure that we're in printing mode, and
copmute page rects.
(WebKit::WebPage::drawRectToPDF): Added a CG specific function to create a PDF document out
of a page rect. It should really work for onscreen content, but we only need it for printing.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added BeginPrinting, EndPrinting,
ComputePagesForPrinting and DrawRectToPDF.
2011-01-17 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Alexey Proskuryakov.
Fix some headers with missing or misspelled #ifndef guards
https://bugs.webkit.org/show_bug.cgi?id=52545
* Shared/UserMessageCoders.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
* WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
* WebProcess/WebProcessMain.h:
2011-01-17 Alexey Proskuryakov <ap@apple.com>
Build fix.
* Platform/Logging.cpp:
2011-01-17 Alexey Proskuryakov <ap@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=52592
Add a logging channel for WKView
* Platform/Logging.cpp:
* Platform/Logging.h:
2011-01-17 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Factor bitmap context drawing code out into a shared function
https://bugs.webkit.org/show_bug.cgi?id=52589
* Platform/cg/CGUtilities.h: Added.
* Platform/cg/CGUtilities.cpp: Added.
(WebKit::paintBitmapContext):
New function that will paint a bitmap context into a CGContext.
* Shared/cg/ShareableBitmapCG.cpp:
(WebKit::ShareableBitmap::paint):
Use paintBitmapContext.
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::paint):
(WebKit::BackingStore::scroll):
Use paintBitmapContext.
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Common.vsprops:
Add CGUtilities.{cpp|h}.
2011-01-17 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Mark Rowe.
Update xcodeproj svn:ignore to include xcuserdata.
* WebKit2.xcodeproj: Modified property svn:ignore.
2011-01-17 Alexey Proskuryakov <ap@apple.com>
Fixing a typo from a bad merge.
* UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]):
2011-01-17 Alexey Proskuryakov <ap@apple.com>
Reviewed by John Sullivan.
https://bugs.webkit.org/show_bug.cgi?id=52590
Should pass a frame into -[WKView canPrintHeadersAndFooters]
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]): Also, renamed the method
to canChangeFrameLayout.
2011-01-17 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Implement scrolling support
https://bugs.webkit.org/show_bug.cgi?id=52502
* Shared/UpdateInfo.cpp:
(WebKit::UpdateInfo::encode):
(WebKit::UpdateInfo::decode):
* Shared/UpdateInfo.h:
Add scrollRect and scrollDelta member variables.
* UIProcess/BackingStore.h:
Add scroll member function.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
Repaint the scroll rect. Force a display of the view when the update info contains a scroll rect.
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::incorporateUpdate):
Call scroll.
(WebKit::BackingStore::scroll):
Paint the backing store into itself.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::display):
Pass the scroll information in the update info.
2011-01-17 Andrey Kosyakov <caseq@chromium.org>
Unreviewed. Fixed malformed reference to WebKitVSPropsRedirectionDir that broke win build.
* win/WebKit2.vcproj:
* win/WebKit2GeneratedCommon.vsprops:
* win/WebKit2WebProcess.vcproj:
2011-01-17 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: simplify debugger enabling routine.
https://bugs.webkit.org/show_bug.cgi?id=52472
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::startJavaScriptDebugging):
2011-01-17 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Andreas Kling.
[Qt][WK2] Crash due to double destruction of QSharedMemory
https://bugs.webkit.org/show_bug.cgi?id=52569
Avoid deleting the QSharedMemory twice.
* Platform/qt/SharedMemoryQt.cpp:
(WebKit::SharedMemory::~SharedMemory):
* Shared/qt/CleanupHandler.cpp:
Renamed m_inDeleteObjects to m_hasStartedDeleting and
added a getter for it.
(WebKit::CleanupHandler::CleanupHandler):
(WebKit::CleanupHandler::deleteObjects):
* Shared/qt/CleanupHandler.h:
(WebKit::CleanupHandler::unmark):
(WebKit::CleanupHandler::hasStartedDeleting):
2011-01-15 Adam Barth <abarth@webkit.org>
Rubber-stamped by Eric Seidel.
Move WebKit2 into Source
https://bugs.webkit.org/show_bug.cgi?id=52438
* DerivedSources.pro:
* GNUmakefile.am:
* WebKit2.pro:
* WebProcess.pro:
* win/WebKit2.vcproj:
* win/WebKit2WebProcess.vcproj:
2011-01-14 Yuzo Fujishima <yuzo@google.com>
Reviewed by Antti Koivisto.
Rename cache() to memoryCache()
https://bugs.webkit.org/show_bug.cgi?id=52433
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::shutdownIfPossible):
(WebKit::WebProcess::didClose):
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformSetCacheModel):
* WebProcess/win/WebProcessWin.cpp:
(WebKit::WebProcess::platformSetCacheModel):
2011-01-13 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Split out a MarkedSpace strategy object from Heap.
https://bugs.webkit.org/show_bug.cgi?id=52421
* Shared/mac/WebMemorySampler.mac.mm:
(WebKit::WebMemorySampler::sampleWebKit): Updated for class move.
2011-01-14 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Add a new PageClient::displayView function and expose it on WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=52500
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::displayView):
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::displayView):
* UIProcess/API/qt/qwkpage_p.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::displayView):
* UIProcess/WebPageProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::displayView):
* UIProcess/win/WebView.h:
2011-01-14 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Implement the "should paint bounds instead of indiviual rects" algorithm from WebKit1
https://bugs.webkit.org/show_bug.cgi?id=52499
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::shouldPaintBoundsRect):
Port code from -[WebView _mustDrawUnionedRect:singleRects:count:].
(WebKit::DrawingAreaImpl::display):
If shouldPaintBoundsRect returns true, clear the rects vector and append the bounds rect.
2011-01-14 Brian Weinstein <bweinstein@apple.com>
Reviewed by Geoff Garen.
ShouldLoadResourceForFrame should use strings, not URLs.
https://bugs.webkit.org/show_bug.cgi?id=52476
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::shouldLoadResourceForFrame): Pass resourceURL as a string instead of
a URL, and rename from subresourceURL to resourceURL.
2011-01-14 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Fix for <rdar://problem/8711576> The web process should be able to read resources from the UI process.
Based on a patch by Ivan Krstić. This also makes the NSURLCache path a sandbox parameter.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
Encode and decode the uiProcessBundleResourcePath member variable.
* Shared/WebProcessCreationParameters.h:
Add uiProcessBundleResourcePath member variable.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
Set the uiProcessBundleResourcePath member variable.
* WebProcess/com.apple.WebProcess.sb:
Allow read-only access to UI_PROCESS_BUNDLE_RESOURCE_DIR and all subdirectories.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::initializeSandbox):
When initializing the sandbox, pass UI_PROCESS_BUNDLE_RESOURCE_DIR.
(WebKit::WebProcess::platformInitializeWebProcess):
Remove the code that would consume a sandbox extension for the url cache path.
2011-01-14 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Delay initializing the sandbox until we get the InitializeWebProcess message.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::initializeSandbox):
(WebKit::WebProcess::platformInitializeWebProcess):
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain):
2011-01-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Align import/export directives
https://bugs.webkit.org/show_bug.cgi?id=52208
* Shared/API/c/WKBase.h: Align import/export directives with
JavaScriptCore/API/JSBase.h.
2011-01-14 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: extract InspectorSettings from InspectorState,
simplify it.
https://bugs.webkit.org/show_bug.cgi?id=52429
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2011-01-13 Enrica Casucci <enrica@apple.com>
Reviewed by Darin Adler.
WebKit2: Add support for drag and drop
https://bugs.webkit.org/show_bug.cgi?id=52343
<rdar://problem/7660558>
This patch contains the changes required to support dropping content
in WebKit on the Mac. The DragData class has been extended to provide
additional context from the application (keyboard state, modal windows, etc.)
as well as information of the drag pasteboard being used.
The support for WebKit as drag source will be added with a separate patch.
* Shared/DragControllerAction.h: Added.
* UIProcess/API/mac/WKView.mm:
Added implemention of the methods required to add suport for a drop target.
To maintain asynchronous communication with the WebProcess, we always return
the previous calculated value for the drag operation.
(-[WKView _registerDraggedTypes]):
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView applicationFlags:]):
(-[WKView draggingEntered:]):
(-[WKView draggingUpdated:]):
(-[WKView draggingExited:]):
(-[WKView prepareForDragOperation:]):
(-[WKView performDragOperation:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::performDragControllerAction):
(WebKit::WebPageProxy::didPerformDragControllerAction):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::dragOperation):
(WebKit::WebPageProxy::resetDragOperation):
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebDragClient.cpp:
(WebKit::WebDragClient::willPerformDragDestinationAction):
(WebKit::WebDragClient::willPerformDragSourceAction):
(WebKit::WebDragClient::actionMaskForDrag):
(WebKit::WebDragClient::dragSourceActionMaskForPoint):
(WebKit::WebDragClient::startDrag):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-01-13 Dan Bernstein <mitz@apple.com>
Reviewed by John Sullivan.
Incorrect assertion in DrawingAreaImpl::scroll()
https://bugs.webkit.org/show_bug.cgi?id=52376
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::scroll): Changed to take the fast path if the rects have the same area.
This made the assertion valid, but I removed it anyway.
2011-01-12 Balazs Kelemen <kbalazs@webkit.org>
Unreviewed.
Getting rid of the unused 'viewportSize' argument in QWKPagePrivate:init.
The argument is unused since http://trac.webkit.org/changeset/75468.
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::QGraphicsWKView):
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::init):
* UIProcess/API/qt/qwkpage_p.h:
2011-01-12 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Implement DrawingAreaImpl::scroll
https://bugs.webkit.org/show_bug.cgi?id=52346
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::scroll):
If there is already an active scroll, compute the area of both scroll rects and
invalidate the smallest one. Compute a new dirty region if necessary and also
add the scroll repaint region to the dirty region.
(WebKit::DrawingAreaImpl::display):
Reset the scroll area and scroll delta.
* WebProcess/WebPage/DrawingAreaImpl.h:
Add scroll area and scroll delta member variables.
2011-01-12 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Region improvements
https://bugs.webkit.org/show_bug.cgi?id=52344
* Platform/Region.cpp:
(WebKit::Region::Shape::move):
(WebKit::Region::move):
Change Region::move to take an IntSize.
* Platform/Region.h:
(WebKit::intersect):
(WebKit::subtract):
(WebKit::move):
Add convenience functions.
2011-01-12 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed Qt build fix for r75661
* Shared/WebEvent.h: Don't declare phase() on non-Mac platforms.
2011-01-12 Beth Dakin <bdakin@apple.com>
Reviewed by Anders Carlsson.
Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309
Expose fixed layout through WebKit SPI
-and corresponding-
<rdar://problem/8844464>
And now with getters!
* UIProcess/API/C/WKPage.cpp:
(WKPageUseFixedLayout):
(WKPageFixedLayoutSize):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::useFixedLayout):
(WebKit::WebPageProxy::fixedLayoutSize):
2011-01-12 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=52337
PlatformWheelEvent should know about the scroll phase on the Mac
Add a phase parameter on Mac WebWheelEvent and pipe it down to PlatformWheelEvent.
* Shared/WebEvent.h:
(WebKit::WebWheelEvent::phase):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
* Shared/WebWheelEvent.cpp:
(WebKit::WebWheelEvent::WebWheelEvent):
(WebKit::WebWheelEvent::encode):
(WebKit::WebWheelEvent::decode):
* Shared/mac/WebEventFactory.mm:
(WebKit::phaseForEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
2011-01-12 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Get rid of an unneeded parameter from DrawingArea::scroll
https://bugs.webkit.org/show_bug.cgi?id=52336
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::scroll):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::scroll):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::scroll):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::scroll):
* WebProcess/WebPage/LayerBackedDrawingArea.h:
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::scroll):
* WebProcess/WebPage/TiledDrawingArea.h:
2011-01-12 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Get the new drawing area painting to the screen
https://bugs.webkit.org/show_bug.cgi?id=52331
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
Call setViewNeedsDisplay on all the update rects.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setViewNeedsDisplay):
Call through to the page client.
(WebKit::WebPageProxy::processDidCrash):
Null out the drawing area proxy.
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::paint):
Paint.
2011-01-12 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
More work on getting the drawing area proxy to paint
https://bugs.webkit.org/show_bug.cgi?id=52328
* UIProcess/API/mac/WKView.mm:
(-[WKView drawRect:]):
Handle the new drawing area.
* UIProcess/BackingStore.cpp:
(WebKit::BackingStore::BackingStore):
Assert that the size isn't empty.
* UIProcess/BackingStore.h:
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::incorporateUpdate):
Paint all update rects into the bitmap context.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::display):
Create a handle so the shareable bitmap will actually be transferred over.
2011-01-12 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2011-01-12 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Begin stubbing out some more BackingStore member functions
https://bugs.webkit.org/show_bug.cgi?id=52323
* UIProcess/BackingStore.cpp:
(WebKit::BackingStore::~BackingStore):
This was accidentally made into a constructor; it should be a destructor.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::paint):
Call the backing store.
(WebKit::DrawingAreaProxyImpl::update):
Incorporate the update.
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
Create the backing store if needed and incorporate the update.
* UIProcess/mac/BackingStoreMac.mm: Added.
(WebKit::BackingStore::platformInitialize):
Create a bitmap context.
(WebKit::BackingStore::paint):
(WebKit::BackingStore::incorporateUpdate):
Add stubs.
* WebKit2.xcodeproj/project.pbxproj:
Add BackingStoreMac.mm
2011-01-12 Beth Dakin <bdakin@apple.com>
Reviewed by Anders Carlsson.
Fix for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose
fixed layout through WebKit SPI
-and corresponding-
<rdar://problem/8844464>
Store useFixedLayout and fixedLayoutSize in the
WebPageCreationParameters and the WebPageProxy.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetUseFixedLayout):
(WKPageSetFixedLayoutSize):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setUseFixedLayout):
(WebKit::WebPageProxy::setFixedLayoutSize):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setUseFixedLayout):
(WebKit::WebPage::setFixedLayoutSize):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2011-01-12 Anders Carlsson <andersca@apple.com>
Reviewed by Beth Dakin.
Add BackingStore class
https://bugs.webkit.org/show_bug.cgi?id=52318
* UIProcess/BackingStore.cpp: Added.
(WebKit::BackingStore::create):
(WebKit::BackingStore::BackingStore):
* UIProcess/BackingStore.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
2011-01-12 Brady Eidson <beidson@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8837307>, <rdar://problem/8637038>, and https://bugs.webkit.org/show_bug.cgi?id=52248
Back/forward list recovery after a WebProcess crash is crashy itself.
Add an isEmpty() accessor so the WebProcess knows if it is actually restoring a session:
* Shared/SessionState.cpp:
(WebKit::SessionState::isEmpty):
* Shared/SessionState.h:
Keep track of the highest used itemID so a relaunched WebProcess can later be informed:
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
(WebKit::WebBackForwardListItem::highedUsedItemID):
* Shared/WebBackForwardListItem.h:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::generateHistoryItemID):
(WebKit::WebBackForwardListProxy::setHighestItemIDFromUIProcess):
(WebKit::WebBackForwardListProxy::addItemFromUIProcess): Remove a now-invalid ASSERT, as the UIProcess
now tells the WebProcess that a previous WebProcess created.
* WebProcess/WebPage/WebBackForwardListProxy.h:
Encode/decode data relevant to restoring a session on WebPage creation:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
If the WebProcess has crashed since the last load, change reload and the various back/forward APIs to
update the current back/forward item (if necessary) then relaunch the process:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::reattachToWebProcess): Renamed from "relaunch()" and made private.
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::loadURL):
(WebKit::WebPageProxy::loadURLRequest):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
Rename "RestoreSession" to "RestoreSessionAndNavigateToCurrentItem"
* WebProcess/WebPage/WebPage.messages.in:
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData):
Restore a session on page creation if the parameters include it:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Call restoreSession if session state exists.
(WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
(WebKit::WebPage::restoreSession):
* WebProcess/WebPage/WebPage.h:
2011-01-12 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Send Update and DidUpdate messages
https://bugs.webkit.org/show_bug.cgi?id=52316
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::update):
Add empty stub.
* UIProcess/DrawingAreaProxy.messages.in:
Add Update message.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::update):
Just send back a DidUpdate message.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::didUpdate):
Add empty stub.
* WebProcess/WebPage/DrawingArea.messages.in:
Add DidUpdate message.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::didUpdate):
Call display().
(WebKit::DrawingAreaImpl::display):
Send an Update message.
2011-01-12 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Make the new drawing area actually draw something
https://bugs.webkit.org/show_bug.cgi?id=52314
* Shared/UpdateInfo.cpp:
(WebKit::UpdateInfo::encode):
(WebKit::UpdateInfo::decode):
Encode and decode newly added fields.
* Shared/UpdateInfo.h:
Add a vector of update rects and a handle for the sharable bitmap.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::display):
Get the individual rects from the region and paint them into the shareable bitmap.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mainFrameHasCustomRepresentation):
* WebProcess/WebPage/WebPage.h:
Add helper function.
* WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
(WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
Use helper function.
2011-01-12 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add UpdateInfo class
https://bugs.webkit.org/show_bug.cgi?id=52306
* Shared/UpdateInfo.cpp: Added.
(WebKit::UpdateInfo::encode):
(WebKit::UpdateInfo::decode):
* Shared/UpdateInfo.h: Added.
(WebKit::UpdateInfo::UpdateInfo):
* WebKit2.xcodeproj/project.pbxproj:
2011-01-12 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
More work on the new drawing area implementation
https://bugs.webkit.org/show_bug.cgi?id=52302
* Platform/Region.cpp:
(WebKit::Region::Shape::segments_end):
segments_end could end up returning an iterator that is one element past the Vector data, so
we can't use operator[] since that will assert.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
Initialize the timer.
(WebKit::DrawingAreaImpl::setNeedsDisplay):
Unite the rect with the dirty region and schedule a display.
(WebKit::DrawingAreaImpl::setSize):
Tell the web page to resize.
(WebKit::DrawingAreaImpl::scheduleDisplay):
Start a display timer if needed.
(WebKit::DrawingAreaImpl::display):
Add a stub.
2011-01-12 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build fix after r75527. Rename 'BackingStoreCairo.cpp'
to 'ShareableBitmapCairo.cpp' to match VS project changes.
* Shared/cairo/BackingStoreCairo.cpp: Removed.
* Shared/cairo/ShareableBitmapCairo.cpp: Copied from Shared/cairo/BackingStoreCairo.cpp.
2011-01-11 Jeff Miller <jeffm@apple.com>
Reviewed by John Sullivan.
WebKit2: "Webpages not responding" dialog appears when <select> popup menu is showing
https://bugs.webkit.org/show_bug.cgi?id=52242
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenu):
On Windows, stop the responsiveness timer before calling showPopupMenu().
2011-01-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders Carlsson.
UIProcess kills the WebProcess sometimes when detached frames exist
https://bugs.webkit.org/show_bug.cgi?id=52227
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didSaveFrameToPageCache): Don't consider the message invalid
if it came in for a detached frame.
2011-01-11 Anders Carlsson <andersca@apple.com>
Build fix.
* WebKit2.xcodeproj/project.pbxproj:
2011-01-11 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add a Region class which represents a graphical region
https://bugs.webkit.org/show_bug.cgi?id=52255
* Platform/Region.cpp: Added.
(WebKit::Region::Region):
(WebKit::Region::rects):
(WebKit::Region::Shape::Shape):
(WebKit::Region::Shape::appendSpan):
(WebKit::Region::Shape::canCoalesce):
(WebKit::Region::Shape::appendSpans):
(WebKit::Region::Shape::appendSegment):
(WebKit::Region::Shape::spans_begin):
(WebKit::Region::Shape::spans_end):
(WebKit::Region::Shape::segments_begin):
(WebKit::Region::Shape::segments_end):
(WebKit::Region::Shape::dump):
(WebKit::Region::Shape::bounds):
(WebKit::Region::Shape::move):
(WebKit::Region::Shape::swap):
(WebKit::Region::Shape::shapeOperation):
(WebKit::Region::Shape::UnionOperation::trySimpleOperation):
(WebKit::Region::Shape::unionShapes):
(WebKit::Region::Shape::IntersectOperation::trySimpleOperation):
(WebKit::Region::Shape::intersectShapes):
(WebKit::Region::Shape::SubtractOperation::trySimpleOperation):
(WebKit::Region::Shape::subtractShapes):
(WebKit::Region::dump):
(WebKit::Region::intersect):
(WebKit::Region::unite):
(WebKit::Region::subtract):
(WebKit::Region::move):
* Platform/Region.h: Added.
(WebKit::Region::bounds):
(WebKit::Region::isEmpty):
(WebKit::Region::Span::Span):
(WebKit::Region::Shape::isEmpty):
* WebKit2.xcodeproj/project.pbxproj:
2011-01-11 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Add DidSetSize message
https://bugs.webkit.org/show_bug.cgi?id=52254
* DerivedSources.make:
Add DrawingAReaProxy.messages.in.
* Platform/CoreIPC/MessageID.h:
Add DrawingAreaProxy message class.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::didSetSize):
Add CoreIPC message handler function.
* UIProcess/DrawingAreaProxy.messages.in: Added.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::didSetSize):
Add stub.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
Handle DrawingAreaProxy messages.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setSize):
Send a DidSetSize message for now.
2011-01-11 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Fix spelling mistake. Sharable -> Shareable.
* Shared/API/c/WKImage.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toImageOptions):
* Shared/ImageOptions.h:
* Shared/WebImage.cpp:
(WebKit::WebImage::create):
2011-01-11 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add SetSize message
https://bugs.webkit.org/show_bug.cgi?id=52247
* DerivedSources.make:
Add DrawingArea.messages.in
* Platform/CoreIPC/MessageID.h:
Add DrawingArea message class.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::sizeDidChange):
Call sendSetSize.
(WebKit::DrawingAreaProxyImpl::sendSetSize):
Send a SetSize message.
* UIProcess/DrawingAreaProxyImpl.h:
Add setSize override.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setSize):
Add setSize member function.
* WebProcess/WebPage/DrawingArea.messages.in: Added.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
* WebProcess/WebPage/DrawingAreaImpl.h:
Add setSize.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage):
Handle drawing area messages.
2011-01-11 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Replace ASSERTs with FIXMEs.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::sizeDidChange):
(WebKit::DrawingAreaProxyImpl::setPageIsVisible):
2011-01-11 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add DrawingAreaImpl skeleton class
https://bugs.webkit.org/show_bug.cgi?id=52246
* UIProcess/API/mac/WKView.mm:
(useNewDrawingArea):
New function which controls which drawing area to use, through an environment variable.
(-[WKView drawRect:]):
Bail if we're using the new drawing area (for now).
(-[WKView WebKit::]):
Create a DrawingAreaProxyImpl when asked to.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
Create a DrawingAreaImpl when asked to.
* WebProcess/WebPage/DrawingAreaImpl.cpp: Added.
* WebProcess/WebPage/DrawingAreaImpl.h: Added.
Add DrawingAreaImpl class.
2011-01-11 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add Mac-only DrawingAreaProxyImpl class skeleton
https://bugs.webkit.org/show_bug.cgi?id=52243
This is the proxy side of a new drawing area implementation. This is Mac only for now
while the design is being fleshed out.
* Shared/DrawingAreaInfo.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
* UIProcess/DrawingAreaProxyImpl.cpp: Added.
(WebKit::DrawingAreaProxyImpl::create):
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::didReceiveMessage):
(WebKit::DrawingAreaProxyImpl::didReceiveSyncMessage):
(WebKit::DrawingAreaProxyImpl::paint):
(WebKit::DrawingAreaProxyImpl::sizeDidChange):
(WebKit::DrawingAreaProxyImpl::setPageIsVisible):
(WebKit::DrawingAreaProxyImpl::attachCompositingContext):
(WebKit::DrawingAreaProxyImpl::detachCompositingContext):
* UIProcess/DrawingAreaProxyImpl.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
2011-01-11 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):
2011-01-11 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Rename ShareableBitmap::createSharable to createShareable
https://bugs.webkit.org/show_bug.cgi?id=52234
* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::createShareable):
* Shared/ShareableBitmap.h:
* Shared/WebImage.cpp:
(WebKit::WebImage::create):
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::geometryDidChange):
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
2011-01-11 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Rename BackingStore to ShareableBitmap
https://bugs.webkit.org/show_bug.cgi?id=52228
* GNUmakefile.am:
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::geometryDidChange):
* PluginProcess/PluginControllerProxy.h:
* Shared/API/c/cg/WKImageCG.cpp:
(WKImageCreateCGImage):
* Shared/BackingStore.cpp: Removed.
* Shared/BackingStore.h: Removed.
* Shared/PlatformPopupMenuData.cpp:
(WebKit::PlatformPopupMenuData::decode):
* Shared/PlatformPopupMenuData.h:
* Shared/ShareableBitmap.cpp: Copied from WebKit2/Shared/BackingStore.cpp.
(WebKit::ShareableBitmap::create):
(WebKit::ShareableBitmap::createSharable):
(WebKit::ShareableBitmap::createHandle):
(WebKit::ShareableBitmap::ShareableBitmap):
(WebKit::ShareableBitmap::~ShareableBitmap):
(WebKit::ShareableBitmap::resize):
(WebKit::ShareableBitmap::data):
* Shared/ShareableBitmap.h: Copied from WebKit2/Shared/BackingStore.h.
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):
* Shared/WebImage.cpp:
(WebKit::WebImage::create):
(WebKit::WebImage::WebImage):
(WebKit::WebImage::~WebImage):
(WebKit::WebImage::size):
* Shared/WebImage.h:
(WebKit::WebImage::bitmap):
* Shared/cairo/BackingStoreCairo.cpp:
(WebKit::ShareableBitmap::createGraphicsContext):
(WebKit::ShareableBitmap::paint):
* Shared/cg/BackingStoreCG.cpp: Removed.
* Shared/cg/ShareableBitmapCG.cpp: Copied from WebKit2/Shared/cg/BackingStoreCG.cpp.
(WebKit::ShareableBitmap::createGraphicsContext):
(WebKit::ShareableBitmap::paint):
* Shared/gtk/BackingStoreGtk.cpp: Removed.
* Shared/gtk/ShareableBitmapGtk.cpp: Copied from WebKit2/Shared/gtk/BackingStoreGtk.cpp.
(WebKit::ShareableBitmap::createGraphicsContext):
(WebKit::ShareableBitmap::paint):
* Shared/qt/BackingStoreQt.cpp: Removed.
* Shared/qt/ShareableBitmapQt.cpp: Copied from WebKit2/Shared/qt/BackingStoreQt.cpp.
(WebKit::ShareableBitmap::createGraphicsContext):
(WebKit::ShareableBitmap::paint):
* UIProcess/FindIndicator.cpp:
(WebKit::FindIndicator::create):
(WebKit::FindIndicator::FindIndicator):
* UIProcess/FindIndicator.h:
(WebKit::FindIndicator::contentImage):
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::geometryDidChange):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotInViewCoordinates):
(WebKit::WebPage::snapshotInDocumentCoordinates):
* win/WebKit2.vcproj:
2011-01-11 John Sullivan <sullivan@apple.com>
Reviewed by Anders Carlsson.
[WKView setFrameSize:] derefs _page->drawingArea() without null check
<https://bugs.webkit.org/show_bug.cgi?id=52231>
* UIProcess/API/mac/WKView.mm:
(-[WKView setFrameSize:]):
Null check drawingArea(). This is OK because if it doesn't exist then it will be
created later with the correct initial size.
2011-01-07 Enrica Casucci <enrica@apple.com>
Reviewed by Alexey Proskuryakov.
Paste and drag and drop use different code paths to interact with the pasteboard.
https://bugs.webkit.org/show_bug.cgi?id=52093
The change consists in a refactoring of the code to have only one class that
deals with the pasteboard on Mac.
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Added two methods to provide to WebCore functionality
exposed by NSURLExtras.
(WebKit::WebEditorClient::canonicalizeURL):
(WebKit::WebEditorClient::canonicalizeURLString):
2011-01-11 Jessie Berlin <jberlin@apple.com>
Reviewed by Anders Carlsson and Sam Weinig.
Fix crash on launch on Windows.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::onSizeEvent):
The drawing area is no longer initialized before the WebView is created and the first
onSize is receieved.
2011-01-11 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Automatically reinitialize the web page on relaunch
https://bugs.webkit.org/show_bug.cgi?id=52224
<rdar://problem/8765695>
* UIProcess/API/mac/WKView.mm:
(-[WKView _didRelaunchProcess]):
Remove call to reinitializeWebPage.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::relaunch):
Call initializeWebPage().
(WebKit::WebPageProxy::initializeWebPage):
Assert that the web page is valid here.
* UIProcess/WebPageProxy.h:
Remove reinitializeWebPage.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::didRelaunchProcess):
Remove call to reinitializeWebPage.
2011-01-10 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Pass the view size to the DrawingAreaProxy constructor
https://bugs.webkit.org/show_bug.cgi?id=52189
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewSize):
* UIProcess/WebPageProxy.h:
2011-01-11 Sam Weinig <sam@webkit.org>
Roll r75460 back in with build fix.
2011-01-11 Anders Carlsson <andersca@apple.com>
Reviewed by Andreas Kling.
Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
https://bugs.webkit.org/show_bug.cgi?id=52184
Qt part made my Balazs Kelemen.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createDrawingAreaProxy):
Call -[WKView _createDrawingAreaProxy].
(WebKit::PageClientImpl::setViewNeedsDisplay):
Call setNeedsDisplayInRect on the WKView.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
No need to set the drawing area proxy anymore.
(-[WKView _createDrawingAreaProxy]):
Create a chunked update drawing area proxy for now.
* UIProcess/API/qt/qgraphicswkview.cpp:
Added a QGraphicsItem* member that is initialized in init to the accociated view.
Implement the new functions. This is a temporary solution, in the long term the view
and the page should be decoupled.
(QGraphicsWKView::QGraphicsWKView):
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::QWKPagePrivate):
(QWKPagePrivate::init):
(QWKPagePrivate::createDrawingAreaProxy):
(QWKPagePrivate::setViewNeedsDisplay):
* UIProcess/API/qt/qwkpage.h:
* UIProcess/API/qt/qwkpage_p.h:
* UIProcess/PageClient.h:
Add new pure virtual member functions.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::reinitializeWebPage):
Set the new drawing area proxy.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
No need to set the drawing area proxy anymore.
(WebKit::WebView::createDrawingAreaProxy):
Create a chunked update drawing area proxy for now.
(WebKit::WebView::setViewNeedsDisplay):
Invalidate the window.
2011-01-11 Adam Roben <aroben@apple.com>
Fix a typo in a comment
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2011-01-10 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r75460.
http://trac.webkit.org/changeset/75460
https://bugs.webkit.org/show_bug.cgi?id=52191
It broke Qt-WK2 build (Requested by Ossy on #webkit).
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Removed.
* UIProcess/API/C/WKGeolocationPermissionRequest.h: Removed.
* UIProcess/API/C/WKPage.h:
* UIProcess/API/C/WebKit2.h:
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::QWKPage):
* UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Removed.
* UIProcess/GeolocationPermissionRequestManagerProxy.h: Removed.
* UIProcess/GeolocationPermissionRequestProxy.cpp: Removed.
* UIProcess/GeolocationPermissionRequestProxy.h: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::processDidCrash):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
* UIProcess/WebUIClient.h:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Removed.
* WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Removed.
* WebProcess/Geolocation/WebGeolocationManager.cpp:
* WebProcess/Geolocation/WebGeolocationManager.h:
* WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
(WebKit::WebGeolocationClient::requestPermission):
(WebKit::WebGeolocationClient::cancelPermissionRequest):
* WebProcess/WebCoreSupport/WebGeolocationClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
2011-01-10 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed, rolling out r75459
http://trac.webkit.org/changeset/75459
Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
https://bugs.webkit.org/show_bug.cgi?id=52184
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
* UIProcess/API/mac/WKView.mm:
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/API/qt/qwkpage.cpp:
* UIProcess/API/qt/qwkpage_p.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::reinitializeWebPage):
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
* UIProcess/win/WebView.h:
2011-01-10 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Remove size parameter to WebPageProxy::initializeWebPage
https://bugs.webkit.org/show_bug.cgi?id=52188
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::init):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage):
* UIProcess/WebPageProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
2011-01-10 Anders Carlsson <andersca@apple.com>
Didn't mean to land this.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage):
* UIProcess/WebPageProxy.h:
2011-01-10 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
WebPageProxy::creationParameters no longer needs to take a size
https://bugs.webkit.org/show_bug.cgi?id=52187
WebPageProxy::creationParameters can just ask the page client for the view size now.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::reinitializeWebPage):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
2011-01-10 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Pass information about the view in the WebPageCreationParameters
https://bugs.webkit.org/show_bug.cgi?id=52186
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
Encode and decode the state flags.
* Shared/WebPageCreationParameters.h:
Add new state flags.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
Initialize the state flags.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Update the page state from the state flags.
2011-01-10 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Make Geolocation features work in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=52078
Step 2 - Add support for requesting and granting permission for geolocation.
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* UIProcess/API/C/WebKit2.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Added.
* UIProcess/API/C/WKGeolocationPermissionRequest.h: Added.
Add new API type, WKGeolocationPermissionRequestRef.
* UIProcess/API/C/WKPage.h:
Add new UIClient function for requesting permission.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::QWKPage):
Stub out the UIClient.
* UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Added.
* UIProcess/GeolocationPermissionRequestManagerProxy.h: Added.
* UIProcess/GeolocationPermissionRequestProxy.cpp: Added.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
* UIProcess/WebUIClient.h:
* WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Added.
* WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Added.
* WebProcess/Geolocation/WebGeolocationManager.cpp:
* WebProcess/Geolocation/WebGeolocationManager.h:
* WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
* WebProcess/WebCoreSupport/WebGeolocationClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::didReceiveGeolocationPermissionDecision):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::geolocationPermissionRequestManager):
* WebProcess/WebPage/WebPage.messages.in:
Track the permission request through both sides of the process divide.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
Add new files.
2011-01-10 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
https://bugs.webkit.org/show_bug.cgi?id=52184
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createDrawingAreaProxy):
Call -[WKView _createDrawingAreaProxy].
(WebKit::PageClientImpl::setViewNeedsDisplay):
Call setNeedsDisplayInRect on the WKView.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
No need to set the drawing area proxy anymore.
(-[WKView _createDrawingAreaProxy]):
Create a chunked update drawing area proxy for now.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::createDrawingAreaProxy):
(QWKPagePrivate::setViewNeedsDisplay):
Add stubs.
* UIProcess/PageClient.h:
Add new pure virtual member functions.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::reinitializeWebPage):
Set the new drawing area proxy.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
No need to set the drawing area proxy anymore.
(WebKit::WebView::createDrawingAreaProxy):
Create a chunked update drawing area proxy for now.
(WebKit::WebView::setViewNeedsDisplay):
Invalidate the window.
2011-01-10 Anders Carlsson <andersca@apple.com>
Fix Windows build again.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::isViewWindowActive):
2011-01-10 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::onShowWindowEvent):
2011-01-10 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Use a pull model for view state changes
https://bugs.webkit.org/show_bug.cgi?id=52175
Instead of having the WKView call setFocused, setActive etc on the WebPageProxy, the
WKView now simply informs the WebPageProxy what has changed, using the WebPageProxy::viewStateDidChange
function. The WebPageProxy can then fetch the relevant information using newly added PageClient functions.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::viewSize):
(WebKit::PageClientImpl::isViewWindowActive):
(WebKit::PageClientImpl::isViewFocused):
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::isViewInWindow):
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView becomeFirstResponder]):
(-[WKView resignFirstResponder]):
(-[WKView viewDidMoveToWindow]):
(-[WKView _windowDidBecomeKey:]):
(-[WKView _windowDidResignKey:]):
(-[WKView viewDidHide]):
(-[WKView viewDidUnhide]):
(-[WKView _isFocused]):
(-[WKView _didRelaunchProcess]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::focusInEvent):
(QGraphicsWKView::focusOutEvent):
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::QWKPagePrivate):
(QWKPagePrivate::viewSize):
(QWKPagePrivate::isViewWindowActive):
(QWKPagePrivate::isViewFocused):
(QWKPagePrivate::isViewVisible):
(QWKPagePrivate::isViewInWindow):
* UIProcess/API/qt/qwkpage_p.h:
* UIProcess/PageClient.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createWebPage):
* UIProcess/WebContext.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::create):
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::viewStateDidChange):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::createWebPage):
* UIProcess/WebProcessProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
(WebKit::WebView::onSetFocusEvent):
(WebKit::WebView::onKillFocusEvent):
(WebKit::WebView::onShowWindowEvent):
(WebKit::WebView::updateActiveState):
(WebKit::WebView::viewSize):
(WebKit::WebView::isViewWindowActive):
(WebKit::WebView::isViewFocused):
(WebKit::WebView::isViewVisible):
(WebKit::WebView::isViewInWindow):
(WebKit::WebView::didRelaunchProcess):
(WebKit::WebView::setIsInWindow):
* UIProcess/win/WebView.h:
2011-01-10 Adam Roben <aroben@apple.com>
Don't pass a reference type to va_start
C++ says this results in undefined behavior:
The restrictions that ISO C places on the second parameter to the
va_start() macro in header <stdarg.h> are different in this
International Standard. The parameter parmN is the identifier of
the rightmost parameter in the variable parameter list of the
function definition (the one just before the ...).221) If the
parameter parmN is declared with a function, array, or reference
type, or with a type that is not compatible with the type that
results when passing an argument for which there is no parameter,
the behavior is undefined.
Fixes <http://webkit.org/b/52168> Title of standalone image document
includes bogus image dimensions
Rubber-stamped by Eric Seidel.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::formatLocalizedString): Don't use a reference type for
|format|.
2011-01-10 Siddharth Mathur <siddharth.mathur@nokia.com>
Reviewed by Eric Seidel.
Support for ARM's RVCT(ARMCC) compiler in import/export directives
https://bugs.webkit.org/show_bug.cgi?id=52146
* Shared/API/c/WKBase.h:
2011-01-10 Sam Weinig <sam@webkit.org>
Fix the build.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2011-01-10 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Make Geolocation features work in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=52078
Step 1 - Add enough support to get position data from a provider.
This does not include permission support.
* Platform/CoreIPC/HandleMessage.h:
Add #include of Arguments.h for CoreIPC::In and Out definitions.
* Platform/CoreIPC/MessageID.h:
Add new message types.
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
Add new API types.
* Shared/WebGeolocationPosition.cpp: Added.
* Shared/WebGeolocationPosition.h: Added.
Internal position representation.
* UIProcess/API/C/WKAPICast.h:
Add casts for new API types.
* UIProcess/API/C/WKContext.cpp:
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKGeolocationManager.cpp: Added.
* UIProcess/API/C/WKGeolocationManager.h: Added.
* UIProcess/API/C/WKGeolocationPosition.cpp: Added.
* UIProcess/API/C/WKGeolocationPosition.h: Added.
* UIProcess/API/C/WebKit2.h:
Add API to provide and control geolocation data.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::processDidClose):
(WebKit::WebContext::didReceiveMessage):
* UIProcess/WebContext.h:
(WebKit::WebContext::geolocationManagerProxy):
* UIProcess/WebGeolocationManagerProxy.cpp: Added.
(WebKit::WebGeolocationManagerProxy::create):
(WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
(WebKit::WebGeolocationManagerProxy::~WebGeolocationManagerProxy):
(WebKit::WebGeolocationManagerProxy::invalidate):
(WebKit::WebGeolocationManagerProxy::initializeProvider):
(WebKit::WebGeolocationManagerProxy::providerDidChangePosition):
(WebKit::WebGeolocationManagerProxy::providerDidFailToDeterminePosition):
(WebKit::WebGeolocationManagerProxy::didReceiveMessage):
(WebKit::WebGeolocationManagerProxy::startUpdating):
(WebKit::WebGeolocationManagerProxy::stopUpdating):
* UIProcess/WebGeolocationManagerProxy.h: Added.
(WebKit::WebGeolocationManagerProxy::clearContext):
(WebKit::WebGeolocationManagerProxy::type):
* UIProcess/WebGeolocationManagerProxy.messages.in: Added.
* UIProcess/WebGeolocationProvider.cpp: Added.
(WebKit::WebGeolocationProvider::startUpdating):
(WebKit::WebGeolocationProvider::stopUpdating):
* UIProcess/WebGeolocationProvider.h: Added.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage):
* WebProcess/Geolocation: Added.
* WebProcess/Geolocation/WebGeolocationManager.cpp: Added.
(WebKit::WebGeolocationManager::WebGeolocationManager):
(WebKit::WebGeolocationManager::~WebGeolocationManager):
(WebKit::WebGeolocationManager::didReceiveMessage):
(WebKit::WebGeolocationManager::registerWebPage):
(WebKit::WebGeolocationManager::unregisterWebPage):
(WebKit::WebGeolocationManager::didChangePosition):
(WebKit::WebGeolocationManager::didFailToDeterminePosition):
* WebProcess/Geolocation/WebGeolocationManager.h: Added.
* WebProcess/Geolocation/WebGeolocationManager.messages.in: Added.
* WebProcess/WebCoreSupport/WebGeolocationClient.cpp: Added.
(WebKit::WebGeolocationClient::geolocationDestroyed):
(WebKit::WebGeolocationClient::startUpdating):
(WebKit::WebGeolocationClient::stopUpdating):
(WebKit::WebGeolocationClient::setEnableHighAccuracy):
(WebKit::WebGeolocationClient::lastPosition):
(WebKit::WebGeolocationClient::requestPermission):
(WebKit::WebGeolocationClient::cancelPermissionRequest):
* WebProcess/WebCoreSupport/WebGeolocationClient.h: Added.
(WebKit::WebGeolocationClient::WebGeolocationClient):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::didReceiveMessage):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::geolocationManager):
Pipe geolocation positions/errors from the UIProcess to the WebProcess.
* DerivedSources.make:
* DerivedSources.pro:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Common.vsprops:
* win/WebKit2Generated.make:
Add new files.
2011-01-10 Martin Robinson <mrobinson@igalia.com>
GTK+ build fix. Continue to fix 'make dist.'
* GNUmakefile.am: Remove more non-existent files from the WebKit2 build.
2011-01-10 Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
[GTK] Remove webkit2 files that are still not added to the
repository from the makefile
https://bugs.webkit.org/show_bug.cgi?id=52145
This change is required for the release, we can add the lines
again to the makefiles with the patches adding the files.
* GNUmakefile.am:
2011-01-10 Andreas Kling <kling@webkit.org>
Reviewed by Simon Hausmann.
[Qt] [WK2] MiniBrowser does not load pages opened in new windows
https://bugs.webkit.org/show_bug.cgi?id=52111
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::context): Implement this method.
2011-01-09 Dan Bernstein <mitz@apple.com>
Reviewed by Simon Fraser.
<rdar://problem/8839498> Assertion failure in KURL::KURL when calling WKURLRequestCreateWithWKURL with a non-parsed URL
https://bugs.webkit.org/show_bug.cgi?id=52132
* Shared/API/c/WKURLRequest.cpp:
(WKURLRequestCreateWithWKURL): Parse the URL.
* Shared/WebString.h: Fixed a comment.
* Shared/WebURL.h: Ditto.
2011-01-09 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
Reviewed by Martin Robinson.
Changes to add Process Launcher and Thread Launcher implementation to the WebKit2 GTK port.
The main() implementation for WebKitWebProcess binary to launch Web process from UI process.
https://bugs.webkit.org/show_bug.cgi?id=48511
* UIProcess/Launcher/gtk: Added.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: Added. GTK (UNIX_X11 specific) implementation
(WebKit::ProcessLauncher::launchProcess):
(WebKit::ProcessLauncher::terminateProcess):
(WebKit::ProcessLauncher::platformInvalidate):
* UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
(WebKit::ThreadLauncher::createWebThread):
* WebProcess/gtk: Added.
* WebProcess/gtk/WebProcessGtk.cpp: Added. The stubbed implementations of virtual functions of WebProcess.h for GTK port.
(WebKit::WebProcess::platformSetCacheModel):
(WebKit::WebProcess::platformClearResourceCaches):
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::platformShutdown):
* WebProcess/gtk/WebProcessMainGtk.cpp: Added. The WebProcessMain call which initiates the Web Process for GTK port.
(WebKit::WebProcessMainGtk):
* WebProcess/gtk/WebProcessMainGtk.h: Added. The WebProcessMain declaration for Web Process for GTK port.
* gtk/MainGtk.cpp: Added. The main function implementation for binary WebKitWebProcess.
(main):
2011-01-07 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
Reviewed by Martin Robinson.
[GTK] WebKit2 GNUmakefile is out of date from trunk
https://bugs.webkit.org/show_bug.cgi?id=51883
* GNUmakefile.am: Updated sources list as per latest revision
* Platform/gtk/RunLoopGtk.cpp:
(RunLoop::TimerBase::start):
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::scheduleWorkAfterDelay):
* Shared/gtk/BackingStoreGtk.cpp:
(WebKit::BackingStore::paint):
* WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
(WebKit::InjectedBundle::load):
* WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
(WebKit::NetscapePlugin::platformInvalidate):
2011-01-08 Dan Bernstein <mitz@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8812759> In WebKit2, PDF view settings (mode and scale) do not stick
https://bugs.webkit.org/show_bug.cgi?id=52118
* Shared/WebPreferencesStore.cpp:
(WebKit::WebPreferencesStore::encode): Encode the double values map.
(WebKit::WebPreferencesStore::decode): Decode the double values map.
(WebKit::defaultValueForKey): Added double instance.
(WebKit::WebPreferencesStore::setDoubleValueForKey): Added.
(WebKit::WebPreferencesStore::getDoubleValueForKey): Added.
* Shared/WebPreferencesStore.h: Added PDFScaleFactor and PDFDisplayMode preferences.
* UIProcess/API/mac/PDFViewController.mm:
(-[WKPDFView initWithFrame:PDFViewController:WebKit::]): Initialize the _pdfViewController ivar.
(-[WKPDFView invalidate]): Changed 'nil' to '0' in assignment to a non-Objective-C pointer.
(-[WKPDFView setDocument:]): Added.
(-[WKPDFView _applyPDFPreferences]): Added.
(-[WKPDFView _updatePreferences:]): Added.
(-[WKPDFView _updatePreferencesSoon]): Added.
(-[WKPDFView _scaleOrDisplayModeOrPageChanged:]): Added.
(-[WKPDFView viewDidMoveToWindow]): Added. Starts observing the PDF view for changes to scale
and display mode.
(-[WKPDFView viewWillMoveToWindow:]): Added. Stops observing for changes.
(WebKit::PDFViewController::setPDFDocumentData): Changed to call throguh -[WKPDFView setDocument:].
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::updateDoubleValueForKey): Added.
* UIProcess/WebPreferences.h:
* UIProcess/cf/WebPreferencesCF.cpp:
(WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added empty implementation.
* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added stub.
* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::setDoubleValueIfInUserDefaults): Added.
(WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added.
* UIProcess/qt/WebPreferencesQt.cpp:
(WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added.
2011-01-08 Dan Bernstein <mitz@apple.com>
Reviewed by Maciej Stachowiak.
In WebKit2, page zooming does not work with PDF
https://bugs.webkit.org/show_bug.cgi?id=52113
* UIProcess/API/C/WKPage.cpp:
(WKPageSupportsTextZoom): Added. Returns whether the page currently supports text-only zoom.
* UIProcess/API/C/WKPage.h:
* UIProcess/API/mac/PDFViewController.h: Made pdfDocumentClass() private and declared new
member functions.
* UIProcess/API/mac/PDFViewController.mm:
(WebKit::PDFViewController::zoomFactor): Added.
(WebKit::PDFViewController::setZoomFactor): Added.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::customRepresentationZoomFactor): Added. Calls through to the WKView.
(WebKit::PageClientImpl::setCustomRepresentationZoomFactor): Ditto.
* UIProcess/API/mac/WKView.mm:
(-[WKView _customRepresentationZoomFactor]): Added. Calls through to the PDFViewController.
(-[WKView _setCustomRepresentationZoomFactor:]): Ditto.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/API/qt/qwkpage_p.h:
(QWKPagePrivate::customRepresentationZoomFactor): Added.
(QWKPagePrivate::setCustomRepresentationZoomFactor): Added.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Coding style fix.
(WebKit::WebPageProxy::supportsTextZoom): Added. Returns false if the main frame has a custom
representation or is a standalone image, true otherwise.
(WebKit::WebPageProxy::setTextZoomFactor): Bail out if the main frame has a custom representation.
(WebKit::WebPageProxy::pageZoomFactor): If the main frame has a custom representation, get the
zoom factor from the page client.
(WebKit::WebPageProxy::setPageZoomFactor): If the main frame has a custom representation, have
the client set the zoom factor.
(WebKit::WebPageProxy::setPageAndTextZoomFactors): Ditto.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::textZoomFactor): Changed to return 1 if the main frame has a custom
representation.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::customRepresentationZoomFactor): Added.
(WebKit::WebView::setCustomRepresentationZoomFactor): Added.
* UIProcess/win/WebView.h:
2011-01-08 Jeff Miller <jeffm@apple.com>
Reviewed by Jon Honeycutt.
Add WKBundleFrameGetVisibleContentBounds().
https://bugs.webkit.org/show_bug.cgi?id=52089
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetVisibleContentBounds):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
Added WKBundleFrameGetVisibleContentBounds().
2011-01-08 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt][WK2] QWKView does not propagate show and hide events to the drawing area
https://bugs.webkit.org/show_bug.cgi?id=52108
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::event): Call setPageIsVisible on the drawing area
if the event is Show or Hide.
2011-01-08 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt][Symbian] Make sure WebKit headers are included before platform headers on Symbian
https://bugs.webkit.org/show_bug.cgi?id=31273
On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
are included before platform headers. On all other platforms continue to use
INCLUDEPATH (as before).
* WebKit2.pro:
2011-01-08 Csaba Osztrogonác <ossy@webkit.org>
[Qt][WK2] Unreviewed buildfix after r75313.
* Scripts/generate-forwarding-headers.pl:
2011-01-08 Adam Barth <abarth@webkit.org>
Moving WebCore changes the layout of the Qt build directory as well,
which means we need to change where we look for these generated files.
* DerivedSources.pro:
2011-01-07 Adam Barth <abarth@webkit.org>
Rubber-stamped by Eric Seidel.
Move WebCore to Source
https://bugs.webkit.org/show_bug.cgi?id=52050
* WebKit2.pro:
2011-01-07 Stephanie Lewis <slewis@apple.com>
Reviewed by Geoff Garen.
<rdar://problem/8649617> Migrate memory tracking from Safari to WebKit
https://bugs.webkit.org/show_bug.cgi?id=50799 Add Memory Sampler to WebKit
Add a sampler for printing off process memory statistics.
This tool can track:
WebCore
- FastMalloc allocations bytes (in use or committed)
JavaScriptCore
- Garbage collector heap bytes (in use or committed)
- Stack bytes (committed only!)
- JIT Code bytes (committed only!)
Malloc zones
- In use bytes for the following zones:
* Default zone (in use or committed)
* DispCon zone (in use or committed)
* Purgable zone (in use or committed)
Task Info
- Resident size memory (RSIZE)
Data collected is dumped to a temporary file.
Create a sandbox for a temporary file.
* Shared/SandboxExtension.h:
(WebKit::SandboxExtension::createHandleForTemporaryFile):
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::createHandleForTemporaryFile):
Memory Sampler files
* Shared/WebMemorySampler.cpp: Added.
(WebKit::WebMemorySampler::shared):
(WebKit::WebMemorySampler::WebMemorySampler):
(WebKit::WebMemorySampler::start):
(WebKit::WebMemorySampler::initializeTimers):
(WebKit::WebMemorySampler::stop):
(WebKit::WebMemorySampler::isRunning):
(WebKit::WebMemorySampler::initializeTempLogFile):
(WebKit::WebMemorySampler::initializeSandboxedLogFile):
(WebKit::WebMemorySampler::writeHeaders):
(WebKit::WebMemorySampler::sampleTimerFired):
(WebKit::WebMemorySampler::stopTimerFired):
(WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
* Shared/WebMemorySampler.h: Added.
* Shared/mac/WebMemorySampler.mac.mm: Added.
(WebKit::WebMemorySampler::sampleSystemMalloc):
(WebKit::WebMemorySampler::sampleProcessCommittedBytes):
(WebKit::WebMemorySampler::processName):
(WebKit::WebMemorySampler::sampleWebKit):
API to start and stop UIProcess and WebProcess sampling.
* UIProcess/API/C/WKContext.cpp:
(WKContextStartMemorySampler):
(WKContextStopMemorySampler):
* UIProcess/API/C/WKContext.h:
Send messages to WebProcess to start and stop memory sampling.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::processDidFinishLaunching):
(WebKit::WebContext::startMemorySampler):
(WebKit::WebContext::stopMemorySampler):
* UIProcess/WebContext.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::startMemorySampler):
(WebKit::WebProcess::stopMemorySampler):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2011-01-07 Jessie Berlin <jberlin@apple.com>
Reviewed by Dan Bernstein.
WebKit2: Need WKBundleFrameCopyProvisionalURL
https://bugs.webkit.org/show_bug.cgi?id=52083
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameCopyProvisionalURL):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::provisionalURL):
Grab the URL from the provisional document loader.
* WebProcess/WebPage/WebFrame.h:
2011-01-07 James Robinson <jamesr@chromium.org>
Revert "Implement mozilla's animationTime property"
https://bugs.webkit.org/show_bug.cgi?id=51952
This approach isn't quite right.
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::display):
(WebKit::ChunkedUpdateDrawingArea::setSize):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawRect):
* WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
(WebKit::LayerBackedDrawingArea::syncCompositingLayers):
2011-01-07 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
Reviewed by Martin Robinson.
[GTK] WebKit2 GNUmakefile is out of date from trunk
Adding new stub files for compiling on latest revision
https://bugs.webkit.org/show_bug.cgi?id=51883
* UIProcess/gtk: Added.
* UIProcess/gtk/TextCheckerGtk.cpp: Added.
(WebKit::TextChecker::state):
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
(WebKit::TextChecker::uniqueSpellDocumentTag):
(WebKit::TextChecker::closeSpellDocumentWithTag):
(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
(WebKit::TextChecker::getGuessesForWord):
(WebKit::TextChecker::learnWord):
(WebKit::TextChecker::ignoreWord):
* UIProcess/gtk/WebInspectorGtk.cpp: Added.
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformOpen):
(WebKit::WebInspectorProxy::platformClose):
(WebKit::WebInspectorProxy::inspectorPageURL):
* UIProcess/gtk/WebPageProxyGtk.cpp: Added.
(WebKit::WebPageProxy::standardUserAgent):
* UIProcess/gtk/WebPreferencesGtk.cpp: Added.
(WebKit::WebPreferences::platformInitializeStore):
(WebKit::WebPreferences::platformUpdateStringValueForKey):
(WebKit::WebPreferences::platformUpdateBoolValueForKey):
(WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
* WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp: Added.
(WebKit::WebContextMenuClient::lookUpInDictionary):
(WebKit::WebContextMenuClient::isSpeaking):
(WebKit::WebContextMenuClient::speak):
(WebKit::WebContextMenuClient::stopSpeaking):
* WebProcess/WebCoreSupport/gtk/WebDatabaseManagerGtk.cpp: Added.
(WebKit::WebDatabaseManager::databaseDirectory):
* WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp: Added.
(WebKit::WebPopupMenu::setUpPlatformData):
* WebProcess/WebPage/gtk: Added.
* WebProcess/WebPage/gtk/WebInspectorGtk.cpp: Added.
(WebKit::WebInspector::localizedStringsURL):
2011-01-06 Adam Roben <aroben@apple.com>
Don't ever call ::SetCursor(0)
Doing so makes the cursor disappear from the screen.
Fixes <http://webkit.org/b/52024> Mouse cursor flashes when moving it
around a WKView before the web process has finished launching
Reviewed by Jon Honeycutt.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::onSetCursor): If we don't have a cursor to set, just
let Windows do its default thing (which is to set the cursor to the
window class's cursor, which in our case is the arrow cursor).
(WebKit::WebView::cursorToShow): Just return 0 when the page has
crashed so that we'll show the default cursor (which is the arrow
cursor). This change has no visible effect, but seems slightly better
conceptually.
(WebKit::WebView::updateNativeCursor): Don't do anything if we don't
have a cursor to set.
2011-01-06 Adam Roben <aroben@apple.com>
Fill the WKView with white when the web process hasn't drawn anything
yet
Fixes <http://webkit.org/b/52023> WKView accumulates pixel garbage
before web process has had a chance to draw anything (if Aero is
disabled)
Reviewed by Jon Honeycutt.
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::paint):
* UIProcess/ChunkedUpdateDrawingAreaProxy.h:
* UIProcess/DrawingAreaProxy.h:
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::paint):
* UIProcess/LayerBackedDrawingAreaProxy.h:
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::paint):
* UIProcess/TiledDrawingAreaProxy.h:
* UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
(WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
* UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
* UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
* UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp:
(WebKit::LayerBackedDrawingAreaProxy::paint):
Changed these functions to return a boolean indicating whether we
actually painted anything.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::onPaintEvent): Fill with white (and don't call
didDraw) when the DrawingAreaProxy isn't able to paint.
2011-01-06 Jessie Berlin <jberlin@apple.com>
Reviewed by Jon Honeycutt.
WebKit2: Need WKBundlePagePrivate equivalent of WebKit1's WebViewPrivate's setDefersCallbacks
https://bugs.webkit.org/show_bug.cgi?id=52038
The implementation of WebKit1's WebViewPrivate's setDefersCallbacks on both Windows and Mac
calls WebCore::Page::setDefersLoading.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetDefersLoading):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setDefersLoading):
* WebProcess/WebPage/WebPage.h:
2011-01-06 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
<rdar://problem/8261624> and https://bugs.webkit.org/show_bug.cgi?id=47355
Change WebKit2 session restoring to restore the full back/forward list.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::registerNewWebBackForwardListItem): Let the UIProcess register its own
WebBackForwardListItems in its ID map upon creation.
* UIProcess/WebProcessProxy.h:
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData): Register each new list entry in the
UIProcess ID map.
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::addItemFromUIProcess): Add this method to register UIProcess
created items without doing any of the other work normally associated with adding a new back/forward item
(such as notifying the UIProcess).
* WebProcess/WebPage/WebBackForwardListProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSession): Map all of the back/forward list entries from the UIProcess then
cause a load of the current entry.
2011-01-06 Adam Roben <aroben@apple.com>
Always show the arrow cursor when the web process has crashed
Fixes <http://webkit.org/b/52006> WKView shows a stale cursor when the
web process crashes
Reviewed by Ada Chan.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::processDidCrash):
(WebKit::WebView::didRelaunchProcess):
Update the cursor to reflect the new state.
(WebKit::WebView::cursorToShow): Always show the arrow cursor when the
web process has crashed.
2011-01-06 Adam Roben <aroben@apple.com>
Reduce code duplication in WebView::updateNativeCursor
Fixes <http://webkit.org/b/52005> It's not easy to add new behavior to
WebView::updateNativeCursor
Reviewed by Ada Chan.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::cursorToShow): Moved code to choose a cursor here...
(WebKit::WebView::updateNativeCursor): ...from here.
* UIProcess/win/WebView.h: Added cursorToShow.
2011-01-06 Adam Roben <aroben@apple.com>
Make WKView fill with white when the web process has crashed
Previously we would just draw whatever we had last drawn into the
WKView (i.e., a stale picture of the web page), which was confusing
(because the web page would mysteriously not respond to input) and ugly
(because it wouldn't behave properly if the window was resized).
Fixes <http://webkit.org/b/52004> WKView keeps painting a stale
picture of the web page when the web process crashes
Reviewed by Ada Chan.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::onPaintEvent): Ported code from -[WKView drawRect:]
to fill with white if the page is invalid or has no DrawingArea. As a
bonus, also ported the call to WebPageProxy::didDraw from that method.
(WebKit::WebView::processDidCrash):
(WebKit::WebView::didRelaunchProcess):
Invalidate our window so that we'll redraw with white or the new page.
2011-01-06 Adam Roben <aroben@apple.com>
Make WKViews work on Windows after a crashed web process gets relaunched
Fixes <http://webkit.org/b/52001> Relaunching the web process fails to
revivify WKViews on Windows
Reviewed by Ada Chan.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::didRelaunchProcess): Implemented by porting code from
-[WKView _didRelaunchProcess].
2011-01-06 Adam Roben <aroben@apple.com>
Remove WebView::m_rect
It was only used in the constructor, and wasn't even kept up-to-date as
the WebView's size changed.
Fixes <http://webkit.org/b/52000> WebView::m_rect is unnecessary
Reviewed by Ada Chan.
* UIProcess/win/WebView.cpp:
* UIProcess/win/WebView.h:
2011-01-05 Brian Weinstein <bweinstein@apple.com>
Reviewed by Ada Chan.
WebKit2: Should be able to call into injected bundle to ask if we should allow resource loads
https://bugs.webkit.org/show_bug.cgi?id=51969
Add the ability to call into the injected bundle to ask if we should allow resource loads.
If the injected bundle says we should cancel, we clear out the ResourceRequest that was
passed into willSendRequest, which cancels the resource load.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add the new callback for allowing/cancelling
resource loads.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::shouldLoadResourceForFrame): Calls through to the client.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchWillSendRequest): Ask the InjectedBundlePageLoaderClient if we
should load the resource or not.
2011-01-06 Jeff Miller <jeffm@apple.com>
Reviewed by Darin Adler.
WebKit2: Add APIs to WKBundleFrame to get content bounds and scroll offset
https://bugs.webkit.org/show_bug.cgi?id=51968
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetContentBounds):
(WKBundleFrameGetScrollOffset):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
Add WKBundleFrameGetContentBounds() and WKBundleFrameGetScrollOffset().
2011-01-06 James Robinson <jamesr@chromium.org>
Reviewed by Simon Fraser.
Implement mozilla's animationTime property
https://bugs.webkit.org/show_bug.cgi?id=51952
Tells the page to clear the current animation time after producing a frame.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawRect):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::display):
(WebKit::ChunkedUpdateDrawingArea::setSize):
* WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
(WebKit::LayerBackedDrawingArea::syncCompositingLayers):
2011-01-06 Darin Adler <darin@apple.com>
Redo the half-done rename from the last check-in.
Sorry for the broken build last night.
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::removeItem): Renamed.
* WebProcess/WebPage/WebBackForwardListProxy.h: Updated
for new name.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didRemoveBackForwardItem): Updated to
use the new name.
2011-01-06 Maciej Stachowiak <mjs@apple.com>
Rubber stamped by Dan Bernstein.
Fix build for Darin's previous change w/ the obvious renaming.
* WebProcess/WebPage/WebBackForwardListProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didRemoveBackForwardItem):
2011-01-05 Darin Adler <darin@apple.com>
Reviewed by Geoff Garen.
Back/Forward entries in WebKit2 leak
https://bugs.webkit.org/show_bug.cgi?id=51983
Besides fixing the leak, this also fixes a problem where
all history items were sent over to the UI process, but
we wanted to send only back/forward items.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::pageClosed): Added.
Tells the web process about all the back/forward
items being removed.
(WebKit::WebBackForwardList::addItem): Ditto.
Also removed a redundant call to didChangeBackForwardList.
(WebKit::WebBackForwardList::clear): Ditto.
* UIProcess/WebBackForwardList.h: Added pageClosed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close): Added a call to pageClosed.
(WebKit::WebPageProxy::backForwardRemovedItem): Added.
Sends a message to the web page in the web process.
* UIProcess/WebPageProxy.h: Added backForwardRemovedItem.
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::updateBackForwardItem): Added an itemID argument,
since callers will now be getting it and we don't want to
get it twice. Removed the code to generate an ID. Also
removed some local variables to make the code a little
tighter and clearer.
(WebKit::WK2NotifyHistoryItemChanged): Only call
updateBackForwardItem for items that already have IDs.
We don't want to send cross-process messages for every
history item; just the ones that are top level back/forward
items.
(WebKit::WebBackForwardListProxy::removeItem):
Added. For use when the UI process tells us to remove it.
(WebKit::WebBackForwardListProxy::addItem): Added code to
assign an ID and put this item into the maps. This is called
exactly once on each back/forward item.
* WebProcess/WebPage/WebBackForwardListProxy.h: Added
removeItem.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didRemoveBackForwardItem): Added.
* WebProcess/WebPage/WebPage.h: Added didRemoveBackForwardItem.
* WebProcess/WebPage/WebPage.messages.in: Added
DidRemoveBackForwardItem message.
2011-01-05 Steve Falkenburg <sfalken@apple.com>
Reviewed by Darin Adler.
Debug and Release builds on Windows clobber each other
https://bugs.webkit.org/show_bug.cgi?id=49185
Changes the structure of WebKitBuild build products directory so we
completely separate each build configuration into independent directories.
Although we previously had per-configuration directories for obj, this change adds
per-configuration directories for bin, lib, obj, and include. Each configuration's
build products are stored within a directory inside of WebKitBuild.
Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
* win/WebKit2.make:
* win/WebKit2.vcproj:
* win/WebKit2Common.vsprops:
* win/WebKit2Generated.make:
* win/WebKit2GeneratedCommon.vsprops:
* win/WebKit2WebProcessPostBuild.cmd:
* win/WebKit2WebProcessPreBuild.cmd:
* win/WebKitPostBuild.cmd:
* win/WebKitPreBuild.cmd:
2011-01-05 Alexey Proskuryakov <ap@apple.com>
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=51973
Make main frame PDF printing work
* UIProcess/API/mac/PDFViewController.h:
* UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::makePrintOperation):
Ask PDFDocument to create an NSPrintOperation.
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView printOperationWithPrintInfo:forFrame:]): Create a new NSPrintOperation, either
from scratch or from a PDF view.
(-[WKView canPrintHeadersAndFooters]): Report if the view can be re-paginated to add headers
and footers.
2011-01-05 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8750248>
Need a way to create a new DownloadProxy from an arbitrary resource request
<rdar://problem/8750465>
Need a way to start a download in WKDownload
<rdar://problem/8752204>
WK2 Context Menus - "Save linked file" support
* Shared/ContextMenuState.h: Added.
Add a ContextMenuState struct which contains state for context menus.
* UIProcess/API/C/WKContext.cpp:
(WKContextDownloadURLRequest):
Call WebContext::download.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::download):
Send a DownloadRequest message to the web process.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showContextMenu):
Set the active context menu state.
(WebKit::WebPageProxy::contextMenuItemSelected):
Handle ContextMenuItemTagDownloadImageToDisk and ContextMenuItemTagDownloadLinkToDisk by calling
WebContext::Download, passing the respective URLs.
* UIProcess/WebPageProxy.messages.in:
ShowContextMenu now takes state as well.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::downloadURL):
Assert that this is never reached; downloads are handled in the UI process.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
Pass the context menu state along when sending the ShowContextMenu message.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::downloadRequest):
Call the shared DownloadManager.
* WebProcess/WebProcess.messages.in:
Add DownloadRequest message.
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add ContextMenuState.h.
2011-01-05 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Unreviewed build fix.
[Qt] [Symbian] Fix building NPAPI support
NPEvent is mapped to QAction on Symbian. QAction has no
default constructor, so toNP() fails to build. Add a case for
Symbian behind the OS(SYMBIAN) guard.
* WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
(WebKit::toNP):
2011-01-05 Jeff Miller <jeffm@apple.com>
Reviewed by Dan Bernstein.
Copy WKImageCG.h to include\WebKit2 in build output
https://bugs.webkit.org/show_bug.cgi?id=51944
* win/WebKit2Generated.make:
Add xcopy command to copy WKImageCG.h.
2011-01-05 Brady Eidson <beidson@apple.com>
Reviewed by Sam Weinig.
Part of <rdar://problem/8261624> and https://bugs.webkit.org/show_bug.cgi?id=47355
Change WebKit2 session restoring to restore the full back/forward list
Add a new message to tell the WebProcess to restore a session state:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSession):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add the new message, AND fix the intentional misspellings.
Also, Sam sucks.
Change WebProcess back/forward list item ids to be odd (UIProcess's will be even):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::generateHistoryItemID):
Provide accessors to the entries in the list to pass to the WebProcess:
* UIProcess/WebBackForwardList.h:
(WebKit::WebBackForwardList::entries):
(WebKit::WebBackForwardList::currentIndex):
Add decoding of the saved back/forward list itmes (we already encode them):
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::generateWebBackForwardItemID):
(WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
Instead of loading the current URL, pass the entire last back to the WebProcess:
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData):
2011-01-05 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=51953
Add a "SessionState" object for IPC messaging.
This object includes all data necessary to restore a session state;
For now, this is just the back/forward list to restore.
* Shared/SessionState.cpp: Added.
(WebKit::SessionState::SessionState):
(WebKit::SessionState::encode):
(WebKit::SessionState::decode):
* Shared/SessionState.h: Added.
(WebKit::SessionState::list):
(WebKit::SessionState::currentIndex):
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
2011-01-05 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Unreviewed build fix.
Include unistd.h for _exit() for non-Windows builds.
Build break noticed on QtWebkit Symbian builds.
* Shared/ChildProcess.cpp:
2011-01-05 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=51949
Make WebBackForwardListItem shared, and add encoders and decoders
* Shared/WebBackForwardListItem.cpp: Copied from UIProcess/WebBackForwardListItem.cpp.
(WebKit::WebBackForwardListItem::encode):
(WebKit::WebBackForwardListItem::decode):
* Shared/WebBackForwardListItem.h: Copied from UIProcess/WebBackForwardListItem.h.
* UIProcess/WebBackForwardListItem.cpp: Removed.
* UIProcess/WebBackForwardListItem.h: Removed.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
2011-01-05 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Handle smart insert/delete
https://bugs.webkit.org/show_bug.cgi?id=51946
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
Add isSmartInsertDelete enabled.
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]):
Handle toggleSmartInsertDelete:.
(-[WKView toggleSmartInsertDelete:]):
Toggle the smart insert/delete state.
* UIProcess/TextChecker.h:
Add isSmartInsertDeleteEnabled and setSmartInsertDeleteEnabled.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Initialize m_isSmartInsertDeleteEnabled.
(WebKit::WebPageProxy::contextMenuItemSelected):
Handle ContextMenuItemTagSmartCopyPaste.
(WebKit::WebPageProxy::setSmartInsertDeleteEnabled):
Update the state and send a SetSmartInsertDeleteEnabled message.
(WebKit::WebPageProxy::creationParameters):
Initialize isSmartInsertDeleteEnabled.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isSmartInsertDeleteEnabled):
Return m_isSmartInsertDeleteEnabled.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::isSmartInsertDeleteEnabled):
(WebKit::TextChecker::setSmartInsertDeleteEnabled):
Store and fetch the smart insert delete state.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::smartInsertDeleteEnabled):
Call WebPage::isSmartInsertDeleteEnabled.
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::toggleSmartInsertDelete):
Assert that this is never called.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Initialize m_isSmartInsertDeleteEnabled
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::isSmartInsertDeleteEnabled):
(WebKit::WebPage::setSmartInsertDeleteEnabled):
Add getter and setter.
* WebProcess/WebPage/WebPage.messages.in:
Add SetSmartInsertDeleteEnabled message.
2011-01-05 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* WebProcess/WebPage/WebPage.cpp:
2011-01-05 Anders Carlsson <andersca@apple.com>
Reviewed by Adele Peterson.
Implement word transformation
https://bugs.webkit.org/show_bug.cgi?id=51943
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]):
Handle the word transformation selectors.
(-[WKView uppercaseWord:]):
(-[WKView lowercaseWord:]):
(-[WKView capitalizeWord:]):
Call down to the WebPageProxy.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::uppercaseWord):
(WebKit::WebPageProxy::lowercaseWord):
(WebKit::WebPageProxy::capitalizeWord):
Send messages to the WebPage.
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::changeWordCase):
Add helper function.
(WebKit::WebEditorClient::uppercaseWord):
(WebKit::WebEditorClient::lowercaseWord):
(WebKit::WebEditorClient::capitalizeWord):
Call helper function.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::changeSpellingToWord):
Call replaceSelectionWithText.
(WebKit::WebPage::uppercaseWord):
(WebKit::WebPage::lowercaseWord):
(WebKit::WebPage::capitalizeWord):
Call the editor functions.
(WebKit::WebPage::replaceSelectionWithText):
New helper function that replaces the selected string with another string.
* WebProcess/WebPage/WebPage.messages.in:
Add new messages.
2011-01-05 Alexey Proskuryakov <ap@apple.com>
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=51935
Add WebKit2 API for largest frame
* UIProcess/API/C/WKPage.cpp:
(WKPageGetFrameSetLargestFrame):
* UIProcess/API/C/WKPage.h:
2011-01-05 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
More work on spelling
https://bugs.webkit.org/show_bug.cgi?id=51939
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]):
Handle changeSpelling: as well.
(-[WKView showGuessPanel:]):
Show or hide the guess panel.
(-[WKView checkSpelling:]):
Pass false to advanceToNextMisspelling.
(-[WKView changeSpelling:]):
Call changeSpellingToWord.
* UIProcess/TextChecker.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Initialize m_pendingLearnOrIgnoreWordMessageCount.
(WebKit::WebPageProxy::contextMenuItemSelected):
Handle smart toggles directly in the UI process, keep track of whether
we're asked to learn or ignore a word.
(WebKit::WebPageProxy::advanceToNextMisspelling):
Pass the boolean through.
(WebKit::WebPageProxy::changeSpellingToWord):
Send a ChangeSpellingToWord message.
(WebKit::WebPageProxy::learnWord):
(WebKit::WebPageProxy::ignoreWord):
Check that we do have a pending learn or ignore word message. Call through to
the text checker.
(WebKit::WebPageProxy::processDidCrash):
Reset the m_pendingLearnOrIgnoreWordMessageCount variable.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Add new messages.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::learnWord):
(WebKit::TextChecker::ignoreWord):
Implement in terms of NSSpellChecker.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::ignoreWordInSpellDocument):
(WebKit::WebEditorClient::learnWord):
Send IgnoreWord and LearnWord messages.
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::toggleAutomaticQuoteSubstitution):
(WebKit::WebEditorClient::toggleAutomaticLinkDetection):
(WebKit::WebEditorClient::toggleAutomaticDashSubstitution):
(WebKit::WebEditorClient::toggleAutomaticTextReplacement):
Add assertions.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::advanceToNextMisspelling):
Pass the bool along to the Editor.
(WebKit::WebPage::changeSpellingToWord):
Replace the selected text.
* WebProcess/WebPage/WebPage.messages.in:
Add new ChangeSpellingToWord message and add a boolean to AdvanceToNextMisspelling.
2011-01-05 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Keep track of active text substitution preferences
https://bugs.webkit.org/show_bug.cgi?id=51931
* Shared/TextCheckerState.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]):
Handle new selectors, mostly copied from WebKit1 code.
(-[WKView orderFrontSubstitutionsPanel:]):
Open the substitution panel.
(-[WKView isAutomaticQuoteSubstitutionEnabled]):
(-[WKView setAutomaticQuoteSubstitutionEnabled:]):
(-[WKView toggleAutomaticQuoteSubstitution:]):
(-[WKView isAutomaticDashSubstitutionEnabled]):
(-[WKView setAutomaticDashSubstitutionEnabled:]):
(-[WKView toggleAutomaticDashSubstitution:]):
(-[WKView isAutomaticLinkDetectionEnabled]):
(-[WKView setAutomaticLinkDetectionEnabled:]):
(-[WKView toggleAutomaticLinkDetection:]):
(-[WKView isAutomaticTextReplacementEnabled]):
(-[WKView setAutomaticTextReplacementEnabled:]):
(-[WKView toggleAutomaticTextReplacement:]):
Call the text checker, and update the state in the web process if needed.
* UIProcess/TextChecker.h:
Add new flags.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::initializeState):
Initialize flags from user defaults.
(WebKit::TextChecker::setAutomaticQuoteSubstitutionEnabled):
(WebKit::TextChecker::setAutomaticDashSubstitutionEnabled):
(WebKit::TextChecker::setAutomaticLinkDetectionEnabled):
(WebKit::TextChecker::setAutomaticTextReplacementEnabled):
Update and save the flags.
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
(WebKit::WebEditorClient::isAutomaticLinkDetectionEnabled):
(WebKit::WebEditorClient::isAutomaticDashSubstitutionEnabled):
(WebKit::WebEditorClient::isAutomaticTextReplacementEnabled):
Get the text checker state.
2011-01-05 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Darin Adler.
Cleaned up com.apple.WebProcess.sb
* WebProcess/com.apple.WebProcess.sb: Moved the closing parentheses of multi-line blocks to
their own lines. Changed to use WebKit-standard 4-space indentation.
2011-01-05 Alexey Proskuryakov <ap@apple.com>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=51903
Tell UI process which subframe is largest
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::frameSetLargestFrame):
Remember largest frame in frameset pages.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::frameDidBecomeFrameSet): Reset stored largest frame if main frame
changes to a frameset or back.
(WebKit::WebPageProxy::frameSetLargestFrameChanged): Store a new largest frame when notified
of a change.
* UIProcess/WebPageProxy.messages.in: Added FrameSetLargestFrameChanged.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::area): Calculate area of a frame.
(WebKit::findLargestFrameInFrameSet): Find largest first-level subframe in a frameset page.
(WebKit::WebChromeClient::contentsSizeChanged): Recalculate largest frame, and notify UI
process if it changed.
* WebProcess/WebCoreSupport/WebChromeClient.h: Store the latest largest frame.
* WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::size):
* WebProcess/WebPage/WebFrame.h:
Expose frame size.
2011-01-04 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] [WK2] Add support for non-trivial context menu action
https://bugs.webkit.org/show_bug.cgi?id=51902
Implement a call back from the QAction triggered in the UIProcess to the
action in WebProcess.
A few basic actions have been implemented based on this feature.
* UIProcess/API/qt/qwkpage.cpp:
(contextMenuActionForWebAction):
(QWKPage::triggerAction):
(QWKPage::action):
* UIProcess/API/qt/qwkpage.h:
* UIProcess/qt/WebContextMenuProxyQt.cpp:
(WebKit::webActionForContextMenuAction):
2011-01-04 Siddharth Mathur <siddharth.mathur@nokia.com>
Reviewed by Laszlo Gombos.
Include unistd.h for sleep() for non-Windows builds.
* WebProcess/WebProcess.cpp:
* WebProcess/qt/WebProcessMainQt.cpp:
2011-01-04 Brian Weinstein <bweinstein@apple.com>
Windows build fix. Change the inline type of consumePermanently.
* Shared/SandboxExtension.h:
(WebKit::SandboxExtension::consumePermanently):
2011-01-04 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/8821203> Sandbox violations trying to access the Safari cache
* Shared/SandboxExtension.h:
(WebKit::SandboxExtension::consumePermanently):
New function which consumes a sandbox extension and destroys it, making it impossible
to later revoke it.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
Encode and decode the path extension handle.
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::createHandle):
Standardize the path before creating the handle.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
Create a sandbox extension for the cache path.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Consume the sandbox extension.
2011-01-04 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::getGuessesForWord):
2011-01-04 Jeff Miller <jeffm@apple.com>
Reviewed by Darin Adler.
Mouse events in WebKit2 on Windows need to know whether the click activated the WebView to match WebKit1 behavior.
https://bugs.webkit.org/show_bug.cgi?id=51228
* Shared/WebEvent.h:
(WebKit::WebMouseEvent::didActivateWebView):
Add m_didActivateWebView to WebMouseEvent on Windows.
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
Propagate whether the click activated the WebView when converting to a PlatformMouseEvent.
* Shared/WebMouseEvent.cpp:
(WebKit::WebMouseEvent::WebMouseEvent):
Add m_didActivateWebView to WebMouseEvent on Windows.
(WebKit::WebMouseEvent::encode):
(WebKit::WebMouseEvent::decode):
Encode and decode new m_didActivateWebView member variable.
* Shared/win/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebMouseEvent):
* Shared/win/WebEventFactory.h:
Add didActivateWebView parameter to createWebMouseEvent().
* UIProcess/win/WebView.cpp:
(WebKit::WebView::wndProc):
(WebKit::WebView::WebView):
(WebKit::WebView::onMouseEvent):
* UIProcess/win/WebView.h:
(WebKit::WebView::setWasActivatedByMouseEvent):
Keep track of whether the click activated the WebView.
2011-01-04 Ivan Krstić <ike@apple.com>
Reviewed and landed by Anders Carlsson.
<rdar://problem/8602585>
<rdar://problem/8711641>
* WebProcess/com.apple.WebProcess.sb:
Fix a misplaced right parenthesis and add a new system path regex.
2011-01-04 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
More work on spelling and grammar
https://bugs.webkit.org/show_bug.cgi?id=51910
* Scripts/webkit2/messages.py:
Add special case for WebCore::TextCheckingResult.
* Shared/NotImplemented.h:
Fix macro so that defining DISABLE_NOT_IMPLEMENTED_WARNINGS to 0 will enable the warnings.
* Shared/WebCoreArgumentCoders.h:
Add argument coders for WebCore::GrammarDetail and WebCore::TextCheckingResult.
* UIProcess/API/mac/WKView.mm:
(-[WKView checkSpelling:]):
Call advanceToNextMisspelling.
* UIProcess/TextChecker.h:
Add new NSSpellChecker wrappers.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Initialize the new member variables.
(WebKit::WebPageProxy::~WebPageProxy):
Call TextChecker::closeSpellDocumentWithTag.
(WebKit::WebPageProxy::advanceToNextMisspelling):
Send the AdvanceToNextMisspelling message.
(WebKit::WebPageProxy::spellDocumentTag):
Create a spell document tag if necessary.
(WebKit::WebPageProxy::checkTextOfParagraph):
(WebKit::WebPageProxy::updateSpellingUIWithMisspelledWord):
(WebKit::WebPageProxy::getGuessesForWord):
Call the TextChecker.
* UIProcess/WebPageProxy.messages.in:
Add new messages.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::uniqueSpellDocumentTag):
(WebKit::TextChecker::closeSpellDocumentWithTag):
(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
(WebKit::TextChecker::getGuessesForWord):
Add NSSpellChecker wrappers.
* UIProcess/qt/TextCheckerQt.cpp:
* UIProcess/win/TextCheckerWin.cpp:
Add stubs.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::isContinuousSpellCheckingEnabled):
(WebKit::WebEditorClient::isGrammarCheckingEnabled):
Get the text checking state from the web process.
(WebKit::WebEditorClient::updateSpellingUIWithMisspelledWord):
(WebKit::WebEditorClient::getGuessesForWord):
Proxy calls to the UI process.
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::isAutomaticSpellingCorrectionEnabled):
(WebKit::WebEditorClient::checkTextOfParagraph):
Proxy calls to the UI process.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::advanceToNextMisspelling):
Call the frame.
* WebProcess/WebPage/WebPage.messages.in:
Add AdvanceToNextMisspelling message.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Set the text checker state.
2011-01-04 Chris Fleizach <cfleizach@apple.com>
Unreviewed. Build fix.
WK2: Support Accessibility
https://bugs.webkit.org/show_bug.cgi?id=51859
* WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
2011-01-04 Chris Fleizach <cfleizach@apple.com>
Unreviewed. Build fix.
WK2: Support Accessibility
https://bugs.webkit.org/show_bug.cgi?id=51859
* WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
(-[AccessibilityWebPageObject accessibilityAttributeValue:]):
2011-01-04 Chris Fleizach <cfleizach@apple.com>
Reviewed by Sam Weinig.
WK2: Support Accessibility
https://bugs.webkit.org/show_bug.cgi?id=51859
Implement remote accessibility API to support cross process accessibility
on the Mac platform.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::accessibilityChildTokenReceived):
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView _updateWindowAndViewFrames]):
(-[WKView _setAccessibilityChildToken:]):
(-[WKView accessibilityIsIgnored]):
(-[WKView accessibilityHitTest:]):
(-[WKView accessibilityAttributeValue:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
(WebKit::WebPageProxy::didReceiveAccessibilityPageToken):
(WebKit::WebPageProxy::sendAccessibilityPresenterToken):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::accessibilityRemoteObject):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowAndViewFramesChanged):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::accessibilityPosition):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/AccessibilityWebPageObject.h: Added.
* WebProcess/WebPage/mac/AccessibilityWebPageObject.mm: Added.
(-[AccessibilityWebPageObject setWebPage:]):
(-[AccessibilityWebPageObject setRemoteParent:]):
(-[AccessibilityWebPageObject dealloc]):
(-[AccessibilityWebPageObject accessibilityIsIgnored]):
(-[AccessibilityWebPageObject accessibilityAttributeNames]):
(-[AccessibilityWebPageObject accessibilityIsAttributeSettable:]):
(-[AccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
(-[AccessibilityWebPageObject accessibilityActionNames]):
(-[AccessibilityWebPageObject accessibilityChildren]):
(-[AccessibilityWebPageObject accessibilityAttributeValue:]):
(-[AccessibilityWebPageObject accessibilityShouldUseUniqueId]):
(-[AccessibilityWebPageObject accessibilityHitTest:]):
(-[AccessibilityWebPageObject accessibilityFocusedUIElement]):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::sendAccessibilityPresenterToken):
(WebKit::WebPage::accessibilityRemoteObject):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::presenterApplicationPid):
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain):
2011-01-04 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
Get rid of an extra copy in the back/forward item IPC message by using a DataReference.
* UIProcess/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
(WebKit::WebBackForwardListItem::setBackForwardData):
* UIProcess/WebBackForwardListItem.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dataCallback): Get rid of no-longer-needed check for size 0.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebPage/EncoderAdapter.cpp:
(WebKit::EncoderAdapter::data):
* WebProcess/WebPage/EncoderAdapter.h:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
2011-01-04 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
Store more data per history entry in the session state blob.
* UIProcess/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
* UIProcess/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::create):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
* UIProcess/cf/WebPageProxyCF.cpp:
2011-01-04 Darin Adler <darin@apple.com>
Reviewed by Brady Eidson.
Add back/forward encoding and decoding to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=51901
* GNUmakefile.am: Added new source files.
* WebKit2.pro: Ditto.
* WebKit2.xcodeproj/project.pbxproj: Ditto.
* win/WebKit2.vcproj: Ditto.
* WebProcess/WebPage/DecoderAdapter.cpp: Added.
* WebProcess/WebPage/DecoderAdapter.h: Added.
* WebProcess/WebPage/EncoderAdapter.cpp: Added.
* WebProcess/WebPage/EncoderAdapter.h: Added.
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::updateBackForwardItem): Added code to encode the back/forward
tree and send it along. The code to decode needs to wait on Brady's
current project.
2011-01-04 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8766999> WebKit2: Sandboxing causes certificate error on access to any HTTPS URL
Allow read access to /Library/Preferences/com.apple.security.plist.
* WebProcess/com.apple.WebProcess.sb:
2011-01-04 Anders Carlsson <andersca@apple.com>
Build fixes.
* UIProcess/qt/TextCheckerQt.cpp:
* UIProcess/win/TextCheckerWin.cpp:
2011-01-04 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Don't use macros for the key names.
* UIProcess/mac/TextCheckerMac.mm:
2011-01-04 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Send over text checker state to the web process
https://bugs.webkit.org/show_bug.cgi?id=51896
* Platform/CoreIPC/Arguments.h:
Remove 'const' from the argument, this matches all the other Arguments classes.
* Shared/TextCheckerState.h: Added.
New class with text checker state.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
Add textCheckerState.
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]):
(-[WKView toggleContinuousSpellChecking:]):
(-[WKView toggleGrammarChecking:]):
(-[WKView toggleAutomaticSpellingCorrection:]):
Get the needed flags from the text checker state.
* UIProcess/TextChecker.h:
Add state() function, remove getters.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess):
Initialize the text checker state.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::updateTextCheckerState):
Send the SetTextCheckerState message to the web process.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::initializeState):
Initialize the state from the user defaults.
(WebKit::TextChecker::state):
Return the state.
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
(WebKit::TextChecker::setAutomaticSpellingCorrectionEnabled):
Make sure to write the new state.
* UIProcess/qt/TextCheckerQt.cpp:
(WebKit::TextChecker::state):
* UIProcess/win/TextCheckerWin.cpp:
(WebKit::TextChecker::state):
Add stubs.
* WebKit2.xcodeproj/project.pbxproj:
Add TextCheckerState.h.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
Initialize m_textCheckerState.
(WebKit::WebProcess::setTextCheckerState):
Update.
* WebProcess/WebProcess.messages.in:
Add SetTextCheckerState message.
* win/WebKit2.vcproj:
Add TextCheckerState.h.
2011-01-04 Brady Eidson <beidson@apple.com>
Rubberstamped by Anders Carlsson.
Attach a radar # to this FIXME:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
2011-01-04 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Add more spelling/grammar related methods
https://bugs.webkit.org/show_bug.cgi?id=51886
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]):
Handle more selectors.
(-[WKView showGuessPanel:]):
Add stub.
(-[WKView checkSpelling:]):
Ditto.
(-[WKView toggleAutomaticSpellingCorrection:]):
Toggle automatic spelling correction.
* UIProcess/TextChecker.h:
Add setAutomaticSpellingCorrectionEnabled and isAutomaticSpellingCorrectionEnabled.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::setAutomaticSpellingCorrectionEnabled):
(WebKit::TextChecker::isAutomaticSpellingCorrectionEnabled):
Update the toggle.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
* WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
Add a Radar URL for the localization FIXMEs.
2011-01-04 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build fix.
* win/WebKit2.vcproj: Correct the missing $(WebKitVSPropsRedirectionDir)
variables that Visual Studio helpfully removes when making changes.
2011-01-04 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build fix.
* win/WebKit2.vcproj: Disable CG-specific WKImageCG.cpp from
Debug_Cairo_CFLite/Release_Cario_CFLite builds.
2011-01-04 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=51856
Pass encoded back/forward tree data from the WebProcess to the UIProcess
Remove the WKBackForwardListItemCopyOriginalURL API as it's not needed:
* UIProcess/API/C/WKBackForwardListItem.cpp:
* UIProcess/API/C/WKBackForwardListItem.h:
* UIProcess/API/qt/qwkhistory.cpp:
* UIProcess/API/qt/qwkhistory.h:
* UIProcess/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
* UIProcess/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::setBackForwardData):
(WebKit::WebBackForwardListItem::backForwardData):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::updateBackForwardItem):
2011-01-04 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt][WK2] Incomplete clean up on termination
https://bugs.webkit.org/show_bug.cgi?id=51474
Do not kill the web process to force it's termination.
Fix object destruction and cleanup logic and make the cleanup more reliable.
Do not try to cleanup on crash because it is not reliable.
* Platform/CoreIPC/qt/ConnectionQt.cpp:
(CoreIPC::Connection::platformInvalidate): Do not delete the socket if we
do not own it. This is the case with a server connection.
* Platform/qt/MappedMemoryPool.cpp:
Turn MappedMemoryPool into a QObject so the CleanupHandler can destruct it
in the same way as the other objects.
(WebKit::MappedMemoryPool::instance):
(WebKit::MappedMemoryPool::~MappedMemoryPool):
* Platform/qt/MappedMemoryPool.h:
(WebKit::MappedMemoryPool::MappedMemoryPool):
* Platform/qt/SharedMemoryQt.cpp:
(WebKit::SharedMemory::create): No need to care about QCoreApplication::aboutToQuit.
It is handled by the CleanupHandler.
(WebKit::SharedMemory::~SharedMemory): Ditto.
* Shared/qt/CleanupHandler.cpp: Renamed from WebKit2/Shared/qt/CrashHandler.cpp.
No longer try to handle crash but just normal termination.
(WebKit::CleanupHandler::CleanupHandler): Connect deleteObjects with QCoreApplication::aboutToQuit.
Ensure appropriate thread affinity.
(WebKit::CleanupHandler::sigTermHandler): Stop the main event loop.
(WebKit::CleanupHandler::deleteObjects): Use deleteLater instead of delete since it is more reliable.
* Shared/qt/CleanupHandler.h: Renamed from WebKit2/Shared/qt/CrashHandler.h.
(WebKit::CleanupHandler::instance):
(WebKit::CleanupHandler::markForCleanup):
(WebKit::CleanupHandler::unmark):
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
Do not kill the web process immidiately but give it a chance to cleanup.
Use QLocalServer::removeServer for assuring that the socket file will be removed.
(WebKit::ProcessLauncherHelper::serverName):
(WebKit::cleanupAtExit): Renamed from cleanupProcesses. Only kill the web process when it times
out terminating. Fixed the bug of changing the list while iterating it over by disconnecting
from the processStateChanged slot.
(WebKit::QtWebProcess::QtWebProcess): Added missing meta type registration of QProcess::ProcessState.
(WebKit::ProcessLauncherHelper::~ProcessLauncherHelper):
(WebKit::ProcessLauncherHelper::ProcessLauncherHelper): No need to add the the instance to the
CleanupHandler because we will remove the socket file in cleanupAtExit.
(WebKit::ProcessLauncherHelper::instance):
(WebKit::ProcessLauncher::terminateProcess):
* WebKit2.pro:
2011-01-04 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] [WK2] create an initial implementation of the context menu handling for WebKit 2
https://bugs.webkit.org/show_bug.cgi?id=51825
Implement the necessary methods to get a basic context menu working for Qt.
Only 4 basic WebAction have been added on the UIProcess side: back, forward, stop and reload.
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::QGraphicsWKView):
(QGraphicsWKView::showContextMenu):
(QGraphicsWKViewPrivate::QGraphicsWKViewPrivate):
* UIProcess/API/qt/qgraphicswkview.h:
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::createContextMenuProxy):
* UIProcess/API/qt/qwkpage.h:
* 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:
2011-01-03 Yi Shen <yi.4.shen@nokia.com>
Reviewed by Adam Barth.
[Qt] Add SelectAll option to the context menu for the editor
https://bugs.webkit.org/show_bug.cgi?id=50049
Add WebPlatformStrategies::contextMenuItemTagSelectAll for Qt.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::contextMenuItemTagSelectAll):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2011-01-03 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Ensure that the correct initial focusable area is focused when tabbing
and shift-tabbing into the WKView.
* UIProcess/API/mac/WKView.mm:
(-[WKView becomeFirstResponder]): Use the keyViewSelectionDirection to set
the initial focus.
2011-01-02 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Simon Fraser.
<rdar://problem/8812159> Update copyright strings
* Info.plist:
* WebProcess/Info.plist:
2011-01-02 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Csaba Osztrogonác.
WebKit 2 does not build on 64bits with a recent GCC
https://bugs.webkit.org/show_bug.cgi?id=51754
Change the argument coding for DatabaseDetails to use explicitly the 64 bits type.
* Shared/OriginAndDatabases.h:
* Shared/WebCoreArgumentCoders.h:
2011-01-02 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Adam Barth.
Move JavaScriptCore to Source
https://bugs.webkit.org/show_bug.cgi?id=51604
Workaround until moving all sources to Source directory is finished.
* Scripts/generate-forwarding-headers.pl: Add Sources to searching path for JavaScriptCore.
2011-01-01 Adam Barth <abarth@webkit.org>
Speculative build fix for Qt. Add some more include paths.
* WebKit2.pro:
2011-01-01 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Move JavaScriptCore to Source
https://bugs.webkit.org/show_bug.cgi?id=51604
* WebKit2.pro:
- Point to JavaScriptCore in its new location.
2010-12-15 Amruth Raj <amruthraj@motorola.com> and Ravi Kasibhatla <ravi.kasibhatla@motorola.com>
Reviewed by Martin Robinson.
[GTK] Enable building whatever already exists of WebKit2
https://bugs.webkit.org/show_bug.cgi?id=37369
* GNUmakefile.am: Added.
* WebKit2Prefix.h: Included WebCore/config.h for GTK port as the first header
file for WebKit2 sources files.
* gtk: Added.
* gtk/webkit2.pc.in: Added.
2010-12-29 Juha Savolainen <juha.savolainen@weego.fi>
Reviewed by Kenneth Rohde Christiansen.
[Qt] [WK2] Added more webattributes to the qwkpreferences
https://bugs.webkit.org/show_bug.cgi?id=51697
Added PrivateBrowsingEnabled, DeveloperExtrasEnabled, DnsPrefetchEnabled attributes
* UIProcess/API/qt/qwkpreferences.cpp:
(QWKPreferences::testAttribute):
(QWKPreferences::setAttribute):
* UIProcess/API/qt/qwkpreferences.h:
2010-12-27 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2 snapshots should contain accelerated content
<rdar://problem/8807393>
https://bugs.webkit.org/show_bug.cgi?id=51660
When creating a snapshot, flatten the layer tree for painting so that
accelerated content is included in the snapshot.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotInViewCoordinates):
(WebKit::WebPage::snapshotInDocumentCoordinates):
2010-12-27 Daniel Bates <dbates@rim.com>
Attempt to fix the WebKit2 Windows build after changeset 74698
<http://trac.webkit.org/changeset/74698> (bug #51656).
Add "..\Shared\API\c\WKImage.h" to WebKit2Generated.make.
* win/WebKit2Generated.make:
2010-12-27 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2: Add API for getting snapshots
https://bugs.webkit.org/show_bug.cgi?id=51656
* Shared/API/c/WKBase.h:
* Shared/API/c/WKImage.cpp: Added.
(WKImageGetTypeID):
(WKImageCreate):
(WKImageGetSize):
* Shared/API/c/WKImage.h: Added.
* Shared/WebImage.cpp: Added.
(WebKit::WebImage::create):
(WebKit::WebImage::size):
* Shared/WebImage.h: Added.
(WebKit::WebImage::backingStore):
(WebKit::WebImage::WebImage):
(WebKit::WebImage::type):
Add a general purpose API image class.
* Shared/API/c/cg: Added.
* Shared/API/c/cg/WKImageCG.cpp: Added.
(WKImageCreateCGImage):
* Shared/API/c/cg/WKImageCG.h: Added.
Add function to convert a WKImageRef to a CGImageRef for platforms that use CG.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toFloatRect):
(WebKit::toIntSize):
(WebKit::toIntPoint):
(WebKit::toIntRect):
(WebKit::toImageOptions):
Make conversion functions that are ambiguous more explicit.
* Shared/APIObject.h:
* Shared/BackingStore.h:
(WebKit::BackingStore::isBackedBySharedMemory):
* Shared/ImageOptions.h: Added.
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):
Allow a WKImageRef to be passed in user messages. Right now, it only
works if the image is sharable.
* UIProcess/API/C/WKPage.cpp:
(WKPageScaleWebView):
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::windowFrame):
Use the more explicit conversion function name.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCreateSnapshotInViewCoordinates):
(WKBundlePageCreateSnapshotInDocumentCoordinates):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(WKBundlePageOverlaySetNeedsDisplay):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotInViewCoordinates):
(WebKit::WebPage::snapshotInDocumentCoordinates):
Add function to take the snapshot.
* WebProcess/WebPage/WebPage.h:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add new files.
2010-12-27 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2: Add additional API for managing databases
https://bugs.webkit.org/show_bug.cgi?id=51629
- Adds client for the database manager to get notifications
of changes to databases.
* UIProcess/API/C/WKDatabaseManager.cpp:
(WKDatabaseManagerSetClient):
* UIProcess/API/C/WKDatabaseManager.h:
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::initializeClient):
(WebKit::WebDatabaseManagerProxy::didModifyOrigin):
(WebKit::WebDatabaseManagerProxy::didModifyDatabase):
* UIProcess/WebDatabaseManagerProxy.h:
* UIProcess/WebDatabaseManagerProxy.messages.in:
* UIProcess/WebDatabaseManagerProxyClient.cpp: Added.
(WebKit::WebDatabaseManagerProxyClient::didModifyOrigin):
(WebKit::WebDatabaseManagerProxyClient::didModifyDatabase):
* UIProcess/WebDatabaseManagerProxyClient.h: Added.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::WebDatabaseManager):
(WebKit::WebDatabaseManager::~WebDatabaseManager):
(WebKit::WebDatabaseManager::dispatchDidModifyOrigin):
(WebKit::WebDatabaseManager::dispatchDidModifyDatabase):
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* win/WebKit2.vcproj:
2010-12-27 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2: Add additional API for managing databases
https://bugs.webkit.org/show_bug.cgi?id=51629
- Adds WKDatabaseManagerGetDatabasesByOrigin, which asynchronously returns
an array of dictionaries containing details about each origin using
databases and details about each database. Keys were added for accessing
the data in the dictionaries.
- Adds WKDatabaseManagerDeleteDatabasesWithNameForOrigin to delete a database
with a specific identifier.
- Adds WKDatabaseManagerSetQuotaForOrigin to set the quota for an origin.
* Shared/OriginAndDatabases.cpp: Added.
(WebKit::OriginAndDatabases::encode):
(WebKit::OriginAndDatabases::decode):
* Shared/OriginAndDatabases.h: Added.
* Shared/WebCoreArgumentCoders.h:
* UIProcess/API/C/WKDatabaseManager.cpp:
(WKDatabaseManagerGetOriginKey):
(WKDatabaseManagerGetOriginQuotaKey):
(WKDatabaseManagerGetOriginUsageKey):
(WKDatabaseManagerGetDatabaseDetailsKey):
(WKDatabaseManagerGetDatabaseDetailsNameKey):
(WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
(WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
(WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
(WKDatabaseManagerGetDatabasesByOrigin):
(callGetDatabasesByOriginBlockAndDispose):
(WKDatabaseManagerGetDatabasesByOrigin_b):
(WKDatabaseManagerGetDatabaseOrigins):
(callGetDatabaseOriginsBlockBlockAndDispose):
(WKDatabaseManagerGetDatabaseOrigins_b):
(WKDatabaseManagerDeleteDatabasesWithNameForOrigin):
(WKDatabaseManagerDeleteDatabasesForOrigin):
(WKDatabaseManagerDeleteAllDatabases):
(WKDatabaseManagerSetQuotaForOrigin):
* UIProcess/API/C/WKDatabaseManager.h:
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::originKey):
(WebKit::WebDatabaseManagerProxy::originQuotaKey):
(WebKit::WebDatabaseManagerProxy::originUsageKey):
(WebKit::WebDatabaseManagerProxy::databaseDetailsKey):
(WebKit::WebDatabaseManagerProxy::databaseDetailsNameKey):
(WebKit::WebDatabaseManagerProxy::databaseDetailsDisplayNameKey):
(WebKit::WebDatabaseManagerProxy::databaseDetailsExpectedUsageKey):
(WebKit::WebDatabaseManagerProxy::databaseDetailsCurrentUsageKey):
(WebKit::WebDatabaseManagerProxy::invalidate):
(WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
(WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
(WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
* UIProcess/WebDatabaseManagerProxy.h:
* UIProcess/WebDatabaseManagerProxy.messages.in:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::getDatabasesByOrigin):
(WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManager::setQuotaForOrigin):
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebCoreSupport/WebDatabaseManager.messages.in:
* win/WebKit2.vcproj:
2010-12-26 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Rename DrawingAreaMessage and DrawingAreaLegacyMessage and
DrawingAreaProxyMessage to DrawingAreaProxyLegacyMessage.
* Platform/CoreIPC/MessageID.h:
* Shared/CoreIPCSupport/DrawingAreaMessageKinds.h:
* Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::paint):
(WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
(WebKit::ChunkedUpdateDrawingAreaProxy::update):
(WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
(WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveMessage):
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
(WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
(WebKit::LayerBackedDrawingAreaProxy::update):
(WebKit::LayerBackedDrawingAreaProxy::didReceiveMessage):
(WebKit::LayerBackedDrawingAreaProxy::didReceiveSyncMessage):
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::sizeDidChange):
(WebKit::TiledDrawingAreaProxy::setPageIsVisible):
(WebKit::TiledDrawingAreaProxy::didReceiveMessage):
(WebKit::TiledDrawingAreaProxy::requestTileUpdate):
(WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
(WebKit::TiledDrawingAreaProxy::takeSnapshot):
(WebKit::TiledDrawingAreaProxy::removeTile):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
(WebKit::WebPageProxy::didReceiveSyncMessage):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::display):
(WebKit::ChunkedUpdateDrawingArea::setSize):
(WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::setSize):
(WebKit::LayerBackedDrawingArea::didReceiveMessage):
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::display):
(WebKit::TiledDrawingArea::setSize):
(WebKit::TiledDrawingArea::updateTile):
(WebKit::TiledDrawingArea::tileUpdateTimerFired):
(WebKit::TiledDrawingArea::didReceiveMessage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage):
* WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
(WebKit::LayerBackedDrawingArea::attachCompositingContext):
2010-12-26 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Drawing area cleanup. Remove a bunch of redundant functions that just ended
up calling setNeedsDisplay.
* UIProcess/DrawingAreaProxy.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::invalidateWindow):
(WebKit::WebChromeClient::invalidateContentsAndWindow):
(WebKit::WebChromeClient::invalidateContentsForSlowScroll):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
* WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
* WebProcess/WebPage/LayerBackedDrawingArea.h:
* WebProcess/WebPage/TiledDrawingArea.cpp:
* WebProcess/WebPage/TiledDrawingArea.h:
2010-12-25 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
Fill in some more preferences for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=51610
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAuthorAndUserStylesEnabled):
(WKPreferencesGetAuthorAndUserStylesEnabled):
(WKPreferencesSetWebArchiveDebugModeEnabled):
(WKPreferencesGetWebArchiveDebugModeEnabled):
(WKPreferencesSetLocalFileContentSniffingEnabled):
(WKPreferencesGetLocalFileContentSniffingEnabled):
(WKPreferencesSetPageCacheEnabled):
(WKPreferencesGetPageCacheEnabled):
(WKPreferencesSetPaginateDuringLayoutEnabled):
(WKPreferencesGetPaginateDuringLayoutEnabled):
(WKPreferencesSetDOMPasteAllowedEnabled):
(WKPreferencesGetDOMPasteAllowedEnabled):
* UIProcess/API/C/WKPreferences.h:
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Pipe through some more preferences.
2010-12-24 Dan Bernstein <mitz@apple.com>
Reviewed by Alexey Proskuryakov.
REGRESSION (r74648): XHR layout test failures
https://bugs.webkit.org/show_bug.cgi?id=51603
Reverted r74648.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldUseCredentialStorage):
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain):
2010-12-24 Simon Fraser <simon.fraser@apple.com>
Fix the Qt build after r74650.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2010-12-24 Benjamin Poulain <ikipou@gmail.com>
Reviewed by Darin Adler.
[Qt] [WK2] WebKit 2 does not build on mac, missing reference to RetainPtr
https://bugs.webkit.org/show_bug.cgi?id=51598
Fix the build, add the missing header.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2010-12-24 Dan Bernstein <mitz@apple.com>
Reviewed by Anders Carlsson.
<rdar://problem/8758386> The web process uses its own credential storage
https://bugs.webkit.org/show_bug.cgi?id=51599
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveAuthenticationChallenge): Try to answer the challenge using
the UI process’s credential storage first.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Prevent the web process from using
its own credential storage.
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain): Ditto.
2010-12-23 Dan Bernstein <mitz@apple.com>
Reviewed by Sam Weinig.
Make dragging work again after r74591.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent): Fixed a typo.
2010-12-23 Jessie Berlin <jberlin@apple.com>
Reviewed by Sam Weinig.
Need WebKit2 API to create a SecurityOrigin from protocol, host, and port
https://bugs.webkit.org/show_bug.cgi?id=51563
Add WKSecurityOriginCreate(WKStringRef protocol, WKStringRef host, int port).
* Shared/API/c/WKSecurityOrigin.cpp:
(WKSecurityOriginCreateFromIdentifier):
Renamed so as not to clash with the new WKSecurityOriginCreate.
(WKSecurityOriginCreate):
* Shared/API/c/WKSecurityOrigin.h:
* Shared/WebSecurityOrigin.h:
(WebKit::WebSecurityOrigin::create):
2010-12-23 Anders Carlsson <andersca@apple.com>
Reviewed by Simon Fraser.
Ensure that we are not getting too many mouse move events
https://bugs.webkit.org/show_bug.cgi?id=51568
<rdar://problem/7881470>
<rdar://problem/8735512>
Implement throttling of mouse move events.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Initialize m_processingMouseMoveEvent to false.
(WebKit::WebPageProxy::handleMouseEvent):
If we're already processing a mouse move events, just update
m_nextMouseMoveEvent and return.
(WebKit::WebPageProxy::didReceiveEvent):
If we received a mouse move event, send the next mouse move event if there is one.
2010-12-23 Brian Weinstein <bweinstein@apple.com>
Reviewed by Anders Carlsson.
Assertion when loading www.yahoo.com in WebKit2 under decodeResourceRequest
https://bugs.webkit.org/show_bug.cgi?id=51562
Don't assert that our data reference isn't empty when we try to get the data from it.
If it is empty, just return 0.
All callers are safe with this function returning 0.
* Platform/CoreIPC/DataReference.h:
(CoreIPC::DataReference::data): Change the assert to an early return.
* Shared/cf/ArgumentCodersCF.cpp:
(CoreIPC::decode): Add an assert, and remove a ternarny operator because the function now does
this for us (if the data is empty, return 0).
2010-12-23 Sam Weinig <sam@webkit.org>
Fix incorrect assertion causing all pages with subframes to crash.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::appendChild):
2010-12-23 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Clean up the selection handling code
https://bugs.webkit.org/show_bug.cgi?id=51550
* Shared/SelectionState.h: Added.
Add SelectionState class which hold information about the current selection.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
Remove selectionChanged function.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
Remove all the selection related state; it lives in the WebPageProxy object now.
(-[WKView insertText:]):
(-[WKView selectedRange]):
(-[WKView hasMarkedText]):
Get the selection information from the WebPageProxy.
* UIProcess/API/mac/WKViewInternal.h:
Remove _selectionChanged declaration.
* UIProcess/PageClient.h:
Remove selectionChanged functions.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::selectionStateChanged):
Update the selection state.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::selectionState):
Return the selection state.
* UIProcess/WebPageProxy.messages.in:
Add SelectionStateChanged message.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
Remove all the selection related state; it lives in the WebPageProxy object now.
(WebKit::WebView::compositionSelectionChanged):
(WebKit::WebView::onIMEComposition):
(WebKit::WebView::onIMEEndComposition):
(WebKit::WebView::onIMERequestCharPosition):
(WebKit::WebView::onIMERequest):
Get the selection information from the WebPageProxy.
* WebKit2.xcodeproj/project.pbxproj:
Add SelectionState.h
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::respondToChangedSelection):
Send a SelectionStateChanged message with the updated state.
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
Remove mac specific code.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getLocationAndLengthFromRange):
Rename this function from convertRangeToPlatformRange and move it out of WebPageMac.mm
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getMarkedRange):
(WebKit::WebPage::characterIndexForPoint):
Call getLocationAndLengthFromRange.
* win/WebKit2.vcproj:
Add SelectionState.h
2010-12-23 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
WKView should not try to do asynchronous validation for selectors that are not editor commands
https://bugs.webkit.org/show_bug.cgi?id=51555
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]): Removed the special case for startSpeaking.
Added call to commandIsSupportedFromMenuOrKeyBinding so we only try to do validation
for commands that are supported. Tweaked comments and added some bug numbers.
(-[WKView _setUserInterfaceItemState:enabled:state:]): Tweaked comment and added
bug number.
2010-12-23 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
<rdar://problem/8799032>
REGRESSION(r74436) Crash opening many pages with WebKit2
* Shared/cf/ArgumentCodersCF.cpp:
(CoreIPC::decode):
Fix paste-o. Decode into a CFDataRef not a CFDictionaryRef
when decoding CFDataRefs.
2010-12-22 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
WebKit2 needs to mirror the frame tree in the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=51546
* UIProcess/API/C/WKFrame.cpp:
(WKFrameCopyChildFrames):
* UIProcess/API/C/WKFrame.h:
Add API to get the child frames of a frame.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::WebFrameProxy):
(WebKit::WebFrameProxy::disconnect):
(WebKit::WebFrameProxy::appendChild):
(WebKit::WebFrameProxy::removeChild):
(WebKit::WebFrameProxy::isDescendantOf):
(WebKit::WebFrameProxy::dumpFrameTree):
(WebKit::WebFrameProxy::didRemoveFromHierarchy):
(WebKit::WebFrameProxy::childFrames):
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::parentFrame): Add getter.
(WebKit::WebFrameProxy::nextSibling): Add getter.
(WebKit::WebFrameProxy::previousSibling): Add getter.
(WebKit::WebFrameProxy::firstChild): Add getter.
(WebKit::WebFrameProxy::lastChild): Add getter.
Make frames keep track of their subframes.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCreateSubframe):
Use the now passed parentID to insert the frame into the hierarchy
(WebKit::WebPageProxy::didSaveFrameToPageCache):
When a frame is added to the page cache, remove it from the hierarchy.
(WebKit::WebPageProxy::didRestoreFrameFromPageCache):
When a frame is restored from the page cache, add it back to the hierarchy.
(WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
Detached frames should also be removed from the hierarchy.
* UIProcess/WebPageProxy.h:
Add new declarations for didSaveFrameToPageCache and didRestoreFrameFromPageCache.
* UIProcess/WebPageProxy.messages.in:
Add messages for DidSaveFrameToPageCache and DidRestoreFrameFromPageCache.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame):
(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
Remove notImplemented, there is no work we need to do here.
(WebKit::WebFrameLoaderClient::didSaveToPageCache):
(WebKit::WebFrameLoaderClient::didRestoreFromPageCache):
Send message to UIProcess to indicate this happened.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSubframe):
Send parent frameID in addition to our own in the message to UIProcess.
2010-12-23 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
New popup windows open disproportionately big
https://bugs.webkit.org/show_bug.cgi?id=51547
<rdar://problem/8637029>
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::createNewPage):
Pass the correct size back to the UI process.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::pageRect):
Implement this and return the size of the page.
2010-12-23 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Nothing happens clicking "launch live player" on live.cnn.com
https://bugs.webkit.org/show_bug.cgi?id=51540
<rdar://problem/8791086>
Implement NPN_PushPopupsEnabledState/NPN_PopPopupsEnabledState.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_PushPopupsEnabledState):
Call NetscapePlugin::pushPopupsEnabledState.
(WebKit::NPN_PopPopupsEnabledState):
Call NetscapePlugin::popPopupsEnabledState.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::pushPopupsEnabledState):
Append the boolean to the vector.
(WebKit::NetscapePlugin::popPopupsEnabledState):
Remove the last boolean from the vector.
(WebKit::NetscapePlugin::allowPopups):
Return the last boolean from the vector.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performJavaScriptURLRequest):
Update the "allowPopupsFromPlugin" state.
2010-12-22 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Webkit2: WebProcess crashes when Private browsing is turned on on yahoo.com
https://bugs.webkit.org/show_bug.cgi?id=51516
<rdar://problem/8766995>
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NPP_SetValue):
Add a null check for NPP_SetValue.
2010-12-22 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
REGRESSION (WK2): Plugins swallow CMD-W, CMD-Q, and probably other shortcuts
https://bugs.webkit.org/show_bug.cgi?id=51515
<rdar://problem/8740926>
Always return false for keyboard events where the command key is down.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformHandleKeyboardEvent):
2010-12-22 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
WebProcess should be terminated if invalid frameIDs are
passed to the UIProcess.
https://bugs.webkit.org/show_bug.cgi?id=51508
- Introduce a mechanism to mark a messages as invalid due to
reasons other than in ability to decode the message, eg. an
invalid frameID is passed in a message.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::Connection):
(CoreIPC::Connection::markCurrentlyDispatchedMessageAsInvalid): Sets
the m_didReceiveInvalidMessage bit so that it can be picked up in
(CoreIPC::Connection::dispatchMessages): Check for m_didReceiveInvalidMessage in
addition to tainted arguments.
* Platform/CoreIPC/Connection.h:
Add base macro for others to extend, that calls markCurrentlyDispatchedMessageAsInvalid()
ASSERTs, and returns.
* UIProcess/WebPageProxy.cpp:
Add Message checks for all WebFrameProxy's gotten from frameIDs passed
over the wire.
* UIProcess/WebProcessProxy.cpp:
(WebKit::isGoodMapKey):
Checks that the key can be inserted safely into a map (eg. not the empty or deleted value).
(WebKit::WebProcessProxy::webFrame):
Return null for bad keys (eg. 0 or -1).
(WebKit::WebProcessProxy::canCreateFrame):
Added. Checks that the ID is good and not in the map yet. Used
as a consistency check before creating frames.
(WebKit::WebProcessProxy::frameCreated):
ASSERT that the key is good, in addition to not in the map yet.
(WebKit::WebProcessProxy::didDestroyFrame):
ASSERT that the key is good.
* UIProcess/WebProcessProxy.h:
Move WebFrameProxy HashMap type into a typedef.
2010-12-22 Darin Adler <darin@apple.com>
Reviewed by Anders Carlsson.
WebKit2 needs a way to return the main resource data
https://bugs.webkit.org/show_bug.cgi?id=51510
* UIProcess/API/C/WKFrame.cpp:
(WKFrameGetMainResourceData): Added.
(callGetMainResourceDataBlockAndDispose): Added.
(WKFrameGetMainResourceData_b): Added.
* UIProcess/API/C/WKFrame.h: Added WKFrameGetMainResourceData.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::getMainResourceData): Added.
* UIProcess/WebFrameProxy.h: Ditto.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getMainResourceDataOfFrame): Added.
(WebKit::WebPageProxy::dataCallback): Replaced the individual callbacks
with just these two.
(WebKit::WebPageProxy::stringCallback): Ditto.
* UIProcess/WebPageProxy.h: Ditto.
* UIProcess/WebPageProxy.messages.in: Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInMainFrame): Send the string callback
message instead of a specific one.
(WebKit::WebPage::getContentsAsString): Ditto.
(WebKit::WebPage::getRenderTreeExternalRepresentation): Ditto.
(WebKit::WebPage::getSelectionOrContentsAsString): Ditto.
(WebKit::WebPage::getSourceForFrame): Ditto.
(WebKit::WebPage::getMainResourceDataOfFrame): Added.
(WebKit::WebPage::getWebArchiveOfFrame): Send the data callback message
instead of a specific one.
* WebProcess/WebPage/WebPage.h: Added getMainResourceDataOfFrame.
* WebProcess/WebPage/WebPage.messages.in: Ditto.
2010-12-22 Darin Adler <darin@apple.com>
* WebProcess/WebPage/WebPage.cpp: Add #if to try to fix non-Mac builds.
2010-12-22 Darin Adler <darin@apple.com>
Reviewed by Anders Carlsson.
Make Speech menu items work in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=51504
* UIProcess/API/C/WKFrame.cpp:
(WKFrameGetWebArchive): Updated to use new-named typedef.
* UIProcess/API/C/WKPage.cpp:
(WKPageRunJavaScriptInMainFrame): Ditto.
(WKPageRenderTreeExternalRepresentation): Ditto.
(WKPageGetSourceForFrame): Ditto.
(WKPageGetContentsAsString): Ditto.
* UIProcess/API/mac/WKView.mm:
(menuItem): Added. Helper function to make it easy to call menu item
functions on arbitrary user interface items.
(toolbarItem): Ditto.
(-[WKView validateUserInterfaceItem:]): Added validation for startSpeaking
and stopSpeaking commands. Reworked the code to fix a bug where
toggleContinuousSpellChecking would always be enabled even when it should
be disabled. Reworked the asynchronous validation code so it works for
items other than menu items and can also handle more than one item for the
same command. Added some comments.
(speakString): Added. Helper function to be used as a callback when we
get the selection or contents to speak.
(-[WKView startSpeaking:]): Added. Uses getSelectionOrContentsAsString.
(-[WKView stopSpeaking:]): Added.
(-[WKView _setUserInterfaceItemState:enabled:state:]): Reworked to work
with the changes to validateUserInterfaceItem above.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::isDisplayingMarkupDocument): Added a FIXME about
a problem I noticed.
(WebKit::WebFrameProxy::didCommitLoad): Tweaked argument name.
(WebKit::WebFrameProxy::getWebArchive): Changed to use new-named typedef.
* UIProcess/WebFrameProxy.h: Changed WebArchiveCallback to DataCallaback.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close): Invalidate the two callback maps since
we only have two now.
(WebKit::WebPageProxy::runJavaScriptInMainFrame): Changed to use merged
maps and typedefs so we don't need a separate callback map for each function.
(WebKit::WebPageProxy::getRenderTreeExternalRepresentation): Ditto.
(WebKit::WebPageProxy::getSourceForFrame): Ditto.
(WebKit::WebPageProxy::getContentsAsString): Ditto.
(WebKit::WebPageProxy::getSelectionOrContentsAsString): Added.
(WebKit::WebPageProxy::getWebArchiveOfFrame): Ditto.
(WebKit::WebPageProxy::didGetContentsAsString): Ditto.
(WebKit::WebPageProxy::didGetSelectionOrContentsAsString): Ditto.
(WebKit::WebPageProxy::didRunJavaScriptInMainFrame): Ditto.
(WebKit::WebPageProxy::didGetRenderTreeExternalRepresentation): Ditto.
(WebKit::WebPageProxy::didGetSourceForFrame): Ditto.
(WebKit::WebPageProxy::didGetWebArchiveOfFrame): Ditto.
(WebKit::WebPageProxy::processDidCrash): Ditto.
* UIProcess/WebPageProxy.h: Updated for changes above.
* UIProcess/WebPageProxy.messages.in: Added DidGetSelectionOrContentsAsString,
GetIsSpeaking, Speak, and StopSpeaking.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::getIsSpeaking): Added.
(WebKit::WebPageProxy::speak): Added.
(WebKit::WebPageProxy::stopSpeaking): Added.
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::isSpeaking): Call WebPage instead of doing
the work directly, so it can run in the UI process.
(WebKit::WebContextMenuClient::speak): Ditto.
(WebKit::WebContextMenuClient::stopSpeaking): Ditto.
(WebKit::WebContextMenuClient::searchWithSpotlight): Added FIXME comment and
changed code to avoid a C-style cast.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::selectionAsString): Added.
* WebProcess/WebPage/WebFrame.h: Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::changeAcceleratedCompositingMode): Use sendSync in the
modern way instead of explicitly calling WebProcess.
(WebKit::WebPage::getSelectionOrContentsAsString): Added.
(WebKit::WebPage::isSpeaking): Added.
(WebKit::WebPage::speak): Added.
(WebKit::WebPage::stopSpeaking): Added.
* WebProcess/WebPage/WebPage.h: Added functions.
* WebProcess/WebPage/WebPage.messages.in: Added GetSelectionOrContentsAsString.
2010-12-22 Anders Carlsson <andersca@apple.com>
Fix build.
* Platform/mac/MachUtilities.cpp:
2010-12-22 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Detect WebProcess crashes sooner, without waiting for ReportCrash to finish
https://bugs.webkit.org/show_bug.cgi?id=51505
* Platform/CoreIPC/CoreIPCMessageKinds.h:
Add SetExceptionPort.
* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC::Connection::platformInvalidate):
If we have an exception port, unregister it.
(CoreIPC::Connection::platformInitialize):
Set m_exceptionPort to null.
(CoreIPC::Connection::open):
If we have an exception port, register an event handler for it and send it over
to the other side.
(CoreIPC::Connection::receiveSourceEventHandler):
Handle the SetExceptionPort message.
(CoreIPC::Connection::exceptionSourceEventHandler):
Receive the message, forward it to the real exception handler and call connectionDidClose.
(CoreIPC::Connection::setShouldCloseConnectionOnMachExceptions):
Create an exception port.
* Platform/mac/MachUtilities.cpp:
(machExceptionPort):
(setMachExceptionPort):
* Platform/mac/MachUtilities.h:
Add helper functions for getting and setting the mach exception port.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didFinishLaunching):
Call setShouldCloseConnectionOnMachExceptions on Mac.
2010-12-22 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Move Mach message receiving code out into a new function
https://bugs.webkit.org/show_bug.cgi?id=51502
* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC::readFromMachPort):
(CoreIPC::Connection::receiveSourceEventHandler):
2010-12-22 Jeff Miller <jeffm@apple.com>
Reviewed by Sam Weinig.
InjectedBundle methods should use the relative URL constructor for KURL instead of the ParsedURLStringTag version
https://bugs.webkit.org/show_bug.cgi?id=51491
The url passed to various InjectedBundle methods is not from KURL::string(), i.e. it has not already been parsed by KURL,
so we have to use the relative URL constructor for KURL instead of the ParsedURLStringTag version.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::addUserScript):
(WebKit::InjectedBundle::addUserStyleSheet):
(WebKit::InjectedBundle::removeUserScript):
(WebKit::InjectedBundle::removeUserStyleSheet):
2010-12-22 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Move more of WebPageProxy::didCommitLoadForFrame into WebFrameProxy::didCommitLoad.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didCommitLoad): Added type and certificate info arguments,
and set m_MIMEType, m_isFrameSet, and m_certificateInfo.
* UIProcess/WebFrameProxy.h: Removed setMIMEType and setCertificateInfo and added
arguments to didCommitLoad.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame): Removed code that is now inside the
WebFrameProxy::didCommitLoad function.
2010-12-21 Darin Adler <darin@apple.com>
Reviewed by Brady Eidson and Sam Weinig.
Add a way to get a web archive in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=51437
* UIProcess/API/C/WKFrame.cpp:
(WKFrameGetWebArchive): Added.
(callGetWebArchiveBlockAndDispose): Added.
(WKFrameGetWebArchive_b): Added.
* UIProcess/API/C/WKFrame.h: Added functions above.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close): Clear out m_webArchiveCallbacks.
(WebKit::WebPageProxy::getWebArchiveOfFrame): Added.
(WebKit::WebPageProxy::didGetWebArchiveOfFrame): Added.
(WebKit::WebPageProxy::processDidCrash): Clear out m_webArchiveCallbacks.
* UIProcess/WebPageProxy.h: Added functions above.
* UIProcess/WebPageProxy.messages.in: Added DidGetWebArchiveOfFrame.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getWebArchiveOfFrame): Added.
* WebProcess/WebPage/WebPage.h: Added function above.
* WebProcess/WebPage/WebPage.messages.in: Added GetWebArchiveOfFrame.
2010-12-21 Siddharth Mathur <siddharth.mathur@nokia.com>
Reviewed by Laszlo Gombos.
[Qt] [WK2] Guard gcc-specific syntax
* WebKit2.pro: Non-gcc based compliers choke on the "-include"
syntax for preinclude, make sure it has guard around it.
2010-12-21 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Can't stop QT music on santastreefarm.com
https://bugs.webkit.org/show_bug.cgi?id=51438
<rdar://problem/8741152>
Implement NPN_ConvertPoint.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_ConvertPoint):
Call NetscapePlugin::convertPoint.
(WebKit::initializeBrowserFuncs):
Only initialize NPN_ConvertPoint and NPN_PopUpContextMenu on Mac.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::convertPoint):
Implement conversion routines.
(WebKit::NetscapePlugin::windowAndViewFramesChanged):
Keep track of the window and view frames, they are needed to do coordinate conversion.
2010-12-21 Sam Weinig <weinig@apple.com>
Reviewed by Anders Carlsson.
Implement encoding/decoding of ResourceRequest and
ResourceResponse for Windows/CFNetwork.
* Shared/win/WebCoreArgumentCodersWin.cpp:
(CoreIPC::encodeResourceRequest):
(CoreIPC::decodeResourceRequest):
(CoreIPC::encodeResourceResponse):
(CoreIPC::decodeResourceResponse):
* win/WebKit2.vcproj:
* win/WebKit2Common.vsprops:
2010-12-21 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Mac WebKit delivers an extra didCommit when loading web archives
https://bugs.webkit.org/show_bug.cgi?id=51419
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didStartProvisionalLoad): Added assertions so we catch
inconsistencies here instead of at the application level. Later, we will have
to decide what to do in cases these assertions fail. The right policy is probably
to consider it a web process failure and do whatever we do for those.
(WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad): Ditto.
(WebKit::WebFrameProxy::didFailProvisionalLoad): Ditto.
(WebKit::WebFrameProxy::didCommitLoad): Ditto.
(WebKit::WebFrameProxy::didFinishLoad): Ditto.
(WebKit::WebFrameProxy::didFailLoad): Ditto.
2010-12-21 Anders Carlsson <andersca@apple.com>
Fix Snow Leopard build.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
2010-12-21 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Fix crash when a Carbon plug-in fails to initialize correctly
https://bugs.webkit.org/show_bug.cgi?id=51415
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
Don't claim to support the QuickDraw event model.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformDestroy):
Only try to remove the window from the map if it's not null.
2010-12-21 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Add ArgumentCoder support for CFDataRef
https://bugs.webkit.org/show_bug.cgi?id=51412
* Shared/cf/ArgumentCodersCF.cpp:
(CoreIPC::typeFromCFTypeRef):
(CoreIPC::encode):
(CoreIPC::decode):
* Shared/cf/ArgumentCodersCF.h:
2010-12-21 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Clicking missing plug-in text does not show a sheet
https://bugs.webkit.org/show_bug.cgi?id=51403
* UIProcess/API/C/WKPage.h:
Add missingPluginButtonClicked to WKPageUIClient.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::missingPluginButtonClicked):
Call the WebUIClient member function.
* UIProcess/WebPageProxy.messages.in:
Add MissingPluginButtonClicked message.
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::missingPluginButtonClicked):
Call the WKPageUIClient callback.
* UIProcess/WebUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::shouldMissingPluginMessageBeButton):
Always return true for now.
(WebKit::WebChromeClient::missingPluginButtonClicked):
Send a MissingPluginButtonClicked message.
2010-12-21 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Andreas Kling.
[Qt] Set BUILDING_QT__ consistently
https://bugs.webkit.org/show_bug.cgi?id=51341
* WebKit2.pro: Remove the definition of BUILDING_QT__ as it
is already defined in WebKit.pri.
2010-12-20 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2: Add resource load client API
https://bugs.webkit.org/show_bug.cgi?id=51370
This just pipes through the basic resource load client data.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageResourceLoadClient):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeResourceLoadClient):
(WebKit::WebPageProxy::didInitiateLoadForResource):
(WebKit::WebPageProxy::didSendRequestForResource):
(WebKit::WebPageProxy::didReceiveResponseForResource):
(WebKit::WebPageProxy::didReceiveContentLengthForResource):
(WebKit::WebPageProxy::didFinishLoadForResource):
(WebKit::WebPageProxy::didFailLoadForResource):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebResourceLoadClient.cpp: Added.
(WebKit::WebResourceLoadClient::didInitiateLoadForResource):
(WebKit::WebResourceLoadClient::didSendRequestForResource):
(WebKit::WebResourceLoadClient::didReceiveResponseForResource):
(WebKit::WebResourceLoadClient::didReceiveContentLengthForResource):
(WebKit::WebResourceLoadClient::didFinishLoadForResource):
(WebKit::WebResourceLoadClient::didFailLoadForResource):
* UIProcess/WebResourceLoadClient.h: Added.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest):
(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoading):
* win/WebKit2.vcproj:
2010-12-20 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add a TextChecker class, hook up spelling and grammar toggling
https://bugs.webkit.org/show_bug.cgi?id=51363
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]):
(-[WKView toggleContinuousSpellChecking:]):
(-[WKView toggleGrammarChecking:]):
* UIProcess/TextChecker.h: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::unmarkAllMisspellings):
(WebKit::WebPageProxy::unmarkAllBadGrammar):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/TextCheckerMac.mm: Added.
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
(WebKit::TextChecker::isContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::isGrammarCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
* UIProcess/qt/TextCheckerQt.cpp: Added.
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
(WebKit::TextChecker::isContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::isGrammarCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
* UIProcess/win/TextCheckerWin.cpp: Added.
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
(WebKit::TextChecker::isContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::isGrammarCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::unmarkAllMisspellings):
(WebKit::WebPage::unmarkAllBadGrammar):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* win/WebKit2.vcproj:
2010-12-20 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Flash plug-in does not work on YouTube video page when accelerated compositing is disabled
https://bugs.webkit.org/show_bug.cgi?id=51348
<rdar://problem/8787667>
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction):
Add new overload.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::create):
(WebKit::PluginControllerProxy::PluginControllerProxy):
These now take an additional isAcceleratedCompositingEnabled parameter.
(WebKit::PluginControllerProxy::isAcceleratedCompositingEnabled):
Return m_isAcceleratedCompositingEnabled.
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::createPlugin):
This now takes an additional isAcceleratedCompositingEnabled parameter.
* PluginProcess/WebProcessConnection.messages.in:
Add isAcceleratedCompositingEnabled parameter to the CreatePlugin message.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::initialize):
Pass isAcceleratedCompositingEnabled when sending the CreatePlugin message.
2010-12-20 Anders Carlsson <andersca@apple.com>
Unreviewed, rolling out r74345.
http://trac.webkit.org/changeset/74345
https://bugs.webkit.org/show_bug.cgi?id=51115
Not the correct fix.
* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/qt/ConnectionQt.cpp:
(CoreIPC::Connection::open):
2010-12-20 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt][WK2] Crash in web process after the connection had been closed
https://bugs.webkit.org/show_bug.cgi?id=51115
Do not call connectionDidClose with a connection that has been explicitly
invalidated on the listener thread.
* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/qt/ConnectionQt.cpp:
(CoreIPC::Connection::disconnectHandler): Added.
(CoreIPC::Connection::open):
2010-12-19 Dan Bernstein <mitz@apple.com>
Reviewed by Sam Weinig.
Improve the fix for <rdar://problem/8769525>.
* UIProcess/API/mac/WKView.mm:
(-[WKView performKeyEquivalent:]): Do not retain the view. Doing so is necessary in
-[WebHTMLView performKeyEquivalent:], which this method was based upon, but not here, because
there is no way for the web process to cause the WKView to be released while it is handling
the event.
2010-12-19 Dan Bernstein <mitz@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8769525> WKView leak when performing key equivalents
https://bugs.webkit.org/show_bug.cgi?id=51315
* UIProcess/API/mac/WKView.mm:
(-[WKView performKeyEquivalent:]): Use a RetainPtr to ensure that the view is released in the
early return code path.
2010-12-19 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] [WK2] QWKPagePrivate::paint() does not need to save the graphics context
https://bugs.webkit.org/show_bug.cgi?id=51300
Remove the unnecessary save() and restore() on the QPainter.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::paint):
2010-12-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Andreas Kling.
[Qt] [WK2] Client are expected to render their own background for WebPages
https://bugs.webkit.org/show_bug.cgi?id=51296
Remove the rendering of the checkerboard from the tiled DrawingAreaProxy
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::paint):
* UIProcess/TiledDrawingAreaTile.h:
* UIProcess/qt/TiledDrawingAreaTileQt.cpp:
2010-12-19 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] [WK2] Client are expected to render their own background for WebPages
https://bugs.webkit.org/show_bug.cgi?id=51296
Do not render a white background before rendering the page with DrawingAreaProxy.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::paint):
2010-12-17 Darin Adler <darin@apple.com>
Reviewed by Dan Bernstein.
Window title for image documents shows corrupted characters instead of multiplication sign when using WebKit2
https://bugs.webkit.org/show_bug.cgi?id=43505
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Changed UI_STRING macros to return
WebCore::String objects instead of C strings.
(WebKit::formatLocalizedString): Added. Uses the Core Foundation string formatting function for
reasons explained in the comment.
(WebKit::WebPlatformStrategies::multipleFileUploadText): Use formatLocalizedString instead of
String::format.
(WebKit::WebPlatformStrategies::imageTitle): Ditto.
(WebKit::WebPlatformStrategies::localizedMediaTimeDescription): Ditto.
2010-12-17 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Resizing a WKView while loading a page can leave the page at a size that doesn't match the window
https://bugs.webkit.org/show_bug.cgi?id=51282
<rdar://problem/8133142>
Fix a race condition in waitForMessage. If we time out on the wait condition, we would keep the
m_waitForMessageMutex mutex unlocked for a brief period of time before taking the lock again and
then removing the messageID/destinationID pair from the hash map. Under some circumstances, the
connection queue would update the hash map right before we removed it, leading to a lost message.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::waitForMessage):
2010-12-17 Anders Carlsson <andersca@apple.com>
Reviewed by Simon Fraser.
Clean up ChunkedUpdateDrawingAreaProxy
https://bugs.webkit.org/show_bug.cgi?id=51277
Get rid of m_lastSetViewSize since it was always equal to m_size.
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::sizeDidChange):
Call sendSetSize().
(WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
Call sendSetSize if the size differs.
(WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
Move code from sizeDidChange over here.
* UIProcess/ChunkedUpdateDrawingAreaProxy.h:
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::setSize):
Add back the early return if the sizes are equal.
2010-12-17 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build fix.
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::canHandleRequest): Provide alternative for
non-CFNetwork implementation.
2010-12-17 Ada Chan <adachan@apple.com>
Reviewed by Anders Carlsson.
Implement WKView::setInitialFocus().
https://bugs.webkit.org/show_bug.cgi?id=51274
* UIProcess/API/C/win/WKView.cpp:
(WKViewSetInitialFocus):
* UIProcess/API/C/win/WKView.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setInitialFocus): Send message to the Web Process to set
initial focus.
* UIProcess/WebPageProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::setInitialFocus):
* UIProcess/win/WebView.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setInitialFocus): Set the focused node to null initially. Then
ask FocusController to set the initial focus based on the focus direction.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add a new message for SetInitialFocus.
2010-12-17 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Remove a check that probably uncovered a resizing bug.
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::setSize):
2010-12-17 Brian Weinstein <bweinstein@apple.com>
Qt build fix.
* UIProcess/qt/WebPopupMenuProxyQt.h:
2010-12-17 Brian Weinstein <bweinstein@apple.com>
Reviewed by Anders Carlsson.
Text area does not update when you arrow through a <select> in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=51269
<rdar://problem/8612853>
Patch by Sam Weinig.
Insteaed of keeping track of the selected index of a <select> just in the UI process, we
need to pass this information along to the web process so that the web process can draw
the correct text in the text field at the top of the select, when the selection changes (via
the arrows or other typing while the select is opened).
When the selected item in a popup changes, the UI process sends a message to the web process, telling
it about the new selected index. The web process gets this message, and then sets the text that
is visible in the select element.
* UIProcess/API/mac/PageClientImpl.h: CreatePopupMenuProxy now takes a WebPageProxy.
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createPopupMenuProxy): Pass the WebPageProxy to create.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::createPopupMenuProxy):
* UIProcess/API/qt/qwkpage_p.h: CreatePopupMenuProxy now takes a WebPageProxy.
* UIProcess/PageClient.h: CreatePopupMenuProxy now takes a WebPageProxy.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::valueChangedForPopupMenu): Send that the selected index changed to the
web process.selected
(WebKit::WebPageProxy::setTextFromItemForPopupMenu): Send that we should update the text for the
active popup menu (with the index of the item to show).
(WebKit::WebPageProxy::showPopupMenu): Pass the WebPageProxy to createPopupMenuProxy.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPopupMenuProxy.h: Add a client who has virtual functions for the state changing of the
popup menu. ShowPopupMenu doesn't take a new selected index anymore, that is handled by the client,
and calling down to the web process.
(WebKit::WebPopupMenuProxy::Client::~Client):
(WebKit::WebPopupMenuProxy::WebPopupMenuProxy): Initialize the client.
* UIProcess/mac/WebPopupMenuProxyMac.h:
(WebKit::WebPopupMenuProxyMac::create): Takes a WebPopupMenuProxy::Client, and passes it to the constructor.
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac): Update what's initialized by the constructor.
(WebKit::WebPopupMenuProxyMac::showPopupMenu): Call through to the web process that the value changed.
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
(WebKit::WebPopupMenuProxyQt::WebPopupMenuProxyQt): Update what's initialized by the constructor.
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::WebPopupMenuProxyWin): Ditto.
(WebKit::WebPopupMenuProxyWin::showPopupMenu): Call through to the web process that the value changed.
(WebKit::WebPopupMenuProxyWin::setFocusedIndex): Resolve a FIXME to set the text of the popup menu.
* UIProcess/win/WebPopupMenuProxyWin.h:
(WebKit::WebPopupMenuProxyWin::create): Take in a WebPopupMenuProxy::client, and pass it to the constructor.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::createPopupMenuProxy): Pass the WebPageProxy to create.
* UIProcess/win/WebView.h:
* WebProcess/WebCoreSupport/WebPopupMenu.cpp:
(WebKit::WebPopupMenu::setTextForIndex): Call through to setTextFromItem to set the select text.
* WebProcess/WebCoreSupport/WebPopupMenu.h:
* WebProcess/WebPage/WebPage.cpp: Call through to setTextForIndex on the active popup menu.
(WebKit::WebPage::setTextForActivePopupMenu):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add a new message.
2010-12-17 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
DrawingAreaProxy::setSize shouldn't be a virtual member function
https://bugs.webkit.org/show_bug.cgi?id=51275
Add a pure virtual sizeDidChange member function to DrawingAreaProxy, and only
call it if the size changes.
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::sizeDidChange):
* UIProcess/ChunkedUpdateDrawingAreaProxy.h:
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::setSize):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::size):
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
* UIProcess/LayerBackedDrawingAreaProxy.h:
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::sizeDidChange):
* UIProcess/TiledDrawingAreaProxy.h:
2010-12-17 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add a WebPageProxy parameter to the DrawingAreaProxy constructor
https://bugs.webkit.org/show_bug.cgi?id=51271
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::QGraphicsWKView):
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::create):
(WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
* UIProcess/ChunkedUpdateDrawingAreaProxy.h:
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::create):
(WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
* UIProcess/LayerBackedDrawingAreaProxy.h:
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::create):
(WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
* UIProcess/TiledDrawingAreaProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
(WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
2010-12-17 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
Add API for "Always Use the Complex Text Code Path"
https://bugs.webkit.org/show_bug.cgi?id=51265
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize shouldAlwaysUseComplexTextCodePath.
(WebKit::WebProcessCreationParameters::encode): Encode shouldAlwaysUseComplexTextCodePath.
(WebKit::WebProcessCreationParameters::decode): Decode shouldAlwaysUseComplexTextCodePath.
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContext.cpp:
(_WKContextSetAlwaysUsesComplexTextCodePath): Added.
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext): Initialize m_alwaysUsesComplexTextCodePath.
(WebKit::WebContext::ensureWebProcess): Set shouldAlwaysUseComplexTextCodePath in the creation parameters.
(WebKit::WebContext::setAlwaysUsesComplexTextCodePath): Added. Sets m_alwaysUsesComplexTextCodePath and
sends a message to the WebProcess.
* UIProcess/WebContext.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Call setAlwaysUsesComplexTextCodePath() based on the creation
parameters.
(WebKit::WebProcess::setAlwaysUsesComplexTextCodePath): Added.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Added SetAlwaysUsesComplexTextCodePath.
2010-12-17 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
WebKit2: Implement a title attribute per frame
https://bugs.webkit.org/show_bug.cgi?id=51266
Cache the title of each frame on the WebFrameProxy. Removes
the WebPageProxy's cache of the main frame title to just
access the main frame.
We clear the cached title on new committed loads and on failures
to load.
* UIProcess/API/C/WKFrame.cpp:
(WKFrameCopyTitle):
* UIProcess/API/C/WKFrame.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didCommitLoad):
(WebKit::WebFrameProxy::didFailLoad):
(WebKit::WebFrameProxy::didChangeTitle):
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::title):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::pageTitle):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::processDidCrash):
* UIProcess/WebPageProxy.h:
2010-12-16 Darin Adler <darin@apple.com>
Reviewed by Maciej Stachowiak.
Add text encoding menu API for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=51226
* UIProcess/API/C/WKPage.cpp:
(WKPageSupportsTextEncoding): Added.
(WKPageCopyCustomTextEncodingName): Added.
(WKPageSetCustomTextEncodingName): Added.
* UIProcess/API/C/WKPage.h: Added the functions above.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize
m_mainFrameHasCustomRepresentation to false.
(WebKit::WebPageProxy::supportsTextEncoding): Added.
(WebKit::WebPageProxy::setCustomTextEncodingName): Added.
(WebKit::WebPageProxy::didCommitLoadForFrame): Set
m_mainFrameHasCustomRepresentation.
* UIProcess/WebPageProxy.h: Added supportsTextEncoding,
setCustomTextEncodingName, customTextEncodingName, and
m_mainFrameHasCustomRepresentation.
* UIProcess/WebPageProxy.messages.in: Tweaked formatting
(added a blank line).
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setCustomTextEncodingName): Added.
* WebProcess/WebPage/WebPage.h: Added setCustomTextEncodingName.
* WebProcess/WebPage/WebPage.messages.in: Added the
SetCustomTextEncodingName message. Tweaked formatting of the
dummy message.
2010-12-17 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r74201.
http://trac.webkit.org/changeset/74201
https://bugs.webkit.org/show_bug.cgi?id=51248
It broke ~6000 layout tests (Requested by Ossy_ on #webkit).
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::setGeometry):
(QGraphicsWKView::itemChange):
2010-12-16 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
Add svn:eol-style native to the message.in files as a favor to Darin Adler.
* PluginProcess/PluginControllerProxy.messages.in: Added property svn:eol-style.
* PluginProcess/PluginProcess.messages.in: Added property svn:eol-style.
* PluginProcess/WebProcessConnection.messages.in: Added property svn:eol-style.
* Shared/Plugins/NPObjectMessageReceiver.messages.in: Added property svn:eol-style.
* UIProcess/Downloads/DownloadProxy.messages.in: Added property svn:eol-style.
* UIProcess/Plugins/PluginProcessProxy.messages.in: Added property svn:eol-style.
* UIProcess/WebContext.messages.in: Added property svn:eol-style.
* UIProcess/WebDatabaseManagerProxy.messages.in: Added property svn:eol-style.
* UIProcess/WebInspectorProxy.messages.in: Added property svn:eol-style.
* UIProcess/WebPageProxy.messages.in: Added property svn:eol-style.
* UIProcess/WebProcessProxy.messages.in: Added property svn:eol-style.
* WebProcess/Authentication/AuthenticationManager.messages.in: Added property svn:eol-style.
* WebProcess/Plugins/PluginProxy.messages.in: Added property svn:eol-style.
* WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: Added property svn:eol-style.
* WebProcess/WebPage/WebInspector.messages.in: Added property svn:eol-style.
* WebProcess/WebPage/WebPage.messages.in: Added property svn:eol-style.
* WebProcess/WebProcess.messages.in: Added property svn:eol-style.
2010-12-16 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Move NSURLCache initialization from the ProcessLauncherMac to the centralized
WebContext initialize WebProcess mechanism.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain):
* WebProcess/win/WebProcessWin.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::setShouldPaintNativeControls):
2010-12-16 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Defer getting a PluginProcessConnection object until the plug-in is initialized
https://bugs.webkit.org/show_bug.cgi?id=51207
<rdar://problem/8731306>
Before this change, we would pass the PluginProcessConnection to the PluginProxy constructor, but not
call PluginProcessConnection::addPluginProxy (which associates the plug-in proxy with the connection)
until the plug-in is initialized.
This could lead to a PluginProxy holding a reference to a PluginProcessConnection when the PluginProxyConnection
itself did not know anything about the PluginProxy. This would happen when a page with plug-ins is opened in a background
tab, with the plug-ins not yet initialized.
Because of this, we could end up in a weird state, where the PluginProcessConnection would think that there are no
more plug-ins alive, and invalidate (and null out) the underlying CoreIPC connection, which would lead to crashes
when trying to send messages to the connection during later initialization.
The fix is to pass the plug-in path to the PluginProxy constructor, and get the connection from PluginProxy::initialize.
PluginProcessConnection object
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::create):
(WebKit::PluginProxy::PluginProxy):
(WebKit::PluginProxy::initialize):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
2010-12-16 Enrica Casucci <enrica@apple.com>
Reviewed by Maciej Stachowiak.
WebKit2: Cannot copy two successive selections using cmd-c
<rdar://problem/8680309>
https://bugs.webkit.org/show_bug.cgi?id=51203
The previous implementation assumed a call sequence from AppKit that
was not always happening.
When the user clicks on the pulldown menu, AppKit sends validateUserInterfaceItem
calls for each element that needs validation and we used to count the number of
validation requests being sent to the web process.
All these calls are made before we have the chance to get one reply from the WebProcess.
We also delayed the menu update until we had received all the replies to the validation requests.
At that point we called update on the menu to trigger the validation one more time with
the data retrived from the WebProcess.
When the user simply presses cmd-c, only one call to vaidateUserInterfaceItem is made
and the menu update triggered the validation of all the menu entries causing the internal
state to be out of sync.
The new implementation is very simple: for each validation request from AppKit we send
a request to the WebProcess and we cache a reference to the menu item being validated.
When the WebProcess replies, we retrieve the menu item from our cache and update its state.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]): Removed initialization of deleted memebers.
(-[WKView validateUserInterfaceItem:]): Request validation to the WebProcess and return YES to
allow AppKit to do the keyBinding processing.
(-[WKView _setUserInterfaceItemState:enabled:state:]): Called when the WebProcess replies to the
validation request to check/uncheck and enable/disable the menu item.
2010-12-16 Anders Carlsson <andersca@apple.com>
Reviewed by Oliver Hunt.
Don't try to call plug-in member functions if the plug-in hasn't been initialized
https://bugs.webkit.org/show_bug.cgi?id=51205
<rdar://problem/8730204>
Make sure that all PluginView functions that can be called while a plug-in has not been
initialized (if the plug-in page is in a background tab for example) have an additional
check for m_isInitialized.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setWindowIsFocused):
(WebKit::PluginView::windowAndViewFramesChanged):
(WebKit::PluginView::platformLayer):
(WebKit::PluginView::scriptObject):
(WebKit::PluginView::privateBrowsingStateChanged):
(WebKit::PluginView::handleEvent):
(WebKit::PluginView::viewGeometryDidChange):
(WebKit::PluginView::setFocus):
2010-12-16 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Add a bunch of m_isStarted assertions to plug-in code.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::frameDidFinishLoading):
(WebKit::NetscapePlugin::frameDidFail):
(WebKit::NetscapePlugin::didEvaluateJavaScript):
(WebKit::NetscapePlugin::streamDidReceiveResponse):
(WebKit::NetscapePlugin::streamDidReceiveData):
(WebKit::NetscapePlugin::streamDidFinishLoading):
(WebKit::NetscapePlugin::streamDidFail):
(WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
(WebKit::NetscapePlugin::manualStreamDidReceiveData):
(WebKit::NetscapePlugin::manualStreamDidFinishLoading):
(WebKit::NetscapePlugin::manualStreamDidFail):
(WebKit::NetscapePlugin::handleMouseEvent):
(WebKit::NetscapePlugin::handleWheelEvent):
(WebKit::NetscapePlugin::handleMouseEnterEvent):
(WebKit::NetscapePlugin::handleMouseLeaveEvent):
(WebKit::NetscapePlugin::handleKeyboardEvent):
(WebKit::NetscapePlugin::setFocus):
(WebKit::NetscapePlugin::pluginScriptableNPObject):
(WebKit::NetscapePlugin::privateBrowsingStateChanged):
2010-12-16 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Save the manual plug-in stream data and redeliver it when the plug-in is initialized
https://bugs.webkit.org/show_bug.cgi?id=51201
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView):
Initialize m_manualStreamState.
(WebKit::PluginView::manualLoadDidReceiveResponse):
If the plug-in hasn't been initialized, store the response.
(WebKit::PluginView::manualLoadDidReceiveData):
If the plug-in hasn't been initialized, store the data.
(WebKit::PluginView::manualLoadDidFinishLoading):
If the plug-in hasn't been initialized, update the state.
(WebKit::PluginView::manualLoadDidFail):
If the plug-in hasn't been initialized, store the error and update the state.
(WebKit::PluginView::initializePlugin):
Call redeliverManualStream.
(WebKit::PluginView::redeliverManualStream):
Redeliver the manual stream to the plug-in.
* WebProcess/Plugins/PluginView.h:
2010-12-16 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
Reviewed by Andreas Kling.
[Qt] Turn off drawing area updates if the item is not visible
The updates are controlled by the QGraphicsItem::visible property.
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKViewPrivate::updateViewportSize):
(QGraphicsWKView::setGeometry):
(QGraphicsWKView::itemChange):
2010-12-15 Dan Bernstein <mitz@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8731320> WebProcess’s CFNetwork cache is in ~/Library/Caches/com.apple.WebProcess
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess): Get the location, disk capacity and memory capacity
of the UI process’s NSURLCache and pass them to the WebProcess.
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain): If an NSURLCache location was passed on the command line, set the
shared NSURLCache to that path and use the specified capacities as initial values.
2010-12-15 Dan Bernstein <mitz@apple.com>
Reviewed by Sam “I blame andersca” Weinig.
Allow responses to be cached by the NSURLCache.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::willCacheResponse): Changed to return the response instead of 0.
2010-12-14 Enrica Casucci <enrica@apple.com>
Reviewed by Adam Roben.
Add IME support to WebKit2 on Windows
https://bugs.webkit.org/show_bug.cgi?id=51049
The implementation is very close to the one in WebKit.
The main change is the addition of handlers for WM_IME_STARTCOMPOSITION,
WM_IME_REQUEST, WM_IME_COMPOSITION, WM_IME_ENDCOMPOSITION,
WM_IME_SELECT, WM_IME_SETCONTEXT and a number of new messages
between the UI process and the WebProcess to send/retrieve
the data being handled by the messages listed above.
* UIProcess/PageClient.h: Added compositionSelectionChanged for Windows platform.
* UIProcess/WebPageProxy.cpp:
The following methods send synchronous messages to the WebProcess.
(WebKit::WebPageProxy::firstRectForCharacterInSelectedRange): Retrieves the rectangle to position
the cnadidates window.
(WebKit::WebPageProxy::getSelectedText): Retrieves the currently selected text.
The following methods send asynchronous messages to the WebProcess.
(WebKit::WebPageProxy::confirmComposition):
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::didChangeSelection): Name changed.
(WebKit::WebPageProxy::didChangeCompositionSelection): Called when there is a change
in the composition selection.
* UIProcess/WebPageProxy.messages.in: Added messages corresponding to the methods above.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::wndProc): Added handling of messages for IME.
The following are the handlers for the window message being sent during composition.
(WebKit::WebView::onIMEComposition):
(WebKit::WebView::onIMEEndComposition):
(WebKit::WebView::onIMERequestCharPosition):
(WebKit::WebView::onIMERequestReconvertString):
(WebKit::WebView::onIMERequest):
(WebKit::WebView::onIMESelect):
(WebKit::WebView::onIMESetContext):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::respondToChangedSelection): Added notification
of composition selection changed for Windows.
* WebProcess/WebPage/win/WebPageWin.cpp:
The following are the WebProcess counterparts of the new messages.
(WebKit::WebPage::confirmComposition):
(WebKit::WebPage::setComposition):
(WebKit::WebPage::firstRectForCharacterInSelectedRange):
(WebKit::WebPage::getSelectedText):
2010-12-15 Sam Weinig <sam@webkit.org>
Reviewed by Brady Eidson.
Loading webkit.org over and over is slower in WebKit2 than WebKit1, looks like page is not cached
<rdar://problem/8774683>
https://bugs.webkit.org/show_bug.cgi?id=51143
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::canCachePage): Return true as long as we
are not a custom representation (eg. a PDF).
(WebKit::WebFrameLoaderClient::shouldCacheResponse): Always return true.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Enable the page cache.
2010-12-15 Simon Fraser <simon.fraser@apple.com>
Reviewed by Adele Peterson.
WebKit2 in compositing mode no longer has font smoothing
https://bugs.webkit.org/show_bug.cgi?id=50733
Tell the root GraphicsLayer that its contents are opaque
if the WebPage draws its background, and that background
is not transparent.
The GraphicsLayer then uses the 'contentsOpaque' setting to
determine whether to use font smoothing.
Add pageBackgroundTransparencyChanged() to DrawingArea
so that the WebPage can inform the DrawingArea when the
background transparency changes.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::pageBackgroundTransparencyChanged):
(WebKit::DrawingArea::onPageClose):
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
(WebKit::LayerBackedDrawingArea::pageBackgroundTransparencyChanged):
* WebProcess/WebPage/LayerBackedDrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setDrawsBackground):
(WebKit::WebPage::setDrawsTransparentBackground):
2010-12-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Fix assertion in plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html test
https://bugs.webkit.org/show_bug.cgi?id=51136
Ensure that a plug-in that has explicitly cancelled the manual stream won't get any more callbacks.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
(WebKit::PluginControllerProxy::cancelManualStreamLoad):
(WebKit::PluginControllerProxy::manualStreamDidReceiveResponse):
(WebKit::PluginControllerProxy::manualStreamDidReceiveData):
(WebKit::PluginControllerProxy::manualStreamDidFinishLoading):
(WebKit::PluginControllerProxy::manualStreamDidFail):
* PluginProcess/PluginControllerProxy.h:
2010-12-15 Brian Weinstein <bweinstein@apple.com>
Windows Build Fix. A .h file was added to the vcproj twice, but not its corresponding cpp file.
* win/WebKit2.vcproj:
2010-12-15 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2: Can't add files to an <input type=file>
https://bugs.webkit.org/show_bug.cgi?id=51087
* Scripts/webkit2/messages.py:
Adds new types.
* Shared/API/c/WKBase.h:
Adds WKOpenPanelParametersRef and WKOpenPanelResultListenerRef.
* Shared/APIObject.h:
Adds TypeOpenPanelParameters and TypeOpenPanelResultListener.
* Shared/WebOpenPanelParameters.cpp: Added.
(WebKit::WebOpenPanelParameters::create):
(WebKit::WebOpenPanelParameters::WebOpenPanelParameters):
(WebKit::WebOpenPanelParameters::~WebOpenPanelParameters):
(WebKit::WebOpenPanelParameters::Data::encode):
(WebKit::WebOpenPanelParameters::Data::decode):
* Shared/WebOpenPanelParameters.h: Added.
(WebKit::WebOpenPanelParameters::allowMultipleFiles):
(WebKit::WebOpenPanelParameters::type):
Class representing options one can pass to open panel.
* UIProcess/API/C/WKAPICast.h:
Add casts for WebOpenPanelParameters and WebOpenPanelResultListenerProxy.
* UIProcess/API/C/WKOpenPanelParameters.cpp: Added.
(WKOpenPanelParametersGetTypeID):
(WKOpenPanelParametersGetAllowsMultipleFiles):
* UIProcess/API/C/WKOpenPanelParameters.h: Added.
* UIProcess/API/C/WKOpenPanelResultListener.cpp: Added.
(WKOpenPanelResultListenerGetTypeID):
(WKOpenPanelResultListenerChooseFiles):
(WKOpenPanelResultListenerCancel):
* UIProcess/API/C/WKOpenPanelResultListener.h: Added.
Add API wrappers.
* UIProcess/API/C/WKPage.h:
Add new UI callback, WKPageRunOpenPanelCallback.
* UIProcess/API/C/WebKit2.h:
Add includes for new API headers.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::QWKPage):
Stub out the runOpenPanel callback.
* UIProcess/WebOpenPanelResultListenerProxy.cpp: Added.
(WebKit::WebOpenPanelResultListenerProxy::WebOpenPanelResultListenerProxy):
(WebKit::WebOpenPanelResultListenerProxy::~WebOpenPanelResultListenerProxy):
(WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
(WebKit::WebOpenPanelResultListenerProxy::cancel):
(WebKit::WebOpenPanelResultListenerProxy::invalidate):
* UIProcess/WebOpenPanelResultListenerProxy.h: Added.
(WebKit::WebOpenPanelResultListenerProxy::create):
(WebKit::WebOpenPanelResultListenerProxy::type):
Adds the listener used to choose files for <input type=file>
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::didChooseFilesForOpenPanel):
(WebKit::WebPageProxy::didCancelForOpenPanel):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::runOpenPanel):
* UIProcess/WebUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runOpenPanel):
* WebProcess/WebPage/WebOpenPanelResultListener.cpp: Added.
(WebKit::WebOpenPanelResultListener::create):
(WebKit::WebOpenPanelResultListener::WebOpenPanelResultListener):
(WebKit::WebOpenPanelResultListener::~WebOpenPanelResultListener):
(WebKit::WebOpenPanelResultListener::didChooseFiles):
* WebProcess/WebPage/WebOpenPanelResultListener.h: Added.
(WebKit::WebOpenPanelResultListener::disconnectFromPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
(WebKit::WebPage::setActiveOpenPanelResultListener):
(WebKit::WebPage::didChooseFilesForOpenPanel):
(WebKit::WebPage::didCancelForOpenPanel):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::activeOpenPanelResultListener):
* WebProcess/WebPage/WebPage.messages.in:
Pipe through file choosing.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
Add new files.
2010-12-15 Anders Carlsson <andersca@apple.com>
Reviewed by Maciej Stachowiak.
Semi-reproducible crash in ChunkedUpdateDrawingArea::paintIntoUpdateChunk closing a particular yahoo page
https://bugs.webkit.org/show_bug.cgi?id=51126
<rdar://problem/8771219>
Laying out the web page can cause the drawing area to change so we need to protect against this.
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::display):
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::display):
* WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
(WebKit::LayerBackedDrawingArea::updateLayoutRunLoopObserverFired):
2010-12-15 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben.
WebKit2: WebPageWin needs implementations of hasLocalDataForURL and canHandleRequest
https://bugs.webkit.org/show_bug.cgi?id=51090
Implement these functions for WebKit2 on Windows.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::hasLocalDataForURL): Does the cross-platform part of the check for having local
data (file URL or subresource), then calls platformHasLocalDataForURL to let the platform do
their specific checks.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformHasLocalDataForURL): Moved the cross-platform code from here to WebPage::hasLocalDataForURL.
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::platformHasLocalDataForURL): Renamed from hasLocalDataForURL.
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::platformHasLocalDataForURL): Renamed from hasLocalDataForURL and implemented with CFNetwork calls. This is the
CFNetwork equivalent of the code in WebPageMac::platformHasLocalDataForURL.
(WebKit::WebPage::canHandleRequest): Copied the line of code from WebView::canHandleRequest in WebKit1, with a FIXME saying
this might not be enough (although it was in WebKit1 on Windows).
2010-12-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r74117.
http://trac.webkit.org/changeset/74117
https://bugs.webkit.org/show_bug.cgi?id=51113
This broke the GTK1 build. (Requested by mrobinson on
#webkit).
* GNUmakefile.am: Removed.
* Scripts/generate-forwarding-headers.pl:
* WebKit2Prefix.h:
* gtk/webkit2.pc.in: Removed.
2010-12-15 Amruth Raj <amruthraj@motorola.com> and Ravi Kasibhatla <ravi.kasibhatla@motorola.com>
Reviewed by Martin Robinson.
Changes to enable building WebKit2 for Gtk port.
(https://bugs.webkit.org/show_bug.cgi?id=37369)
* GNUmakefile.am: Added.
* Scripts/generate-forwarding-headers.pl: For GTK port, taking 1 extra argument for copying network headers.
* WebKit2Prefix.h: Included WebCore/config.h for GTK port as the first header file for WebKit2 sources files.
* gtk: Added.
* gtk/webkit2.pc.in: Added.
2010-12-15 Jan Erik Hanssen <jhanssen@sencha.com>
Reviewed by Andreas Kling.
[Qt][WK2] webkit2 does not compile on OS X
https://bugs.webkit.org/show_bug.cgi?id=50128
prctl(2) is only available on Linux, so use an atexit handler for killing
all the child processes when the process is exiting.
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::cleanupProcesses):
(WebKit::QtWebProcess::QtWebProcess):
(WebKit::QtWebProcess::processStateChanged):
(WebKit::ProcessLauncherHelper::instance):
2010-12-14 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* win/WebKit2Common.vsprops:
2010-12-14 Anders Carlsson <andersca@apple.com>
Fix Qt build.
* WebKit2.pro:
2010-12-14 Anders Carlsson <andersca@apple.com>
Reviewed by TYPO FIX.
Fix a typo.
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::determineQuirks):
2010-12-14 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Cannot type into plugin edit field
https://bugs.webkit.org/show_bug.cgi?id=51074
<rdar://problem/8483741>
Add a PrognameShouldBeWebKitPluginHost quirk, since it turns out Flash Player calls getprogname() and checks
if the return value is "WebKitPluginHost" in order to determine when to handle NPCocoaEventKeyDown events.
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::netscapePluginModule):
If the plug-in module has the PrognameShouldBeWebKitPluginHost quirk, call setprogname("WebKitPluginHost").
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
(WebKit::NetscapePluginModule::load):
Call determineQuirks()
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::determineQuirks):
Add the PrognameShouldBeWebKitPluginHost quirk for Flash.
* Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
(WebKit::NetscapePluginModule::determineQuirks):
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::determineQuirks):
Add stubs.
* Shared/Plugins/PluginQuirks.h:
Add new PluginQuirks file.
* WebKit2.xcodeproj/project.pbxproj:
Add PluginQuirks.h
2010-12-14 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add a NetscapePluginModuleX11 and move the Qt implementation of PluginInfoStore::getPluginInfo there
https://bugs.webkit.org/show_bug.cgi?id=51066
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: Copied from WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp.
(WebKit::NetscapePluginModule::getPluginInfo):
* UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
(WebKit::PluginInfoStore::getPluginInfo):
* WebKit2.pro:
2010-12-14 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Move Windows version of getPluginInfo to NetscapePluginModule
https://bugs.webkit.org/show_bug.cgi?id=51073
* Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: Added.
(WebKit::getVersionInfo):
(WebKit::fileVersion):
(WebKit::NetscapePluginModule::getPluginInfo):
* UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
(WebKit::PluginInfoStore::getPluginInfo):
* win/WebKit2.vcproj:
2010-12-14 Alice Liu <alice.liu@apple.com>
Fix clang++ build.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::sendSync):
Move the default argument to the declaration.
2010-12-14 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Move PluginInfoStore::getPluginInfo to NetscapePluginModule
https://bugs.webkit.org/show_bug.cgi?id=51058
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
Move implementation of PluginInfoStore::getPluginInfo and related
helper functions here.
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::getPluginInfo):
Just call NetscapePluginModule::getPluginInfo here for now.
* WebKit2.xcodeproj/project.pbxproj:
Add NetscapePluginModuleMac.mm.
2010-12-14 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Switch name and description order when fetching Carbon plug-in info
https://bugs.webkit.org/show_bug.cgi?id=46211
The plug-in description comes before the name in the Carbon string list resource.
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::getPluginInfoFromCarbonResources):
2010-12-14 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Move NetscapePluginModule.{cpp|h} to Shared/Plugins/Netscape
https://bugs.webkit.org/show_bug.cgi?id=51052
* Shared/Plugins/Netscape/NetscapePluginModule.cpp: Renamed from WebKit2/WebProcess/Plugins/Netscape/NetscapePluginModule.cpp.
* Shared/Plugins/Netscape/NetscapePluginModule.h: Renamed from WebKit2/WebProcess/Plugins/Netscape/NetscapePluginModule.h.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Common.vsprops:
2010-12-14 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Handle complex text input for plug-ins
https://bugs.webkit.org/show_bug.cgi?id=51047
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::sendComplexTextInput):
Pass along the text input to the plug-in.
* PluginProcess/PluginControllerProxy.messages.in:
Add SendComplexTextInput message.
* UIProcess/API/mac/WKTextInputWindowController.h: Added.
* UIProcess/API/mac/WKTextInputWindowController.mm: Added.
Add text input window controller, mostly copied from WebKit1.
* UIProcess/API/mac/WKView.mm:
(-[WKView keyDown:]):
If needed, pass along the event to the text input window controller.
(-[WKView inputContext]):
Return the input context of the text input window controller.
(-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]):
Notify the input window controller that the input source changed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::sendComplexTextInputToPlugin):
Send the complex text input to the web process.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::convertStringToKeyCodes):
Convert a string to a vector of key codes in the current encoding.
(WebKit::NetscapePlugin::sendComplexTextInput):
In the Cocoa event model, create and dispatch an NPCocoaEventTextInput event.
In the Carbon event model, convert the string to individual key codes and send them
as key down events.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::sendComplexTextInput):
Send the text to the plug-in controller proxy.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::sendComplexTextInput):
If the plug-in has a matching text input identifier, call Plugin::sendComplexTextInput.
* WebProcess/WebPage/WebPage.messages.in:
Add SendComplexTextInputToPlugin message.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::sendComplexTextInputToPlugin):
Iterate over all known plug-in views and try to find one to send the text input to.
2010-12-13 Alexey Proskuryakov <ap@apple.com>
Reviewed by Adam Barth.
https://bugs.webkit.org/show_bug.cgi?id=50953
DNS Prefetch should be an opt-in feature
Pass the preference through WebKit2.
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetDNSPrefetchingEnabled):
(WKPreferencesGetDNSPrefetchingEnabled):
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2010-12-13 Anders Carlsson <andersca@apple.com>
Reviewed by Kevin Decker.
Pass the complex text input status to the WKView
https://bugs.webkit.org/show_bug.cgi?id=50993
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setComplexTextInputEnabled):
* UIProcess/API/mac/WKView.mm:
(-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setComplexTextInputEnabled):
2010-12-14 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
WebKit 2 does not send touch cancel events correctly between processes
https://bugs.webkit.org/show_bug.cgi?id=50235
The classes WebKit2PlatformTouchPoint and WebKit2PlatformTouchEvent
misses the conversion of TouchCancel events and points.
This patch add the missing enums when converting from a WebTouchEvent
to a PlatformTouchEvent.
Testing is already covered by fast/events/touch/send-oncancel-event.html
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
(WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
2010-12-14 Zalan Bujtas <zbujtas@gmail.com>
Reviewed by Kenneth Rohde Christiansen.
Add loadFinished() for provisional load error
This fixes the hanging UI state, when provisional load error occurs due to
the async nature of policy check.
https://bugs.webkit.org/show_bug.cgi?id=48724
* UIProcess/API/qt/ClientImpl.cpp:
(loadFinished):
(qt_wk_didFailProvisionalLoadWithErrorForFrame):
(qt_wk_didFinishLoadForFrame):
(qt_wk_didFailLoadWithErrorForFrame):
2010-12-13 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2: Need to be able to set the application name for the user agent for a WKPage
https://bugs.webkit.org/show_bug.cgi?id=51011
Fixes:
WebKit2: Need to be able to set the application name for the user agent for a WKPage
<rdar://problem/8564532>
WebKit2: Need to be able to get the computed user agent for a WKPage
<rdar://problem/8637285>
Moves user agent computation to the UIProcess and just passes it to the WebProcess
when it has changed.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
Add a user agent to the creation parameters.
* UIProcess/API/C/WKPage.cpp:
(WKPageCopyUserAgent):
(WKPageCopyApplicationNameForUserAgent):
(WKPageSetApplicationNameForUserAgent):
(WKPageSetCustomUserAgent):
* UIProcess/API/C/WKPage.h:
Add new API to set the application name and access the computed user agent.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::setUserAgent):
(WebKit::WebPageProxy::setApplicationNameForUserAgent):
(WebKit::WebPageProxy::setCustomUserAgent):
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::userAgent):
(WebKit::WebPageProxy::applicationNameForUserAgent):
* UIProcess/mac/WebPageProxyMac.mm: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setUserAgent):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userAgent):
* WebProcess/WebPage/WebPage.messages.in:
Pipe through user agent.
(WebKit::callGestalt):
(WebKit::macOSXVersionString):
(WebKit::userVisibleWebKitVersionString):
(WebKit::WebPageProxy::standardUserAgent):
* UIProcess/win/WebPageProxyWin.cpp: Added.
(WebKit::windowsVersion):
(WebKit::userVisibleWebKitVersionString):
(WebKit::WebPageProxy::standardUserAgent):
Port standardUserAgent computation from WebKit1.
* UIProcess/qt/WebPageProxyQt.cpp: Added.
(WebKit::WebPageProxy::standardUserAgent):
Stub out the user agent so there is no change in behavior.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add new file.
2010-12-13 Brady Eidson <beidson@apple.com>
Reviewed by Jon Honeycutt (and Brian Weinstein in heart).
<rdar://problem/8752202> and https://bugs.webkit.org/show_bug.cgi?id=50997
Expose "link title" and "link label" to InjectedBundleHitTestResult API
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
(WKBundleHitTestResultCopyLinkLabel):
(WKBundleHitTestResultCopyLinkTitle):
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::linkLabel):
(WebKit::InjectedBundleHitTestResult::linkTitle):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2010-12-13 Brian Weinstein <bweinstein@apple.com>
Windows Build Fix. Add a needed include.
* UIProcess/win/WebView.cpp:
2010-12-13 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Remove associated page concept from WKView constructor
https://bugs.webkit.org/show_bug.cgi?id=50983
Step 2: Remove WebPageNamespace. It no longer does anything.
* Shared/APIObject.h:
* UIProcess/API/C/WKPage.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
* UIProcess/API/qt/qgraphicswkview.cpp:
* UIProcess/API/qt/qwkcontext.cpp:
(QWKContext::QWKContext):
* UIProcess/API/qt/qwkcontext_p.h:
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::QWKPagePrivate):
* UIProcess/API/qt/qwkpage_p.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::createWebPage):
* UIProcess/WebContext.h:
* UIProcess/WebPageNamespace.cpp: Removed.
* UIProcess/WebPageNamespace.h: Removed.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::context):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::createWebPage):
* UIProcess/WebProcessProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
* UIProcess/win/WebView.h:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
2010-12-13 Sam Weinig <sam@webkit.org>
Fix windows build.
* UIProcess/win/WebView.h:
2010-12-13 Sam Weinig <sam@webkit.org>
Fix windows build.
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/win/WebView.h:
(WebKit::WebView::create):
2010-12-13 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Remove associated page concept from WKView constructor
https://bugs.webkit.org/show_bug.cgi?id=50983
Step 1: Remove associate page constructors from WKView and make
all views use the shared namespace for the context.
* UIProcess/API/C/win/WKView.cpp:
* UIProcess/API/C/win/WKView.h:
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
* UIProcess/API/qt/qwkcontext.cpp:
* UIProcess/API/qt/qwkcontext.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
* UIProcess/win/WebView.h:
(WebKit::WebView::create):
2010-12-13 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/WebPageProxy.h:
2010-12-13 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben.
WebKit2: Leaks a WebView when opening/closing Web Inspector on Windows
https://bugs.webkit.org/show_bug.cgi?id=50975
<rdar://problem/8763501>
Make m_inspectorView be a RefPtr<WebView>, instead of a WebView*.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::WebInspectorProxy): If we are on Windows, include WebView.h.
* UIProcess/WebInspectorProxy.h: Change the type of m_inspectorView to a RefPtr<WebView>.
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Remove the call to leakRef when creating the WebView.
2010-12-13 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Pass the complex text input state all the way to the UI process
https://bugs.webkit.org/show_bug.cgi?id=50980
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::setComplexTextInputEnabled):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setComplexTextInputEnabled):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::pluginComplexTextInputIdentifier):
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::pluginComplexTextInputIdentifier):
(WebKit::PluginProxy::setComplexTextInputEnabled):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginProxy.messages.in:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setComplexTextInputEnabled):
2010-12-13 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Change the WebKit2 public API so there is no explicit WKPageNamespace object
https://bugs.webkit.org/show_bug.cgi?id=50898
* Shared/API/c/WKBase.h: Remove definition of WKPageNamespaceRef.
* UIProcess/API/C/WKAPICast.h: Remove toAPI/toImpl for WKPageNamespaceRef.
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/WKPage.h:
Replace WKPageGetPageNamespace with WKPageGetContext.
* UIProcess/API/C/WKPageNamespace.cpp: Removed.
* UIProcess/API/C/WKPageNamespace.h: Removed.
* UIProcess/API/C/WebKit2.h: Remove #include of WKPageNamespace.h.
* UIProcess/API/C/win/WKView.cpp:
(WKViewCreate): Changed to take a WKContextRef instead of a WKPageNamespaceRef.
(WKViewCreateUsingSharedProcess): Added. Similar to WKViewCreate except that
all callers of it will have their views end up in the same shared process, whereas
with WKViewCreate, a new internal page namespace will be created and could place
the view's WebPage into a new process.
(WKViewCreateForAssociatedPage): Added. Creates a view that is forced to use the
same process as the passed in page.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
(WebKit::WebView::initialize):
* UIProcess/win/WebView.h:
(WebKit::WebView::create):
(WebKit::WebView::createUsingSharedProcess):
(WebKit::WebView::createForAssociatedPage):
Implementation of the WKView create functions.
* UIProcess/API/C/win/WKView.h:
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:]):
(-[WKView initWithFrame:contextRef:]):
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView initWithFrame:contextRef:usingSharedProcess:]):
(-[WKView initWithFrame:contextRef:pageGroupRef:usingSharedProcess:]):
(-[WKView initWithFrame:forAssociatedPageRef:]):
(-[WKView initWithFrame:forAssociatedPageRef:pageGroupRef:]):
(-[WKView initWithFrame:pageNamespace:pageGroup:]):
Add new initializers for the objective-c WKView. It follows the same
pattern as WKViewRef.
* UIProcess/API/qt/qwkcontext.cpp:
(QWKContext::QWKContext):
* UIProcess/API/qt/qwkcontext.h:
Remove uses of WKPageNamespaceRef.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::sharedPageNamespace): Returns a shared
page namespace used by the view's createUsingSharedProcess constructions.
(WebKit::WebContext::createPageNamespace): Change to return
a PassRefPtr to make things clearer.
(WebKit::WebContext::pageNamespaceWasDestroyed): Clear the shared
namespace if it is cleared.
* UIProcess/WebContext.h:
* UIProcess/WebPageNamespace.h: Remove unused "struct WKContextStatistics".
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::context):
* UIProcess/WebPageProxy.h:
Add context getter.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
Use forAssociatedPageRef constructor for the WebInspector view.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
Remove WKPageNamespace.h/cpp.
2010-12-13 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build fix.
* UIProcess/win/WebInspectorProxyWin.cpp: Non-Apple builds
need to include <wtf/RetainPtr.h>.
2010-12-13 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build fix after r73807.
Added stub implementation of Download object.
* WebProcess/Downloads/curl: Added.
* WebProcess/Downloads/curl/DownloadCurl.cpp: Added.
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::cancel):
(WebKit::Download::platformInvalidate):
* win/WebKit2.vcproj: Exclude DownloadCFNet for Cairo builds,
added DownloadCurl (excluded for regular Apple builds.)
2010-12-13 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add the ability for plug-ins to toggle complex text input
https://bugs.webkit.org/show_bug.cgi?id=50966
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
Initialize m_isComplexTextInputEnabled.
(WebKit::PluginControllerProxy::setComplexTextInputEnabled):
Update m_isComplexTextInputEnabled.
* PluginProcess/PluginControllerProxy.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
Initialize m_pluginHasFocus and m_windowHasFocus.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
(WebKit::NetscapePlugin::isWindowActive):
Return m_windowHasFocus.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformSetFocus):
Update m_pluginHasFocus and call setComplexTextInputEnabled.
(WebKit::NetscapePlugin::windowFocusChanged):
Update m_windowHasFocus and call setComplexTextInputEnabled.
* WebProcess/Plugins/PluginController.h:
Add setComplexTextInputEnabled.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setComplexTextInputEnabled):
* WebProcess/Plugins/PluginView.h:
Add setComplexTextInputEnabled
2010-12-13 David Hyatt <hyatt@apple.com>
Reviewed by Adam Roben.
Remove the space behavior that I added. It's covered in EventHandler in WebCore
already for Windows.
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::performDefaultBehaviorForKeyEvent):
2010-12-13 David Hyatt <hyatt@apple.com>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn should respect writing-mode. Use
logical scrolling instead of physical scrolling for those keys in WebKit2.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::logicalScroll):
(WebKit::WebPage::performDefaultBehaviorForKeyEvent):
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::logicalScroll):
(WebKit::WebPage::performDefaultBehaviorForKeyEvent):
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::logicalScroll):
(WebKit::WebPage::performDefaultBehaviorForKeyEvent):
2010-12-13 Brian Weinstein <bweinstein@apple.com>
Reviewed by Darin Adler.
WebKit2: Focusing Web Inspector window doesn't focus contents on Windows
https://bugs.webkit.org/show_bug.cgi?id=50947
<rdar://problem/8762468>
When we get the notification that the inspector window has focused, focus the inner inspector view.
* UIProcess/WebInspectorProxy.h:
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::onSetFocusEvent): Set the focus of the inspector view, because that is what
needs to be focused in the inspector window.
2010-12-13 Dan Bernstein <mitz@apple.com>
Coding style fix.
* WebProcess/Downloads/mac/DownloadMac.mm:
(WebKit::originatingURLFromBackForwardList):
2010-12-13 Balazs Kelemen <kbalazs@webkit.org>
Unreviewed trivial build fix (linux, 64 bit, gcc-4.5.1)
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exceededDatabaseQuota):
Don't use unsigned long long as alias for uint64_t.
2010-12-13 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Crash when clicking a download link that targets a new tab
https://bugs.webkit.org/show_bug.cgi?id=50935
<rdar://problem/8760572>
Check for a null history item.
* WebProcess/Downloads/mac/DownloadMac.mm:
(WebKit::originatingURLFromBackForwardList):
2010-12-13 Andras Becsi <abecsi@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt][WK2] Fix build if WebKitTools are not available
https://bugs.webkit.org/show_bug.cgi?id=50242
* DerivedSources.pro: Remove dependency to WebKitTools.
* Scripts/generate-forwarding-headers.pl: Moved from WebKitTools/Scripts/generate-forwarding-headers.pl.
2010-12-13 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed.
* WebKit2.pro: Remove non-existant Shared/DrawingAreaBase.h from build system.
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
Added a stub implememntation.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::requestCheckingOfString):
* WebProcess/WebCoreSupport/WebEditorClient.h:
2010-12-12 Brian Weinstein <bweinstein@apple.com>
Reviewed by Tim Hatcher.
WebKit2: Implement WebInspector::localizedStringsURL on Windows
https://bugs.webkit.org/show_bug.cgi?id=50896
Find the localized strings file using CFBundleCopyResourceURL.
* WebProcess/WebPage/win/WebInspectorWin.cpp:
(WebKit::WebInspector::localizedStringsURL):
2010-12-12 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Give LogTextInput a sensible flag value.
* Platform/Logging.cpp:
2010-12-12 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Remove incorrect assertion that has been firing in the API tester.
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::~WebDatabaseManagerProxy):
2010-12-12 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Disable WebKit2 logging by default.
https://bugs.webkit.org/show_bug.cgi?id=50878
* Platform/Logging.cpp:
(initializeLogChannelsIfNecessary):
2010-12-11 Brian Weinstein <bweinstein@apple.com>
Reviewed by Sam Weinig.
Web Inspector: Make inspector on Windows show and be usable in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=50877
Hook up the unimplemented methods in WebInspectorProxyWin to get the web inspector
showing and usable in WebKit2 on Windows.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::WebInspectorProxy): Initialize Windows-specific variables to 0.
* UIProcess/WebInspectorProxy.h:
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::registerInspectorViewWindowClass): Sets up the inspector view class.
(WebKit::WebInspectorProxy::InspectorViewWndProc): Calls through to the WebInspectorProxy's non-static
WndProc.
(WebKit::WebInspectorProxy::wndProc): Handles WM_SIZE, WM_CLOSE, and WM_GETMINMAXINFO, the rest go to
::DefWindowProc.
(WebKit::WebInspectorProxy::onSizeEvent): Resize the WKView that has the inspector page to match the
outer window that was just resized.
(WebKit::WebInspectorProxy::onMinMaxInfoEvent): Set the minimum size the window can be resized to.
(WebKit::WebInspectorProxy::onCloseEvent): Hide the window, and call WebInspectorProxy::close.
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Create a WKView and return its page.
(WebKit::WebInspectorProxy::platformOpen): Create an HWND for the inspector, put the inspector's WKView
inside of it, and show the window.
(WebKit::WebInspectorProxy::platformClose): Destroy the inspector's window (which destroys the child WKView),
and 0 out instance variables.
(WebKit::WebInspectorProxy::inspectorPageURL): Finds inspector/inspector.html in the WebKit bundle.
2010-12-12 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Andreas Kling.
[Qt][WK2] Crash in WebPage constructor.
https://bugs.webkit.org/show_bug.cgi?id=50892
* WebProcess/qt/WebProcessQt.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
Disable runtime enabled features that have no WebKit2 implementation yet.
2010-12-10 Jon Honeycutt <jhoneycutt@apple.com>
Select menus with short option titles do not paint properly
https://bugs.webkit.org/show_bug.cgi?id=50860
<rdar://problem/8660807>
The backing stores used for painting the popup menu items were only as
wide as the widest option title, but the popup window that we create is
at least as wide as the <select> element. This adjusts the backing
stores to be at least as wide as the <select>, as well.
Reviewed by Sam Weinig.
* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::paint):
Paint using the width of the backing store.
* WebProcess/WebCoreSupport/WebPopupMenu.cpp:
(WebKit::WebPopupMenu::show):
Pass the page coordinates of the <select> element to
setUpPlatformData().
* WebProcess/WebCoreSupport/WebPopupMenu.h:
Added new parameter to setUpPlatformData().
* WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
(WebKit::WebPopupMenu::setUpPlatformData):
Ditto.
* WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):
Ditto.
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):
Fixed a typo in a comment. Adjust the backing store size to be at least
as wide as the <select> element, and use that width when painting the
items to the backing store.
2010-12-11 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed Qt buildfix after r73808.
WebKit2: Need a WebKit2 equivalent of the WebKit1 WebDatabaseManager
https://bugs.webkit.org/show_bug.cgi?id=50606
* DerivedSources.pro:
2010-12-11 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r73834.
http://trac.webkit.org/changeset/73834
https://bugs.webkit.org/show_bug.cgi?id=50866
It broke Qt-WebKit2 build, because of missing WK2_DIR variable
(Requested by Ossy on #webkit).
* WebKit2.pro:
2010-12-10 Siddharth Mathur <siddharth.mathur@nokia.com>
Reviewed by Eric Seidel.
[Qt][WK2] Make WebKit2 static library compile on Symbian
https://bugs.webkit.org/show_bug.cgi?id=50861
* WebKit2.pro:
2010-12-10 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Ensure that we are not getting too many wheel events
<rdar://problem/7881465>
Add simple coalescing of wheel events being sent to the WebProcess. This
adds two models, one which drops interim events and one which merges events
together. For now, we are using the simpler dropping model.
* Shared/WebEvent.h:
(WebKit::WebEvent::modifiers):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::coalesceWheelEvents):
(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::didReceiveEvent):
* UIProcess/WebPageProxy.h:
2010-12-10 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Make WKContextGetStatistics gather global statistics
https://bugs.webkit.org/show_bug.cgi?id=50850
Change WKContextGetStatistics to work on all objects in the process, and
make it more robust by incrementing/decrementing the counts in the constructor
and destructor respectively.
Also, rename WKContextGetStatistics to WKContextGetGlobalStatistics to better match
what it's actually doing.
* UIProcess/API/C/WKContext.cpp:
(WKContextGetStatistics):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]):
(-[WKView dealloc]):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::statistics):
* UIProcess/WebContext.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::WebFrameProxy):
(WebKit::WebFrameProxy::~WebFrameProxy):
* UIProcess/WebPageNamespace.cpp:
* UIProcess/WebPageNamespace.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::~WebPageProxy):
* UIProcess/WebPageProxy.h:
2010-12-10 Brian Weinstein <bweinstein@apple.com>
Reviewed by Darin Adler.
WebKit2: Context menu support on Windows
<https://bugs.webkit.org/show_bug.cgi?id=50514>
Implment showing of the context menu on Windows for WebKit2, and calling through to
WebPageProxy::contextMenuItemSelected.
* UIProcess/win/WebContextMenuProxyWin.cpp:
(WebKit::WebContextMenuProxyWin::WebContextMenuProxyWin): Initialize the member variables.
(WebKit::WebContextMenuProxyWin::populateMenu): Iterate over the vector of WebContextMenuItemData
that was passed in, adding the menu items and recursively calling back into this function to populate
any submenus that are needed. This function also sets up the map from action identifierss to WebContextMenuItemData,
to use to find the WebContextMenuItemData from a selected menu item.
(WebKit::WebContextMenuProxyWin::showContextMenu): Destroy any menu we have already created, populate the menu
to show, and show the context menu. Once TrackPopupMenuEx returns, it returns identifier of the selected menu item.
Look up that identifier in the map we created, and tell the WebPageProxy that a context menu item was selected.
(WebKit::WebContextMenuProxyWin::hideContextMenu): Destroy the HMENU if it is non-null, and clear the identifier map.
* UIProcess/win/WebContextMenuProxyWin.h:
(WebKit::WebContextMenuProxyWin::create): Call through to the constructor, and change the arguments that it takes.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::createContextMenuProxy): Call with the correct arguments.
2010-12-10 Jessie Berlin <jberlin@apple.com>
Qt Build Fix. Unreviewed.
* WebKit2.pro:
Add the Messages.h and MessageReceivers.h.
2010-12-10 Jessie Berlin <jberlin@apple.com>
Reviewed by Adam Roben and Sam Weinig.
WebKit2: Need a WebKit2 equivalent of the WebKit1 WebDatabaseManager
https://bugs.webkit.org/show_bug.cgi?id=50606
Add a WebDatabaseManagerProxy owned by the WebContext.
Expose API (similar to the WebKit1 API) to get a list of origins for which there are
Databases, delete all the databases for a given origin, and delete all the databases.
Add WebDatabaseManager and WebDatabaseManagerProxy as messages receivers.
* DerivedSources.make:
* Platform/CoreIPC/MessageID.h:
Add the WebDatabaseManagerProxy as a UIProcess type (DatabaseManager).
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetDatabaseManager):
Expose API to get the DatabaseManager.
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKDatabaseManager.cpp: Added.
(WKDatabaseManagerGetTypeID):
(WKDatabaseManagerGetDatabaseOrigins):
(callGetDatabaseOriginsBlockBlockAndDispose):
(WKDatabaseManagerGetDatabaseOrigins_b):
(WKDatabaseManagerDeleteDatabasesForOrigin):
(WKDatabaseManagerDeleteAllDatabases):
* UIProcess/API/C/WKDatabaseManager.h: Added.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
Create the WebDatabaseManagerProxy.
(WebKit::WebContext::processDidClose):
Invalidate the WebDatabaseManagerProxy.
(WebKit::WebContext::didReceiveMessage):
Forward messages to the WebDatabaseManagerProxy.
* UIProcess/WebContext.h:
(WebKit::WebContext::databaseManagerProxy):
* UIProcess/WebDatabaseManagerProxy.cpp: Added.
(WebKit::WebDatabaseManagerProxy::create):
(WebKit::WebDatabaseManagerProxy::WebDatabaseManagerProxy):
(WebKit::WebDatabaseManagerProxy::~WebDatabaseManagerProxy):
(WebKit::WebDatabaseManagerProxy::invalidate):
Invalidate the map of callbacks for getDatabaseOrigins.
(WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
Store the callback and send the request for the origins which have databases to the
WebProcess.
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
Call the callback function with the SecurityOrigins created from the identifiers received.
(WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
If the origin exists, send the message on to the WebProcess to delete the databases
associated with that origin.
(WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
Send the message to the WebProcess to delete all the databases.
* UIProcess/WebDatabaseManagerProxy.h: Added.
(WebKit::WebDatabaseManagerProxy::type):
* UIProcess/WebDatabaseManagerProxy.messages.in: Added.
* UIProcess/WebPageProxy.cpp:
Move invalidateCallbackMap from here ...
* UIProcess/GenericCallback.h:
(WebKit::invalidateCallbackMap):
.. to here so that it can be used elsewhere (e.g. by WebDatabaseManagerProxy).
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage):
Forward on all messages destined for the WebDatabaseManagerProxy to the WebContext.
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::didReceiveMessage):
(WebKit::WebDatabaseManager::getDatabaseOrigins):
Send an array of the identifiers for the SecurityOrigins for which there are databases to
the UIProcess.
(WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
If the SecurityOrigin with that identifier exists, tell the DatabaseTracker to delete the
databases for that origin.
(WebKit::WebDatabaseManager::deleteAllDatabases):
Tell the DatabaseTracker to delete the databases for that origin.
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: Added.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage):
* WebKit2.pro:
Add WKDatabaseManager.cpp/.h and WebDatabaseManagerProxy.cpp/.h
* WebKit2.xcodeproj/project.pbxproj:
Ditto, also add WebDatabaseManagerProxy.messages.in and WebDatabaseManager.messages.in.
* win/WebKit2.vcproj:
Ditto.
* win/WebKit2Generated.make:
Make sure WKDatabaseManager.h is copied into WebKitBuild on Windows.
2010-12-10 Ada Chan <adachan@apple.com>
Reviewed by Anders Carlsson.
Implement Download::start() and Download::startWithHandle() on Windows.
https://bugs.webkit.org/show_bug.cgi?id=50844
* WebProcess/Downloads/Download.h:
* WebProcess/Downloads/cf/DownloadCFNet.cpp:
(WebKit::Download::start): Create a CFURLDownloadRef and schedule it.
(WebKit::Download::startWithHandle): Create a CFURLDownloadRef with the loading connection
retrieved from the ResourceHandle.
(WebKit::Download::platformInvalidate):
(WebKit::downloadFromClientInfo):
(WebKit::didStartCallback):
(WebKit::willSendRequestCallback):
(WebKit::didReceiveAuthenticationChallengeCallback):
(WebKit::didReceiveResponseCallback):
(WebKit::willResumeWithResponseCallback):
(WebKit::didReceiveDataCallback):
(WebKit::shouldDecodeDataOfMIMETypeCallback):
(WebKit::decideDestinationWithSuggestedObjectNameCallback):
(WebKit::didCreateDestinationCallback):
(WebKit::didFinishCallback):
(WebKit::didFailCallback):
2010-12-10 Enrica Casucci <enrica@apple.com>
Windows build fix. Unreviewed.
Adding a dummy synchronous message for platforms
that don't have any.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::dummy):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2010-12-09 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben.
Prep for WebKit2: Context menu support on Windows
https://bugs.webkit.org/show_bug.cgi?id=50514
Update WebKit2 to call the correct code when CROSS_PLATFORM_CONTEXT_MENUS is set.
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::WebContextMenuItemData): Add a branch based on whether or not
CROSS_PLATFORM_CONTEXT_MENUS is set.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::customizeMenu): Define different functions based on
whether or not CROSS_PLATFORM_CONTEXT_MENUS. Both of these are stubs, so functionality
doesn't need to be shared.
* WebProcess/WebCoreSupport/WebContextMenuClient.h: Define different functions based on
whether or not CROSS_PLATFORM_CONTEXT_MENUS.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show): Add a branch based on whether or not
CROSS_PLATFORM_CONTEXT_MENUS is set.
2010-12-09 Enrica Casucci <enrica@apple.com>
Reviewed by Alexey Proskuryakov.
Implement IME support for Mac.
<rdar://problem/7660589> WebKit2: Implement IME support for Mac.
https://bugs.webkit.org/show_bug.cgi?id=50788
This patch addes support for input methods in WebKit2.
In order to support IME, it was necessary to add synchronous calls from the UIProcess
to the WebProcess. These calls all have a timeout of 1 second.
The current implementation still uses the NSTextInput protocol, but the plan is to move
to the NSTextInputClient protocol. This has not been done yet for ease of comparison with
WebKit. attributedSubstringFromRange is the only method that has not been implemented, because
I have not yet decided what is the best way to send an NSAttributedString across the process
boundary.
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction): Added template for member function.
with four reply arguments.
* Scripts/webkit2/messages.py: Added CompositionUnderline and relevant header.
* Shared/WebCoreArgumentCoders.h:
(CoreIPC::): Added encoder/decoder for CompositionUnderline.
* UIProcess/API/mac/PageClientImpl.h: Added parameters to interceptKeyEvent and selectionChanged.
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::selectionChanged): Added parameters.
(WebKit::PageClientImpl::interceptKeyEvent): Added parameters.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]): Added initialization of new private members.
(-[WKView insertText:]):
(-[WKView _selectionChanged:isEditable:isPassword:hasMarkedText:range:]): Added parameters.
(-[WKView _interceptKeyEvent:hasComposition:start:end:lines:WebCore::]): Added parameters.
(-[WKView keyDown:]): Modified to reset state on each keyDown.
(-[WKView selectedRange]): Added.
(-[WKView hasMarkedText]): Added.
(-[WKView unmarkText]): Added.
(-[WKView validAttributesForMarkedText]): Added.
(extractUnderlines): Added.
(-[WKView setMarkedText:selectedRange:]): Added.
(-[WKView markedRange]): Added.
(-[WKView attributedSubstringFromRange:]): Added.
(-[WKView characterIndexForPoint:]): Added.
(-[WKView firstRectForCharacterRange:]): Added.
(-[WKView conversationIdentifier]): Added.
* UIProcess/API/mac/WKViewInternal.h: Added parameters to _interceptKeyEvent and _selectionChanged.
* UIProcess/PageClient.h: Added parameters to interpretKeyEvent and selectionChanged.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getMarkedRange): Added.
(WebKit::WebPageProxy::characterIndexForPoint): Added.
(WebKit::WebPageProxy::firstRectForCharacterRange): Added.
(WebKit::WebPageProxy::interpretKeyEvent): Additional parameters.
(WebKit::WebPageProxy::didSelectionChange): Additional parameters for Mac platform.
* UIProcess/WebPageProxy.h: Added new methods and parameters to didSelectionChange
and interpretKeyEvent.
* UIProcess/WebPageProxy.messages.in: Added parameters to interpretKeyEvent and selectionChanged messages.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::sendSync): Added support for synchronous messages.
The default timeout is 1 second.
* WebProcess/WebCoreSupport/WebEditorClient.cpp: respondToChangedSelection is now
only for non Mac platform.
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::respondToChangedSelection): Added implementation for Mac platform.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveSyncMessage): Added.
* WebProcess/WebPage/WebPage.h: Added new methods and support for synchronous messages.
* WebProcess/WebPage/WebPage.messages.in: Added new messages.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::interceptEditingKeyboardEvent): Added parameters.
(WebKit::WebPage::convertRangeToPlatformRange): Added.
(WebKit::WebPage::getMarkedRange): Added.
(WebKit::characterRangeAtPoint): Added.
(WebKit::WebPage::characterIndexForPoint): Added.
(WebKit::convertToRange): Added.
(WebKit::WebPage::firstRectForCharacterRange): Added.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveSyncMessage): Added.
* WebProcess/WebProcess.h: Added didReceiveSyncMessage.
2010-12-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt][WK2] Add the QWKContext API class to wrap the WebContext.
https://bugs.webkit.org/show_bug.cgi?id=50750
* UIProcess/API/qt/WKView.h:
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::QGraphicsWKView):
Change the WKPageNamespaceRef argument to QWKContext*
* UIProcess/API/qt/qgraphicswkview.h:
* UIProcess/API/qt/qwkcontext.cpp: Added.
* UIProcess/API/qt/qwkcontext.h: Added.
* UIProcess/API/qt/qwkcontext_p.h: Added.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::QWKPagePrivate):
(QWKPage::QWKPage):
Change the WKPageNamespaceRef argument to QWKContext*
* UIProcess/API/qt/qwkpage.h:
* UIProcess/API/qt/qwkpage_p.h:
* WebKit2.pro:
2010-12-10 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Flush IPC connection send buffer after each message.
[Qt] [WK2] IPC messages are not sent until send buffer fills up
https://bugs.webkit.org/show_bug.cgi?id=50667
* Platform/CoreIPC/qt/ConnectionQt.cpp:
(CoreIPC::Connection::sendOutgoingMessage):
2010-12-09 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt][WK2] Use a single QNetworkAccessManager per web process.
https://bugs.webkit.org/show_bug.cgi?id=50757
This allows a better management of network resources and the use
of global cookie jar and disk cache across all frames.
* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
(WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):
(WebCore::WebFrameNetworkingContext::networkAccessManager):
* WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::shutdownIfPossible):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::networkAccessManager):
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::platformShutdown):
* WebProcess/qt/WebProcessQt.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::platformShutdown):
* WebProcess/win/WebProcessWin.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::platformShutdown):
2010-12-09 Mark Rowe <mrowe@apple.com>
Fix the 32-bit build.
* Shared/cf/ArgumentCodersCF.cpp:
(CoreIPC::sizeForNumberType):
2010-12-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by Brady Eidson.
WebKit2: Control-click doesn't invoke context menu
https://bugs.webkit.org/show_bug.cgi?id=50793
<rdar://problem/8664800>
* WebProcess/WebPage/WebPage.cpp:
(WebKit::isContextClick): New helper function - on Mac, not only right clicks
but also control-left-clicks are context clicks.
(WebKit::handleMouseEvent): Use above.
2010-12-09 Anders Carlsson <andersca@apple.com>
Fix clang++ build.
* Scripts/webkit2/messages.py:
DrawingAreaInfo is a struct.
* Shared/WebPreferencesStore.cpp:
(WebKit::valueForKey):
Move valueForKey above code that uses it.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WebInspectorProxyObjCAdapter windowWillClose:]):
Remove trailing semicolon.
2010-12-09 Timothy Hatcher <timothy@apple.com>
Add support for transparent WebKit2 WKViews.
https://webkit.org/b/50785
Reviewed by Anders Carlsson.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Encode drawsBackground and drawsTransparentBackground.
(WebKit::WebPageCreationParameters::decode): Decode drawsBackground and drawsTransparentBackground.
* Shared/WebPageCreationParameters.h:
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView setDrawsBackground:]): Added.
(-[WKView drawsBackground]): Added.
(-[WKView setDrawsTransparentBackground:]): Added.
(-[WKView drawsTransparentBackground]): Added.
(-[WKView drawRect:]): Only fill the background if the WebProcess isn't valid and drawsBackground.
Use white or clear based on setDrawsTransparentBackground.
(-[WKView isOpaque]): Return drawsBackground.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize m_drawsBackground and m_drawsTransparentBackground.
(WebKit::WebPageProxy::setDrawsBackground): Added. Send a SetDrawsBackground message.
(WebKit::WebPageProxy::setDrawsTransparentBackground): Added. Send a SetDrawsTransparentBackground message.
(WebKit::WebPageProxy::creationParameters): Set drawsBackground and drawsTransparentBackground.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::drawsBackground): Added. Return m_drawsBackground.
(WebKit::WebPageProxy::drawsTransparentBackground): Added. Return m_drawsTransparentBackground.
* UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
(WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint): Use the copy blend mode when drawing a background.
(WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore): Use the copy blend mode to replace existing content.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Setup the new view's background color and transparent flag.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize m_drawsBackground and m_drawsTransparentBackground.
(WebKit::WebPage::setDrawsBackground): Added. Propagate the flag to the FrameViews.
(WebKit::WebPage::setDrawsTransparentBackground): Added. Propagate the background color to the FrameViews.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::drawsBackground): Added. Return m_drawsBackground.
(WebKit::WebPage::drawsTransparentBackground): Added. Return m_drawsTransparentBackground.
* WebProcess/WebPage/WebPage.messages.in: Added SetDrawsBackground and SetDrawsTransparentBackground.
2010-12-09 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Cannot use NSKeyedArchiver in WK2 for ResourceResponses
https://bugs.webkit.org/show_bug.cgi?id=50792
<rdar://problem/8741799>
When encoding, first convert the requests and responses to the serializable dictionary representation
and use the newly added CF CoreIPC encoders. When decoding, do the opposite.
* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::encodeResourceRequest):
(CoreIPC::decodeResourceRequest):
(CoreIPC::encodeResourceResponse):
(CoreIPC::decodeResourceResponse):
2010-12-09 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add CoreIPC coders for CF types
https://bugs.webkit.org/show_bug.cgi?id=50791
* Platform/CoreIPC/ArgumentDecoder.h:
(CoreIPC::ArgumentDecoder::decodeEnum):
* Platform/CoreIPC/ArgumentEncoder.h:
(CoreIPC::ArgumentEncoder::encodeEnum):
* Shared/cf/ArgumentCodersCF.cpp: Added.
(CoreIPC::tokenNullTypeRef):
(CoreIPC::typeFromCFTypeRef):
(CoreIPC::encode):
(CoreIPC::decode):
(CoreIPC::sizeForNumberType):
* Shared/cf/ArgumentCodersCF.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
2010-12-09 Brady Eidson <beidson@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8749750> and https://bugs.webkit.org/show_bug.cgi?id=50786
WK2 authentication never consults WebCore session credential storage.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Since we don't need to expose this as
API at this time, always return true.
2010-12-09 Sam Weinig <weinig@apple.com>
Reviewed by Alexey Proskuryakov.
WebKit2: Add support for access keys
https://bugs.webkit.org/show_bug.cgi?id=49832
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleKeyEvent): Match windows WebKit and call
the event handler's for handleAccessKey function for
system keys. This will never be hit on the Mac.
2010-12-09 Darin Adler <darin@apple.com>
Qt build fix.
* WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: Include "NotImplemented.h".
2010-12-09 Steve Falkenburg <sfalken@apple.com>
Windows build fix.
* WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp:
2010-12-09 Brady Eidson <beidson@apple.com>
Reviewed by Anders Carlsson.
<rdar://problem/8613779> and https://bugs.webkit.org/show_bug.cgi?id=50777
WebKit2 ContextMenuClient support
Implement google search in a cross platform manner, and add a FIXME for download support:
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::downloadURL):
(WebKit::WebContextMenuClient::searchWithGoogle):
Mac implementations for speaking and searching:
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: Added.
(WebKit::WebContextMenuClient::lookUpInDictionary): Add a FIXME for now.
(WebKit::WebContextMenuClient::isSpeaking):
(WebKit::WebContextMenuClient::speak):
(WebKit::WebContextMenuClient::stopSpeaking):
(WebKit::WebContextMenuClient::searchWithSpotlight):
Stubs for Win and Qt:
* WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: Added.
(WebKit::WebContextMenuClient::lookUpInDictionary):
(WebKit::WebContextMenuClient::isSpeaking):
(WebKit::WebContextMenuClient::speak):
(WebKit::WebContextMenuClient::stopSpeaking):
* WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp: Added.
(WebKit::WebContextMenuClient::lookUpInDictionary):
(WebKit::WebContextMenuClient::isSpeaking):
(WebKit::WebContextMenuClient::speak):
(WebKit::WebContextMenuClient::stopSpeaking):
Project file stuffs:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
2010-12-09 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Don't leak the PDFDocument
https://bugs.webkit.org/show_bug.cgi?id=50771
* UIProcess/API/mac/PDFViewController.mm:
(WebKit::PDFViewController::setPDFDocumentData):
2010-12-09 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add a basic implementation of PDF support on Mac
https://bugs.webkit.org/show_bug.cgi?id=50768
* UIProcess/API/mac/PDFViewController.h:
* UIProcess/API/mac/PDFViewController.mm: Added.
(-[WKPDFView initWithFrame:PDFViewController:WebKit::]):
Setup the view hierarchy.
(-[WKPDFView invalidate]):
Set the controller to null.
(-[WKPDFView pdfView]):
Return the PDF view.
(WebKit::PDFViewController::create):
(WebKit::PDFViewController::PDFViewController):
Create a WKPDFView and insert it as a subview of the WKView.
(WebKit::PDFViewController::~PDFViewController):
Remove the WKPDFView from the view hierarchy and invalidate it.
(WebKit::convertPostScriptDataSourceToPDF):
Convert the data in the data reference to PDF and return it as a CFDataRef.
(WebKit::PDFViewController::setPDFDocumentData):
Create a PDFDocument and set it on the PDF view.
(WebKit::PDFViewController::pdfDocumentClass):
(WebKit::PDFViewController::pdfPreviewViewClass):
(WebKit::PDFViewController::pdfKitBundle):
Add soft-linking helper functions.
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
(WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
Call the WKView methods.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setPageHasCustomRepresentation:]):
Create a PDF view controller if necessary.
(-[WKView _didFinishLoadingDataForCustomRepresentation:CoreIPC::]):
Pass the data along to the PDF view controller.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2010-12-09 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add support for custom representation
https://bugs.webkit.org/show_bug.cgi?id=50767
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
Add mimeTypesWithCustomRepresentation and encode and decode accordingly.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
(WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
Add empty stubs for now.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::didCommitLoadForMainFrame):
(QWKPagePrivate::didFinishLoadingDataForCustomRepresentation):
* UIProcess/API/qt/qwkpage_p.h:
Add empty stubs.
* UIProcess/PageClient.h:
Add new functions for custom representations.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::canShowMIMEType):
Check that the mime type is not null.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
This now takes an additional frameHasCustomRepresentation parameter.
Call the page client function.
(WebKit::WebPageProxy::didFinishLoadingDataForCustomRepresentation):
Call the page client function.
* UIProcess/WebPageProxy.messages.in:
Change DidCommitLoadForFrame message, add DidFinishLoadingDataForCustomRepresentation message.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
We want to use custom representations for PDF and PostScript MIME types.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::didCommitLoadForMainFrame):
(WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
* UIProcess/win/WebView.h:
Add stubs.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
Initialize m_frameHasCustomRepresentation.
(WebKit::WebFrameLoaderClient::hasHTMLView):
The frame has a HTML view unless it has a custom representation.
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
Pass along whether the frame has a custom representation.
(WebKit::WebFrameLoaderClient::committedLoad):
Don't send data back to WebCore if the frame has a custom representation.
(WebKit::WebFrameLoaderClient::finishedLoading):
Send all the data to the UI process.
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
Update the m_frameHasCustomRepresentation state based on the MIME type.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
(WebKit::WebFrameLoaderClient::frameHasCustomRepresentation):
Add getter.
* WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
(WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
Don't do any painting if the main frame has a custom representation.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Add all the MIME types with custom representations.
* WebProcess/WebProcess.h:
(WebKit::WebProcess::shouldUseCustomRepresentationForMIMEType):
Add getter.
2010-12-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dan Bernstein.
Implement "Use Selection for Find" in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=50737
<rdar://problem/8564881>
* UIProcess/API/mac/WKView.mm: Add support for the takeFindStringFromSelection:
selector as a command.
2010-12-09 Brady Eidson <beidson@apple.com>
Reviewed by Maciej Stachowiak.
<rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191
WebKit2 Authentication Support
Implement authentication-related coders:
* Shared/WebCoreArgumentCoders.h:
Allow the ResourceResponse coders to handle null responses:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::encodeResourceResponse):
(CoreIPC::decodeResourceResponse):
Add new API and Impl casts for ProtectionSpace and Credential enums:
* UIProcess/API/C/WKAPICast.h:
(WebKit::toAPI):
(WebKit::toCredentialPersistence):
Move the DecisionListener to be accessed off the challenge itself, and fill in other
necessary API:
* UIProcess/API/C/WKAuthenticationChallenge.cpp:
(WKAuthenticationChallengeGetDecisionListener):
(WKAuthenticationChallengeGetProtectionSpace):
(WKAuthenticationChallengeGetProposedCredential):
(WKAuthenticationChallengeGetPreviousFailureCount):
* UIProcess/API/C/WKAuthenticationChallenge.h:
* UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
(WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
(WebKit::AuthenticationChallengeProxy::proposedCredential):
(WebKit::AuthenticationChallengeProxy::protectionSpace):
* UIProcess/Authentication/AuthenticationChallengeProxy.h:
(WebKit::AuthenticationChallengeProxy::previousFailureCount):
Fill in some credential API:
* UIProcess/API/C/WKCredential.cpp:
(WKCredentialCreate):
(WKCredentialCopyUser):
* UIProcess/API/C/WKCredential.h:
* UIProcess/API/C/WKCredentialTypes.h: Added.
* UIProcess/Authentication/WebCredential.cpp:
(WebKit::WebCredential::WebCredential):
(WebKit::WebCredential::user):
* UIProcess/Authentication/WebCredential.h:
(WebKit::WebCredential::create):
Fill in some protection space API:
* UIProcess/API/C/WKProtectionSpace.cpp:
(WKProtectionSpaceCopyHost):
(WKProtectionSpaceGetPort):
(WKProtectionSpaceCopyRealm):
(WKProtectionSpaceGetIsProxy):
(WKProtectionSpaceGetServerType):
(WKProtectionSpaceGetReceivesCredentialSecurely):
(WKProtectionSpaceGetAuthenticationScheme):
* UIProcess/API/C/WKProtectionSpace.h:
* UIProcess/API/C/WKProtectionSpaceTypes.h: Added.
* UIProcess/Authentication/WebProtectionSpace.cpp:
(WebKit::WebProtectionSpace::WebProtectionSpace):
(WebKit::WebProtectionSpace::host):
(WebKit::WebProtectionSpace::port):
(WebKit::WebProtectionSpace::realm):
(WebKit::WebProtectionSpace::isProxy):
(WebKit::WebProtectionSpace::serverType):
(WebKit::WebProtectionSpace::receivesCredentialSecurely):
(WebKit::WebProtectionSpace::authenticationScheme):
* UIProcess/Authentication/WebProtectionSpace.h:
Change the authentication challenge callback to reflect the new ownership of
the DecisionListener:
* UIProcess/API/C/WKPage.h:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didReceiveAuthenticationChallengeInFrame):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
2010-12-08 Sam Weinig <sam@webkit.org>
Reviewed by Geoffrey "Error" Garen.
Fix typo: Diplaying -> Displaying
* UIProcess/API/C/WKFrame.cpp:
(WKFrameIsDisplayingStandaloneImageDocument):
(WKFrameIsDisplayingMarkupDocument):
* UIProcess/API/C/WKFrame.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::canProvideSource):
(WebKit::WebFrameProxy::isDisplayingStandaloneImageDocument):
(WebKit::WebFrameProxy::isDisplayingMarkupDocument):
* UIProcess/WebFrameProxy.h:
2010-12-08 Sam Weinig <sam@webkit.org>
Reviewed by Gavin Barraclough.
Add WebKit2 Preference for TabsToLinks behavior.
<rdar://problem/8664263>
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetTabsToLinks):
(WKPreferencesGetTabsToLinks):
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::tabsToLinks):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::tabsToLinks):
2010-12-08 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Andreas Kling.
WebTouchEvent::isTouchEventType() does not take into account the type TouchCancel
https://bugs.webkit.org/show_bug.cgi?id=50680
Add the missing type check to WebTouchEvent::isTouchEventType().
* Shared/WebTouchEvent.cpp:
(WebKit::WebTouchEvent::isTouchEventType):
2010-12-08 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
Need a way to get a WKBundleFrameRef from JS HTMLIFrameElement
https://bugs.webkit.org/show_bug.cgi?id=50726
Adds WKBundleNodeHandleCopyDocumentFrame, WKBundleNodeHandleCopyHTMLFrameElementContentFrame
and WKBundleNodeHandleCopyHTMLIFrameElementContentFrame, to handle the document, <frame>
and <iframe> cases.
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
(WKBundleNodeHandleCopyDocumentFrame):
(WKBundleNodeHandleCopyHTMLFrameElementContentFrame):
(WKBundleNodeHandleCopyHTMLIFrameElementContentFrame):
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::copyDocumentFrame):
(WebKit::InjectedBundleNodeHandle::copyHTMLFrameElementContentFrame):
(WebKit::InjectedBundleNodeHandle::copyHTMLIFrameElementContentFrame):
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2010-12-08 Sam Weinig <sam@webkit.org>
Reviewed by Gavin Barraclough.
Need a WebKit2 way to test whether a frame is displaying a standalone image
<rdar://problem/8443059>
WebKit2: Need a way to test whether a page or frame is showing HTML content
<rdar://problem/8642563>
Add WKFrameIsDiplayingStandaloneImageDocument and WKFrameIsDiplayingMarkupDocument.
* UIProcess/API/C/WKFrame.cpp:
(WKFrameIsDiplayingStandaloneImageDocument):
(WKFrameIsDiplayingMarkupDocument):
* UIProcess/API/C/WKFrame.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::canProvideSource): This now just calls isDiplayingMarkupDocument.
(WebKit::WebFrameProxy::isDiplayingStandaloneImageDocument):
(WebKit::WebFrameProxy::isDiplayingMarkupDocument):
* UIProcess/WebFrameProxy.h:
2010-12-08 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
WebFrameProxy::canShowMIMEType should return true for PDF MIME types in the main frame
https://bugs.webkit.org/show_bug.cgi?id=50724
* UIProcess/WebContext.cpp:
(WebKit::WebContext::pdfAndPostScriptMIMETypes):
* UIProcess/WebContext.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::canShowMIMEType):
2010-12-08 Brian Weinstein <bweinstein@apple.com>
Reviewed by Brady Eidson.
WebMenuTarget implemented in both WebKit and WebKit2
https://bugs.webkit.org/show_bug.cgi?id=50665
<rdar://problem/8742640>
Rename WebMenuTarget to WKMenuTarget to prevent this warning and stay consistent with
other WebKit2 namings.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(+[WKMenuTarget sharedMenuTarget]):
(WebKit::nsMenuItemVector):
(WebKit::WebContextMenuProxyMac::showContextMenu):
2010-12-08 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Move canShowMIMEType to Frame
https://bugs.webkit.org/show_bug.cgi?id=50723
* UIProcess/API/C/WKFrame.cpp:
(WKFrameCanShowMIMEType):
* UIProcess/API/C/WKFrame.h:
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/WKPage.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::canShowMIMEType):
* UIProcess/WebFrameProxy.h:
2010-12-08 Sam Weinig <sam@webkit.org>
Reviewed by Oliver Hunt.
Rename WKPreferencesGetFTPDirectoryTemplatePath to WKPreferencesCopyFTPDirectoryTemplatePath
since it copies the value.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesCopyFTPDirectoryTemplatePath):
* UIProcess/API/C/WKPreferencesPrivate.h:
2010-12-08 Sam Weinig <sam@webkit.org>
Reviewed by Brady Eidson.
WebKit2: Can't open ftp directory
<rdar://problem/8489321>
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetForceFTPDirectoryListings):
(WKPreferencesGetForceFTPDirectoryListings):
(WKPreferencesSetFTPDirectoryTemplatePath):
(WKPreferencesGetFTPDirectoryTemplatePath):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Pipe through the FTP directory listing preferences.
2010-12-08 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
https://bugs.webkit.org/show_bug.cgi?id=49388
Fixes a build failure because WebChromeClient.cpp uses WebCore::Cursor.
This patch adds an include of QuartzCore/CATransform3D, which includes
a file that has a 'Cursor' object defined. So I had to qualify the
use of Cursor in WebChromeClient.cpp.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::setCursor):
2010-12-07 Brian Weinstein <bweinstein@apple.com>
Reviewed by John Sullivan.
Layering Violation in ContextMenu - member variable of type HitTestResult
https://bugs.webkit.org/show_bug.cgi?id=50586
Update users of ContextMenu and ContextMenuController to match where the new functions
are located.
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::WebContextMenuItemData): Remove the call to checkOrEnableItem, that call will be made when
the ContextMenuItem is added to the ContextMenu through the ContextMenuController.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
2010-12-08 Jessie Berlin <jberlin@apple.com>
Reviewed by Adam Roben.
WebKit2: Implement WebChromeClient::exceededDatabaseQuota
https://bugs.webkit.org/show_bug.cgi?id=50656
The exceededDatabaseQuota call from the WebProcess to the UIProcess needs to be synchronous
because the new quota is checked directly after exceededDatabaseQuota returns in order to
determine if the new Database can be created.
Pass all of the details from the WebProcess to the UIProcess in order to inform the
decision in the UIProcess about the new quota. In WebKit1, these details were
fetched through an additional call to the API detailsForDatabase (which is infeasible in
WebKit2 since exceededDatabaseQuota is a synchronous call).
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction):
Add a version that takes 7 parameters.
* UIProcess/API/C/WKPage.h:
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::QWKPage):
Indicate that exceededDatabaseQuota is not implemented.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::exceededDatabaseQuota):
Call the UIClient's exceededDatabaseQuota
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::exceededDatabaseQuota):
If the client does not implement exceededDatabaseQuota, return a the current quota.
* UIProcess/WebUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exceededDatabaseQuota):
Send a synchronous message to the UIProcess to ask for the new quota for the origin for the
given frame.
2010-12-07 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
fast/loader/empty-embed-src-attribute.html asserts in debug builds
https://bugs.webkit.org/show_bug.cgi?id=50643
Just always ignore attempts to load requests with empty URLs.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2010-12-07 Jessie Berlin <jberlin@apple.com>
Build fix. Unreviewed.
* WebKit2.pro:
Added WebDatabaseManagerQt.cpp.
* WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp: Added.
(WebKit::WebDatabaseManager::databaseDirectory):
Added a FIXME to implement and return an empty string.
2010-12-07 Darin Adler <darin@apple.com>
Get a bit closer to making Qt WebKit2 compile again.
* WebKit2.pro: Add the WebDatabaseManager source files.
Still missing: The Qt version of the databaseDirectory function.
2010-12-07 Jessie Berlin <jberlin@apple.com>
Reviewed by Darin Adler.
WebKit2: Need to set the location of the Databases directory when the WebProcess is initialized
https://bugs.webkit.org/show_bug.cgi?id=50604
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp: Added.
(WebKit::WebDatabaseManager::shared):
(WebKit::WebDatabaseManager::WebDatabaseManager):
Initialize the DatabaseTracker with the Database directory.
* WebProcess/WebCoreSupport/WebDatabaseManager.h: Added.
* WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: Added.
(WebKit::WebDatabaseManager::databaseDirectory):
Copied from WebKitInitializeDatabasesIfNecessary in WebKit/mac/Storage/WebDatabaseManager.mm.
* WebProcess/WebCoreSupport/win/WebDatabaseManagerWin.cpp: Added.
(WebKit::WebDatabaseManager::databaseDirectory):
Copied from WebKitInitializeWebDatabasesIfNecessary in WebKit/win/WebDatabaseManager.cpp.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
Make sure that the Databases directory has been set by calling WebDatabaseManager::shared().
* WebKit2.xcodeproj/project.pbxproj:
Add WebDatabaseManager.cpp/.h/Mac.cpp
* win/WebKit2.vcproj:
Add WebDatabaseManager.cpp/.h/Win.cpp
2010-12-06 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Pass security origin to make local file decision correctly
https://bugs.webkit.org/show_bug.cgi?id=48603
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::loadURL): Pass security origin.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchCreatePage): Ditto.
2010-12-06 Simon Fraser <simon.fraser@apple.com>
Reviewed by Sam Weinig.
Fix two WebKit2 prefs issues.
* Shared/WebPreferencesStore.h: Include font-family preferences
in the FOR_EACH_WEBKIT_STRING_PREFERENCE macro, actually propagating
font family prefs to WebCore settings.
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::WebPageGroup):
(WebKit::WebPageGroup::~WebPageGroup): Add and remove the WebPageGroup
from the preference object it creates. This allows preference changes
to actually be propagated to the web process.
2010-12-06 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
The plug-in process crashes if it can't load the plug-in module
https://bugs.webkit.org/show_bug.cgi?id=50601
<rdar://problem/8692654>
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::initialize):
Handle m_plugin being 0.
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::netscapePluginModule):
Create the plug-in module if it doesn't exist.
(WebKit::PluginProcess::initialize):
Store the plug-in path.
* PluginProcess/PluginProcess.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::create):
Return null if the plug-in module doesn't exist.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
Simplify code.
2010-12-06 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
WebProcess crash in NPRemoteObjectMap::invalidate when closing tab
https://bugs.webkit.org/show_bug.cgi?id=50597
<rdar://problem/8655584>
When invalidating the NPRemoteObjectMap, we don't want NPObjectMessageReceiver to
release all objects NPObjects blindly because NPJSObjects have already been deallocated by the plug-in view.
This is not an ideal solution; an ideal solution would involve NPJSObjects notifying any NPObjectMessageReceiver objects
that the NPJSObject is being destroyed. The NPObjectMessageReceiver could then simply null out the NPObject pointer.
* Shared/Plugins/NPObjectMessageReceiver.cpp:
(WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
(WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
* Shared/Plugins/NPObjectMessageReceiver.h:
* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
(WebKit::NPRemoteObjectMap::invalidate):
* Shared/Plugins/NPRemoteObjectMap.h:
(WebKit::NPRemoteObjectMap::isInvalidating):
2010-12-06 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Generalize didChangeLocationWithinPageForFrame for all same document navigations
https://bugs.webkit.org/show_bug.cgi?id=50584
- Rename didChangeLocationWithinPageForFrame callbacks to didSameDocumentNavigationForFrame
- Add WKSameDocumentNavigationType to didChangeLocationWithinPageForFrame.
- Call didSameDocumentNavigationForFrame for HTML session state changes.
* Shared/API/c/WKPageLoadTypes.h: Added.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
Moved WKFrameNavigationType here from WKPage.h and add WKSameDocumentNavigationType.
* Shared/SameDocumentNavigationType.h: Added.
* UIProcess/API/C/WKAPICast.h:
Moved WKFrameNavigationType conversion from here.
* UIProcess/API/C/WKPage.h:
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::QWKPage):
Update comment.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didSameDocumentNavigation):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didSameDocumentNavigationForFrame):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
Pipe new name through.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
Call didChangeLocationWithinPageForFrame for session state changes.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
Add new files.
2010-12-06 Jessie Berlin <jberlin@apple.com>
Reviewed by Dan Bernstein.
WebKit2: Expose the preference to enable or disable HTML5 Databases.
https://bugs.webkit.org/show_bug.cgi?id=50411
* Shared/WebPreferencesStore.h:
Make the preference to enable HTML5 Databases default ot true.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetDatabasesEnabled):
(WKPreferencesGetDatabasesEnabled):
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Set AbstractDatabase::isAvailable (mimicking how the preference is set in WebKit1).
2010-12-06 Mark Rowe <mrowe@apple.com>
Build fix.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformHandleKeyboardEvent): Wrap Carbon-specific code in #ifndef NP_NO_CARBON.
2010-12-06 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Add a shim for GetCurrentEventButtonState
https://bugs.webkit.org/show_bug.cgi?id=50583
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::getCurrentEventButtonState):
Get the event button state from the plug-in.
(WebKit::PluginProcess::initializeShim):
Add new shim callback.
* PluginProcess/mac/PluginProcessShim.cpp:
(WebKit::shimGetCurrentEventButtonState):
Add shim.
* PluginProcess/mac/PluginProcessShim.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::buttonState):
Return the button state.
(WebKit::NetscapePlugin::platformHandleMouseEvent):
Update the button state. Also, make sure to actually pass the modifiers to NPP_HandleEvent.
2010-12-06 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Add a shim for IsWindowActive
https://bugs.webkit.org/show_bug.cgi?id=50582
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::isWindowActive):
Get the NetscapePlugin from the WindowRef and check if the plug-in's window is active.
(WebKit::PluginProcess::initializeShim):
* PluginProcess/mac/PluginProcessShim.cpp
(WebKit::shimIsWindowActive):
Call isWindowActive. If it returns true, return the result value. Otherwise, call the real
IsWindowActive function.
* PluginProcess/mac/PluginProcessShim.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
Initialize m_isWindowactive.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
(WebKit::NetscapePlugin::isWindowActive):
Return whether the window is active.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::windowMap):
(WebKit::NetscapePlugin::platformPostInitialize):
(WebKit::NetscapePlugin::platformDestroy):
(WebKit::NetscapePlugin::netscapePluginFromWindow):
Add a mapping between windows and the corresponding NetscapePlugin objects.
(WebKit::NetscapePlugin::windowFocusChanged):
Update the window focus member variable.
2010-12-06 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
REGERSSION (r73310?): Contents of <select> popup menus are upside-down on Windows
https://bugs.webkit.org/show_bug.cgi?id=50544
<rdar://problem/8732336>
* Shared/BackingStore.cpp:
* Shared/BackingStore.h:
* Shared/cairo/BackingStoreCairo.cpp:
Remove BackingStore::createFlippedGraphicsContext.
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):
Don't create a flipped graphics context.
2010-12-06 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
REGRESSION: Text in Find indicator is vertically flipped
https://bugs.webkit.org/show_bug.cgi?id=50524
<rdar://problem/8732978>
Don't flip the graphics context.
* UIProcess/FindIndicator.cpp:
(WebKit::FindIndicator::draw):
2010-12-03 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Dispatch keyboard events in the Carbon event model
https://bugs.webkit.org/show_bug.cgi?id=50503
* Shared/WebEvent.h:
(WebKit::WebKeyboardEvent::macCharCode):
* Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::WebKeyboardEvent):
(WebKit::WebKeyboardEvent::encode):
(WebKit::WebKeyboardEvent::decode):
Add macCharCode field.
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebKeyboardEvent):
* Shared/qt/WebEventFactoryQt.cpp:
(WebKit::WebEventFactory::createWebKeyboardEvent):
* Shared/win/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebKeyboardEvent):
Pass along the Mac char code.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformHandleKeyboardEvent):
Convert the event to a Carobn event.
2010-12-03 John Sullivan <sullivan@apple.com>
Reviewed by Adam Roben.
https://bugs.webkit.org/show_bug.cgi?id=50504
Expose some more WebCore settings in WebKit2 preferences
* Shared/WebPreferencesStore.h:
Changed name of existing FOR_EACH_WEBKIT_STRING_PREFERENCE macro to
FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE since it was all about platform-specific
font families, and I'm now introducing a non-platform-spacific string, and
I didn't want to put the new preference in two platform-specific lists. Then
added a new FOR_EACH_WEBKIT_STRING_PREFERENCE to hold the new preference. Note
that the other preferences exposed in this patch were already declared here.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetDefaultFontSize):
New wrapper.
(WKPreferencesGetDefaultFontSize):
Ditto.
(WKPreferencesSetDefaultFixedFontSize):
Ditto.
(WKPreferencesGetDefaultFixedFontSize):
Ditto.
(WKPreferencesSetDefaultTextEncodingName):
Ditto.
(WKPreferencesCopyDefaultTextEncodingName):
Ditto.
* UIProcess/API/C/WKPreferences.h:
Declare new wrappers.
2010-12-05 Adam Roben <aroben@apple.com>
Windows production build fix
Put spaces after trailing backslashes when setting
%WebKitVSPropsRedirectionDir%. According to MSDN
<http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>:
A backslash ( \ ) followed by a newline character is interpreted as
a space in the command; use a backslash at the end of a line to
continue a command onto the next line. NMAKE interprets the
backslash literally if any other character, including a space or
tab, follows the backslash.
* win/WebKit2.make:
2010-12-04 Sam Weinig <sam@webkit.org>
Reviewed by Jon Honeycutt.
WebKit2: Need client functions to notify app when the url changes due to a fragment navigation
https://bugs.webkit.org/show_bug.cgi?id=50511
Pipe didChangeLocationWithinPageForFrame up through the UIProcess to the WKPageLoadClient,
updating the WebFrameProxy's URL on the way.
Test: PageLoadDidChangeLocationWithinPageForFrame
* UIProcess/API/C/WKPage.h:
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::QWKPage):
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didChangeURLWithoutNavigation):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didChangeLocationWithinPageForFrame):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeLocationWithinPageForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame):
(WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
(WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect): Fix typo.
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
2010-12-03 Timothy Hatcher <timothy@apple.com>
Make the Web Inspector window show and be usable on Mac.
https://webkit.org/b/50490
Reviewed by Sam Weinig.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::invalidate): Call platformClose.
(WebKit::WebInspectorProxy::didLoadInspectorPage): Call platformOpen.
(WebKit::WebInspectorProxy::didClose): Call platformClose.
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.messages.in: Added DidClose.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): Added.
(-[WebInspectorProxyObjCAdapter windowWillClose:]): Added. Call WebInspectorProxy::close.
(WebKit::WebInspectorProxy::platformOpen): Added.
(WebKit::WebInspectorProxy::platformClose): Added.
* UIProcess/qt/WebInspectorProxyQt.cpp:
(WebKit::WebInspectorProxy::platformOpen): Added stub.
(WebKit::WebInspectorProxy::platformClose): Added stub.
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformOpen): Added stub.
(WebKit::WebInspectorProxy::platformClose): Added stub.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::sendMessageToFrontend): Added more null checks to avoid a crash.
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::closeWindow): Call WebInspector::didClose.
(WebKit::WebInspectorFrontendClient::disconnectFromBackend): Ditto.
(WebKit::WebInspectorFrontendClient::sendMessageToBackend): Removed. This does not need to be
implemented by our subclass since we are in a single process.
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: Removed sendMessageToBackend.
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::didClose): Added. Send a DidClose message to the UI process.
* WebProcess/WebPage/WebInspector.h:
2010-12-03 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig and Dan Bernstein.
Clean up the BackingStore implementation
https://bugs.webkit.org/show_bug.cgi?id=50498
* Shared/BackingStore.cpp:
(WebKit::BackingStore::create):
(WebKit::BackingStore::createSharable):
(WebKit::BackingStore::resize):
Use new numBytesForSize helper function.
(WebKit::BackingStore::createFlippedGraphicsContext):
Make this function platform independent.
* Shared/BackingStore.h:
(WebKit::BackingStore::numBytesForSize):
Given a size, return the number of bytes needed for it.
(WebKit::BackingStore::sizeInBytes):
Implement.
* Shared/cg/BackingStoreCG.cpp:
(WebKit::BackingStore::paint):
Don't use CGBitmapContextCreateImage; it creates an extra copy of the image data.
* Shared/qt/BackingStoreQt.cpp:
Remove createFlippedGraphicsContext.
2010-12-03 Siddharth Mathur <siddharth.mathur@nokia.com>
Reviewed by Laszlo Gombos.
[Qt] [WK2] Build system improvements for non-Unix targets
https://bugs.webkit.org/show_bug.cgi?id=50257
* DerivedSources.pro:
Fix dir seperator errors on Windows build host. Thanks to Laszlo Gombos.
2010-12-03 Sam Weinig <sam@webkit.org>
Reviewed by Maciej Stachowiak.
Enable <a ping> for Mac/Windows/WebKit2 builds
<rdar://problem/8504473>
https://bugs.webkit.org/show_bug.cgi?id=50488
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetHyperlinkAuditingEnabled):
(WKPreferencesGetHyperlinkAuditingEnabled):
* UIProcess/API/C/WKPreferences.h:
Add "HyperlinkAuditing" preference and enabled it by default.
2010-12-03 Brady Eidson <beidson@apple.com>
Reviewed by good sense in fixing builds.
Export the 4 new API headers I added today.
* WebKit2.xcodeproj/project.pbxproj:
2010-12-03 Brady Eidson <beidson@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8725679> and https://bugs.webkit.org/show_bug.cgi?id=50482
Crash trying to empty caches with no WebProcess.
* Shared/WebProcessCreationParameters.h: Add the "clear this cache" flags.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::ensureWebProcess): If either of the clear cache flags are set when a new WebProcess is
created, include those flags in the parameters.
(WebKit::WebContext::clearResourceCaches): If the current process isn't valid, flag this action to be done later.
(WebKit::WebContext::clearApplicationCache): Ditto.
* UIProcess/WebContext.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Clear the caches if told to.
2010-12-03 Sam Weinig <sam@webkit.org>
Reviewed by Gavin Barraclough.
Fix failing API test. The default san serif font on the mac
should be Helvetica, not Courier.
* Shared/WebPreferencesStore.h:
2010-12-03 Jia Pu <jpu@apple.com>
Reviewed by Darin Adler.
Need to move all code that applies correction into correction panel callback.
https://bugs.webkit.org/show_bug.cgi?id=50426
<rdar://problem/8720832>
Adopted new signature of dismissCorrectionPanel.
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::dismissCorrectionPanel):
2010-12-03 Jessie Berlin <jberlin@apple.com>
Windows build fix. Unreviewed.
* win/WebKit2Generated.make:
Add the new API files from http://trac.webkit.org/changeset/73281.
2010-12-03 Brady Eidson <beidson@apple.com>
Reviewed by Anders Carlsson.
Groundwork for <rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191
WebKit2 Authentication Support
With this patch in place, authentication challenges are sent up from WebCore and shipped over the IPC layer.
Client apps can implement the related client methods to attempt to continue without credentials or cancel a
challenge.
There's not yet API to inspect a challenge or create a credential to use in reply - that will come later.
Build-system changes:
* DerivedSources.make:
* DerivedSources.pro:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Common.vsprops:
Messages and casts for IPC and APIs:
* Platform/CoreIPC/MessageID.h:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* Shared/WebCoreArgumentCoders.h:
* UIProcess/API/C/WKAPICast.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage):
Stub out the AuthenticationChallenge class family:
* UIProcess/API/C/WKAuthenticationChallenge.cpp: Added.
(WKAuthenticationChallengeGetTypeID):
* UIProcess/API/C/WKAuthenticationChallenge.h: Added.
* UIProcess/API/C/WKCredential.cpp: Added.
(WKCredentialGetTypeID):
* UIProcess/API/C/WKCredential.h: Added.
* UIProcess/API/C/WKProtectionSpace.cpp: Added.
(WKProtectionSpaceGetTypeID):
* UIProcess/API/C/WKProtectionSpace.h: Added.
Add an Authentication listener for the client app to respond to:
* UIProcess/API/C/WKAuthenticationDecisionListener.cpp: Added.
(WKAuthenticationDecisionListenerGetTypeID):
(WKAuthenticationDecisionListenerUseCredential):
(WKAuthenticationDecisionListenerCancel):
* UIProcess/API/C/WKAuthenticationDecisionListener.h: Added.
Add Authentication related methods to the page loader client:
* UIProcess/API/C/WKPage.h:
Add empty implementations of the new API objects:
* UIProcess/Authentication: Added.
* UIProcess/Authentication/AuthenticationChallengeProxy.cpp: Added.
(WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
(WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
(WebKit::AuthenticationChallengeProxy::useCredential):
(WebKit::AuthenticationChallengeProxy::cancel):
* UIProcess/Authentication/AuthenticationChallengeProxy.h: Added.
(WebKit::AuthenticationChallengeProxy::create):
(WebKit::AuthenticationChallengeProxy::listener):
(WebKit::AuthenticationChallengeProxy::type):
* UIProcess/Authentication/WebCredential.cpp: Added.
(WebKit::WebCredential::core):
* UIProcess/Authentication/WebCredential.h: Added.
(WebKit::WebCredential::create):
(WebKit::WebCredential::type):
* UIProcess/Authentication/WebProtectionSpace.cpp: Added.
(WebKit::WebProtectionSpace::WebProtectionSpace):
* UIProcess/Authentication/WebProtectionSpace.h: Added.
(WebKit::WebProtectionSpace::create):
(WebKit::WebProtectionSpace::type):
Add implementation of the Authentication decision listener:
* UIProcess/Authentication/AuthenticationDecisionListener.cpp: Added.
(WebKit::AuthenticationDecisionListener::AuthenticationDecisionListener):
(WebKit::AuthenticationDecisionListener::useCredential):
(WebKit::AuthenticationDecisionListener::cancel):
(WebKit::AuthenticationDecisionListener::detachChallenge):
* UIProcess/Authentication/AuthenticationDecisionListener.h: Added.
(WebKit::AuthenticationDecisionListener::create):
(WebKit::AuthenticationDecisionListener::type):
WebPage and PageLoaderClient glue:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
(WebKit::WebLoaderClient::didReceiveAuthenticationChallengeInFrame):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
(WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Add a manager to map the actual platform authentication challenges to a challenge ID,
as at least some platforms require the object identity to persist:
* WebProcess/Authentication: Added.
* WebProcess/Authentication/AuthenticationManager.cpp: Added.
(WebKit::generateAuthenticationChallengeID):
(WebKit::AuthenticationManager::shared):
(WebKit::AuthenticationManager::AuthenticationManager):
(WebKit::AuthenticationManager::didReceiveMessage):
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
(WebKit::AuthenticationManager::useCredentialForChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
(WebKit::AuthenticationManager::cancelChallenge):
* WebProcess/Authentication/AuthenticationManager.h: Added.
* WebProcess/Authentication/AuthenticationManager.messages.in: Added.
Hand off Authentication challenges to the manager to be sent over IPC:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
(WebKit::WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace):
* UIProcess/API/qt/qwkpage.cpp:
2010-12-03 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Flip the destination context when painting a backing store into the destination
https://bugs.webkit.org/show_bug.cgi?id=50491
* Shared/cg/BackingStoreCG.cpp:
(WebKit::BackingStore::paint):
2010-12-03 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
The chunked update drawing area is flipped twice when drawing
https://bugs.webkit.org/show_bug.cgi?id=50465
<rdar://problem/8726836>
* UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
(WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
(WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
Flip the destination contexts, thus unflipping them. (Turns out two wrongs make a right here).
2010-12-03 Jessie Berlin <jberlin@apple.com>
Reviewed by Sam Weinig.
Need a WebKit2 Equivalent of WebSecurityOrigin
https://bugs.webkit.org/show_bug.cgi?id=50170
* Shared/API/c/WKBase.h:
Add the WKSecurityOriginRef typedef.
* Shared/APIObject.h:
Add the SecurityOrigin type as a Shared type.
* Shared/API/c/WKSharedAPICast.h::
Add the mapping between WKSecurityOriginRef and WebSecurityOrigin.
* UIProcess/API/C/WKSecurityOrigin.cpp: Added.
(WKSecurityOriginGetTypeID):
(WKSecurityOriginCreate):
(WKSecurityOriginGetProtocol):
(WKSecurityOriginGetHost):
(WKSecurityOriginGetPort):
* UIProcess/API/C/WKSecurityOrigin.h: Added.
* UIProcess/WebSecurityOrigin.h: Added.
(WebKit::WebSecurityOrigin::create):
Create based on the database identifier, which contains the protocol, host and port.
(WebKit::WebSecurityOrigin::protocol):
(WebKit::WebSecurityOrigin::host):
(WebKit::WebSecurityOrigin::port):
(WebKit::WebSecurityOrigin::databaseIdentifier):
(WebKit::WebSecurityOrigin::WebSecurityOrigin):
(WebKit::WebSecurityOrigin::type):
* WebKit2.pro:
Add WKSecurityOrigin.cpp/.h.
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add the WebSecurityOrigin.h and WKSecurityOrigin.cpp/.h.
* win/WebKit2Generated.make:
Make sure WKSecurityOrigin.h file gets copied over to the WebKitBuild directory on Windows.
2010-12-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Csaba Osztrogonác.
[Qt] Fix compilation with !ENABLE(OFFLINE_WEB_APPLICATIONS) and
!ENABLE(TILED_BACKING_STORE) for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=50071
Add appropriate guards. No functional change if guards are set.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::setActualVisibleContentsRect):
* UIProcess/TiledDrawingAreaProxy.cpp:
* UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
* UIProcess/qt/TiledDrawingAreaTileQt.cpp:
* UIProcess/qt/WebContextQt.cpp:
(WebKit::WebContext::applicationCacheDirectory):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
2010-12-02 Sam Weinig <sam@webkit.org>
Fix Qt.
* UIProcess/API/qt/qwkpreferences.cpp:
(QWKPreferencesPrivate::createPreferences):
2010-12-02 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2 Preferences should be held off the PageGroup, not the Context
https://bugs.webkit.org/show_bug.cgi?id=50414
- In addition, this now makes the preference held off the PageGroup have
the identifier of the PageGroup and autosave to disk (only on the mac
for now).
- Adds ability to create an arbitrary preference that can be autosaved
via a new WKPreferencesCreateWithIdentifier function.
* UIProcess/API/C/WKContext.cpp:
* UIProcess/API/C/WKContext.h:
Remove preference related code.
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupSetPreferences):
(WKPageGroupGetPreferences):
* UIProcess/API/C/WKPageGroup.h:
Add getter/setter for preferences.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesCreateWithIdentifier):
* UIProcess/API/C/WKPreferences.h:
Add WKPreferencesCreateWithIdentifier and remove WKPreferencesCreateCopy which is
unused.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::~WebContext):
* UIProcess/WebContext.h:
Remove preference related code.
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::WebPageGroup):
(WebKit::WebPageGroup::addPage):
(WebKit::WebPageGroup::removePage):
(WebKit::WebPageGroup::setPreferences):
(WebKit::WebPageGroup::preferences):
(WebKit::WebPageGroup::preferencesDidChange):
* UIProcess/WebPageGroup.h:
Add preference and page tracking.
* UIProcess/WebPageNamespace.cpp:
* UIProcess/WebPageNamespace.h:
Remove preference change notification code.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::~WebPageProxy):
Add/remove self from page group set.
(WebKit::WebPageProxy::preferencesDidChange):
(WebKit::WebPageProxy::creationParameters):
Get preferences from the pageGroup.
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::WebPreferences):
(WebKit::WebPreferences::addPageGroup):
(WebKit::WebPreferences::removePageGroup):
(WebKit::WebPreferences::update):
* UIProcess/WebPreferences.h:
(WebKit::WebPreferences::create):
Change to track page groups instead of contexts.
* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::makeKey): Add ".WebKit2" prefix for keys.
2010-12-02 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Flash videos on YouTube flicker
https://bugs.webkit.org/show_bug.cgi?id=50409
<rdar://problem/8668757>
When painting from a backing store, we need to add the source location
to the destination point.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::paint):
(WebKit::PluginProxy::update):
2010-12-02 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
WebKit2 needs API to turn on popup blocking
https://bugs.webkit.org/show_bug.cgi?id=50407
Pipe-through a preference for javascript being able to open
windows without user gesture.
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetJavaScriptCanOpenWindowsAutomatically):
(WKPreferencesGetJavaScriptCanOpenWindowsAutomatically):
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2010-12-02 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Plug-ins should be able to update the mouse cursor
https://bugs.webkit.org/show_bug.cgi?id=50399
Call WKEnableSettingCursorWhenInBackground.
* PluginProcess/mac/PluginProcessMainMac.mm:
(WebKit::PluginProcessMain):
2010-12-02 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=50368
Overhaul WebKit2 preferences code
- Reduces the number of places you have to touch to add a new preference
(From 9 down to 4, but with a bit of elbow grease, we should get that
down to 2 or 3).
- Add hooks so that platforms can initialize the preferences based on an
identifier. This is currently only used on the Mac to initialize a
preference store from NSUserDefaults and autosave the changes to disk.
It is not yet enabled due to no way to set the identifier from client
code.
* Shared/WebPageCreationParameters.cpp:
Add necessary #include of WebCoreArgumentCoders.h which is now needed
due to cleanup in WebPreferencesStore.h.
* Shared/WebPreferencesStore.cpp:
(WebKit::WebPreferencesStore::WebPreferencesStore):
(WebKit::WebPreferencesStore::encode):
(WebKit::WebPreferencesStore::decode):
(WebKit::defaultValueForKey):
(WebKit::setValueForKey):
(WebKit::valueForKey):
(WebKit::WebPreferencesStore::setStringValueForKey):
(WebKit::WebPreferencesStore::getStringValueForKey):
(WebKit::WebPreferencesStore::setBoolValueForKey):
(WebKit::WebPreferencesStore::getBoolValueForKey):
(WebKit::WebPreferencesStore::setUInt32ValueForKey):
(WebKit::WebPreferencesStore::getUInt32ValueForKey):
* Shared/WebPreferencesStore.h:
Complete overhaul of this class to store the preferences as
a set of HashMaps and use macros to define the keys and default
values.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesGetFontSmoothingLevel):
Add cast to keep conversion function working.
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::WebPreferences): Add identifier constructor.
(WebKit::WebPreferences::updateStringValueForKey):
(WebKit::WebPreferences::updateBoolValueForKey):
(WebKit::WebPreferences::updateUInt32ValueForKey):
Add type based updaters. These currently give hooks to the platform and
call the generic update, but in the future, we can use this to optimize
updating preferences to not send the entire store for each change.
* UIProcess/WebPreferences.h:
Generate the getters and setters via macro instantiation.
* UIProcess/cf/WebPreferencesCF.cpp: Added.
(WebKit::WebPreferences::platformInitializeStore):
(WebKit::WebPreferences::platformUpdateStringValueForKey):
(WebKit::WebPreferences::platformUpdateBoolValueForKey):
(WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
Stubbed out.
* UIProcess/mac/WebPreferencesMac.mm: Added.
(WebKit::makeKey):
(WebKit::setStringValueIfInUserDefaults):
(WebKit::setBoolValueIfInUserDefaults):
(WebKit::setUInt32ValueIfInUserDefaults):
(WebKit::WebPreferences::platformInitializeStore):
(WebKit::WebPreferences::platformUpdateStringValueForKey):
(WebKit::WebPreferences::platformUpdateBoolValueForKey):
(WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
Use the platform hooks to initialize and update the store from
NSUserDefaults.
* UIProcess/qt/WebPreferencesQt.cpp: Added.
(WebKit::WebPreferences::platformInitializeStore):
(WebKit::WebPreferences::platformUpdateStringValueForKey):
(WebKit::WebPreferences::platformUpdateBoolValueForKey):
(WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
Stubbed out.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::platformPreferencesDidChange):
Update to pull the value using the new type based getters.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add new files.
2010-12-02 Steve Falkenburg <sfalken@apple.com>
Mac build fix.
* WebProcess/WebKitMain.cpp:
(enableDataExecutionPrevention):
2010-11-30 Amruth Raj <amruthraj@motorola.com> and Ravi Kasibhatla <ravi.kasibhatla@motorola.com>
Reviewed by Martin Robinson.
[GTK] Implement RunLoop, WorkQueue, Connection classes for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=48507
* Platform/CoreIPC/Connection.h: UNIX_X11 specific changes for GTK port.
(CoreIPC::Connection::messageProcessingCompleted):
* Platform/CoreIPC/gtk: Added.
* Platform/CoreIPC/gtk/ConnectionGtk.cpp: Added. Connection class implementation for GTK port (UNIX_X11 specific).
(CoreIPC::readBytesFromSocket):
(CoreIPC::writeBytesToSocket):
(CoreIPC::Connection::platformInitialize):
(CoreIPC::Connection::platformInvalidate):
(CoreIPC::Connection::processCompletedMessage):
(CoreIPC::Connection::readEventHandler):
(CoreIPC::Connection::open):
(CoreIPC::Connection::platformCanSendOutgoingMessages):
(CoreIPC::Connection::sendOutgoingMessage):
* Platform/PlatformProcessIdentifier.h: UNIX_X11 specific changes for GTK port.
* Platform/RunLoop.h: GTK port specific changes.
* Platform/WorkQueue.h: GTK port specific changes.
* Platform/gtk/RunLoopGtk.cpp: Added. Runs an event loop using GMainLoop and handles the incoming messages.
(RunLoop::RunLoop):
(RunLoop::~RunLoop):
(RunLoop::run):
(RunLoop::mainLoop):
(RunLoop::stop):
(RunLoop::queueWork):
(RunLoop::wakeUp):
(RunLoop::TimerBase::TimerBase):
(RunLoop::TimerBase::~TimerBase):
(RunLoop::TimerBase::resetTimerSource):
(RunLoop::TimerBase::oneShotTimerFired):
(RunLoop::TimerBase::repeatingTimerFired):
(RunLoop::TimerBase::start):
(RunLoop::TimerBase::stop):
(RunLoop::TimerBase::isActive):
* Platform/gtk/WorkQueueGtk.cpp: Added. Creates a thread and polls on a given fd using GIOChannel.
Dispatches the obtained messages to RunLoop's GMainLoop.
(WorkQueue::EventSource::EventSource):
(WorkQueue::EventSource::dispatchSource):
(WorkQueue::EventSource::performWorkOnce):
(WorkQueue::EventSource::performWork):
(WorkQueue::EventSource::deleteEventSource):
(WorkQueue::platformInitialize):
(WorkQueue::platformInvalidate):
(WorkQueue::startWorkQueueThread):
(WorkQueue::workQueueThreadBody):
(WorkQueue::registerEventSourceHandler):
(WorkQueue::unregisterEventSourceHandler):
(WorkQueue::scheduleWork):
2010-12-02 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Move enableExecutionPrevention to WebKitMain
https://bugs.webkit.org/show_bug.cgi?id=50392
* WebProcess/WebKitMain.cpp:
(enableDataExecutionPrevention):
(WebKitMain):
* WebProcess/win/WebProcessMainWin.cpp:
(WebKit::WebProcessMain):
2010-12-02 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Enable DEP at runtime to allow for compatibility with older versions of ATL
https://bugs.webkit.org/show_bug.cgi?id=50378
* WebProcess/win/WebProcessMainWin.cpp:
(WebKit::enableDataExecutionPrevention):
(WebKit::WebProcessMain):
* win/WebKit2WebProcessCommon.vsprops:
2010-12-01 Sam Weinig <sam@webkit.org>
Fix 64-bit build.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::windowAndViewFramesChanged):
2010-12-01 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Give the fake Carbon window the right bounds
https://bugs.webkit.org/show_bug.cgi?id=50361
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::windowAndViewFramesChanged):
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginControllerProxy.messages.in:
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateWindowAndViewFrames]):
Pass both the window frame and view frame along.
(-[WKView renewGState]):
Call _updateWindowAndViewFrames.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
Pass both the window frame and view frame along.
* UIProcess/WebPageProxy.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformPostInitialize):
We don't want a title bar in our fake window.
(WebKit::computeFakeWindowBoundsRect):
Compute the fake window bounds.
(WebKit::NetscapePlugin::windowAndViewFramesChanged):
Update the fake window bounds.
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::windowAndViewFramesChanged):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::windowAndViewFramesChanged):
(WebKit::PluginView::initializePlugin):
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowAndViewFramesChanged):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::windowFrameInScreenCoordinates):
(WebKit::WebPage::viewFrameInWindowCoordinates):
* WebProcess/WebPage/WebPage.messages.in:
Pass both the window frame and view frame along.
2010-12-01 Jia Pu <jpu@apple.com>
Reviewed by Darin Adler.
Support multiple correction candidates panel for misspelled word on Mac OS X.
https://bugs.webkit.org/show_bug.cgi?id=50137
<rdar://problem/8568059>
Adopted new function signatures defined in base class.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::getGuessesForWord):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::showCorrectionPanel):
2010-12-01 Simon Fraser <simon.fraser@apple.com>
Reviewed by John Sullivan.
Hit testing broken on sibling views of the WKView
<rdar://problem/8718397>
Make sure that hitView is not null when comparing with the
_layerHostingView.
* UIProcess/API/mac/WKView.mm:
(-[WKView hitTest:]):
2010-12-01 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Implement the remaining PluginController/Plugin member functions
https://bugs.webkit.org/show_bug.cgi?id=50356
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::cancelStreamLoad):
(WebKit::PluginControllerProxy::cancelManualStreamLoad):
(WebKit::PluginControllerProxy::setStatusbarText):
(WebKit::PluginControllerProxy::pluginProcessCrashed):
(WebKit::PluginControllerProxy::frameDidFinishLoading):
(WebKit::PluginControllerProxy::frameDidFail):
(WebKit::PluginControllerProxy::manualStreamDidReceiveResponse):
(WebKit::PluginControllerProxy::manualStreamDidReceiveData):
(WebKit::PluginControllerProxy::manualStreamDidFinishLoading):
(WebKit::PluginControllerProxy::manualStreamDidFail):
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginControllerProxy.messages.in:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::frameDidFinishLoading):
(WebKit::PluginProxy::frameDidFail):
(WebKit::PluginProxy::manualStreamDidReceiveResponse):
(WebKit::PluginProxy::manualStreamDidReceiveData):
(WebKit::PluginProxy::manualStreamDidFinishLoading):
(WebKit::PluginProxy::manualStreamDidFail):
(WebKit::PluginProxy::windowFrameChanged):
(WebKit::PluginProxy::cancelStreamLoad):
(WebKit::PluginProxy::cancelManualStreamLoad):
(WebKit::PluginProxy::setStatusbarText):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginProxy.messages.in:
2010-12-01 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
WinCairo build should not use link-time code generation (LTCG)
https://bugs.webkit.org/show_bug.cgi?id=50353
* win/WebKit2.vcproj:
* win/WebKit2WebProcess.vcproj:
2010-12-01 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig..
Fix <rdar://problem/8717674>.
* WebProcess/com.apple.WebProcess.sb:
Allow the UI process to issue file-write extensions.
2010-12-01 Sam Weinig <sam@webkit.org>
Another windows build fix.
* UIProcess/API/C/win/WKView.cpp:
(WKViewCreate):
2010-12-01 Sam Weinig <sam@webkit.org>
Attempt to fix Windows build.
* UIProcess/API/C/win/WKViewPrivate.cpp:
* UIProcess/API/C/win/WKViewPrivate.h:
2010-12-01 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Add PageGrouping to WebKit2 API
https://bugs.webkit.org/show_bug.cgi?id=50332
- Adds WKPageGroupRef and WKBundlePageGroupRef API objects
(backed by WebPageGroup and WebPageGroupProxy respectively).
- Moves visibleToInjectedBundle from page to PageGroup.
- Make userScript/userStyleSheet functions take a page group parameter.
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* Shared/WebPageGroupData.cpp: Added.
(WebKit::WebPageGroupData::encode):
(WebKit::WebPageGroupData::decode):
* Shared/WebPageGroupData.h: Added.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetPageGroup):
* UIProcess/API/C/WKPage.h:
* UIProcess/API/C/WKPageGroup.cpp: Added.
(WKPageGroupGetTypeID):
(WKPageGroupCreateWithIdentifier):
(WKPageGroupCopyIdentifier):
* UIProcess/API/C/WKPageGroup.h: Added.
* UIProcess/API/C/WebKit2.h:
* UIProcess/API/C/win/WKView.cpp:
(WKViewCreate):
* UIProcess/API/C/win/WKView.h:
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]):
(-[WKView initWithFrame:pageNamespaceRef:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::QWKPagePrivate):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::createWebPage):
* UIProcess/WebContext.h:
* UIProcess/WebContextUserMessageCoders.h:
(WebKit::WebContextUserMessageEncoder::encode):
(WebKit::WebContextUserMessageDecoder::decode):
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::inspectorPageGroup):
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebPageGroup.cpp: Added.
(WebKit::generatePageGroupID):
(WebKit::webPageGroupMap):
(WebKit::WebPageGroup::create):
(WebKit::WebPageGroup::get):
(WebKit::WebPageGroup::WebPageGroup):
(WebKit::WebPageGroup::~WebPageGroup):
* UIProcess/WebPageGroup.h: Added.
(WebKit::WebPageGroup::identifier):
(WebKit::WebPageGroup::pageGroupID):
(WebKit::WebPageGroup::data):
(WebKit::WebPageGroup::type):
* UIProcess/WebPageNamespace.cpp:
(WebKit::WebPageNamespace::createWebPage):
* UIProcess/WebPageNamespace.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::create):
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::pageGroup):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::createWebPage):
* UIProcess/WebProcessProxy.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):
* UIProcess/win/WebView.h:
(WebKit::WebView::create):
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleAddUserScript):
(WKBundleAddUserStyleSheet):
(WKBundleRemoveUserScript):
(WKBundleRemoveUserStyleSheet):
(WKBundleRemoveUserScripts):
(WKBundleRemoveUserStyleSheets):
(WKBundleRemoveAllUserContent):
(WKBundleOverrideXSSAuditorEnabledForTestRunner):
* WebProcess/InjectedBundle/API/c/WKBundle.h:
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageGetPageGroup):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp: Added.
(WKBundlePageGroupGetTypeID):
(WKBundlePageGroupCopyIdentifier):
* WebProcess/InjectedBundle/API/c/WKBundlePageGroup.h: Added.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideXSSAuditorEnabledForTestRunner):
(WebKit::InjectedBundle::addUserScript):
(WebKit::InjectedBundle::addUserStyleSheet):
(WebKit::InjectedBundle::removeUserScript):
(WebKit::InjectedBundle::removeUserStyleSheet):
(WebKit::InjectedBundle::removeUserScripts):
(WebKit::InjectedBundle::removeUserStyleSheets):
(WebKit::InjectedBundle::removeAllUserContent):
(WebKit::InjectedBundle::didInitializePageGroup):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/InjectedBundleClient.cpp:
(WebKit::InjectedBundleClient::didInitializePageGroup):
* WebProcess/InjectedBundle/InjectedBundleClient.h:
* WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
(WebKit::InjectedBundleUserMessageEncoder::encode):
(WebKit::InjectedBundleUserMessageDecoder::decode):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::create):
(WebKit::WebPage::WebPage):
(WebKit::WebPage::close):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::pageGroup):
* WebProcess/WebPage/WebPageGroupProxy.cpp: Added.
(WebKit::WebPageGroupProxy::create):
(WebKit::WebPageGroupProxy::~WebPageGroupProxy):
* WebProcess/WebPage/WebPageGroupProxy.h: Added.
(WebKit::WebPageGroupProxy::identifier):
(WebKit::WebPageGroupProxy::pageGroupID):
(WebKit::WebPageGroupProxy::isVisibleToInjectedBundle):
(WebKit::WebPageGroupProxy::WebPageGroupProxy):
(WebKit::WebPageGroupProxy::type):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::webPageGroup):
* WebProcess/WebProcess.h:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
2010-12-01 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
vcproj changes can't be applied cleanly by the Windows EWS bot
https://bugs.webkit.org/show_bug.cgi?id=50328
* win/WebKit2.submit.sln: Added property svn:eol-style.
* win/WebKit2.vcproj: Added property svn:eol-style.
* win/WebKit2Apple.vsprops: Added property svn:eol-style.
* win/WebKit2CFLite.vsprops: Added property svn:eol-style.
* win/WebKit2Common.vsprops: Added property svn:eol-style.
* win/WebKit2DirectX.vsprops: Added property svn:eol-style.
* win/WebKit2Generated.vcproj: Added property svn:eol-style.
* win/WebKit2GeneratedCommon.vsprops: Added property svn:eol-style.
* win/WebKit2WebProcess.vcproj: Added property svn:eol-style.
* win/WebKit2WebProcessCommon.vsprops: Added property svn:eol-style.
2010-12-01 Simon Fraser <simon.fraser@apple.com>
Reviewed by Anders Carlsson.
Size changes on layer-backed drawing areas don't always end up with the correct value
https://bugs.webkit.org/show_bug.cgi?id=50351
<rdar://problem/8692966>
When the UI process does not receive didSetSize messages promptly,
LayerBackedDrawingAreaProxy::setSize() bails early based on the
m_isWaitingForDidSetFrameNotification flag.
In this situation, the final size may be incorrect. didSetSize()
needs to compare the size that the web process has to the expected size,
and send a final setSize if they differ.
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::didSetSize):
(WebKit::LayerBackedDrawingAreaProxy::didReceiveMessage):
* UIProcess/LayerBackedDrawingAreaProxy.h:
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::setSize):
2010-12-01 Simon Fraser <simon.fraser@apple.com>
Reviewed by Anders Carlsson.
Crash when closing WebKit2 window with accelerated composting content
https://bugs.webkit.org/show_bug.cgi?id=50307
<rdar://problem/8640126>
When the web page is closing, notify the drawing area, so that
the layer-backed drawing area can kill the runloop obsever,
then clear it. Clearing it is not sufficient, since the drawing
area is ref-counted.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::onPageClose):
* WebProcess/WebPage/LayerBackedDrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
* WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
(WebKit::LayerBackedDrawingArea::platformClear):
(WebKit::LayerBackedDrawingArea::onPageClose):
2010-12-01 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Return a correct user agent if NPN_UserAgent is called with a null NPP from NPP_New.
https://bugs.webkit.org/show_bug.cgi?id=50336
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_UserAgent):
Call the static NetscapePlugin::userAgent function instead.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::userAgent):
If the passed in NPP is null, get the NetscapePlugin currently executing NPP_New.
(WebKit::NetscapePlugin::initialize):
Keep track of the plug-in currently executing NPP_New.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
2010-12-01 Brian Weinstein <bweinstein@apple.com>
One last Windows build fix.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
2010-12-01 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::pageDidEnterAcceleratedCompositing):
(WebKit::WebView::pageDidLeaveAcceleratedCompositing):
(WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
2010-12-01 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/win/WebView.h:
2010-12-01 Anders Carlsson <andersca@apple.com>
Reviewed by Andreas Kling.
Get rid of DrawingAreaBase
https://bugs.webkit.org/show_bug.cgi?id=50329
* Scripts/webkit2/messages.py:
* Shared/DrawingAreaInfo.h:
(WebKit::DrawingAreaInfo::DrawingAreaInfo):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
(-[WKView _pageDidEnterAcceleratedCompositing]):
(-[WKView _pageDidLeaveAcceleratedCompositing]):
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::takeSnapshot):
(QGraphicsWKViewPrivate::commitScale):
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
(WebKit::ChunkedUpdateDrawingAreaProxy::setSize):
(WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
(WebKit::ChunkedUpdateDrawingAreaProxy::update):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::nextIdentifier):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::info):
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
(WebKit::LayerBackedDrawingAreaProxy::setSize):
(WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
(WebKit::LayerBackedDrawingAreaProxy::update):
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeAcceleratedCompositing):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
(WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
(WebKit::DrawingArea::DrawingArea):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::info):
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
(WebKit::LayerBackedDrawingArea::didReceiveMessage):
* WebProcess/WebPage/LayerBackedDrawingArea.h:
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::TiledDrawingArea):
* WebProcess/WebPage/TiledDrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::changeAcceleratedCompositingMode):
2010-11-30 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed speculative build fix for Windows.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::pageDidEnterAcceleratedCompositing):
(WebKit::WebView::pageDidLeaveAcceleratedCompositing):
(WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
* UIProcess/win/WebView.h:
2010-11-30 Anders Carlsson <andersca@apple.com>
Fix Qt build.
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::takeSnapshot):
(QGraphicsWKViewPrivate::commitScale):
2010-11-30 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Change DrawingArea and DrawingAreaProxy to not inherit from DrawingAreaBase
https://bugs.webkit.org/show_bug.cgi?id=50300
* UIProcess/API/mac/WKView.mm:
(-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaBase::]):
(-[WKView _pageDidEnterAcceleratedCompositing]):
(-[WKView _pageDidLeaveAcceleratedCompositing]):
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::nextDrawingAreaID):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::info):
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
(WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
(WebKit::DrawingArea::DrawingArea):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::info):
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
(WebKit::LayerBackedDrawingArea::didReceiveMessage):
* WebProcess/WebPage/LayerBackedDrawingArea.h:
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::TiledDrawingArea):
* WebProcess/WebPage/TiledDrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::changeAcceleratedCompositingMode):
2010-11-30 Simon Fraser <simon.fraser@apple.com>
Reviewed by Sam Weinig.
Context menus broken after WebKit2 goes into accelerated composting mode.
https://bugs.webkit.org/show_bug.cgi?id=50296
Override hitTest: on the WKView to exclude the child layer-backed view from
hit testing, so that context menus work.
* UIProcess/API/mac/WKView.mm:
(-[WKView hitTest:]):
2010-11-30 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
Build fix.
* Configurations/BaseTarget.xcconfig: Don't run Copy Files and Run Script build phases
during installhdrs. It's not necessary, and it results in Xcode attempting to copy the
plug-in shim dylib when it has not yet been built.
* WebKit2.xcodeproj/project.pbxproj: Stop copying the .xcconfig file in to the application
wrapper.
2010-11-30 Anders Carlsson <andersca@apple.com>
Fix build.
* Scripts/webkit2/messages.py:
2010-11-30 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Rename DrawingAreaBase.h to DrawingAreaInfo.h.
* Shared/DrawingAreaInfo.h: Renamed from WebKit2/Shared/DrawingAreaBase.h.
(WebKit::DrawingAreaBase::DrawingAreaInfo::DrawingAreaInfo):
(WebKit::DrawingAreaBase::~DrawingAreaBase):
(WebKit::DrawingAreaBase::info):
(WebKit::DrawingAreaBase::DrawingAreaBase):
* Shared/WebPageCreationParameters.h:
* UIProcess/DrawingAreaProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/DrawingArea.h:
* win/WebKit2.vcproj:
2010-11-30 Anders Carlsson <andersca@apple.com>
Fix build.
* PluginProcess/mac/PluginProcessShim.cpp:
2010-11-30 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Add a simple shim function for Debugger().
https://bugs.webkit.org/show_bug.cgi?id=50268
* PluginProcess/PluginProcess.h:
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::initShouldCallRealDebugger):
We only want to call the real Debugger() function when USERBREAK is set.
(WebKit::shouldCallRealDebugger):
Return whether USERBREAK is set.
(WebKit::PluginProcess::initializeShim):
Initialize the shim.
* PluginProcess/mac/PluginProcessMainMac.mm:
(WebKit::PluginProcessMain):
Call PluginProcess::initializeShim.
* PluginProcess/mac/PluginProcessShim.cpp:
(WebKit::WebKitPluginProcessShimInitialize):
This now takes a struct of callbacks.
(WebKit::shimDebugger):
Call the shouldCallDebugger function. If it returns true, the real Debugger() function should be called.
* PluginProcess/mac/PluginProcessShim.h:
* WebKit2.xcodeproj/project.pbxproj:
2010-11-30 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Pass the plug-in process shim in DYLD_INSERT_LIBRARIES when launching the plug-in process
https://bugs.webkit.org/show_bug.cgi?id=50262
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
Add an EnvironmentVariables class that allows for easy modification of the environment variables
passed to posix_spawn.
(WebKit::ProcessLauncher::launchProcess):
When spawning the plug-in process, insert the plug-in process shim.
2010-11-30 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add plug-in process shim
https://bugs.webkit.org/show_bug.cgi?id=50261
* Configurations/PluginProcessShim.xcconfig: Added.
* PluginProcess/mac/PluginProcessShim.cpp: Added.
(PluginProcessShimInitialize):
* PluginProcess/mac/PluginProcessShim.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
2010-11-30 Brian Weinstein <bweinstein@apple.com>
Fix the Windows build by copying WKFindOptions.h into WebKitOutputDir with the other headers.
* win/WebKit2Generated.make:
2010-11-30 Dan Bernstein <mitz@apple.com>
Try to fix the Windows build.
* win/WebKit2.vcproj:
2010-11-30 Dan Bernstein <mitz@apple.com>
Reviewed by Anders Carlsson.
Injected bundle support for <rdar://problem/8710645> WebKitTestRunner needs layoutTestController.findString
https://bugs.webkit.org/show_bug.cgi?id=50238
* Shared/API/c/WKFindOptions.h: Added. Moved the definition of WKFindOptions here from WKPage.h.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toFindOptions): Moved from WKAPICast.h.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPage.h:
* WebKit2.xcodeproj/project.pbxproj: Added WKFindOptions.h.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageFindString): Added.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::findStringFromInjectedBundle): Added.
* WebProcess/WebPage/WebPage.h:
2010-11-30 Andreas Kling <kling@webkit.org>
Reviewed by Dirk Schulze.
GraphicsContext: Remove "current path" and have strokePath, fillPath and clipPath take a Path argument
https://bugs.webkit.org/show_bug.cgi?id=48516
* UIProcess/FindIndicator.cpp:
(WebKit::FindIndicator::draw):
2010-11-30 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
All projects on Windows should use cmd files for build events
https://bugs.webkit.org/show_bug.cgi?id=50213
* win/WebKit2Common.vsprops:
* win/WebKit2WebProcessCommon.vsprops:
* win/WebKit2WebProcessPostBuild.cmd: Added.
* win/WebKit2WebProcessPreBuild.cmd: Added.
* win/WebKitPostBuild.cmd: Added.
* win/WebKitPreBuild.cmd: Added.
* win/WebKitPreLink.cmd: Added.
2010-11-30 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Andreas Kling.
[Qt] Early return if setResizesToContentsUsingLayoutSize() is called with already-set size
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setResizesToContentsUsingLayoutSize):
2010-11-29 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
WebKit2 part of <rdar://problem/8650085> adding word-prefix search options to the text search API.
https://bugs.webkit.org/show_bug.cgi?id=50038
Based on a patch from Darin Adler.
* Shared/WebFindOptions.h: Renamed FindOptions.h to this to account for WebCore’s new private
FindOptions.h. Added and reordered FindOptions and rolled FindDirection into FindOptions.
* UIProcess/API/C/WKAPICast.h: Removed toFindDirection().
(WebKit::toFindOptions): Updated for new values.
* UIProcess/API/C/WKPage.cpp:
(WKPageFindString): Removed separate WKFindDirection.
(WKPageCountStringMatches): Replaces caseInsensitive boolean with WKFindOptions.
* UIProcess/API/C/WKPage.h: Removed WKFindDirection and updated WKFindOptions.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findString): Removed separate FindDirection.
(WebKit::WebPageProxy::countStringMatches): Replaced caseInsensitive boolean with FindOptions.
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj: Updated for the header rename.
* WebProcess/WebPage/FindController.cpp:
(WebKit::core): Added. Converts WebKit2 FindOptions to WebCore FindOptions.
(WebKit::FindController::countStringMatches): Changed to use FindOptions.
(WebKit::FindController::findString): Ditto.
* WebProcess/WebPage/FindController.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::findString): Ditto.
(WebKit::WebPage::countStringMatches): Ditto.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Ditto.
2010-11-29 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build fix.
* win/WebKit2.vcproj: Add missing vsprops association for
Debug_Cairo_CFLite target.
2010-11-29 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Cursor does not always change back to arrow when exiting image document
https://bugs.webkit.org/show_bug.cgi?id=50190
<rdar://problem/8665265>
* Shared/mac/WebEventFactory.mm:
(WebKit::mouseEventTypeForEvent):
(WebKit::globalPointForEvent):
(WebKit::pointForEvent):
Handle the NSMouseEntered and NSMouseExited events.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:]):
We want entered and exited events for this tracking area.
Add mouseEntered and mouseExited handlers.
2010-11-29 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Should be able to pause and resume downloads
https://bugs.webkit.org/show_bug.cgi?id=50185
<rdar://problem/8691135>
* UIProcess/API/C/WKContext.h:
Add didCancel callback.
* UIProcess/API/C/WKDownload.cpp:
(WKDownloadGetResumeData):
(WKDownloadCancel):
Call the respective DownloadProxy member functions.
* UIProcess/API/C/WKDownload.h:
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::cancel):
Send Cancel to the WebProcess.
(WebKit::DownloadProxy::didFail):
This now takes a resumeData reference.
(WebKit::DownloadProxy::didCancel):
Set the resume data and call didCancel.
* UIProcess/Downloads/DownloadProxy.h:
(WebKit::DownloadProxy::resumeData):
Return the resume data.
* UIProcess/Downloads/DownloadProxy.messages.in:
Add DidCancel message, Add resume data to DidFail.
* UIProcess/WebDownloadClient.cpp:
(WebKit::WebDownloadClient::didCancel):
Call the didCancel context client function.
* WebProcess/Downloads/Download.cpp:
(WebKit::Download::didFail):
This now takes a resume data argument as well.
(WebKit::Download::didCancel):
Send DidCancel.
* WebProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::cancelDownload):
Look up the download and cancel it.
* WebProcess/Downloads/cf/DownloadCFNet.cpp:
(WebKit::Download::cancel):
Add stub.
* WebProcess/Downloads/mac/DownloadMac.mm:
(WebKit::Download::cancel):
Cancel the download.
(-[WKDownloadAsDelegate download:didFailWithError:]):
Pass the resume data along.
* WebProcess/Downloads/qt/DownloadQt.cpp:
(WebKit::Download::cancel):
Add stub.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::cancelDownload):
Ask the download manager to cancel the download.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
Add CancelDownload message.
2010-11-29 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Adam Roben.
[WK2] Support repeating timers
https://bugs.webkit.org/show_bug.cgi?id=50024
Added boolean member for TimerBase on PLATFORM(WIN)
and PLATFORM(QT) to be able to differentiate between
repeating and one shot operating mode. Change the confusing
signature of TimerBase::start: use a bool for selecting
operating mode.
* Platform/RunLoop.h:
(RunLoop::TimerBase::startRepeating):
(RunLoop::TimerBase::startOneShot):
* Platform/mac/RunLoopMac.mm:
(RunLoop::TimerBase::start):
* Platform/qt/RunLoopQt.cpp:
(RunLoop::TimerBase::timerFired): Only stop the timer if it
is not in repeating mode.
(RunLoop::TimerBase::TimerBase):
(RunLoop::TimerBase::start):
* Platform/win/RunLoopWin.cpp:
(RunLoop::TimerBase::timerFired): Only stop the timer if it
is not in repeating mode.
(RunLoop::TimerBase::TimerBase):
(RunLoop::TimerBase::start):
2010-11-29 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Downloads: When the web process crashes, call error callbacks for pending downloads
https://bugs.webkit.org/show_bug.cgi?id=50164
<rdar://problem/8691170>
* UIProcess/API/C/WKContext.h:
Add processDidCrash callback.
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::~DownloadProxy):
Assert that the web context is null.
(WebKit::DownloadProxy::processDidClose):
Call the processDidCrash callback.
(WebKit::DownloadProxy::didFinish):
(WebKit::DownloadProxy::didFail):
Call downloadFinished.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::processDidClose):
Call processDidClose on all pending downloads.
(WebKit::WebContext::downloadFinished):
Remove the download proxy from the map.
* UIProcess/WebDownloadClient.cpp:
(WebKit::WebDownloadClient::processDidCrash):
Call the processDidCrash callback function.
2010-11-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Allow pre-generation for package builds for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=50139
Use a build variable for the generated directory path and set the
value based on CONFIG just like for WebKit1.
For non-package builds use a relative base path for the
genrated directory just like for WebKit1.
* DerivedSources.pro:
* WebKit2.pro:
2010-11-28 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Move some build logic from Qt to platform independent code
https://bugs.webkit.org/show_bug.cgi?id=50134
Remove the creation of the directories under $$OUTPUT_DIR/include
as these will be handled by the fwheader_generator target.
Remove the explicit generation of $$OUTPUT_DIR/WebKit2/generated as
this is not required.
* DerivedSources.pro:
2010-11-24 Brady Eidson <beidson@apple.com>
Reviewed implicitly by John Sullivan.
https://bugs.webkit.org/show_bug.cgi?id=50042
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WebUserDataWrapper initWithUserData:WebKit::]): Do the proper self = [super init] dance here.
2010-11-24 Brady Eidson <beidson@apple.com>
Reviewed by Dan Bernstein.
More of <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=50042
WK2 Context Menu Items need a user data object and a client callback for selection.
* Shared/API/c/WKContextMenuItem.cpp:
(WKContextMenuItemGetUserData):
(WKContextMenuItemSetUserData):
* Shared/API/c/WKContextMenuItem.h:
* Shared/WebContextMenuItem.cpp:
(WebKit::WebContextMenuItem::userData):
(WebKit::WebContextMenuItem::setUserData):
* Shared/WebContextMenuItem.h:
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::userData):
(WebKit::WebContextMenuItemData::setUserData):
* Shared/WebContextMenuItemData.h:
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageContextMenuClient.cpp:
(WebKit::WebPageContextMenuClient::customContextMenuItemSelected): Added for WK2 apps to get a callback.
* UIProcess/WebPageContextMenuClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::contextMenuItemSelected):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WebUserDataWrapper initWithUserData:WebKit::]): Add an "APIObject" user data wrapper class to associate with the NSMenuItem.
(-[WebUserDataWrapper WebKit::]):
(-[WebMenuTarget forwardContextMenuAction:]): Include the user data object in the created ContextMenuItemData.
(WebKit::nsMenuItemVector):
2010-11-24 Andras Becsi <abecsi@inf.u-szeged.hu>
Reviewed by Kenneth Rohde Christiansen.
Make WebKit2 compile with !ENABLE(INSPECTOR).
https://bugs.webkit.org/show_bug.cgi?id=49973
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toImpl):
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKInspector.cpp:
* UIProcess/API/C/WKInspector.h:
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/WKPage.h:
* UIProcess/WebInspectorProxy.cpp:
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::didReceiveMessage):
(WebKit::WebPageProxy::didReceiveSyncMessage):
(WebKit::WebPageProxy::processDidCrash):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
* UIProcess/qt/WebInspectorProxyQt.cpp:
* UIProcess/win/WebInspectorProxyWin.cpp:
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
* WebProcess/WebPage/WebInspector.cpp:
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspector.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::close):
(WebKit::WebPage::windowIsFocused):
(WebKit::WebPage::didReceiveMessage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/qt/WebInspectorQt.cpp:
* WebProcess/WebPage/win/WebInspectorWin.cpp:
2010-11-24 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt][WK2] Make deep copies of tile images
We need the tile images we get from UpdateChunk::createImage() to persist,
so we should take a copy() of them.
* UIProcess/qt/TiledDrawingAreaTileQt.cpp:
(WebKit::TiledDrawingAreaTile::updateFromChunk):
2010-11-24 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Fix uninitialized variable in QGraphicsWKViewPrivate
Always initialize QGWKVP::m_isChangingScale in the constructor.
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKViewPrivate::QGraphicsWKViewPrivate):
2010-11-23 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Andreas Kling.
Adapt to setShouldDelegateScrolling not being a real setting anymore.
We now similarily to setUseFixedLayout and setPaintEntireContents
set it on the FrameView wen transitioning to a new page, etc.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setResizesToContentsUsingLayoutSize):
2010-11-22 Adam Roben <aroben@apple.com>
Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files
Apple's Windows build allows placing header files and import libraries for WebKit's
dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the
$WebKitLibrariesDir environment variable. This is both required for production builds and
convenient for Apple-internal developer builds. Apple's production builds also require that
WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production
builds, the files are copied into that directory tree by the
WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the
copying is done by
JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make.
This .vsprops copying is problematic in one very important case: when a developer updates
their source tree and then tries to build. Visual Studio only reads .vsprops files when a
project is first loaded. So, when Visual Studio is first opened after the .vsprops files are
updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a
build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into
$WebKitLibrariesDir, but Visual Studio will not pick up the changes. The rest of the build
will proceed with out-of-date .vsprops files, which will likely result in a build failure.
To fix this, we now use normal relative paths to access the .vsprops files in the source
tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment
variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is
unset, so the normal relative paths are used to read the .vsprops files out of the source
tree directly. In production builds, this environment variable is set to a fake directory
that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path
is resolved.
For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops:
$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the
files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds,
JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to
"$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for
FeatureDefines.vsprops becomes:
$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
which resolves to:
$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
(We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3"
actually exist since they are matched by an equal number of ".." path components.)
Note that Visual Studio still won't pick up changes made to .vsprops files while Visual
Studio is open, but that problem hasn't seemed to cause developers many headaches so far.
Fixes <http://webkit.org/b/49181> Windows build fails mysteriously when .vsprops files are
updated
Reviewed by Dave Hyatt.
* win/WebKit2.make: Set $WebKitVSPropsRedirectionDir so that production builds can
find the .vsprops files.
* win/WebKit2.vcproj:
* win/WebKit2WebProcess.vcproj:
Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops
files.
2010-11-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Andreas Kling.
Make WebKit2 compile with ENABLE_JAVASCRIPT_DEBUGGER=0
* WebProcess/WebPage/WebInspector.cpp: Add missing ENABLE(JAVASCRIPT_DEBUGGER) guards.
(WebKit::WebInspector::startJavaScriptDebugging):
(WebKit::WebInspector::stopJavaScriptDebugging):
(WebKit::WebInspector::startJavaScriptProfiling):
(WebKit::WebInspector::stopJavaScriptProfiling):
2010-11-21 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
Textareas should be resizable by default
https://bugs.webkit.org/show_bug.cgi?id=49892
Test: WebKit2/WKPreferences
* Shared/WebPreferencesStore.cpp:
(WebKit::WebPreferencesStore::WebPreferencesStore):
(WebKit::WebPreferencesStore::encode):
(WebKit::WebPreferencesStore::decode):
* Shared/WebPreferencesStore.h:
Add textAreasAreResizable bit.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetJavaEnabled):
(WKPreferencesGetJavaEnabled):
Fix typo, WKPRe... -> WKPre...
(WKPreferencesSetMinimumFontSize):
(WKPreferencesGetMinimumFontSize):
Fix comment to correctly reflect that the default minimumFontSize is 0, not 1.
(WKPreferencesSetTextAreasAreResizable):
(WKPreferencesGetTextAreasAreResizable):
* UIProcess/API/C/WKPreferences.h:
Add API.
* UIProcess/API/C/WKPreferencesPrivate.h:
Don't use PLATFORM in API headers.
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::setTextAreasAreResizable):
(WebKit::WebPreferences::textAreasAreResizable):
* UIProcess/WebPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Pipe bit through to the WebProcess and onto WebCore::Settings.
2010-11-19 Zalan Bujtas <zbujtas@gmail.com>
Reviewed by Andreas Kling.
WebUIClient::createNewPage() expects a retained WKPageRef.
https://bugs.webkit.org/show_bug.cgi?id=48549
* UIProcess/API/qt/ClientImpl.cpp:
(qt_wk_createNewPage):
2010-11-19 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add a didFail WKContextDownloadClient callback
https://bugs.webkit.org/show_bug.cgi?id=49847
* UIProcess/API/C/WKContext.h:
Add didFail callback.
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didFail):
Call WebDownloadClient::didFail.
* UIProcess/WebDownloadClient.cpp:
(WebKit::WebDownloadClient::didFail):
Call the didFail client function.
2010-11-19 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Extend sandbox when downloading files
https://bugs.webkit.org/show_bug.cgi?id=49844
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction):
Add new overload.
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
Create a sandbox extension handle if necessary.
* UIProcess/Downloads/DownloadProxy.messages.in:
Add a sandbox extension handle out parameter to the DecideDestinationWithSuggestedFilename message.
* WebProcess/Downloads/Download.cpp:
(WebKit::Download::decideDestinationWithSuggestedFilename):
Create and consume the returned sandbox extension handle.
(WebKit::Download::didFinish):
(WebKit::Download::didFail):
Invalidate the sandbox extension handles.
* WebProcess/Downloads/mac/DownloadMac.mm:
(-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
Whoops, fix inverted logic.
2010-11-19 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files
https://bugs.webkit.org/show_bug.cgi?id=49819
* win/WebKit2.vcproj:
* win/WebKit2Generated.vcproj:
* win/WebKit2WebProcess.vcproj:
* win/WebKit2WebProcessCommon.vsprops:
2010-11-19 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
More of <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=49836
Add WebKit2 API relevant to customization of context menus
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameAllowsFollowingLink):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::allowsFollowingLink):
* WebProcess/WebPage/WebFrame.h:
2010-11-19 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
<rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=49836
Add WebKit2 API relevant to customization of context menus
Most of this is just exposing already-existing concepts in API.
* Shared/API/c/WKURLRequest.cpp:
(WKURLRequestCreateWithWKURL):
* Shared/API/c/WKURLRequest.h:
* Shared/WebURLRequest.cpp:
(WebKit::WebURLRequest::create):
* Shared/WebURLRequest.h:
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
(WKBundleHitTestResultCopyAbsoluteImageURL):
(WKBundleHitTestResultCopyAbsoluteMediaURL):
(WKBundleHitTestResultGetImageRect):
(WKBundleHitTestResultGetIsSelected):
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageHasLocalDataForURL):
(WKBundlePageCanHandleRequest):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::absoluteImageURL):
(WebKit::InjectedBundleHitTestResult::absoluteMediaURL):
(WebKit::InjectedBundleHitTestResult::imageRect):
(WebKit::InjectedBundleHitTestResult::isSelected):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::hasLocalDataForURL):
(WebKit::WebPage::canHandleRequest):
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::hasLocalDataForURL): Stubbed for now.
(WebKit::WebPage::canHandleRequest): Ditto.
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::hasLocalDataForURL): Ditto.
(WebKit::WebPage::canHandleRequest): Ditto.
2010-11-19 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Need a way to clear disk cache from WebContext
https://bugs.webkit.org/show_bug.cgi?id=49820
* UIProcess/API/C/WKContext.cpp:
(WKContextClearResourceCaches): Added.
(WKContextClearApplicationCache): Added.
* UIProcess/API/C/WKContext.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::clearResourceCaches): Added.
(WebKit::WebContext::clearApplicationCache): Added.
* UIProcess/WebContext.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearResourceCaches): Added.
(WebKit::WebProcess::clearApplicationCache): Added.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Added messages.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformClearResourceCaches): Added.
* WebProcess/qt/WebProcessQt.cpp:
(WebKit::WebProcess::platformClearResourceCaches): Added.
* WebProcess/win/WebProcessWin.cpp:
(WebKit::WebProcess::platformClearResourceCaches): Added.
2010-11-19 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Implement support for loading local files
https://bugs.webkit.org/show_bug.cgi?id=49828
<rdar://problem/8447121>
* UIProcess/WebPageProxy.cpp:
(WebKit::initializeSandboxExtensionHandle):
Given an URL, create a sandbox extension if it's a local file URL.
(WebKit::WebPageProxy::loadURL):
(WebKit::WebPageProxy::loadURLRequest):
Pass along sandbox extension handles to the LoadURL and LoadURLRequest messages.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
Call SandboxExtensionTracker::didStartProvisionalLoad.
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
Call SandboxExtensionTracker::didCommitProvisionalLoad.
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
Call SandboxExtensionTracker::didFailProvisionalLoad.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::~WebPage):
Invalidate the sandbox extension tracker.
(WebKit::WebPage::close):
Invalidate the sandbox extension tracker.
(WebKit::WebPage::loadURL):
(WebKit::WebPage::loadURLRequest):
Pass the sandbox extension handle to the sandbox extension tracker.
(WebKit::WebPage::SandboxExtensionTracker::~SandboxExtensionTracker):
Invalidate the sandbox extension tracker.
(WebKit::WebPage::SandboxExtensionTracker::invalidate):
invalidate ell the sandbox extensions.
(WebKit::WebPage::SandboxExtensionTracker::beginLoad):
Create a sandbox extension and store it as the "pending provisional extension".
(WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
Consume the pending provisional extension and make it the provisional extension.
(WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad):
Invalidate the committed extension and make the provisional extension the committed extension.
(WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad):
Invalidate the provisional extension.
* WebProcess/WebPage/WebPage.messages.in:
Add SandboxExtension::Handle parameters to LoadURL and LoadURLRequest.
2010-11-19 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Make it possible to encode null SandboxExtension handles
https://bugs.webkit.org/show_bug.cgi?id=49825
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::Handle::encode):
If there's no underlying sandbox extension, just encode an empty byte array.
(WebKit::SandboxExtension::Handle::decode):
If the decoded byte array is empty, don't try to create a sandbox extension.
(WebKit::SandboxExtension::create):
If the handle is null, return null.
(WebKit::SandboxExtension::consume):
Consuming shuld not null out the underlying sandbox extension object.
2010-11-19 Steve Falkenburg <sfalken@apple.com>
Reviewed by Darin Adler.
Normalize Cairo/CFLite project/solution configuration names
https://bugs.webkit.org/show_bug.cgi?id=49818
* win/WebKit2.vcproj:
* win/WebKit2WebProcess.vcproj:
2010-11-19 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add SandboxExtension abstraction and use it for the injected bundle extension
https://bugs.webkit.org/show_bug.cgi?id=49817
* Shared/SandboxExtension.h:
Add SandboxExtension abstraction.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
Instead of encoding/decoding a token, encode/decode the sandbox extension handle.
* Shared/mac/SandboxExtensionMac.mm: Added.
Add Mac implementation of SandboxExtension.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess):
Create a SandboxExtension::Handle object.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/InjectedBundle/InjectedBundle.h:
(WebKit::InjectedBundle::setSandboxExtension):
Set the sandbox extension.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
(WebKit::InjectedBundle::load):
Consume the sandbox extension.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Create a sandbox extension and set it on the injected bundle.
2010-11-18 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Windows vcproj configuration names should be normalized across projects
https://bugs.webkit.org/show_bug.cgi?id=49776
* win/WebKit2.submit.sln:
* win/WebKit2Generated.vcproj:
* win/WebKit2GeneratedCommon.vsprops: Added.
2010-11-18 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Crash in WebKit::PluginView::manualLoadDidReceiveResponse when navigating to a .wav file in WebKit2 on Mac
https://bugs.webkit.org/show_bug.cgi?id=48559
<rdar://problem/8606622>
Add null checks for m_plugin.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::manualLoadDidReceiveResponse):
(WebKit::PluginView::manualLoadDidReceiveData):
(WebKit::PluginView::manualLoadDidFinishLoading):
(WebKit::PluginView::manualLoadDidFail):
2010-11-18 Mark Rowe <mrowe@apple.com>
Rubber-stamped by Adam Roben.
<rdar://problem/8602509&8602717&8602724> Enable compaction support.
* Configurations/WebKit2.xcconfig:
2010-11-18 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben.
WebKit2: Safari shouldn't auto-activate plug-ins in background tabs.
https://bugs.webkit.org/show_bug.cgi?id=49770
<rdar://problem/8482424>
Add an API on Windows to call setIsInWindow, which calls through to WebPage::setIsInWindow.
Remove the !PLATFORM(WIN) check in WebPage, so we don't automatically start plugins that are
loaded in background tabs.
* UIProcess/API/C/win/WKView.cpp:
(WKViewSetIsInWindow): Call through to WebView::setIsInWindow.
* UIProcess/API/C/win/WKView.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::setIsInWindow): Call through to WebPage::setIsInWindow.
* UIProcess/win/WebView.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Remove the !PLATFORM(WIN) check and update the comment.
2010-11-18 Darin Adler <darin@apple.com>
* WebProcess/WebPage/WebPage.cpp: Fix build by rolling out a change.
2010-11-18 Darin Adler <darin@apple.com>
Reviewed by Kevin Decker.
REGRESSION (WebKit2): Plug-ins and <video> start playing immediately in background tabs
https://bugs.webkit.org/show_bug.cgi?id=49766
Test: manual-tests/resources/video-tab.html
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Call setCanStartMedia(false) since the rest of the code
starts out treating the page as "not in a window".
2010-11-18 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Remove leftover Windows Debug_Internal configurations
https://bugs.webkit.org/show_bug.cgi?id=49758
* win/WebKit2.vcproj:
* win/WebKit2WebProcess.vcproj:
2010-11-18 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Page overlays should be able to handle mouse events
https://bugs.webkit.org/show_bug.cgi?id=49756
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
Add API cast function for converting an IntPoint to a WKPoint.
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(PageOverlayClientImpl::mouseEvent):
Call the appropriate callbacks.
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
Add new callbacks.
2010-11-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Keep the web process alive if there are active downloads
https://bugs.webkit.org/show_bug.cgi?id=49755
Make sure that Download objects are destroyed when the download finishes or fails.
Don't close the web process if there are live Download objects.
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didFail):
Add stub.
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Downloads/DownloadProxy.messages.in:
Add DidFail message.
* WebProcess/Downloads/Download.cpp:
(WebKit::Download::didFinish):
Call DownloadManager::downloadFinished.
(WebKit::Download::didFail):
Send DidFail message and call DownloadManager::downloadFinished.
* WebProcess/Downloads/Download.h:
(WebKit::Download::destinationID):
Call downloadID().
(WebKit::Download::downloadID):
Return the download ID.
* WebProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::downloadFinished):
Delete the Download object and call WebProcess::shutdownIfPossible.
* WebProcess/Downloads/DownloadManager.h:
(WebKit::DownloadManager::isDownloading):
Return whether the download manager has any active downloads.
* WebProcess/Downloads/mac/DownloadMac.mm:
(-[WKDownloadAsDelegate download:didFailWithError:]):
Call Download::didFail.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::removeWebPage):
Call shutdownIfPossible.
(WebKit::WebProcess::shutdownIfPossible):
New function. Don't shutdown if there are live pages or active downloads.
* WebProcess/WebProcess.h:
2010-11-18 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Debug_Internal Windows configuration is unnecessary, should be removed
https://bugs.webkit.org/show_bug.cgi?id=49753
* UIProcess/Launcher/win/ProcessLauncherWin.cpp:
* WebKit2Prefix.h:
2010-11-18 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Clean up vcproj errors
https://bugs.webkit.org/show_bug.cgi?id=49741
* win/WebKit2WebProcess.vcproj:
2010-11-18 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Laszlo Gombos.
[Qt] [WK2] WebKit 2 would not compile for Qt without ENABLE_TOUCH_EVENT
https://bugs.webkit.org/show_bug.cgi?id=49664
Move the ENABLE(TOUCH_EVENTS) to the code where internal WebKit touch
types are used.
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::touchEvent):
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::touchEvent):
2010-11-17 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
Reuse the size of the actualVisibleContentRect when loading a new page
or navigating session history.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2010-11-17 Dimitri Glazkov <dglazkov@chromium.org>
Reviewed by Darin Adler.
Converge means of querying a parent node into one way, which is Node::parentNode.
https://bugs.webkit.org/show_bug.cgi?id=49686
* WebProcess/WebPage/WebPage.cpp: Changed to use parentNode.
(WebKit::WebPage::findZoomableAreaForPoint): Ditto.
2010-11-17 Timothy Hatcher <timothy@apple.com>
Remove duplicate Web Inspector message handeling in WebPage::didReceiveMessage.
https://webkit.org/b/49689
Reviewed by Andreas Kling.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage): Remove duplicate code.
2010-11-17 Timothy Hatcher <timothy@apple.com>
Fix a crash when closing the inspected page when the Web Inspector
page was never created.
https://bugs.webkit.org/show_bug.cgi?id=49687
Reviewed by John Sullivan.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::sendMessageToFrontend): Null check the Inspector WebPage.
2010-11-17 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Don't crash when invalidating a page overlay that hasn't been installed yet
https://bugs.webkit.org/show_bug.cgi?id=49685
Null check the web page.
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::setNeedsDisplay):
2010-11-17 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=49682 - Expose "removeItemAtIndex" in WKMutableArray
* Shared/API/c/WKMutableArray.cpp:
(WKArrayRemoveItemAtIndex):
* Shared/API/c/WKMutableArray.h:
* Shared/MutableArray.cpp:
(WebKit::MutableArray::removeItemAtIndex):
* Shared/MutableArray.h:
2010-11-17 Brady Eidson <beidson@apple.com>
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=49683 - Export WKContextMenuItem and WKContextMenuItemTypes as public headers
* WebKit2.xcodeproj/project.pbxproj:
2010-11-17 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Need way to invalidate part of a WKOverlayRef so it will be redrawn
https://bugs.webkit.org/show_bug.cgi?id=49679
<rdar://problem/8679152>
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(WKBundlePageOverlaySetNeedsDisplay):
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::setNeedsDisplay):
* WebProcess/WebPage/PageOverlay.h:
2010-11-17 Timothy Hatcher <timothy@apple.com>
Provide a way to create a WKView (WebPage) that is hidden from
the InjectedBundle. This is needed for the Web Inspector.
https://webkit.org/b/49670
Reviewed by Sam Weinig.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Added visibleToInjectedBundle.
(WebKit::WebPageCreationParameters::decode): Ditto.
* Shared/WebPageCreationParameters.h: Ditto.
* UIProcess/API/C/win/WKView.cpp:
(WKViewCreate): Pass VisibleToInjectedBundle to the WebView create function.
* UIProcess/API/C/win/WKViewPrivate.cpp:
(WKViewCreateForWebInspector): Added. Not used yet. Passes HiddenFromInjectedBundle
to the WebView create function.
* UIProcess/API/C/win/WKViewPrivate.h: Added WKViewCreateForWebInspector.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:]): Added hiddenFromInjectedBundle
parameter and calls WebPageProxy::setVisibleToInjectedBundle.
(-[WKView initWithFrame:pageNamespaceRef:]): Calls initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:
and passes NO for hiddenFromInjectedBundle.
(-[WKView initWithFrame:]): Cleaned up by removing the local assignment to self and just returns the result.
* UIProcess/API/mac/WKViewInternal.h: Added initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize m_visibleToInjectedBundle from the creation parameters.
(WebKit::WebPageProxy::creationParameters): Set visibleToInjectedBundle using m_visibleToInjectedBundle.
* UIProcess/WebPageProxy.h: Added m_visibleToInjectedBundle.
(WebKit::WebPageProxy::visibleToInjectedBundle): Added. Return m_visibleToInjectedBundle.
(WebKit::WebPageProxy::setVisibleToInjectedBundle): Added. Set m_visibleToInjectedBundle.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView): Added InjectedBundleVisibility parameter and calls
WebPageProxy::setVisibleToInjectedBundle.
* UIProcess/win/WebView.h: Added InjectedBundleVisibility enum.
(WebKit::WebView::create): Added InjectedBundleVisibility parameter.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::create): Checks visibleToInjectedBundle before talking to the injected bundle.
(WebKit::WebPage::WebPage): Initialize m_isVisibleToInjectedBundle from the creation parameters.
(WebKit::WebPage::close): Checks m_isVisibleToInjectedBundle before talking to the injected bundle.
* WebProcess/WebPage/WebPage.h: Added m_isVisibleToInjectedBundle.
2010-11-17 Andras Becsi <abecsi@webkit.org>
Unreviewed buildfix.
[Qt] D'oh! I screwed up the dependencies.
* DerivedSources.pro:
2010-11-17 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Andreas Kling.
[WK2] Set paintsEntireContents for "resizes to contents" mode
Only relevant for the tiled backing store.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setResizesToContentsUsingLayoutSize):
2010-11-17 Andras Becsi <abecsi@webkit.org>
Reviewed by Andreas Kling.
[Qt][WK2] Make it possible to set custom user agent strings in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=49627
Copy the MiniBrowser.qrc and QtTestBrowser's useragentlist.txt file
to the build directory of MiniBrowser because it has to be in a
subdirectory of the resource file.
Add a method to QWKPage to retrieve the custom user agent string.
* DerivedSources.pro:
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::customUserAgent):
* UIProcess/API/qt/qwkpage.h:
2010-11-17 Simon Fraser <simon.fraser@apple.com>
Reviewed by Adam Roben.
https://bugs.webkit.org/show_bug.cgi?id=45567
Add stubbed-out layer-backed drawing area for Windows.
Add implementations of LayerBackedDrawingArea and
LayerBackedDrawingAreaProxy for Windows, and add them
to the vcproj.
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
* UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: Added.
(WebKit::LayerBackedDrawingAreaProxy::page):
(WebKit::LayerBackedDrawingAreaProxy::platformSetSize):
(WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
(WebKit::LayerBackedDrawingAreaProxy::detachCompositingContext):
(WebKit::LayerBackedDrawingAreaProxy::paint):
* UIProcess/win/WebView.cpp:
(WebKit::WebView::pageDidEnterAcceleratedCompositing):
(WebKit::WebView::pageDidLeaveAcceleratedCompositing):
(WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
* UIProcess/win/WebView.h:
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
* WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Added.
(WebKit::LayerBackedDrawingArea::platformInit):
(WebKit::LayerBackedDrawingArea::platformClear):
(WebKit::LayerBackedDrawingArea::attachCompositingContext):
(WebKit::LayerBackedDrawingArea::detachCompositingContext):
(WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
(WebKit::LayerBackedDrawingArea::scheduleCompositingLayerSync):
(WebKit::LayerBackedDrawingArea::syncCompositingLayers):
* win/WebKit2.vcproj:
2010-11-17 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] [WK2] The focus switching does not seems to work with QGraphicsWKView
https://bugs.webkit.org/show_bug.cgi?id=49545
Implement focus switching with Tab. This is now done asynchronously,
waiting for webkit to call takeFocus() and switching the widget.
Since the focus can change between the Tab press and the callback,
QGraphicsWKView::focusNextPrevChildCallback() make sure the view still has
focus before passing it to the next widget.
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::QGraphicsWKView):
(QGraphicsWKView::focusNextPrevChildCallback):
(QGraphicsWKView::focusNextPrevChild):
* UIProcess/API/qt/qgraphicswkview.h:
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::takeFocus):
* UIProcess/API/qt/qwkpage.h:
* UIProcess/API/qt/qwkpage_p.h:
2010-11-17 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
Don't prohibit scrolling in tiled backing store mode.
We delegate scrolling instead.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2010-11-17 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Kenneth Christiansen.
[Qt] Improve painting performance on 16-bit displays
When the default pixmap depth is 16-bit, then use RGB16 instead of
RGB32 for the chunks, to avoid unnecessary conversions and reduce
chunk size. The conversions happen as images as QPixmaps have 16-bit
depth and the tiles on the ui process are also backed by QPixmaps.
* Shared/qt/UpdateChunk.cpp:
(WebKit::UpdateChunk::size):
(WebKit::UpdateChunk::createImage):
* Shared/qt/UpdateChunk.h:
2010-11-16 Sam Weinig <sam@webkit.org>
Reviewed by Adam Roben.
WebKit2: Support enabling site-specific quirks
<rdar://problem/8451371>
https://bugs.webkit.org/show_bug.cgi?id=46076
* Shared/WebPreferencesStore.cpp:
(WebKit::WebPreferencesStore::WebPreferencesStore):
(WebKit::WebPreferencesStore::encode):
(WebKit::WebPreferencesStore::decode):
* Shared/WebPreferencesStore.h:
Add needsSiteSpecificQuirks;
* UIProcess/API/C/WKAPICast.h:
(WebKit::toFontSmoothingLevel):
(WebKit::toAPI):
Move FontSmoothing conversion functions here.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetFontSmoothingLevel):
(WKPreferencesGetFontSmoothingLevel):
(WKPreferencesSetAcceleratedCompositingEnabled):
(WKPreferencesGetAcceleratedCompositingEnabled):
(WKPreferencesSetCompositingBordersVisible):
(WKPreferencesGetCompositingBordersVisible):
(WKPreferencesSetCompositingRepaintCountersVisible):
(WKPreferencesGetCompositingRepaintCountersVisible):
(WKPreferencesSetNeedsSiteSpecificQuirks):
(WKPreferencesGetNeedsSiteSpecificQuirks):
Add WKPreferencesSetNeedsSiteSpecificQuirks/WKPreferencesGetNeedsSiteSpecificQuirks
and move implementations from WKPreferencesPrivate.cpp here.
* UIProcess/API/C/WKPreferencesPrivate.cpp: Removed.
* UIProcess/API/C/WKPreferencesPrivate.h:
Add Add WKPreferencesSetNeedsSiteSpecificQuirks/WKPreferencesGetNeedsSiteSpecificQuirks.
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::setNeedsSiteSpecificQuirks):
(WebKit::WebPreferences::needsSiteSpecificQuirks):
* UIProcess/WebPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Pipe through needsSiteSpecificQuirks.
* WebKit2.xcodeproj/project.pbxproj:
* WebKit2.pro:
* win/WebKit2.vcproj:
Update for removed files.
2010-11-16 Adam Roben <aroben@apple.com>
Fix horizontal scrolling via the mousewheel/trackpad on Windows
Reviewed by Mark Rowe.
* Shared/win/WebEventFactory.cpp: Fixed typo in the
WM_VISTA_MOUSEHWHEEL constant.
2010-11-16 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Disable LTCG for Windows Release builds. Add new Release_LTCG configuration.
https://bugs.webkit.org/show_bug.cgi?id=49632
* win/WebKit2.make:
* win/WebKit2.submit.sln:
* win/WebKit2.vcproj:
* win/WebKit2WebProcess.vcproj:
2010-11-16 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Handle converting a ResourceHandle to a download
https://bugs.webkit.org/show_bug.cgi?id=49631
* WebProcess/Downloads/Download.h:
Add startWithHandle.
* WebProcess/Downloads/DownloadManager.h:
* WebProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::convertHandleToDownload):
Create a new Download object and call startWithHandle on it.
* WebProcess/Downloads/cf/DownloadCFNet.cpp:
(WebKit::Download::startWithHandle):
Add stub.
* WebProcess/Downloads/mac/DownloadMac.mm:
(WebKit::Download::startWithHandle):
Create an NSURLDownload object from passed in ResourceHandle.
* WebProcess/Downloads/qt/DownloadQt.cpp:
(WebKit::Download::startWithHandle):
Add stub.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::download):
Call WebFrame::convertHandleToDownload.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::convertHandleToDownload):
Call DownloadManager::convertHandleToDownload.
2010-11-16 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Set the original URL for downloads
https://bugs.webkit.org/show_bug.cgi?id=49628
* WebProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
* WebProcess/Downloads/DownloadManager.h:
startDownload now takes the originating web page.
* WebProcess/Downloads/cf/DownloadCFNet.cpp:
(WebKit::Download::start):
start now takes the originating web page.
* WebProcess/Downloads/mac/DownloadMac.mm:
(WebKit::originatingURL):
(WebKit::setOriginalURLForDownload):
Port code over from WebKit1 that sets the download URL.
(WebKit::Download::start):
Call setOriginalURLForDownload.
* WebProcess/Downloads/qt/DownloadQt.cpp:
(WebKit::Download::start):
start now takes the originating web page.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
Pass the web page to DownloadManager::startDownload.
2010-11-16 Dave Hyatt <hyatt@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=11004
font-size:0 is ignored. Remove the minimum font size of 1 in CSSStyleSelector.
Change the pref value for minimum font size from 1 to 0. Make sure to never use the NSFont's size,
since it doesn't honor a size of 0. Instead pass the size in to the FontPlatformData(NSFont*) version
of the constructor rather than using [NSFont pointSize].
https://bugs.webkit.org/show_bug.cgi?id=49582
Negative leading is not handled correctly. There are two bugs here. The first is that
maxAscent and maxDescent can be negative, so we need a notion of whether or not we have
set them before so that we can allow them to be < 0.
The second issue is that we should understand where fonts will end up relative to
our baseline (excluding line height), and only allow those boxes to impact ascent and
descent if the actual font box (without factoring in line height) is above or below the
root line box baseline.
Added fast/css/negative-leading.html
These two bug fixes have to land together to keep the Acid 3 test rendering correctly.
* Shared/WebPreferencesStore.cpp:
(WebKit::WebPreferencesStore::WebPreferencesStore):
2010-11-16 Anders Carlsson <andersca@apple.com>
Fix clang++ build.
* Scripts/webkit2/messages.py:
* WebProcess/WebPage/WebInspector.h:
2010-11-16 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add WKPageCanShowMIMEType
https://bugs.webkit.org/show_bug.cgi?id=49612
* UIProcess/API/C/WKPage.cpp:
(WKPageCanShowMIMEType):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::canShowMIMEType):
* UIProcess/WebPageProxy.h:
2010-11-16 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Make WebPageProxy::decidePolicyForMIMEType a tad synchronous
https://bugs.webkit.org/show_bug.cgi?id=49605
Change the DecidePolicyForMIMEType message to be synchronous, and if the policy listener is
invoked from within the decidePolicyForMIMEType callback return the policy information as out
parameters. This is needed in order to convert a loading connection to a download.
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForMIMEType):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
2010-11-16 Kenneth Rohde Christiansen <kenneth@webkit.org>, Zalan Bujtas <zbujtas@gmail.com>
Reviewed by Andreas Kling.
[WK2][Qt] Add API for finding a zoomable area for a given point
This is useful for implementing e.g "double tap zoom"
Only enabled for Qt.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::findZoomableAreaForPoint):
(QWKPagePrivate::didFindZoomableArea):
* UIProcess/API/qt/qwkpage.h:
* UIProcess/API/qt/qwkpage_p.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFindZoomableArea):
(WebKit::WebPageProxy::findZoomableAreaForPoint):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::findZoomableAreaForPoint):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2010-11-16 Andreas Kling <kling@webkit.org>
Rubber-stamped by Simon Hausmann.
Revert !ENABLE(INSPECTOR) fix- we don't need it right now,
and it was less maintainable than I had though.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toImpl):
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
* WebProcess/WebPage/WebInspector.cpp:
2010-11-16 Andreas Kling <kling@webkit.org>
Reviewed by Simon Hausmann.
Fix compilation with !ENABLE(INSPECTOR)
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toImpl):
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
* WebProcess/WebPage/WebInspector.cpp:
2010-11-16 Andras Becsi <abecsi@webkit.org>
Reviewed by Andreas Kling.
[Qt] Use SIGINT instead of SIGKILL to let the web process clean up after itself.
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::QtWebProcess::setupChildProcess):
2010-11-16 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Andreas Kling.
[WK2][Qt] Expose resizes-to-contents mode in WebKit2
Only available with ENABLE(TILED_BACKING_STORE)
Based on a patch by Antti Koivisto.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::setResizesToContentsUsingLayoutSize):
* UIProcess/API/qt/qwkpage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setResizesToContentsUsingLayoutSize):
* UIProcess/WebPageProxy.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSize):
(WebKit::WebPage::setResizesToContentsUsingLayoutSize):
(WebKit::WebPage::resizeToContentsIfNeeded):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::resizesToContentsEnabled):
(WebKit::WebPage::resizesToContentsLayoutSize):
* WebProcess/WebPage/WebPage.messages.in:
2010-11-16 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt][WK2] Get proxy settings from environment (http[s]_proxy)
If http_proxy and/or https_proxy are set in the environment,
pass those in to QNetworkAccessManager.
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::EnvHttpProxyFactory::EnvHttpProxyFactory):
(WebKit::EnvHttpProxyFactory::initializeFromEnvironment):
(WebKit::EnvHttpProxyFactory::queryProxy):
(WebKit::initializeProxy):
(WebKit::WebProcessMainQt):
2010-11-16 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt][WK2] Emit windowCloseRequested signal on window.close()
Original patch by Zalan Bujtas.
* UIProcess/API/qt/ClientImpl.cpp:
(qt_wk_close):
* UIProcess/API/qt/qwkpage.h:
2010-11-15 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Kill the web process if the UI process dies
Connect UI (parent) process death signal to SIGKILL of the web
process (child). This ensures that there's no stale web processes
after the UI process has crashed.
Original patch by Kimmo Kinnunen.
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::QtWebProcess::QtWebProcess):
(WebKit::QtWebProcess::setupChildProcess):
(WebKit::ProcessLauncherHelper::launch):
2010-11-16 Simon Hausmann <simon.hausmann@nokia.com>
Rubber-stamped by Andreas Kling.
[Qt] Trivial build fix for building WebKit2 inside Qt Creator
Similar to WebCore.pro, define a fallback for OUTPUT_DIR.
* WebKit2.pro:
2010-11-15 Andreas Kling <kling@webkit.org>
Reviewed by Tor Arne Vestbø.
[Qt] Make sure qwkpage.h and qwkpreferences.h are copied into includes/WebKit2
* UIProcess/API/qt/WKView.h:
2010-11-15 Andreas Kling <kling@webkit.org>
Reviewed by Tor Arne Vestbø.
[Qt] Use $${PYTHON} rather than "python" to execute Python scripts
Fixes building with the old Python that currently ships with Scratchbox.
* DerivedSources.pro:
2010-11-15 Brady Eidson <beidson@apple.com>
Reviewed by a better attempt at a Windows build fix.
* win/WebKit2Generated.make:
2010-11-15 Brady Eidson <beidson@apple.com>
Reviewed by my attempt to fix the Windows build
* win/WebKit2Generated.make: Add new API headers here.
2010-11-15 Brady Eidson <beidson@apple.com>
Reviewed by Sam Weinig.
Finish off <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=48720
Customizable context menu support in WebKit2.
- Adds an API-level WKContextMenuItem.
- Round trips through both the InjectedBundle client and the new PageContextMenuClient before
actually displaying the menu.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* Shared/API/c/WKBase.h:
* Shared/API/c/WKContextMenuItem.cpp: Added.
(WKContextMenuItemGetTypeID):
(WKContextMenuItemCreateAsAction):
(WKContextMenuItemCreateAsCheckableAction):
(WKContextMenuItemCreateAsSubmenu):
(WKContextMenuItemSeparatorItem):
(WKContextMenuItemGetTag):
(WKContextMenuItemGetType):
(WKContextMenuItemCopyTitle):
(WKContextMenuItemGetEnabled):
(WKContextMenuItemGetChecked):
(WKContextMenuCopySubmenuItems):
* Shared/API/c/WKContextMenuItem.h: Added.
* Shared/API/c/WKContextMenuItemTypes.h: Added.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toImpl):
* Shared/WebContextMenuItem.cpp:
(WebKit::WebContextMenuItem::create):
(WebKit::WebContextMenuItem::separatorItem):
(WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
* Shared/WebContextMenuItem.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient):
(WKPageSetPageFindClient):
(WKPageSetPageLoaderClient):
(WKPageSetPagePolicyClient):
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageContextMenuClient.cpp: Added.
(WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
* UIProcess/WebPageContextMenuClient.h: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeContextMenuClient):
(WebKit::WebPageProxy::showContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems):
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
2010-11-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add shouldDecodeSourceDataOfMIMEType WKContextDownloadClient callback
https://bugs.webkit.org/show_bug.cgi?id=49558
* UIProcess/API/C/WKContext.h:
Add shouldDecodeSourceDataOfMIMEType callback.
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
Call WebDownloadClient::shouldDecodeSourceDataOfMIMEType.
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
Add allowOverwrite out parameter.
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Downloads/DownloadProxy.messages.in:
Add ShouldDecodeSourceDataOfMIMEType message.
* UIProcess/WebDownloadClient.cpp:
(WebKit::WebDownloadClient::shouldDecodeSourceDataOfMIMEType):
Call the WKContextDownloadClient.
(WebKit::WebDownloadClient::decideDestinationWithSuggestedFilename):
Add allowOverwrite out parameter.
* UIProcess/WebDownloadClient.h:
* WebProcess/Downloads/Download.cpp:
(WebKit::Download::shouldDecodeSourceDataOfMIMEType):
Send the ShouldDecodeSourceDataOfMIMEType message.
(WebKit::Download::decideDestinationWithSuggestedFilename):
Add allowOverwrite reply parameter.
* WebProcess/Downloads/mac/DownloadMac.mm:
(-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
Call Download::shouldDecodeSourceDataOfMIMEType.
(-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
Add allowOverwrite parameter.
2010-11-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add decideDestinationWithSuggestedFilename WKContextDownloadClient callback
https://bugs.webkit.org/show_bug.cgi?id=49554
* Platform/CoreIPC/MessageSender.h:
(CoreIPC::MessageSender::sendSync):
Add sendSync capabilities to Messagesender.
* UIProcess/API/C/WKContext.h:
Add decideDestinationWithSuggestedFilename callback.
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
Call WebDownloadClient::decideDestinationWithSuggestedFilename.
* UIProcess/Downloads/DownloadProxy.messages.in:
Add DecideDestinationWithSuggestedFilename.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didReceiveSyncMessage):
Process MessageClassDownloadProxy messages.
* UIProcess/WebDownloadClient.cpp:
(WebKit::WebDownloadClient::decideDestinationWithSuggestedFilename):
Ask the WKContextDownloadClient for the destination.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveSyncMessage):
MessageClassDownloadProxy messages should go to the WebContext.
* WebProcess/Downloads/Download.cpp:
(WebKit::Download::decideDestinationWithSuggestedFilename):
Send the DecideDestinationWithSuggestedFilename message.
* WebProcess/Downloads/Download.h:
* WebProcess/Downloads/mac/DownloadMac.mm:
(-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
call Download::decideDestinationWithSuggestedFilename and set the destination.
2010-11-15 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[WK2][Qt] Add "page snapshot" functionality to tiled backing store
Original patch by Antti Koivisto.
Add a way to take a snapshot of a specific part of the page, at a specific scale.
Only implemented for the tiled drawing area.
* Shared/CoreIPCSupport/DrawingAreaMessageKinds.h:
New message: TakeSnapshot.
* Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
New message: SnapshotTaken.
* UIProcess/API/qt/qgraphicswkview.h:
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::takeSnapshot):
Expose the snapshot functionality.
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::didReceiveMessage):
(WebKit::TiledDrawingAreaProxy::takeSnapshot):
* UIProcess/TiledDrawingAreaProxy.h:
* UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
(WebKit::TiledDrawingAreaProxy::snapshotTaken):
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::didReceiveMessage):
2010-11-15 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[WK2][Qt] WebKit2 implementation of tiled backing store
https://bugs.webkit.org/show_bug.cgi?id=49526
Basic opt-in tiling implementation for WebKit2/Qt.
Original patch by Antti Koivisto.
* Shared/CoreIPCSupport/DrawingAreaMessageKinds.h:
New messages: RequestTileUpdate and CancelTileUpdate.
* Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
New messages: Invalidate, TileUpdated, AllTileUpdatesProcessed.
* Shared/DrawingAreaBase.h:
New area type: TiledDrawingAreaType.
* UIProcess/API/qt/qgraphicswkview.h:
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::QGraphicsWKView):
(QGraphicsWKView::setGeometry):
(QGraphicsWKViewPrivate::QGraphicsWKViewPrivate):
(QGraphicsWKView::prepareScaleChange):
(QGraphicsWKView::commitScaleChange):
(QGraphicsWKViewPrivate::onScaleChanged):
(QGraphicsWKViewPrivate::commitScale):
Support for tiled backing store.
* UIProcess/TiledDrawingAreaProxy.cpp: Added.
(WebKit::TiledDrawingAreaProxy::create):
(WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
(WebKit::TiledDrawingAreaProxy::~TiledDrawingAreaProxy):
(WebKit::TiledDrawingAreaProxy::setSize):
(WebKit::TiledDrawingAreaProxy::setPageIsVisible):
(WebKit::TiledDrawingAreaProxy::didSetSize):
(WebKit::TiledDrawingAreaProxy::didReceiveMessage):
(WebKit::TiledDrawingAreaProxy::didReceiveSyncMessage):
(WebKit::TiledDrawingAreaProxy::requestTileUpdate):
(WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
(WebKit::TiledDrawingAreaProxy::createTile):
(WebKit::TiledDrawingAreaProxy::setTileSize):
(WebKit::TiledDrawingAreaProxy::setTileCreationDelay):
(WebKit::TiledDrawingAreaProxy::setKeepAndCoverAreaMultipliers):
(WebKit::TiledDrawingAreaProxy::invalidate):
(WebKit::TiledDrawingAreaProxy::updateTileBuffers):
(WebKit::TiledDrawingAreaProxy::tileBufferUpdateComplete):
(WebKit::TiledDrawingAreaProxy::paint):
(WebKit::TiledDrawingAreaProxy::adjustVisibleRect):
(WebKit::TiledDrawingAreaProxy::setContentsScale):
(WebKit::TiledDrawingAreaProxy::removeAllTiles):
(WebKit::TiledDrawingAreaProxy::tileDistance):
(WebKit::TiledDrawingAreaProxy::calculateKeepRect):
(WebKit::TiledDrawingAreaProxy::calculateCoverRect):
(WebKit::TiledDrawingAreaProxy::createTiles):
(WebKit::TiledDrawingAreaProxy::resizeEdgeTiles):
(WebKit::TiledDrawingAreaProxy::dropTilesOutsideRect):
(WebKit::TiledDrawingAreaProxy::tileAt):
(WebKit::TiledDrawingAreaProxy::setTile):
(WebKit::TiledDrawingAreaProxy::removeTile):
(WebKit::TiledDrawingAreaProxy::mapToContents):
(WebKit::TiledDrawingAreaProxy::mapFromContents):
(WebKit::TiledDrawingAreaProxy::contentsRect):
(WebKit::TiledDrawingAreaProxy::tileRectForCoordinate):
(WebKit::TiledDrawingAreaProxy::tileCoordinateForPoint):
(WebKit::TiledDrawingAreaProxy::startTileBufferUpdateTimer):
(WebKit::TiledDrawingAreaProxy::tileBufferUpdateTimerFired):
(WebKit::TiledDrawingAreaProxy::startTileCreationTimer):
(WebKit::TiledDrawingAreaProxy::tileCreationTimerFired):
(WebKit::TiledDrawingAreaProxy::hasPendingUpdates):
* UIProcess/TiledDrawingAreaProxy.h: Added.
(WebKit::TiledDrawingAreaProxy::contentsScale):
(WebKit::TiledDrawingAreaProxy::attachCompositingContext):
(WebKit::TiledDrawingAreaProxy::detachCompositingContext):
(WebKit::TiledDrawingAreaProxy::tileSize):
(WebKit::TiledDrawingAreaProxy::tileCreationDelay):
(WebKit::TiledDrawingAreaProxy::getKeepAndCoverAreaMultipliers):
* UIProcess/TiledDrawingAreaTile.h: Added.
(WebKit::TiledDrawingAreaTile::create):
(WebKit::TiledDrawingAreaTile::hasBackBufferUpdatePending):
(WebKit::TiledDrawingAreaTile::coordinate):
(WebKit::TiledDrawingAreaTile::rect):
(WebKit::TiledDrawingAreaTile::ID):
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
* WebProcess/WebPage/TiledDrawingArea.cpp: Added.
(WebKit::TiledDrawingArea::TiledDrawingArea):
(WebKit::TiledDrawingArea::~TiledDrawingArea):
(WebKit::TiledDrawingArea::invalidateWindow):
(WebKit::TiledDrawingArea::invalidateContentsAndWindow):
(WebKit::TiledDrawingArea::invalidateContentsForSlowScroll):
(WebKit::TiledDrawingArea::scroll):
(WebKit::TiledDrawingArea::setNeedsDisplay):
(WebKit::TiledDrawingArea::display):
(WebKit::TiledDrawingArea::scheduleDisplay):
(WebKit::TiledDrawingArea::setSize):
(WebKit::TiledDrawingArea::suspendPainting):
(WebKit::TiledDrawingArea::resumePainting):
(WebKit::TiledDrawingArea::didUpdate):
(WebKit::TiledDrawingArea::updateTile):
(WebKit::TiledDrawingArea::tileUpdateTimerFired):
(WebKit::TiledDrawingArea::didReceiveMessage):
* WebProcess/WebPage/TiledDrawingArea.h: Added.
(WebKit::TiledDrawingArea::attachCompositingContext):
(WebKit::TiledDrawingArea::detachCompositingContext):
(WebKit::TiledDrawingArea::setRootCompositingLayer):
(WebKit::TiledDrawingArea::scheduleCompositingLayerSync):
(WebKit::TiledDrawingArea::syncCompositingLayers):
* WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp: Added.
(WebKit::TiledDrawingArea::paintIntoUpdateChunk):
* WebKit2.pro:
* UIProcess/qt/TiledDrawingAreaTileQt.cpp: Added.
(WebKit::checkeredPixmap):
(WebKit::TiledDrawingAreaTile::TiledDrawingAreaTile):
(WebKit::TiledDrawingAreaTile::~TiledDrawingAreaTile):
(WebKit::TiledDrawingAreaTile::isDirty):
(WebKit::TiledDrawingAreaTile::isReadyToPaint):
(WebKit::TiledDrawingAreaTile::hasReadyBackBuffer):
(WebKit::TiledDrawingAreaTile::invalidate):
(WebKit::TiledDrawingAreaTile::resize):
(WebKit::TiledDrawingAreaTile::swapBackBufferToFront):
(WebKit::TiledDrawingAreaTile::paint):
(WebKit::TiledDrawingAreaTile::paintCheckerPattern):
(WebKit::TiledDrawingAreaTile::updateFromChunk):
(WebKit::TiledDrawingAreaTile::updateBackBuffer):
* UIProcess/qt/TiledDrawingAreaProxyQt.cpp: Added.
(WebKit::TiledDrawingAreaProxy::updateWebView):
(WebKit::TiledDrawingAreaProxy::webViewVisibleRect):
(WebKit::TiledDrawingAreaProxy::page):
2010-11-12 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Andreas Kling.
[Qt] Need to implement WebKit::pluginWillHandleLoadError for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=48764
Add the missing error to Qt support.
* WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
(WebKit::pluginWillHandleLoadError):
2010-11-12 John Sullivan <sullivan@apple.com>
Reviewed by Anders Carlsson.
Fixed Target for WKBundlePageOverlay.cpp.
* WebKit2.xcodeproj/project.pbxproj:
Changed Target for WKBundlePageOverlay.cpp from WebProcess to WebKit2.
2010-11-12 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Need a way that WKBundlePageOverlayRef clients can make sure they only uninstall the overlay they installed
https://bugs.webkit.org/show_bug.cgi?id=49461
<rdar://problem/8662760>
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageUninstallPageOverlay):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):
(WebKit::FindController::hideFindUI):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::uninstallPageOverlay):
* WebProcess/WebPage/WebPage.h:
2010-11-12 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Allow MessageSender to override sendMessage
https://bugs.webkit.org/show_bug.cgi?id=49457
Change MessageSender::send to encode the message and then call sendMessage.
This allows for clients to override sendMessage, something which WebProcessProxy
will be able to take advantage of.
* Platform/CoreIPC/MessageSender.h:
(CoreIPC::MessageSender::send):
(CoreIPC::MessageSender::sendMessage):
2010-11-12 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
CoreIPC cleanup
https://bugs.webkit.org/show_bug.cgi?id=49455
Add a static create function to ArgumentEncoder.
Factor sync message argument encoder creation out into a new function,
createSyncMessageArgumentEncoder.
* Platform/CoreIPC/ArgumentEncoder.cpp:
(CoreIPC::ArgumentEncoder::create):
* Platform/CoreIPC/ArgumentEncoder.h:
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::createSyncMessageArgumentEncoder):
(CoreIPC::Connection::dispatchSyncMessage):
* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::send):
(CoreIPC::Connection::sendSync):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::send):
2010-11-12 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
ASSERTION when converting some WKStringRefs returned from willSubmitForm to CFStringRef
<rdar://problem/8662180>
https://bugs.webkit.org/show_bug.cgi?id=49454
Enforce the invariant that a WebString never contains a null WTF::String at a
lower level, in the WebString constructor, instead of relying on the callers of
WebString::create to do it.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toCopiedAPI): Remove null string check...
* Shared/WebString.h:
(WebKit::WebString::WebString): ... and move it to the constructor.
* Shared/API/c/WKURL.cpp:
(WKURLCopyString): Use toCopiedAPI() instead of calling WebString directly
to match other similar uses.
2010-11-12 Andreas Kling <kling@webkit.org>
Reviewed by Antonio Gomes.
[Qt][WK2] Fix leaking of mapped files
MappedMemory::fileName was never set on the receiving side, which led
the MappedMemoryPool to call QFile::map() again when reusing an existing file.
* Platform/qt/MappedMemoryPool.cpp:
(WebKit::MappedMemoryPool::mapFile):
2010-11-12 Adam Roben <aroben@apple.com>
Windows build fix
* win/WebKit2Generated.make: Copy WKBundlePageOverlay.h.
2010-11-12 Benjamin Poulain <benjamin.poulain@nokia.com>
Unreviewed fix after r71857.
* UIProcess/qt/WebInspectorProxyQt.cpp:
* WebProcess/WebPage/qt/WebInspectorQt.cpp:
2010-11-11 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Add didReceiveResponse and didReceiveData to the download client
https://bugs.webkit.org/show_bug.cgi?id=49418
* UIProcess/API/C/WKContext.h:
Add didReceiveResponse and didReceiveData to WKContextDownloadClient.
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didReceiveResponse):
(WebKit::DownloadProxy::didReceiveData):
Call WebDownloadClient member functions.
* UIProcess/Downloads/DownloadProxy.messages.in:
Add DidReceiveResponse and DidReceiveData messages.
* UIProcess/WebDownloadClient.cpp:
(WebKit::WebDownloadClient::didReceiveResponse):
(WebKit::WebDownloadClient::didReceiveData):
Call client functions.
* WebKit2.xcodeproj/project.pbxproj:
Let Xcode update the file.
* WebProcess/Downloads/Download.cpp:
(WebKit::Download::didReceiveResponse):
(WebKit::Download::didReceiveData):
Send messages.
* WebProcess/Downloads/mac/DownloadMac.mm:
(WebKit::Download::start):
Set deletesFileUponFailure to NO.
(-[WKDownloadAsDelegate download:didReceiveResponse:]):
Call didReceiveResponse.
2010-11-11 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add an argument coder for ResourceResponse.
https://bugs.webkit.org/show_bug.cgi?id=49415
* Shared/WebCoreArgumentCoders.h:
* Shared/gtk/WebCoreArgumentCodersGtk.cpp:
(CoreIPC::encodeResourceResponse):
(CoreIPC::decodeResourceResponse):
* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::encodeResourceResponse):
(CoreIPC::decodeResourceResponse):
* Shared/qt/WebCoreArgumentCodersQt.cpp:
(CoreIPC::encodeResourceResponse):
(CoreIPC::decodeResourceResponse):
* Shared/win/WebCoreArgumentCodersWin.cpp:
(CoreIPC::encodeResourceResponse):
(CoreIPC::decodeResourceResponse):
2010-11-11 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed build fix for r71587.
* WebKit2.xcodeproj/project.pbxproj: No longer uses absolute path.
2010-11-11 Csaba Osztrogonác <ossy@webkit.org>
[Qt] Unreviewed WebKit2 buildfix after r71587.
* UIProcess/qt/WebInspectorProxyQt.cpp:
* WebKit2.pro:
2010-11-11 Brian Weinstein <bweinstein@apple.com>
More Windows build fixing. Change another #import to a #include, and remove an unneeded
namespace.
* UIProcess/win/WebInspectorProxyWin.cpp:
* WebProcess/WebPage/win/WebInspectorWin.cpp:
2010-11-11 Brent Fulgham <bfulgham@webkit.org>
Windows [Cairo] build fix. Unreviewed.
Provide stubs for two BackingStore methods.
* Shared/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createFlippedGraphicsContext):
(WebKit::BackingStore::paint):
2010-11-11 Brian Weinstein <bweinstein@apple.com>
Windows Build Fix. Change #imports to #includes.
* UIProcess/win/WebInspectorProxyWin.cpp:
2010-11-08 Timothy Hatcher <timothy@apple.com>
Create and load the Web Inspector page.
https://webkit.org/b/49207
Reviewed by Anders Carlsson.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage): Added. Call platformCreateInspectorPage and then
call WebPageProxy::loadURL with inspectorPageURL.
(WebKit::WebInspectorProxy::didLoadInspectorPage): Added stub.
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.messages.in: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage): Call WebInspectorProxy::didReceiveWebInspectorProxyMessage.
(WebKit::WebPageProxy::didReceiveSyncMessage): Call WebInspectorProxy::didReceiveSyncWebInspectorProxyMessage.
* UIProcess/WebPageProxy.h: Made creationParameters public so WebInspectorProxy can use it.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Make a WkView and return the WebPageProxy.
(WebKit::WebInspectorProxy::inspectorPageURL): Return the file URL for the inspector.html file.
* UIProcess/qt/WebInspectorProxyQt.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
(WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
(WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::openInspectorFrontend): Call WebInspector::createInspectorPage and set up the WebInspectorFrontendClient.
(WebKit::WebInspectorClient::sendMessageToFrontend): Call doDispatchMessageOnFrontendPage in the base class.
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::frontendLoaded): Call WebInspector::didLoadInspectorPage.
(WebKit::WebInspectorFrontendClient::localizedStringsURL): Call WebInspector::localizedStringsURL.
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::WebInspector):
(WebKit::WebInspector::createInspectorPage): Send a sync WebInspectorProxy::CreateInspectorPage message and set up
the WebPage using the result page ID.
(WebKit::WebInspector::didLoadInspectorPage): Send a WebInspectorProxy::DidLoadInspectorPage message.
* WebProcess/WebPage/WebInspector.h:
(WebKit::WebInspector::inspectorPage): Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage): Call WebInspector::didReceiveWebInspectorMessage.
* WebProcess/WebPage/mac/WebInspectorMac.mm:
(WebKit::WebInspector::localizedStringsURL): Return the file URL for the localizedStrings.js file.
* WebProcess/WebPage/qt/WebInspectorQt.cpp:
(WebKit::WebInspector::localizedStringsURL): Added stub.
* WebProcess/WebPage/win/WebInspectorWin.cpp:
(WebKit::WebInspector::localizedStringsURL): Added stub.
* DerivedSources.make: Added WebInspectorProxy.messages.in.
* DerivedSources.pro: Ditto.
* WebKit2.pro: Added new files.
* WebKit2.xcodeproj/project.pbxproj: Ditto.
* win/WebKit2.vcproj: Ditto.
2010-11-11 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Move the remaining API client classes to use the APIClient base class.
https://bugs.webkit.org/show_bug.cgi?id=49404
Also moves InjectedBundleClient into its own class to match other API clients.
* UIProcess/WebContextInjectedBundleClient.cpp:
* UIProcess/WebContextInjectedBundleClient.h:
* UIProcess/WebHistoryClient.cpp:
(WebKit::WebHistoryClient::didNavigateWithNavigationData):
(WebKit::WebHistoryClient::didPerformClientRedirect):
(WebKit::WebHistoryClient::didPerformServerRedirect):
(WebKit::WebHistoryClient::didUpdateHistoryTitle):
(WebKit::WebHistoryClient::populateVisitedLinks):
* UIProcess/WebHistoryClient.h:
(WebKit::WebHistoryClient::shouldTrackVisitedLinks):
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::initializeClient):
(WebKit::InjectedBundle::reportException):
(WebKit::InjectedBundle::didCreatePage):
(WebKit::InjectedBundle::willDestroyPage):
(WebKit::InjectedBundle::didReceiveMessage):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/InjectedBundleClient.cpp: Added.
(WebKit::InjectedBundleClient::didCreatePage):
(WebKit::InjectedBundleClient::willDestroyPage):
(WebKit::InjectedBundleClient::didReceiveMessage):
* WebProcess/InjectedBundle/InjectedBundleClient.h: Added.
* win/WebKit2.vcproj:
2010-11-11 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Remove an unneeded CFAllocatorRef parameter.
* Shared/API/c/mac/WKURLResponseNS.h:
* Shared/API/c/mac/WKURLResponseNS.mm:
(WKURLResponseCopyNSURLResponse):
2010-11-11 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Add and implement WKDownloadCopyRequest
https://bugs.webkit.org/show_bug.cgi?id=49393
* Shared/API/c/mac/WKURLRequestNS.h:
* Shared/API/c/mac/WKURLRequestNS.mm:
(WKURLRequestCopyNSURLRequest):
Remove unneeded CFAllocator parameter.
* Shared/WebURLRequest.cpp:
(WebKit::WebURLRequest::WebURLRequest):
* Shared/WebURLRequest.h:
(WebKit::WebURLRequest::create):
Change create to take a ResourceRequest instead.
* UIProcess/API/C/WKDownload.cpp:
(WKDownloadCopyRequest):
Return a copied WKURLRequest.
* UIProcess/API/C/WKDownload.h:
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didStart):
Set the request.
* UIProcess/Downloads/DownloadProxy.h:
(WebKit::DownloadProxy::request):
Return the request.
* UIProcess/Downloads/DownloadProxy.messages.in:
* WebProcess/Downloads/Download.cpp:
(WebKit::Download::didStart):
Pass the request along when sending the DidStart message.
2010-11-11 John Sullivan <sullivan@apple.com>
Rubber-stamped by Anders Carlsson.
* WebKit2.xcodeproj/project.pbxproj:
Added WKBundlePageOverlay.h to the WebKit2 Target and made it public.
2010-11-11 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Move GraphicsContext setup code to PageOverlay::drawRect
https://bugs.webkit.org/show_bug.cgi?id=49389
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::drawRect):
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::drawRect):
2010-11-11 Adam Roben <aroben@apple.com>
Build fix after r71816
* WebProcess/WebPage/WebPage.messages.in: Compile out
SetActualVisibleContentRect when ENABLE(TILED_BACKING_STORE) is
turned off.
2010-11-11 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Andreas Kling.
[Qt][WK2] Implement BackingStore
https://bugs.webkit.org/show_bug.cgi?id=49377
* Shared/qt/BackingStoreQt.cpp:
(WebKit::createQImage): Added static helper. Creates a QImage
from the shared memory buffer.
(WebKit::BackingStore::createGraphicsContext):
(WebKit::BackingStore::createFlippedGraphicsContext): Leave
unimplemented with an ASSERT_NOT_REACHED since this is only
needed for the CoreGraphics backend.
(WebKit::BackingStore::paint):
2010-11-11 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Andreas Kling.
[Qt] Add a Qt WebKit2 API for overriding the actual visible content rect
https://bugs.webkit.org/show_bug.cgi?id=49381
Add an Qt WebKit2 API for overriding the actual visible content rect in
WebCore. This is supposed to be used in combination with tiling.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::setActualVisibleContentsRect):
* UIProcess/API/qt/qwkpage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setActualVisibleContentRect):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setActualVisibleContentRect):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2010-11-10 Beth Dakin <bdakin@apple.com>
Reviewed by Simon Fraser.
Fix for https://bugs.webkit.org/show_bug.cgi?id=49356
-[WebView _scaleWebView:] should take and origin and scroll the
document
-and corresponding-
<rdar://problem/8643921>
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toImpl):
* UIProcess/API/C/WKPage.cpp:
(WKPageScaleWebView):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scaleWebView):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaleWebView):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2010-11-10 Ada Chan <adachan@apple.com>
Fix Windows build.
* win/WebKit2Generated.make:
2010-11-10 Simon Fraser <simon.fraser@apple.com>
Reviewed by Anders Carlsson.
Misc drawing area cleanup
https://bugs.webkit.org/show_bug.cgi?id=49349
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::setSize):
(WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
(WebKit::LayerBackedDrawingAreaProxy::update):
Call process()->send() instead of process()->connection()->send() in case
the web process has not been launched yet.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Delay creation of the drawing area
until after other WebPage state has been initialized, in case
the DrawingArea creation needs to call back to the WebPage.
2010-11-10 Simon Fraser <simon.fraser@apple.com>
Reviewed by Adam Roben.
Push m_viewSize down to DrawingAreaProxy base class
https://bugs.webkit.org/show_bug.cgi?id=49347
Some refactoring so that the various drawing area classes
can share m_size.
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::setSize):
* UIProcess/ChunkedUpdateDrawingAreaProxy.h:
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::setSize):
(WebKit::DrawingAreaProxy::size):
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::setSize):
* UIProcess/LayerBackedDrawingAreaProxy.h:
* UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
(WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
(WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
* UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
(WebKit::LayerBackedDrawingAreaProxy::platformSetSize):
(WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
* UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
* UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
2010-11-10 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Closing tabs sometimes crashes the WebProcess in invalidateContentsAndWindow
https://bugs.webkit.org/show_bug.cgi?id=49335
<rdar://problem/8646621>
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::changeAcceleratedCompositingMode):
If we fail to send the DidChangeAcceleratedCompositing message, don't null out the
drawing area. This will happen during page teardown.
2010-11-10 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by David Hyatt.
HTML5 Ruby support should be mandatory feature
https://bugs.webkit.org/show_bug.cgi?id=49272
Remove Ruby as optional feature.
* Configurations/FeatureDefines.xcconfig:
* WebKit2Prefix.h: Touch it to avoid incremental build failure on Windows.
2010-11-10 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Add license to DerivedSources.make.
* DerivedSources.make:
2010-11-09 Sam Weinig <sam@webkit.org>
Reviewed by Adam Roben.
Convert client classes to use APIClient base class.
https://bugs.webkit.org/show_bug.cgi?id=49322
* UIProcess/WebFormClient.cpp:
(WebKit::WebFormClient::willSubmitForm):
* UIProcess/WebFormClient.h:
* UIProcess/WebLoaderClient.cpp:
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPolicyClient.cpp:
* UIProcess/WebPolicyClient.h:
* UIProcess/WebUIClient.cpp:
* UIProcess/WebUIClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
2010-11-10 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt][WK2] Fix re-use of memory-mapped files
https://bugs.webkit.org/show_bug.cgi?id=49310
QTemporaryFile::fileName() returns an empty string after close()
so we have to keep separate track of the filename.
Also, we can't reopen the file if it's been QFile::remove()d,
so we defer unlinking until the MappedMemoryPool is destroyed or
the CrashHandler kicks in.
This makes re-use of memory-mapped files work (after we kill an
assertion that the file size == the new mmap size - it's fine if
the file is larger, too.)
* Platform/qt/MappedMemoryPool.cpp:
(WebKit::MappedMemoryPool::~MappedMemoryPool):
(WebKit::MappedMemoryPool::clear):
(WebKit::MappedMemoryPool::mapMemory):
(WebKit::MappedMemoryPool::mapFile):
* Platform/qt/MappedMemoryPool.h:
(WebKit::MappedMemory::mappedFileName):
* Shared/qt/CrashHandler.cpp:
(WebKit::CrashHandler::deleteObjects):
* Shared/qt/UpdateChunk.cpp:
(WebKit::UpdateChunk::encode):
2010-11-09 Brady Eidson <beidson@apple.com>
Reviewed by the ever-picky Windows build-bot.
Windows build bot was complaining about this.
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::core):
2010-11-09 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
WKDownload.h should be a public header.
* WebKit2.xcodeproj/project.pbxproj:
2010-11-09 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
Part of <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=48720
Customizable context menu support in WebKit2.
This adds a BundlePageContextMenu client and lets WebKit2 consult it with the proposed
list of WebContextMenuItems.
There is no realistic API for the embedding app to actually inspect or create new
WebContextMenuItems (will be "WKContextMenuItem") and that ability will come later.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* Platform/Logging.cpp:
(initializeLogChannelsIfNecessary):
* Platform/Logging.h:
* Shared/APIObject.h:
* Shared/MutableArray.cpp:
(WebKit::MutableArray::reserveCapacity):
* Shared/MutableArray.h:
* Shared/WebContextMenuItem.cpp: Added.
(WebKit::WebContextMenuItem::WebContextMenuItem):
(WebKit::WebContextMenuItem::data):
* Shared/WebContextMenuItem.h: Added.
(WebKit::WebContextMenuItem::create):
(WebKit::WebContextMenuItem::type):
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::core):
(WebKit::kitItems):
(WebKit::coreItems):
* Shared/WebContextMenuItemData.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetContextMenuClient):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp: Added.
(WebKit::InjectedBundlePageContextMenuClient::InjectedBundlePageContextMenuClient):
(WebKit::InjectedBundlePageContextMenuClient::initialize):
(WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h: Added.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Call through to the injected bundle client
with the default items and convert the returned items back for WebCore to use.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::initializeInjectedBundleContextMenuClient):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleContextMenuClient):
2010-11-09 Sam Weinig <sam@webkit.org>
Add some stylistic flourish to the last patch as suggested by Lord Darin Adler.
* UIProcess/API/C/WKPage.cpp:
(WKPageGetSourceForFrame):
(WKPageGetContentsAsString):
* UIProcess/WebPageProxy.cpp:
(WebKit::invalidateCallbackMap):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::contentsAsString):
2010-11-09 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Need WebKit2 mechanism for getting the visible page text
<rdar://problem/8646928>
https://bugs.webkit.org/show_bug.cgi?id=49275
* UIProcess/API/C/WKPage.cpp:
(WKPageGetContentsAsString):
(callContentsAsStringBlockBlockAndDispose):
(WKPageGetContentsAsString_b):
* UIProcess/API/C/WKPage.h:
Add GetContentsAsString callback function declaration and forwarding.
* UIProcess/WebPageProxy.cpp:
(WebKit::invalidateCallbackMap):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::getContentsAsString):
(WebKit::WebPageProxy::didGetContentsAsString):
(WebKit::WebPageProxy::processDidCrash):
* UIProcess/WebPageProxy.h:
Add GetContentsAsString callback and generalize invalidating the callback
maps into a standalone function.
* UIProcess/WebPageProxy.messages.in:
Add DidGetContentsAsString return message.
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::contentsAsString):
Gets the string content of all the subframes.
(WebKit::WebFrame::isFrameSet):
Call through to the document.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getContentsAsString):
Forward to the the main frames contentsAsString function.
* WebProcess/WebPage/WebPage.messages.in:
Add GetContentsAsString and collect all callback messages together.
2010-11-09 Sam Weinig <sam@webkit.org>
Fix mac build.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformSetCacheModel):
2010-11-09 Simon Fraser <simon.fraser@apple.com>
Reviewed by Darin Adler, Dan Bernstein.
<rdar://problem/8360145> Pages using accelerated compositing missing content on Windows
Disable accelerated compositing on Windows until we have cross-process
rendering implemented.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2010-11-09 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add injected bundle API for creating page overlays
https://bugs.webkit.org/show_bug.cgi?id=49282
* Shared/API/c/WKBase.h:
Add WKBundlePageOverlayRef.
* Shared/APIObject.h:
Add TypeBundlePageOverlay.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
Add WKBundlePageOverlayRef mapping.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageInstallPageOverlay):
Install the passed in page overlay.
(WKBundlePageUninstallPageOverlay):
Uninstall the passed in page overlay.
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: Added.
(PageOverlayClientImpl::create):
(PageOverlayClientImpl::PageOverlayClientImpl):
(PageOverlayClientImpl::pageOverlayDestroyed):
(PageOverlayClientImpl::willMoveToWebPage):
(PageOverlayClientImpl::didMoveToWebPage):
(PageOverlayClientImpl::drawRect):
(PageOverlayClientImpl::mouseEvent):
Add a PageOverlay::Client subclass that forwards everything to its client.
(WKBundlePageOverlayGetTypeID):
(WKBundlePageOverlayCreate):
Create a page overlay.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::pageOverlayDestroyed):
* WebProcess/WebPage/FindController.h:
Add stub.
* WebProcess/WebPage/PageOverlay.h:
Inherit from APIObject.
(WebKit::PageOverlay::type):
return TypeBundlePageOverlay.
* win/WebKit2.vcproj:
Add new files.
2010-11-09 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Get rid of FindPageOverlay
https://bugs.webkit.org/show_bug.cgi?id=49268
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
Remove files.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):
Create a PageOverlay with the FindController as its client.
(WebKit::FindController::willMoveToWebPage):
Null out the find page overlay if the web page is null.
(WebKit::FindController::didMoveToWebPage):
Add stub.
* WebProcess/WebPage/FindController.h:
FindController is now a PageOverlay::Client.
* WebProcess/WebPage/FindPageOverlay.cpp: Removed.
* WebProcess/WebPage/FindPageOverlay.h: Removed.
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::setPage):
Call the willMoveToWebPage and didMoveToWebPage client functions.
(WebKit::PageOverlay::setNeedsDisplay):
Pass the page overlay bounds instead of the web page size.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::installPageOverlay):
Clear the page of the previous page overlay.
(WebKit::WebPage::uninstallPageOverlay):
Clear the page of the previous page overlay.
* WebProcess/WebPage/WebPage.h:
The page overlay is now refcounted.
* win/WebKit2.vcproj:
Remove files.
2010-11-09 Sam Weinig <sam@webkit.org>
Fix windows build.
* WebProcess/win/WebProcessWin.cpp:
(WebKit::WebProcess::platformSetCacheModel):
2010-11-09 Sam Weinig <sam@webkit.org>
Reviewed by Adam Roben.
Factor calculation of cache sizes based on cache model into shared function
https://bugs.webkit.org/show_bug.cgi?id=48706
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::calculateCacheSizes):
* WebProcess/WebProcess.h:
* WebProcess/mac/WebProcessMac.mm:
(WebKit::volumeFreeSize):
(WebKit::WebProcess::platformSetCacheModel):
* WebProcess/win/WebProcessWin.cpp:
(WebKit::memorySize):
(WebKit::volumeFreeSize):
(WebKit::WebProcess::platformSetCacheModel):
2010-11-09 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Context menus show up in the wrong place when the page is scrolled
https://bugs.webkit.org/show_bug.cgi?id=49264
Convert the hitTestResult point into 'window' coordinates before sending over
to the UIProcess to show the menu.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
Convert to use message sender interface.
(WebKit::WebContextMenu::itemSelected):
Remove unnecessary WebCore::'s.
2010-11-09 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Send messages directly to the WebContext
https://bugs.webkit.org/show_bug.cgi?id=49262
* Platform/CoreIPC/MessageID.h:
Temporarily add MessageClassWebContextLegacy.
* Shared/CoreIPCSupport/WebContextMessageKinds.h:
Rename adding Legacy prefix.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didNavigateWithNavigationData):
(WebKit::WebContext::didPerformClientRedirect):
(WebKit::WebContext::didPerformServerRedirect):
(WebKit::WebContext::didUpdateHistoryTitle):
(WebKit::WebContext::setCacheModel):
(WebKit::WebContext::addVisitedLink):
(WebKit::WebContext::addVisitedLinkHash):
(WebKit::WebContext::getPlugins):
(WebKit::WebContext::getPluginPath):
(WebKit::WebContext::didReceiveMessage):
(WebKit::WebContext::didReceiveSyncMessage):
* UIProcess/WebContext.h:
* UIProcess/WebContext.messages.in: Added.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPluginProcessConnection):
(WebKit::WebProcessProxy::didReceiveMessage):
(WebKit::WebProcessProxy::didReceiveSyncMessage):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::postMessage):
(WebKit::InjectedBundle::postSynchronousMessage):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::updateGlobalHistory):
(WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
(WebKit::WebFrameLoaderClient::setTitle):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::populatePluginCache):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::addVisitedLink):
Move context related messages to be sent directly to the context.
* DerivedSources.make:
* DerivedSources.pro:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add new files.
2010-11-09 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Move the find page overlay code to FindController
https://bugs.webkit.org/show_bug.cgi?id=49266
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::~FindController):
(WebKit::FindController::rectsForTextMatches):
(WebKit::overlayBackgroundColor):
(WebKit::FindController::drawRect):
(WebKit::FindController::mouseEvent):
* WebProcess/WebPage/FindController.h:
* WebProcess/WebPage/FindPageOverlay.cpp:
(WebKit::FindPageOverlay::drawRect):
(WebKit::FindPageOverlay::mouseEvent):
* WebProcess/WebPage/FindPageOverlay.h:
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::bounds):
(WebKit::PageOverlay::drawRect):
(WebKit::PageOverlay::mouseEvent):
* WebProcess/WebPage/PageOverlay.h:
2010-11-09 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Add a PageOverlay::Client object in preparation of not allowing subclassing of PageOverlay
https://bugs.webkit.org/show_bug.cgi?id=49263
* WebProcess/WebPage/FindPageOverlay.cpp:
(WebKit::FindPageOverlay::FindPageOverlay):
Call the PageOverlay constructor.
(WebKit::FindPageOverlay::drawRect):
(WebKit::FindPageOverlay::mouseEvent):
These now take a PageOverlay callback.
* WebProcess/WebPage/FindPageOverlay.h:
FindPageOverlay now inherits from PageOverlay::Client.
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::create):
Add create function.
(WebKit::PageOverlay::PageOverlay):
The constructor now takes a client.
(WebKit::PageOverlay::drawRect):
(WebKit::PageOverlay::mouseEvent):
Call the client methods.
* WebProcess/WebPage/PageOverlay.h:
Add Client class.
2010-11-09 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Darin Adler.
<rdar://problem/8646456> WebProcess crashes reproducibly on complex text
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Initialize wkCreateCTTypesetterWithUniCharProviderAndOptions
and wkCreateCTLineWithUniCharProvider.
2010-11-09 Sam Weinig <sam@webkit.org>
Fix Windows build.
* win/WebKit2.vcproj:
2010-11-09 Sam Weinig <sam@webkit.org>
Fix Qt build.
* WebKit2.pro:
2010-11-09 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Windows Popup widget support (<select>)
<rdar://problem/8559439>
https://bugs.webkit.org/show_bug.cgi?id=48701
Port WebCore's PopupMenuWin's implementation to work within the confines of WebKit2.
Since we currently can't draw text using WebCore in the UIProcess, this approach uses
the WebProcess to create two bitmaps representing the full popup menu (both unselected and
selected) and sends them to the UIProcess to be drawn in an HWND.
* Shared/BackingStore.h:
* Shared/cg/BackingStoreCG.cpp:
* Shared/qt/BackingStoreQt.cpp:
Add new function to create a flipped graphics context from the backing store,
and add additional parameters to paint, to allow more control of how the backing
store is painted into the destination context.
* Shared/PlatformPopupMenuData.cpp: Added.
(WebKit::PlatformPopupMenuData::PlatformPopupMenuData):
(WebKit::PlatformPopupMenuData::encode):
(WebKit::PlatformPopupMenuData::decode):
* Shared/PlatformPopupMenuData.h: Added.
Add struct so platforms can send platform specific data to their popup menu implementations.
* Shared/WebPopupItem.cpp:
(WebKit::WebPopupItem::WebPopupItem):
(WebKit::WebPopupItem::encode):
(WebKit::WebPopupItem::decode):
* Shared/WebPopupItem.h:
Add isLabel for each menu item.
* UIProcess/FindIndicator.cpp:
(WebKit::FindIndicator::draw):
Update for new BackingStore::paint signature.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebPopupMenuProxy.h:
* UIProcess/mac/WebPopupMenuProxyMac.h:
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::showPopupMenu):
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
(WebKit::WebPopupMenuProxyQt::showPopupMenu):
* UIProcess/qt/WebPopupMenuProxyQt.h:
Pass through the new PlatformPopupMenuData.
* UIProcess/win/WebPopupMenuProxyWin.cpp:
* UIProcess/win/WebPopupMenuProxyWin.h:
Port implementation from WebCore.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::createPopupMenuProxy):
Pass the WebView to the WebPopupMenuProxyWin.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::paint):
(WebKit::PluginProxy::update):
Update for new BackingStore::paint signature.
* WebProcess/WebCoreSupport/WebPopupMenu.cpp:
(WebKit::WebPopupMenu::populateItems): Add isLabel for each item.
(WebKit::WebPopupMenu::show): Give each platform a chance to add platform specific data.
* WebProcess/WebCoreSupport/WebPopupMenu.h:
* WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm: Added.
(WebKit::WebPopupMenu::setUpPlatformData):
* WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp: Added.
(WebKit::WebPopupMenu::setUpPlatformData):
Add stubbed out setUpPlatformData.
* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Added.
(WebKit::WebPopupMenu::setUpPlatformData):
Compute data needed in the UIProcess including generating the bitmaps.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add new files.
2010-11-09 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt][WK2] ASSERT fail in fast/frames/lots-of-objects.html
https://bugs.webkit.org/show_bug.cgi?id=49253
* Platform/qt/SharedMemoryQt.cpp:
(WebKit::SharedMemory::create): Do not assert
when the attach was unsuccessful but return with 0.
2010-11-09 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Andreas Kling.
[Qt][WK2] WebKitTestRunner is dead
https://bugs.webkit.org/show_bug.cgi?id=49129
* Platform/qt/SharedMemoryQt.cpp:
(WebKit::SharedMemory::~SharedMemory):
Follow up fix: do not access the QSharedMemory object
in an assert if it has been deleted.
2010-11-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Andreas Kling.
Send page scroll requests to the PageClient when scroll delegation is turned on
https://bugs.webkit.org/show_bug.cgi?id=49171
Implement the IPC and API required for making scroll delegation work
with WebKit2. This is only used when you have tiling enabled.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::pageDidRequestScroll):
* UIProcess/API/qt/qwkpage.h:
* UIProcess/API/qt/qwkpage_p.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pageDidRequestScroll):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::delegatedScrollRequested):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::pageDidRequestScroll):
* WebProcess/WebPage/WebPage.h:
2010-11-08 Ivan Krstić <ike@apple.com>
Reviewed by Mark Rowe.
<rdar://problem/8531943> Enable partial symbolication for sandbox violations in WebProcess.
* WebProcess/com.apple.WebProcess.sb:
2010-11-08 Juha Savolainen <juha.savolainen@weego.fi>
Reviewed by Andreas Kling.
[Qt] Added new methods to QWKHistory and made QWKHistoryItemPrivate to shared object.
https://bugs.webkit.org/show_bug.cgi?id=49063
Added more functionality to the QWKHistory and changed QWKHistoryItemPrivate to shared object.
This is needed because we cannot delete the QWKHistoryItemPrivate pointer in destructor of QWKHistoryItem,
there may have other history instances which share same private implementation.
* UIProcess/API/qt/qwkhistory.cpp:
(QWKHistoryItemPrivate::~QWKHistoryItemPrivate):
(QWKHistoryItem::QWKHistoryItem):
(QWKHistoryItem::QWKHistoryItem::operator=):
(QWKHistory::currentItem): Added
(QWKHistory::backItem): Added
(QWKHistory::forwardItem): Added
(QWKHistory::itemAt): Added
(QWKHistory::backItems): Added
(QWKHistory::forwardItems): Added
* UIProcess/API/qt/qwkhistory.h:
* UIProcess/API/qt/qwkhistory_p.h:
2010-11-08 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Add WKDownloadClient API
https://bugs.webkit.org/show_bug.cgi?id=49227
* Shared/API/c/WKBase.h:
Add WKDownloadRef.
* UIProcess/API/C/WKAPICast.h:
Add WKDownloadRef <-> DownloadProxy mapping.
* UIProcess/API/C/WKContext.cpp:
(WKContextSetDownloadClient):
Initialize the download client.
* UIProcess/API/C/WKContext.h:
Add new WKContextDownloadClient API.
* UIProcess/API/C/WKDownload.cpp: Added.
* UIProcess/API/C/WKDownload.h:
Add WKDownload files.
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didStart):
(WebKit::DownloadProxy::didCreateDestination):
(WebKit::DownloadProxy::didFinish):
Call down to the the WebDownloadClient.
* UIProcess/Downloads/DownloadProxy.messages.in:
Rename DidBegin to DidStart.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::initializeDownloadClient):
Initialize the download client.
* UIProcess/WebContext.h:
(WebKit::WebContext::downloadClient):
Add getter.
* UIProcess/WebDownloadClient.cpp:
(WebKit::WebDownloadClient::didStart):
(WebKit::WebDownloadClient::didCreateDestination):
(WebKit::WebDownloadClient::didFinish):
Call the relevant WKContextDownloadClient functions.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/Downloads/Download.cpp:
(WebKit::Download::didStart):
* WebProcess/Downloads/Download.h:
* WebProcess/Downloads/mac/DownloadMac.mm:
(-[WKDownloadAsDelegate downloadDidBegin:]):
Rename Download::didBegin to Download::didStart.
* win/WebKit2.vcproj:
Add new files.
2010-11-08 Brady Eidson <beidson@apple.com>
Reviewed by Anders Carlsson.
Part of https://bugs.webkit.org/show_bug.cgi?id=49222
Rename "WebContextMenuItem" to "WebContextMenuItemData"
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* Shared/WebContextMenuItem.cpp: Removed.
* Shared/WebContextMenuItem.h: Removed.
* Shared/WebContextMenuItemData.cpp: Copied from Shared/WebContextMenuItem.cpp.
(WebKit::WebContextMenuItemData::WebContextMenuItemData):
(WebKit::WebContextMenuItemData::encode):
(WebKit::WebContextMenuItemData::decode):
(WebKit::kitItems):
* Shared/WebContextMenuItemData.h: Copied from Shared/WebContextMenuItem.h.
(WebKit::WebContextMenuItemData::submenu):
* UIProcess/WebContextMenuProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::contextMenuItemSelected):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WebMenuTarget forwardContextMenuAction:]):
(WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
(WebKit::nsMenuItemVector):
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):
* UIProcess/qt/WebContextMenuProxyQt.cpp:
(WebKit::WebContextMenuProxyQt::showContextMenu):
* UIProcess/qt/WebContextMenuProxyQt.h:
* UIProcess/win/WebContextMenuProxyWin.cpp:
(WebKit::WebContextMenuProxyWin::showContextMenu):
* UIProcess/win/WebContextMenuProxyWin.h:
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::itemSelected):
* WebProcess/WebPage/WebContextMenu.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didSelectItemFromActiveContextMenu):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2010-11-08 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan and Dan Bernstein.
Find in Page: scrolling the page with the scrollbar while overlay is up dismisses the overlay
https://bugs.webkit.org/show_bug.cgi?id=49219
<rdar://problem/8569550>
* WebProcess/WebPage/FindPageOverlay.cpp:
(WebKit::FindPageOverlay::bounds):
Return the bounds of the find page overlay, excluding any scrollbars.
(WebKit::FindPageOverlay::drawRect):
Call bounds.
(WebKit::FindPageOverlay::mouseEvent):
Only dismiss the find UI if the mouse down event happens inside the overlay bounds.
2010-11-08 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Add the ability to send messages to DownloadProxy objects
https://bugs.webkit.org/show_bug.cgi?id=49213
* DerivedSources.make:
* DerivedSources.pro:
Add Download.messages.in.
* Platform/CoreIPC/MessageID.h:
Add MessageClassDownloadProxy message class.
* Platform/CoreIPC/MessageSender.h:
Include Connection.h directly since it's required.
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didBegin):
(WebKit::DownloadProxy::didCreateDestination):
(WebKit::DownloadProxy::didFinish):
Add stubs.
* UIProcess/Downloads/DownloadProxy.messages.in: Added.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didReceiveMessage):
Handle DownloadProxy messages.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage):
Hand DownloadProxy messages off to the context.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/Downloads/Download.cpp:
(WebKit::Download::didBegin):
(WebKit::Download::didReceiveData):
(WebKit::Download::didCreateDestination):
(WebKit::Download::didFinish):
Send messages.
* WebProcess/Downloads/mac/DownloadMac.mm:
(-[WKDownloadAsDelegate download:didCreateDestination:]):
Call Download::didCreateDestination.
* win/WebKit2.vcproj:
Add new files.
2010-11-08 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Add DownloadProxy object
https://bugs.webkit.org/show_bug.cgi?id=49211
DownloadProxy will be the implementation of the forthcoming WKDownloadRef object.
* Shared/APIObject.h:
Add TypeDownload.
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::generateDownloadID):
Generate a unique download ID.
(WebKit::DownloadProxy::invalidate):
Null out the web context.
* UIProcess/Downloads/DownloadProxy.h:
(WebKit::WebContext::processDidClose):
Invalidate all downloads.
(WebKit::WebContext::createDownloadProxy):
Create a WebDownload object.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):
Call createDownloadProxy instead.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add new files.
* win/WebKit2Common.vsprops:
Add new include path.
2010-11-08 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=49201
Crash when closing a page
Handle null frame by passing a 0 frame id (normal ones start from 1).
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::focusedFrameChanged):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedFrameChanged):
2010-11-08 Nate Chapin <japhet@chromium.org>
Reviewed by Alexey Proskuryakov.
Function call update for
https://bugs.webkit.org/show_bug.cgi?id=27165.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::Stream::start):
2010-11-08 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
NPClass::construct and NPClass::invokeDefault never called with out-of-process plug-ins in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=49198
* Shared/Plugins/NPObjectMessageReceiver.cpp:
(WebKit::NPObjectMessageReceiver::invokeDefault):
Call NPClass::invokeDefault.
(WebKit::NPObjectMessageReceiver::construct):
Call NPClass::construct
* Shared/Plugins/NPObjectMessageReceiver.messages.in:
Add InvokeDefault and Construct messages.
* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::invokeDefault):
Send the InvokeDefault message.
(WebKit::NPObjectProxy::construct):
Send the Construct message.
(WebKit::NPObjectProxy::NP_InvokeDefault):
Call NPObjectProxy::invokeDefault.
(WebKit::NPObjectProxy::NP_Construct):
Call NPObjectProxy::construct.
2010-11-08 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Plug-in views should not assume that plugins are RenderEmbeddedObjects
https://bugs.webkit.org/show_bug.cgi?id=49196
<rdar://problem/8638467>
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginProcessCrashed):
2010-11-08 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
NPN_Evaluate doesn't work with out-of-process plugins in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=49193
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::evaluate):
Send an Evaluate message.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::evaluate):
Call Evaluate on the plug-in proxy.
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginProxy.messages.in:
Add Evaluate message.
2010-11-08 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Correctly convert NPObjectProxy to NPVariantData
https://bugs.webkit.org/show_bug.cgi?id=49190
* Shared/Plugins/NPObjectMessageReceiver.h:
(WebKit::NPObjectMessageReceiver::npObject):
Add NPObject getter.
* Shared/Plugins/NPObjectProxy.h:
(WebKit::NPObjectProxy::npObjectID):
Add NPObjectID getter.
* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
Handle the case where the NPObject is an NPObjectProxy.
(WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
Handle NPVariantData::LocalNPObjectID.
* Shared/Plugins/NPVariantData.cpp:
(WebKit::NPVariantData::makeRemoteNPObjectID):
* Shared/Plugins/NPVariantData.h:
New function for creating an NPVariantData that contains a remote NPObject ID.
2010-11-08 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=48685
Notify UI process about focused frame
Handle notifications, store the current one in WebPageProxy in UI process.
* UIProcess/API/C/WKPage.cpp:
(WKPageGetFocusedFrame):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::focusedFrameChanged):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::focusedFrame):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedFrameChanged):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2010-11-07 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Rename Cache to MemoryCache
https://bugs.webkit.org/show_bug.cgi?id=49159
* WebProcess/WebProcess.cpp:
* WebProcess/mac/WebProcessMac.mm:
* WebProcess/win/WebProcessWin.cpp:
2010-11-06 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Andreas Kling.
[Qt][WK2] WebKitTestRunner is dead
https://bugs.webkit.org/show_bug.cgi?id=49129
* Platform/qt/SharedMemoryQt.cpp:
(WebKit::SharedMemory::~SharedMemory):
Avoid double deletion when deleteLater has
already been called.
2010-11-05 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
suspendAnimations/resumeAnimations not present in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=49109
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameSuspendAnimations):
(WKBundleFrameResumeAnimations):
* WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::suspendAnimations):
(WebKit::WebFrame::resumeAnimations):
* WebProcess/WebPage/WebFrame.h:
2010-11-05 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
WebProcess won't kill itself if UIProcess goes away while WebProcess is spinning
https://bugs.webkit.org/show_bug.cgi?id=49090
<rdar://problem/7834575>
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::connectionDidClose):
Call Client::didCloseOnConnectionWorkQueue.
* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::Client::didCloseOnConnectionWorkQueue):
Add new client function. Will be called on the connection work queue when the connection is closed.
* Platform/WorkItem.h:
(FunctionWorkItem0::FunctionWorkItem0):
(FunctionWorkItem0::execute):
(WorkItem::create):
Add a new WorkItem subclass that will invoke a C function.
* Platform/WorkQueue.h:
* Platform/mac/WorkQueueMac.cpp:
(WorkQueue::scheduleWorkAfterDelay):
New function which will schedule the given work item to be executed in at least 'delay' seconds.
* Platform/qt/WorkQueueQt.cpp:
(WorkQueue::scheduleWorkAfterDelay):
Add empty stub.
* Platform/win/WorkQueueWin.cpp:
(WorkQueue::scheduleWorkAfterDelay):
Ditto.
* PluginProcess/PluginProcess.h:
Derive from ChildProcess.
* Shared/ChildProcess.cpp: Added.
(WebKit::ChildProcess::ChildProcess):
(WebKit::ChildProcess::~ChildProcess):
(WebKit::watchdogCallback):
Call _exit.
(WebKit::ChildProcess::didCloseOnConnectionWorkQueue):
When the connection is closed, schedule a work item to be run in 10 seconds. If the process hasn't
exited normally by then, we'll exit.
* Shared/ChildProcess.h:
Add new ChildProcess class which is a common base class of WebProcess and PluginProcess and which contains
the watchdog timer logic.
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/WebProcess.h:
Derive from ChildProcess.
* win/WebKit2.vcproj:
Add new files.
2010-11-05 Adam Roben <aroben@apple.com>
Implement PluginInfoStore::shouldUsePlugin on Windows
Fixes <http://webkit.org/b/43509> <rdar://problem/8273822> WebKit2
should refuse to load the same plugins that old-WebKit refuses to load
Reviewed by Anders Carlsson.
* UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
(WebKit::fileVersion): Helper function to construct a 64-bit file
version from two 32-bit numbers.
(WebKit::PluginInfoStore::getPluginInfo): Ported code from
WebCore::PluginPackage::fetchInfo to get the plugin's version. We now
store it in Plugin::fileVersion.
(WebKit::isOldWindowsMediaPlayerPlugin):
(WebKit::isNewWindowsMediaPlayerPlugin):
Added these helpers. The code came from
WebCore::PluginDatabase::getPluginPathsInDirectories.
(WebKit::PluginInfoStore::shouldUsePlugin): Implemented. The code was
ported from WebCore::PluginDatabase::getPluginPathsInDirectories and
WebCore::PluginPackage::isPluginBlacklisted.
2010-11-05 Adam Roben <aroben@apple.com>
Operate on m_plugins directly in PluginInfoStore::shouldUsePlugin
We'll need to operate on m_plugins if we ever want to unload an
already-loaded plugin before loading the new one.
Fixes <http://webkit.org/b/49076> loadedPlugins parameter to
PluginInfoStore::shouldUsePlugin is redundant
Reviewed by Anders Carlsson.
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::loadPlugin):
* UIProcess/Plugins/PluginInfoStore.h:
* UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
(WebKit::PluginInfoStore::shouldUsePlugin):
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::shouldUsePlugin):
* UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
(WebKit::PluginInfoStore::shouldUsePlugin):
* UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
(WebKit::PluginInfoStore::shouldUsePlugin):
Removed the loadedPlugins parameter from shouldUsePlugin. The single
implementation (Mac) now uses m_plugins directly.
2010-11-05 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Implement pluginElementNPObject
https://bugs.webkit.org/show_bug.cgi?id=49077
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::pluginElementNPObject):
Send the GetPluginElementNPObject message.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::getPluginElementNPObject):
Get the plug-in element NPObject and expose it to the other side of the connection.
* WebProcess/Plugins/PluginProxy.messages.in:
Add GetPluginElementNPObject.
2010-11-04 Anders Carlsson <andersca@apple.com>
Reviewed by Oliver Hunt.
Implement NP_RemoveProperty and NP_Enumerate
https://bugs.webkit.org/show_bug.cgi?id=49046
* Shared/Plugins/NPObjectMessageReceiver.cpp:
(WebKit::NPObjectMessageReceiver::removeProperty):
Call the removeProperty NPClass function.
(WebKit::NPObjectMessageReceiver::enumerate):
Call the enumerate NPClass function.
* Shared/Plugins/NPObjectMessageReceiver.messages.in:
Add RemoveProperty and Enumerate messages.
* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::removeProperty):
Send the RemoveProperty message.
(WebKit::NPObjectProxy::enumerate):
Send the Enumerate message.
(WebKit::NPObjectProxy::NP_RemoveProperty):
Call removeProperty.
(WebKit::NPObjectProxy::NP_Enumerate):
Call enumerate.
2010-11-05 Sam Weinig <sam@webkit.org>
Fix failing python tests.
* Scripts/webkit2/messages.py:
* Scripts/webkit2/messages_unittest.py:
2010-11-05 Sam Weinig <sam@webkit.org>
Reviewed by Adam Roben..
Generate the messages sent to the WebProcessProxy
https://bugs.webkit.org/show_bug.cgi?id=49062
* Platform/CoreIPC/MessageID.h:
Temporarily add MessageClassWebProcessProxyLegacy while we still can't
support GetPluginProcessConnection (and deferred sync replies) in the
general mechanism.
* Scripts/webkit2/messages.py:
Add support for WebCore::PluginData and WebKit::WebNavigationDataStore.
* Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
Remove now unused kinds. Rename to MessageClassWebProcessProxyLegacy.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPluginPath):
(WebKit::WebProcessProxy::addBackForwardItem):
(WebKit::WebProcessProxy::didNavigateWithNavigationData):
(WebKit::WebProcessProxy::didPerformClientRedirect):
(WebKit::WebProcessProxy::didPerformServerRedirect):
(WebKit::WebProcessProxy::didUpdateHistoryTitle):
(WebKit::WebProcessProxy::didReceiveMessage):
(WebKit::WebProcessProxy::didReceiveSyncMessage):
(WebKit::WebProcessProxy::didDestroyFrame):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in: Added.
Move implementations to their own functions.
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
Change to use WebProcessProxyLegacyMessage.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::updateGlobalHistory):
(WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
(WebKit::WebFrameLoaderClient::setTitle):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::populatePluginCache):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::updateBackForwardItem):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::addVisitedLink):
(WebKit::WebProcess::removeWebFrame):
Use generated messages.
* DerivedSources.make:
* DerivedSources.pro:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
Add new files.
2010-11-04 Adam Roben <aroben@apple.com>
Use a window region to clip windowed plugins
Fixes <http://webkit.org/b/49024> <rdar://problem/8487847> Windowed
plugins aren't clipped in WebKit2 on Windows
Reviewed by Jon Honeycutt.
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
(WebKit::registerPluginView): Removed the CS_PARENTDC style. This style
makes Windows ignore the window region and always clip to the parent
window. Also pass WebKit.dll's HINSTANCE as part of the WNDCLASSW
struct so that the window class will be specific to WebKit.dll rather
than to WebKit2WebProcess.exe. This is useful for testing, but also
more pedantically correct.
(WebKit::setWindowRegion): Helper function to set a window region and
deal with ownership of the HRGN correctly.
(WebKit::NetscapePlugin::platformGeometryDidChange): Make an HRGN that
corresponds to m_clipRect and set it on the plugin's window.
2010-11-05 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Andreas Kling.
[Qt][WK2] Left over files and shared memory segments
https://bugs.webkit.org/show_bug.cgi?id=48985
* Platform/qt/SharedMemoryQt.cpp:
(WebKit::SharedMemory::create): Force deletion of the QSharedMemory
object on terminate by connecting QCoreApplication::aboutToQuit with
deleteLater. Add the object to the CrashHandler as well to release the
shared memory segment even on crash.
(WebKit::SharedMemory::~SharedMemory):
* Shared/qt/CrashHandler.cpp: Added.
CrashHandler has a container for QObjects that we want to
destroy on crash. When we got a signal that we interpret as
a crash then it destroys those objects.
(WebKit::CrashHandler::CrashHandler):
(WebKit::CrashHandler::signalHandler):
(WebKit::CrashHandler::deleteObjects):
* Shared/qt/CrashHandler.h: Added.
(WebKit::CrashHandler::instance):
(WebKit::CrashHandler::didDelete):
(WebKit::CrashHandler::markForDeletionOnCrash):
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncherHelper::ProcessLauncherHelper):
Add the object itself to the CrashHandler to close the QLocalServer
even on crash. Without that the QLocalServer leaves over socket files on the disk.
(WebKit::ProcessLauncherHelper::~ProcessLauncherHelper):
* WebKit2.pro:
2010-11-04 Jia Pu <jpu@apple.com>
Reviewed by Dan Bernstein.
reversion bubble in WebViews
https://bugs.webkit.org/show_bug.cgi?id=47630
<rdar://problem/8530960>
This patch is to add reversion to correction panel. Please see WebCore/ChangeLog for detail.
* WebProcess/WebCoreSupport/WebEditorClient.h: Adopted new signature of base class method.
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Ditto.
(WebKit::WebEditorClient::showCorrectionPanel):
(WebKit::WebEditorClient::dismissCorrectionPanel):
2010-11-04 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by David Hyatt.
Delegate scrolling via a separate method
https://bugs.webkit.org/show_bug.cgi?id=48988
Add delegatedScrollRequested method to WebChromeClient,
which is only used in conjunging with tiling, and thus ifdef'ed.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::delegatedScrollRequested):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2010-11-03 Enrica Casucci <enrica@apple.com>
Reviewed by Alexey Proskuryakov.
Need a way to test in WebKit2 whether a form field contains marked text
<rdar://problem/8555293>
https://bugs.webkit.org/show_bug.cgi?id=48969
Added a selection changed notification from the Web process to the UI process.
The message being sent contains information about the current selection.
Event though for this specific bug the only information required is the marked text,
I've added other selection information that will be needed to support IME.
All the stubbed methods are required methods by the NSTextInput protocol.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::selectionChanged): Added.
* UIProcess/API/mac/WKView.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:pageNamespaceRef:]): Added initialization of new members.
(-[WKView _selectionChanged:isEditable:isPassword:hasMarkedText:]): Stores the values from
the selection changed message.
(-[WKView selectedRange]): Added stub.
(-[WKView hasMarkedText]): Implemented.
(-[WKView unmarkText]): Added stub.
(-[WKView validAttributesForMarkedText]): Added stub.
(-[WKView setMarkedText:selectedRange:]): Added stub.
(-[WKView markedRange]): Added stub.
(-[WKView attributedSubstringFromRange:]): Added stub.
(-[WKView conversationIdentifier]): Added stub.
(-[WKView characterIndexForPoint:]): Added stub.
(-[WKView firstRectForCharacterRange:]): Added stub.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::selectionChanged): Added.
* UIProcess/API/qt/qwkpage_p.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didSelectionChange): New message handler.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::selectionChanged): Added.
* UIProcess/win/WebView.h:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::respondToChangedSelection): Added implementation.
2010-11-04 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Andreas Kling.
[Qt][WK2] Cleanup UpdateChunk and MappedMemoryPool
https://bugs.webkit.org/show_bug.cgi?id=48994
* Platform/qt/MappedMemoryPool.cpp:
(WebKit::MappedMemoryPool::mapMemory):
Removed argument with default value that was always
used with the default value.
(WebKit::MappedMemoryPool::mapFile): Ditto and
add some asserts.
* Platform/qt/MappedMemoryPool.h:
Encapsulating MappedMemory and remove the unused
MappedMemoryPool::searchForMappedMemory method.
(WebKit::MappedMemory::mappedFile):
(WebKit::MappedMemory::markFree):
(WebKit::MappedMemory::data):
(WebKit::MappedMemory::MappedMemory):
(WebKit::MappedMemory::markUsed):
(WebKit::MappedMemory::mapSize):
(WebKit::MappedMemory::isFree):
(WebKit::MappedMemoryPool::instance):
* Shared/qt/UpdateChunk.cpp:
Removed the unused data method besides other cleanups.
(WebKit::UpdateChunk::UpdateChunk):
(WebKit::UpdateChunk::encode):
(WebKit::UpdateChunk::decode):
(WebKit::UpdateChunk::createImage):
* Shared/qt/UpdateChunk.h:
2010-11-04 Andreas Kling <kling@webkit.org>
Reviewed by Tor Arne Vestbø.
[Qt] Add a stub WebContextMenuProxy
This is the Qt equivalent of r71333.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::createContextMenuProxy):
* UIProcess/qt/WebContextMenuProxyQt.cpp: Added.
(WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
(WebKit::WebContextMenuProxyQt::create):
(WebKit::WebContextMenuProxyQt::showContextMenu):
(WebKit::WebContextMenuProxyQt::hideContextMenu):
* UIProcess/qt/WebContextMenuProxyQt.h: Added.
* WebKit2.pro:
2010-11-04 Adam Roben <aroben@apple.com>
Add a do-nothing WebContextMenuProxy implementation on Windows
Fixes <http://webkit.org/b/48992> REGRESSION (r71041): Crash in
WebPageProxy::showContextMenu when right-clicking in WebKit2 on
Windows
Reviewed by Dan Bernstein.
* UIProcess/win/WebContextMenuProxyWin.cpp: Added.
(WebKit::WebContextMenuProxyWin::WebContextMenuProxyWin):
(WebKit::WebContextMenuProxyWin::create):
(WebKit::WebContextMenuProxyWin::showContextMenu):
(WebKit::WebContextMenuProxyWin::hideContextMenu):
* UIProcess/win/WebContextMenuProxyWin.h: Added.
Just stubbed-out this class.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::createContextMenuProxy): Create a new
WebContextMenuProxyWin and return it. Returning 0 results in a crash.
* win/WebKit2.vcproj: Added WebContextMenuProxyWin.
2010-11-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by Andreas Kling..
[Qt] Build Webkit2 both in debug and release on Mac
On Mac OS X we build QtWebKit in both debug and release, so
we need to also build the webkit2 library in both configs.
* WebKit2.pro:
2010-11-04 Adam Roben <aroben@apple.com>
Remove lame puts()s from WebPageProxy
Rubber-stamped by Anders Carlsson.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadURL):
(WebKit::WebPageProxy::loadURLRequest):
2010-11-03 Alice Liu <alice.liu@apple.com>
Fix clang++ build
* PluginProcess/PluginProcess.h:
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/WebContextMenuProxy.h:
Change class to struct and vise versa where needed.
2010-11-03 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Implement NP_SetProperty
https://bugs.webkit.org/show_bug.cgi?id=48956
* Shared/Plugins/NPObjectMessageReceiver.cpp:
(WebKit::NPObjectMessageReceiver::setProperty):
Call the NPClass setProperty function.
* Shared/Plugins/NPObjectMessageReceiver.messages.in:
Add SetProperty message.
* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::setProperty):
Send a SetProperty message.
(WebKit::NPObjectProxy::NP_SetProperty):
Call NPObjectProxy::setProperty.
2010-11-03 Anders Carlsson <andersca@apple.com>
Reviewed by Simon Fraser.
Out of process plug-ins don't support the CA drawing model
https://bugs.webkit.org/show_bug.cgi?id=48950
<rdar://problem/8626019>
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction):
Add new overload.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::initialize):
Call platformInitialize().
(WebKit::PluginControllerProxy::destroy):
Call platformDestroy().
(WebKit::PluginControllerProxy::isAcceleratedCompositingEnabled):
Assume that accelerated compositing is available if we have a render server port.
(WebKit::PluginControllerProxy::geometryDidChange):
Call platformGeometryDidChange().
* PluginProcess/PluginProcess.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::createPlugin):
Pass back the remote layer client ID.
* PluginProcess/WebProcessConnection.messages.in:
Add a remoteLayerClientID out parameter to CreatePlugin.
* PluginProcess/mac/PluginControllerProxyMac.mm: Added.
(WebKit::PluginControllerProxy::platformInitialize):
If the plug-in has a layer, create a remote layer client and associate it with the layer.
(WebKit::PluginControllerProxy::platformDestroy):
Invalidate the remote layer client.
(WebKit::PluginControllerProxy::remoteLayerClientID):
Return the remote layer client ID if one exists.
(WebKit::PluginControllerProxy::platformGeometryDidChange):
Update the layer bounds.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: Added.
(WebKit::PluginProxy::pluginLayer):
Create a render layer if needed.
(WebKit::PluginProxy::needsBackingStore):
Return whether the plug-in needs a backing store. (It doesn't need a backing store if it's a CA plug-in).
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::PluginProxy):
Initialize m_remoteLayerClientID.
(WebKit::PluginProxy::initialize):
Set m_remoteLayerClientID.
(WebKit::PluginProxy::paint):
Bail if the plug-in doesn't need a backing store.
(WebKit::PluginProxy::geometryDidChange):
Don't create a backing store if the plug-in doesn't need one.
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
Remove RetainPtr initialization.
* WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
(WebKit::LayerBackedDrawingArea::platformClear):
Use nullptr instead of 0.
2010-11-03 Anders Carlsson <andersca@apple.com>
Reviewed by Simon Fraser.
Crash when layout in response to setSize changes the drawing area
https://bugs.webkit.org/show_bug.cgi?id=48947
This is tested by compositing/plugins/small-to-large-composited-plugin.html.
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::setSize):
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::setSize):
2010-11-03 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Pass the accelerated compositing render server port to the plug-in process at startup
https://bugs.webkit.org/show_bug.cgi?id=48925
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess):
Initialize m_compositingRenderServerPort to MACH_PORT_NULL.
(WebKit::PluginProcess::initialize):
Get the plug-in path and render server port from the creation parameters.
* PluginProcess/PluginProcess.messages.in:
Change the Initialize message to take a PluginProcessCreationParameters struct.
* Shared/Plugins/PluginProcessCreationParameters.cpp: Added.
* Shared/Plugins/PluginProcessCreationParameters.h: Added.
Add new PluginProcessCreationParameters struct.
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
Initialize now takes a PluginProcessCreationParameters struct.
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm: Added.
(WebKit::PluginProcessProxy::platformInitializePluginProcess):
Initialize the render server port.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2010-11-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Add the webkit2 library to LIBS instead of QMAKE_LFLAGS
Otherwise the library order will get messed up and cause
missing symbols on Mac OS X.
* WebKit2.pri:
* WebKit2.pro:
2010-11-02 Daniel Bates <dbates@rim.com>
Reviewed by Adam Barth.
For unnamed frames, window.name returns a generated name
https://bugs.webkit.org/show_bug.cgi?id=6751
Part 1 of 2.
Substitute FrameTree::uniqueName() for FrameTree::name() in WebKit2.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::name):
2010-11-02 Amruth Raj <amruthraj@motorola.com> and Ravi Kasibhatla <ravi.kasibhatla@motorola.com>
Reviewed by Martin Robinson.
Changes to enable building WebKit2 for Gtk port.
(https://bugs.webkit.org/show_bug.cgi?id=37369)
* Platform/gtk: Added.
* Platform/gtk/SharedMemoryGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
(WebKit::SharedMemory::Handle::Handle):
(WebKit::SharedMemory::Handle::~Handle):
(WebKit::SharedMemory::Handle::encode):
(WebKit::SharedMemory::Handle::decode):
(WebKit::SharedMemory::create):
(WebKit::SharedMemory::~SharedMemory):
(WebKit::SharedMemory::createHandle):
(WebKit::SharedMemory::systemPageSize):
* Shared/gtk: Added.
* Shared/gtk/BackingStoreGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
(WebKit::BackingStore::createGraphicsContext):
(WebKit::BackingStore::paint):
* Shared/gtk/PlatformCertificateInfo.h: Added. Added. Stubbed implementation for GTK port. Yet to implement.
(WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
(WebKit::PlatformCertificateInfo::encode):
(WebKit::PlatformCertificateInfo::decode):
* Shared/gtk/WebCoreArgumentCodersGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
(CoreIPC::encodeResourceRequest):
(CoreIPC::decodeResourceRequest):
* UIProcess/Plugins/gtk: Added.
* UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
(WebKit::PluginInfoStore::pluginsDirectories):
(WebKit::PluginInfoStore::pluginPathsInDirectory):
(WebKit::PluginInfoStore::individualPluginPaths):
(WebKit::PluginInfoStore::getPluginInfo):
(WebKit::PluginInfoStore::shouldUsePlugin):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/gtk: Added.
* WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
(WebKit::InjectedBundle::load):
(WebKit::InjectedBundle::activateMacFontAscentHack):
* WebProcess/Plugins/Netscape/gtk: Added.
* WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
(WebKit::NetscapePlugin::platformPostInitialize):
(WebKit::NetscapePlugin::platformDestroy):
(WebKit::NetscapePlugin::platformGeometryDidChange):
(WebKit::NetscapePlugin::platformPaint):
(WebKit::toNP):
(WebKit::NetscapePlugin::platformHandleMouseEvent):
(WebKit::NetscapePlugin::platformHandleWheelEvent):
(WebKit::NetscapePlugin::platformSetFocus):
(WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
(WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
(WebKit::NetscapePlugin::platformHandleKeyboardEvent):
* WebProcess/WebCoreSupport/gtk: Added.
* WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h: Added. Added. Stubbed implementation for GTK port. Yet to implement.
(WebFrameNetworkingContext::create):
(WebFrameNetworkingContext::WebFrameNetworkingContext):
2010-11-02 Jing Jin <jjin@apple.com>
Reviewed by Alexey Proskuryakov.
Key down calls are not being sent to the application.
https://bugs.webkit.org/show_bug.cgi?id=48867
* UIProcess/API/mac/WKView.mm:
(-[WKView keyDown:]): Call super when ignoring a key down.
2010-11-02 Anders Carlsson <andersca@apple.com>
Reviewed by John Sullivan.
Add Null and Int32 to NPVariantData
https://bugs.webkit.org/show_bug.cgi?id=48887
* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
(WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
* Shared/Plugins/NPVariantData.cpp:
(WebKit::NPVariantData::NPVariantData):
(WebKit::NPVariantData::makeNull):
(WebKit::NPVariantData::makeInt32):
(WebKit::NPVariantData::encode):
(WebKit::NPVariantData::decode):
* Shared/Plugins/NPVariantData.h:
(WebKit::NPVariantData::int32Value):
2010-11-02 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Add support for NP_HasMethod and NP_Invoke
https://bugs.webkit.org/show_bug.cgi?id=48882
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction):
Add new overload.
* Shared/Plugins/NPObjectMessageReceiver.cpp:
(WebKit::NPObjectMessageReceiver::hasMethod):
Call hasMethod and return the result.
(WebKit::NPObjectMessageReceiver::invoke):
Convert the arguments, call invoke and return the result.
(WebKit::NPObjectMessageReceiver::getProperty):
Release the converted variant.
* Shared/Plugins/NPObjectMessageReceiver.messages.in:
Add HasMethod and Invoke messages.
* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::hasMethod):
Send the HasMethod message.
(WebKit::NPObjectProxy::invoke):
Send the Invoke message.
(WebKit::NPObjectProxy::NP_HasMethod):
Call hasMethod.
(WebKit::NPObjectProxy::NP_Invoke):
Call invoke.
2010-11-02 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Implement NP_HasProperty for NPObjectProxy
https://bugs.webkit.org/show_bug.cgi?id=48876
* Shared/Plugins/NPObjectMessageReceiver.cpp:
(WebKit::NPObjectMessageReceiver::hasProperty):
Call The hasProperty callback function.
* Shared/Plugins/NPObjectMessageReceiver.messages.in:
Add HasProperty message.
* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::hasProperty):
Send the HasProperty message.
(WebKit::NPObjectProxy::NP_HasProperty):
Call hasProperty.
2010-11-02 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Add a way to send startup messages on the context which can be posted when a process launches
<rdar://problem/8617928>
https://bugs.webkit.org/show_bug.cgi?id=48838
Adds WKContextSetInitializationUserDataForInjectedBundle which sets an
APIObject on WebContext to be sent to the InjectedBundle's WKBundleInitialize
function each time a process starts up. This can help in cases where
the WebProcess dies, and will be helpful in the world where there are
multiple WebProcess's per context.
* Scripts/webkit2/messages.py:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetInitializationUserDataForInjectedBundle):
* UIProcess/API/C/WKContext.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess):
* UIProcess/WebContext.h:
(WebKit::WebContext::setInjectedBundleInitializationUserData):
(WebKit::WebContext::injectedBundleInitializationUserData):
* WebProcess/InjectedBundle/API/c/WKBundleInitialize.h:
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
(WebKit::InjectedBundle::load):
* WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
(WebKit::InjectedBundle::load):
* WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
(WebKit::InjectedBundle::load):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2010-11-02 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Implement PluginProxy::pluginScriptableNPObject
https://bugs.webkit.org/show_bug.cgi?id=48874
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::getPluginScriptableNPObject):
Ask the plug-in for its scriptable NPObject, register it with the map and return its object ID.
* PluginProcess/PluginControllerProxy.messages.in:
Add GetPluginScriptableNPObject message.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::pluginScriptableNPObject):
Send the GetPluginScriptableNPObject message.
2010-11-02 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Add strings to NPVariantData
https://bugs.webkit.org/show_bug.cgi?id=48871
* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
(WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
* Shared/Plugins/NPVariantData.cpp:
(WebKit::NPVariantData::makeString):
(WebKit::NPVariantData::encode):
(WebKit::NPVariantData::decode):
* Shared/Plugins/NPVariantData.h:
(WebKit::NPVariantData::stringValue):
2010-11-02 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Add convenience functions for allocating NPAPI memory
https://bugs.webkit.org/show_bug.cgi?id=48870
Add npnMemAlloc, npnMemFree and createNPString functions and
npnMemNew, npnMemNewArray function templates.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getOwnPropertyNames):
Use npnMemFree.
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::enumerate):
Use npnMemNewArray.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
Use createNPString.
* WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
(WebKit::npnMemAlloc):
Call malloc.
(WebKit::npnMemFree):
Call free.
(WebKit::createNPString):
Allocate the characters for a new NPString.
(WebKit::createNPObject):
Call npnMemNew.
(WebKit::deallocateNPObject):
Call npnMemFree.
(WebKit::releaseNPVariantValue):
Call npnMemFree.
* WebProcess/Plugins/Netscape/NPRuntimeUtilities.h:
(WebKit::npnMemNew):
(WebKit::npnMemNewArray):
Add new functions.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_MemAlloc):
Call npnMemAlloc.
(WebKit::NPN_MemFree):
Call npnMemFree.
(WebKit::NPN_UTF8FromIdentifier):
Call npnMemNewArray.
(WebKit::copyCString):
Call npnMemNewArray. Correctly initialize the "len" out parameter.
2010-11-02 Jessie Berlin <jberlin@apple.com>
Windows build fix. Unreviewed.
* win/WebKit2Generated.make:
Add WKInspector.h so that it is copied over to the WebKitBuild directory.
2010-11-02 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Add some support for remote and local NPObjects to NPRemoteObjectMap
https://bugs.webkit.org/show_bug.cgi?id=48864
* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
If the NPVariant contains an NPObject that isn't an NPObjectProxy, register it
and return its ID.
(WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
If the NPVariantData contains a remote object, create an NPObjectProxy and return it.
* Shared/Plugins/NPVariantData.cpp:
(WebKit::NPVariantData::NPVariantData):
Initialize m_localNPObjectIDValue and m_remoteNPObjectIDValue.
(WebKit::NPVariantData::makeLocalNPObjectID):
Create an NPVariantData that contains a local NPObject ID.
(WebKit::NPVariantData::encode):
Handle local and remote NPObject IDs.
(WebKit::NPVariantData::decode):
Decode local and remote NPObject IDs and "swap them" so an encoded remote NPObject ID is
decoded as a local NPObjectID (and vice versa).
* Shared/Plugins/NPVariantData.h:
(WebKit::NPVariantData::localNPObjectIDValue):
(WebKit::NPVariantData::remoteNPObjectIDValue):