blob: 9971651ea1664bdf8e5de0ed58fc89cd57447da9 [file] [log] [blame]
2013-05-15 Anders Carlsson <andersca@apple.com>
WKPageGetPluginInformationDisplayNameKey doesn't return the right key
https://bugs.webkit.org/show_bug.cgi?id=116188
Reviewed by Andreas Kling.
* UIProcess/API/C/WKPage.cpp:
(WKPageGetPluginInformationDisplayNameKey):
2013-05-15 Alexey Proskuryakov <ap@apple.com>
More fixing after WebProcessShim renaming in r149074.
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer): Updated a comment to mention the shim by its new name.
2013-05-15 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13902706> Lion: com.apple.tsm.uiserver sandbox error in Console when
launching Safari
Reviewed by Anders Carlsson.
* WebProcess/com.apple.WebProcess.sb.in: Silence the violation.
2013-05-13 Anders Carlsson <andersca@apple.com>
Frame::editor() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=116037
Reviewed by Darin Adler.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::searchWithGoogle):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::updateGlobalSelection):
* WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
(WebKit::WebEditorClient::handleInputMethodKeydown):
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::executePendingEditorCommands):
(WebKit::WebEditorClient::handleKeyboardEvent):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::searchWithGoogle):
(WebKit::WebContextMenuClient::searchWithSpotlight):
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::changeWordCase):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::selectionAsString):
(WebKit::WebFrame::setTextDirection):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
(WebKit::WebPage::executeEditingCommand):
(WebKit::WebPage::isEditingCommandEnabled):
(WebKit::WebPage::validateCommand):
(WebKit::WebPage::handleEditingKeyboardEvent):
(WebKit::WebPage::advanceToNextMisspelling):
(WebKit::WebPage::uppercaseWord):
(WebKit::WebPage::lowercaseWord):
(WebKit::WebPage::capitalizeWord):
(WebKit::WebPage::replaceSelectionWithText):
(WebKit::WebPage::handleAlternativeTextUIResult):
(WebKit::WebPage::setCompositionForTesting):
(WebKit::WebPage::hasCompositionForTesting):
(WebKit::WebPage::confirmCompositionForTesting):
(WebKit::WebPage::setComposition):
(WebKit::WebPage::cancelComposition):
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::WebPage::confirmComposition):
(WebKit::WebPage::setComposition):
(WebKit::WebPage::cancelComposition):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::executeKeypressCommandsInternal):
(WebKit::WebPage::handleEditingKeyboardEvent):
(WebKit::WebPage::setComposition):
(WebKit::WebPage::confirmComposition):
(WebKit::WebPage::cancelComposition):
(WebKit::WebPage::insertText):
(WebKit::WebPage::insertDictatedText):
(WebKit::WebPage::getMarkedRange):
(WebKit::WebPage::firstRectForCharacterRange):
(WebKit::WebPage::readSelectionFromPasteboard):
(WebKit::WebPage::getStringSelectionForPasteboard):
(WebKit::WebPage::getDataSelectionForPasteboard):
2013-05-15 Anders Carlsson <andersca@apple.com>
Need a way for NPAPI plug-ins to open preference panes
https://bugs.webkit.org/show_bug.cgi?id=116173
<rdar://problem/13503848>
Reviewed by Sam Weinig.
* PluginProcess/PluginControllerProxy.h:
Add openPluginPreferencePane().
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::openPluginPreferencePane):
Send OpenPluginPreferencePane to the UI process.
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::getPluginInfo):
Get the preference pane path.
* Shared/Plugins/PluginModuleInfo.h:
Add preferencePanePath member variable.
* UIProcess/Plugins/PluginProcessProxy.h:
Add openPluginPreferencePane message handler.
* UIProcess/Plugins/PluginProcessProxy.messages.in:
ADd OpenPluginPreferencePane message.
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::openPluginPreferencePane):
Get the path to the preference pane and use LS to open it.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
Handle WKNVPlugInContainer.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
Add WKNVPlugInContainer member variable.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::openPluginPreferencePane):
Call through to the plug-in controller.
(WebKit::NetscapePlugin::plugInContainer):
Create a WKNPAPIPlugInContainer object if necessary.
(WebKit::NetscapePlugin::platformDestroy):
Invalidate the WKNPAPIPlugInContainer object.
* WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.h:
New file with the protocol definition.
* WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm:
(-[WKNPAPIPlugInContainer dealloc]):
Assert that the plug-in is null (that we've been invalidated).
(-[WKNPAPIPlugInContainer _invalidate]):
Set the plug-in to null.
(-[WKNPAPIPlugInContainer openPlugInPreferencePane]):
Call through to the plug-in.
* WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainerInternal.h:
New file with the interface declaration for the object that implements the protocol.
* WebProcess/Plugins/PluginController.h:
Add openPluginPreferencePane member function.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::openPluginPreferencePane):
Add stub; this should never be called since we always go through the UI process.
2013-05-15 Alexey Proskuryakov <ap@apple.com>
[WK2][Mac] Split resetTextInputState into two functions
https://bugs.webkit.org/show_bug.cgi?id=116174
Reviewed by Anders Carlsson.
Splitting resetTextInputState into resetSecureInputState and
notifyInputContextAboutDiscardedComposition, paving the way for a fix where these
won't be happening simultaneously.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::resetSecureInputState):
(WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
* UIProcess/API/mac/WKView.mm:
(-[WKView resignFirstResponder]):
(-[WKView _resetSecureInputState]):
(-[WKView _notifyInputContextAboutDiscardedComposition]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
2013-05-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add padding to all public class structs for future expansion without breaking ABI
https://bugs.webkit.org/show_bug.cgi?id=112565
Reviewed by Anders Carlsson.
Use 4 pointers for most of the classes that are unlikely to grow
and 8 for WebKitWebView and WebKitWebContext.
* UIProcess/API/gtk/WebKitBackForwardList.h:
(_WebKitBackForwardListClass):
* UIProcess/API/gtk/WebKitBackForwardListItem.h:
(_WebKitBackForwardListItemClass):
* UIProcess/API/gtk/WebKitContextMenu.h:
(_WebKitContextMenuClass):
* UIProcess/API/gtk/WebKitContextMenuItem.h:
(_WebKitContextMenuItemClass):
* UIProcess/API/gtk/WebKitCookieManager.h:
(_WebKitCookieManagerClass):
* UIProcess/API/gtk/WebKitDownload.h:
(_WebKitDownloadClass):
* UIProcess/API/gtk/WebKitFaviconDatabase.h:
(_WebKitFaviconDatabaseClass):
* UIProcess/API/gtk/WebKitFileChooserRequest.h:
(_WebKitFileChooserRequestClass):
* UIProcess/API/gtk/WebKitFindController.h:
(_WebKitFindControllerClass):
* UIProcess/API/gtk/WebKitFormSubmissionRequest.h:
(_WebKitFormSubmissionRequestClass):
* UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h:
(_WebKitGeolocationPermissionRequestClass):
* UIProcess/API/gtk/WebKitHitTestResult.h:
(_WebKitHitTestResultClass):
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
(_WebKitNavigationPolicyDecisionClass):
* UIProcess/API/gtk/WebKitPlugin.h:
(_WebKitPluginClass):
* UIProcess/API/gtk/WebKitPolicyDecision.h:
(_WebKitPolicyDecisionClass):
* UIProcess/API/gtk/WebKitPrintOperation.h:
(_WebKitPrintOperationClass):
* UIProcess/API/gtk/WebKitResponsePolicyDecision.h:
(_WebKitResponsePolicyDecisionClass):
* UIProcess/API/gtk/WebKitSecurityManager.h:
(_WebKitSecurityManagerClass):
* UIProcess/API/gtk/WebKitSettings.h:
(_WebKitSettingsClass):
* UIProcess/API/gtk/WebKitURIRequest.h:
(_WebKitURIRequestClass):
* UIProcess/API/gtk/WebKitURIResponse.h:
(_WebKitURIResponseClass):
* UIProcess/API/gtk/WebKitURISchemeRequest.h:
(_WebKitURISchemeRequestClass):
* UIProcess/API/gtk/WebKitWebContext.h:
(_WebKitWebContextClass):
* UIProcess/API/gtk/WebKitWebInspector.h:
(_WebKitWebInspectorClass):
* UIProcess/API/gtk/WebKitWebResource.h:
(_WebKitWebResourceClass):
* UIProcess/API/gtk/WebKitWebView.h:
(_WebKitWebViewClass):
* UIProcess/API/gtk/WebKitWebViewBase.h:
(_WebKitWebViewBaseClass):
* UIProcess/API/gtk/WebKitWebViewGroup.h:
(_WebKitWebViewGroupClass):
* UIProcess/API/gtk/WebKitWindowProperties.h:
(_WebKitWindowPropertiesClass):
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
Remove WTF_USE_PLATFORM_STRATEGIES
https://bugs.webkit.org/show_bug.cgi?id=114431
Reviewed by Darin Adler.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
2013-05-14 Simon Cooper <scooper@apple.com>
Add a preference that can disable the fake SYSV SHM shim
https://bugs.webkit.org/show_bug.cgi?id=116127
<rdar://problem/13810524>
Reviewed by Alexey Proskuryakov.
* PluginProcess/mac/PluginProcessShim.mm:
(WebKit::shim_disabled):
(WebKit::shim_shmdt):
(WebKit::shim_shmat):
(WebKit::shim_shmget):
(WebKit::shim_shmctl):
2013-05-14 Tim Horton <timothy_horton@apple.com>
[wk2] Not updating tiled backing coverage when main frame scrollability changes
https://bugs.webkit.org/show_bug.cgi?id=116123
<rdar://problem/13836559>
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
Add updateMainFrameClipsToExposedRect.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
Remove m_clipsToExposedRect. We don't actually need it.
(WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
Call updateMainFrameClipsToExposedRect so that we can always update
tiled backing coverage and can factor out our calls to setClipsToExposedRect.
(WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
Factor out setClipsToExposedRect calls to here, and also call
FrameView::adjustTiledBackingCoverage so that the FrameView's tiled
backing is informed to allow overdraw in the UI-process-scrolling case.
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
Use updateMainFrameClipsToExposedRect.
2013-05-14 Alexey Proskuryakov <ap@apple.com>
[Mac] Add a testing shim for secure event input functions
https://bugs.webkit.org/show_bug.cgi?id=116122
Reviewed by Mark Rowe.
Moved DyldInterpose.h to WebCore, as we now use it there too.
* PluginProcess/mac/PluginProcessShim.mm:
* Shared/mac/CookieStorageShimLibrary.cpp:
* Shared/mac/DyldInterpose.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/mac/SecItemShimLibrary.mm:
2013-05-14 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Win] REGRESSION(r149944): mmap is not available on Windows
https://bugs.webkit.org/show_bug.cgi?id=116015
Reviewed by Anders Carlsson.
Use fastAlloc/fastFree for platforms other than OS(DARWIN) where
using mmap is not necessary and maybe not available.
* Platform/CoreIPC/ArgumentEncoder.cpp:
(CoreIPC::allocBuffer):
(CoreIPC::freeBuffer):
(CoreIPC::ArgumentEncoder::~ArgumentEncoder):
(CoreIPC::ArgumentEncoder::grow):
2013-05-14 Zan Dobersek <zdobersek@igalia.com>
[GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
https://bugs.webkit.org/show_bug.cgi?id=115921
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Add platform_cppflags to the list of libwebkit2gtk CPPFLAGS.
2013-05-14 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[WK2][Win] Fix ASSERT(DeleteTimerQueueTimer...)
https://bugs.webkit.org/show_bug.cgi?id=116039
Reviewed by Benjamin Poulain.
According to the documentation, DeleteTimerQueueTimer can be expected to return
false with an ERROR_IO_PENDING error when called from the timer's callback.
* Platform/win/WorkQueueWin.cpp:
(WorkQueue::timerCallback):
2013-05-14 Alexey Proskuryakov <ap@apple.com>
Remove unused "type" field from DictionaryPopupInfo
https://bugs.webkit.org/show_bug.cgi?id=116011
Reviewed by Darin Adler.
It is unused, and furthermore, PDFPlugin sets it incorrectly anyway.
* Shared/DictionaryPopupInfo.cpp:
(WebKit::DictionaryPopupInfo::encode):
(WebKit::DictionaryPopupInfo::decode):
* Shared/DictionaryPopupInfo.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::showDefinitionForAttributedString):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::lookUpInDictionary):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupForRange):
2013-05-14 Michael BrĂĽning <michael.bruning@digia.com>
[WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters().
https://bugs.webkit.org/show_bug.cgi?id=110218
Reviewed by Darin Adler.
Make the WebPageProxy::creationParameters use the accessor
deviceScaleFactor() instead of using m_intrinsicDeviceScaleFactor
directly. This will restore the custom device scale factor when
reattaching to the WebProcess after a crash.
Moreover, it will enable the Qt and ELF ports to use the
existing C API for overriding the device scale factor instead
of using the WebPageProxy directly or adding new C API to set
the intrinsic device scale factor.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::setDeviceScaleFactor):
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::updatePaintNode):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
2013-05-13 Alex Christensen <achristensen@apple.com>
Added testRunner.setPrinting.
https://bugs.webkit.org/show_bug.cgi?id=42693
rdar://problem/8213845
Reviewed by Darin Adler.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCopyRenderTreeExternalRepresentationForPrinting): Added.
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
Added WKBundlePageCopyRenderTreeExternalRepresentationForPrinting declaration.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::renderTreeExternalRepresentationForPrinting): Added.
* WebProcess/WebPage/WebPage.h:
Added renderTreeExternalRepresentationForPrinting declaration.
2013-05-13 Timothy Hatcher <timothy@apple.com>
Add support for updating the Web Inspector toolbar height.
https://bugs.webkit.org/show_bug.cgi?id=115996
Reviewed by Joseph Pecoraro and Benjamin Poulain.
* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::setToolbarHeight):
(WebInspectorProxy):
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformSetToolbarHeight):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformSetToolbarHeight):
(WebKit):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformSetToolbarHeight):
* UIProcess/qt/WebInspectorProxyQt.cpp:
(WebKit::WebInspectorProxy::platformSetToolbarHeight):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::setToolbarHeight):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
(WebInspectorFrontendClient):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::setToolbarHeight):
* WebProcess/WebPage/WebInspector.h:
2013-05-13 Ryosuke Niwa <rniwa@webkit.org>
Sometimes NSUndoManager can get into an inconsistent state
https://bugs.webkit.org/show_bug.cgi?id=116050
Reviewed by Enrica Casucci.
Always group undo items to work around a bug in NSUndoManager that manifests
when we call removeAllActionsWithTarget.
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::registerEditCommand):
2013-05-13 Anders Carlsson <andersca@apple.com>
[WK2] Crash in WebKit::StorageAreaMap::didSetItem()
https://bugs.webkit.org/show_bug.cgi?id=116026
Reviewed by Andreas Kling.
Make sure that we ignore any leftover messages from the UI process after we've reset
the storage map. Achieve this by keeping a seed count in the StorageAreaMap object that's incremented
everytime the map is reset. Associate every storage area change with the seed and ignore any incoming
notification messages from the UI process if the seeds are different.
* Platform/CoreIPC/HandleMessage.h:
(CoreIPC):
(CoreIPC::callMemberFunction):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getValues):
(WebKit::StorageManager::setItem):
(WebKit::StorageManager::removeItem):
(WebKit::StorageManager::clear):
* UIProcess/Storage/StorageManager.h:
(StorageManager):
* UIProcess/Storage/StorageManager.messages.in:
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::StorageAreaMap):
(WebKit::StorageAreaMap::setItem):
(WebKit::StorageAreaMap::removeItem):
(WebKit::StorageAreaMap::clear):
(WebKit::StorageAreaMap::resetValues):
(WebKit::StorageAreaMap::loadValuesIfNeeded):
(WebKit::StorageAreaMap::didGetValues):
(WebKit::StorageAreaMap::didSetItem):
(WebKit::StorageAreaMap::didRemoveItem):
(WebKit::StorageAreaMap::didClear):
(WebKit::StorageAreaMap::applyChange):
* WebProcess/Storage/StorageAreaMap.h:
(StorageAreaMap):
* WebProcess/Storage/StorageAreaMap.messages.in:
2013-05-13 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[WK2][CoordinatedGraphics] Avoid dispensable calls to WebView::updateViewportSize()
https://bugs.webkit.org/show_bug.cgi?id=116045
Reviewed by Darin Adler.
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::setSize):
2013-05-13 Jon Lee <jonlee@apple.com>
[WK2] Notification manager removal should not be tied to termination of web processes
https://bugs.webkit.org/show_bug.cgi?id=116038
<rdar://problem/10968680>
Reviewed by Ryosuke Niwa.
WebNotificationManagerProxy incorrectly removes the manager when web processes close.
Since it is a supplemental on the web context, the manager should only be removed
when the context is destroyed.
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
* UIProcess/Notifications/WebNotificationManagerProxy.h: Remove implementation of
processDidClose().
2013-05-13 Martin Robinson <mrobinson@igalia.com>
[GTK] [WebKit2] Use a template file for generated GObject enum files
https://bugs.webkit.org/show_bug.cgi?id=115867
Reviewed by Carlos Garcia Campos.
* GNUmakefile.am: Use a template file instead of specifying portions of the file on the command-line.
* UIProcess/API/gtk/WebKitEnumTypes.cpp.template: Added.
* UIProcess/API/gtk/WebKitEnumTypes.h.template: Added.
* UIProcess/API/gtk/WebKitFindController.cpp: We can no longer rely on WebKitEnumTypes.h to pull in WebKitWebView.h.
2013-05-13 Noam Rosenthal <noam@webkit.org>
[CoordGfx] requestAnimationFrame performance issues
https://bugs.webkit.org/show_bug.cgi?id=112345
Reviewed by Jocelyn Turcotte.
Changed the logic of requestAnimationFrame in Coordinated Graphics.
We don't send any IPC messages for requestAnimationFrame. Instead, we do one of two things:
- If there is already a frame pending in the UI process, do nothing, as the animations would
be serviced when the frame is returned to the web process.
- If there is no frame pending, we schedule a flush, making sure that that flush occurs at
least 1/60 seconds after the last animation service, so that we don't get an infinite loop
of flushes.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::requestAnimationFrame):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
(WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in:
2013-05-13 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[WK2][CoordinatedGraphics] WKView needs API for handling opacity
https://bugs.webkit.org/show_bug.cgi?id=116032
Reviewed by Kenneth Rohde Christiansen.
Add WKViewSetOpacity and WKViewOpacity APIs and use them in
WebView.cpp.
* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewSetOpacity):
(WKViewOpacity):
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::WebView):
(WebKit::WebView::paintToCurrentGLContext):
* UIProcess/CoordinatedGraphics/WebView.h:
(WebKit::WebView::setOpacity):
(WebKit::WebView::opacity):
(WebView):
2013-05-13 Zan Dobersek <zdobersek@igalia.com>
[GTK] Use WebCore layer archives for TestWebCore, WebKitPluginProcess
https://bugs.webkit.org/show_bug.cgi?id=115918
Reviewed by Gustavo Noronha Silva.
Due to layer violations and circular dependencies the WebKitPluginProcess requires for the
libraries containing the built code of the intertwining Platform and WebCore layers to be
specified multiple times when linking. This can be avoided by packing the two layers' archives
into one big archive, named after the WebCore layer due to no clear boundary between it and the
Platform layer. The big archive can then be specified only once when linking, simplifying the code
and suppressing all the layering violations so they do not cause build problems.
First the libtool libraries that the WebCore layer (as required by the WebKitPluginProcess) depends on
are specified. These are then used as dependencies for the archive creation rule as well as the list
from which the archive file paths are constructed and then used to dump the member files from these archives.
The member files are then added to the big archive. The latter is added to the list of libraries the
WebKitPluginProcess requires to successfully link.
* GNUmakefile.am:
2013-05-13 Zalan Bujtas <zalan@apple.com>
WebProcess consuming very high CPU on linkedin.com
https://bugs.webkit.org/show_bug.cgi?id=115601
Reviewed by Andreas Kling.
Disable WEB_TIMING_MINIMAL.
Turn off window.performance and performance.now(). Some JS frameworks expect
additional Web Timing APIs, when performance.now() is available.
* Configurations/FeatureDefines.xcconfig:
2013-05-12 Anders Carlsson <andersca@apple.com>
Stop including UnusedParam.h
https://bugs.webkit.org/show_bug.cgi?id=116003
Reviewed by Sam Weinig.
UnusedParam.h is empty now so there's no need to include it anymore.
* UIProcess/API/C/WKContext.cpp:
* UIProcess/API/C/WKInspector.cpp:
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/efl/ewk_text_checker.cpp:
* UIProcess/API/efl/ewk_view.cpp:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
* UIProcess/mac/WKFullScreenWindowController.mm:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2013-05-12 Andreas Kling <akling@apple.com>
Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
<http://webkit.org/b/115988>
<rdar://problem/13870943>
Reviewed by Anders Carlsson.
Let WebCore control the UI process's suppression of the sudden termination mechanism.
This is implemented by having WebChromeClient push Enable/DisableSuddenTermination messages
over to the UI process where the appropriate NSProcessInfo calls are made.
We also use this information when deciding whether to insta-kill a web process when its last
page is closed. This mechanism is re-usable in WebCore to protect against sudden termination
by the UI process.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::removeWebPage):
(WebKit::WebProcessProxy::enableSuddenTermination):
(WebKit::WebProcessProxy::disableSuddenTermination):
* UIProcess/WebProcessProxy.h:
(WebProcessProxy):
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::enableSuddenTermination):
(WebKit::WebChromeClient::disableSuddenTermination):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient):
2013-05-12 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13402976> Sandbox violations in com.nvidia.OpenGL on Lion.
Reviewed by Dan Bernstein.
* WebProcess/com.apple.WebProcess.sb.in: Silence the violations (on Lion only).
2013-05-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=115914
Reviewed by Martin Robinson.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize):
2013-05-12 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Unreviewed build fix after r149944.
* Platform/CoreIPC/ArgumentEncoder.cpp: Include <sys/mman.h> for mmap(2).
2013-05-11 Anders Carlsson <andersca@apple.com>
Don't pass malloced pointers as out-of-line data when sending Mach messages
https://bugs.webkit.org/show_bug.cgi?id=115970
<rdar://problem/13144680>
Reviewed by Sam Weinig.
Give ArgumentEncoder an inline buffer of 512 bytes. If we need more than that, use mmap to allocate data
since that gives us fresh zero-filled memory that we can safely share.
* Platform/CoreIPC/ArgumentEncoder.cpp:
(CoreIPC::ArgumentEncoder::ArgumentEncoder):
Set up the buffer pointers to point to the inline buffer.
(CoreIPC::ArgumentEncoder::~ArgumentEncoder):
Unmap the buffer if necessary.
(CoreIPC::ArgumentEncoder::grow):
Grow the allocation exponentially, rounded up to the nearest page. This is a simplification from the
current strategy, but most messages are either tiny in which case they will fit inside the inline buffer,
or big in which case we'll end up doing less allocations + memory copying.
* Platform/CoreIPC/ArgumentEncoder.h:
(ArgumentEncoder):
2013-05-11 Zan Dobersek <zdobersek@igalia.com>
Unreviewed GTK build fix after r149904.
* GNUmakefile.list.am: Adding missing build targets.
2013-05-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed, Fix WK2 EFL build after r149904.
Add new PluginInformation.cpp file to CMake.
* CMakeLists.txt:
2013-05-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed, fix WK2 EFL build after r149904.
Add new WKPluginInformation.cpp file to CMake.
* CMakeLists.txt:
2013-05-11 Andreas Kling <akling@apple.com>
When possible, terminate web processes immediately when closing their last page.
<http://webkit.org/b/115964>
<rdar://problem/13869266>
Reviewed by Geoffrey Garen.
When we're using a network process, there's no need for the UI process to wait for web processes
to clear resource caches and terminate nicely.
We can just kill them off right away in WebProcessProxy::removeWebPage() when the last page is closed.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):
Terminate the child process immediately if possible.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::canTerminateChildProcess):
(WebKit::WebProcessProxy::shouldTerminate):
Broke out the logic from the shouldTerminate() IPC message handler into a separate function
so we can call it from removeWebPage().
2013-05-11 Anders Carlsson <andersca@apple.com>
Crash when terminating a process that has not been fully launched
https://bugs.webkit.org/show_bug.cgi?id=115962
<rdar://problem/13660916>
Reviewed by Andreas Kling.
Handle terminating a process that has not been fully launched.
* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::ProcessLauncher::didFinishLaunchingProcess):
If we have been invalidated, dispose the connection identifier.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::terminateProcess):
If we're still launching the process, invalidate so the client won't get an unexpected
didFinishLaunching callback.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::requestTermination):
Check if webConnection() is null before calling it. (It will be null if the process isn't fully launched).
2013-05-10 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: Implement WK2 version of WebInspectorFrontendClient::save
https://bugs.webkit.org/show_bug.cgi?id=115564
Reviewed by Benjamin Poulain.
Implement InspectorFrontendHost's save() and append() methods for
Mac WebKit2. Add canSave() for all ports.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::save):
(WebKit):
(WebKit::WebInspectorProxy::append):
* UIProcess/WebInspectorProxy.h:
(WebInspectorProxy):
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformSave):
(WebKit):
(WebKit::WebInspectorProxy::platformAppend):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformSave):
(WebKit):
(WebKit::WebInspectorProxy::platformAppend):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformSave):
(WebKit):
(WebKit::WebInspectorProxy::platformAppend):
* UIProcess/qt/WebInspectorProxyQt.cpp:
(WebKit::WebInspectorProxy::platformSave):
(WebKit):
(WebKit::WebInspectorProxy::platformAppend):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::canSave):
(WebKit):
(WebKit::WebInspectorFrontendClient::save):
(WebKit::WebInspectorFrontendClient::append):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
(WebInspectorFrontendClient):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::save):
(WebKit):
(WebKit::WebInspector::append):
(WebKit::WebInspector::didSave):
(WebKit::WebInspector::didAppend):
* WebProcess/WebPage/WebInspector.h:
(WebInspector):
* WebProcess/WebPage/WebInspector.messages.in:
* WebProcess/WebPage/efl/WebInspectorEfl.cpp:
(WebKit::WebInspector::canSave):
(WebKit):
* WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
(WebKit::WebInspector::canSave):
(WebKit):
* WebProcess/WebPage/mac/WebInspectorMac.mm:
(WebKit::WebInspector::canSave):
(WebKit):
* WebProcess/WebPage/qt/WebInspectorQt.cpp:
(WebKit::WebInspector::canSave):
(WebKit):
2013-05-10 Remy Demarest <rdemarest@apple.com>
Copy WKPluginInformation.h header to the WebKit2 Framework private headers.
https://bugs.webkit.org/show_bug.cgi?id=115940
Reviewed by Darin Adler.
* WebKit2.xcodeproj/project.pbxproj:
Move WKPluginInformation.h file from the framework's Project Headers to
Private Headers.
2013-05-10 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt][Mac] Unreviewed. Roll out the fix attempt in r149912.
* Target.pri:
2013-05-10 Simon Cooper <scooper@apple.com>
Fix AppleConnect issues for WiFi interfaces
<rdar://problem/13776227&13776240&13776281>
https://bugs.webkit.org/show_bug.cgi?id=115932
Reviewed by Alexey Proskuryakov.
Add support for WiFi interfaces for the AppleConnect plugin.
Remove the FIXME.
* Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
2013-05-10 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt][Mac] Unreviewed speculative build fix after r149904.
* Target.pri:
2013-05-10 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt] Unreviewed buildfix after r149904.
* Target.pri:
2013-05-09 Sam Weinig <sam@webkit.org>
Unify plug-in information dictionaries
<rdar://problem/13852080>
https://bugs.webkit.org/show_bug.cgi?id=115891
Reviewed by Anders Carlsson.
This unifies the plug-in information dictionaries vended by WKContextCopyPlugInInfoForBundleIdentifier
and WKContextGetInfoForInstalledPlugIns with those from the WKPageLoaderClient and WKPageUIClient.
All the old keys will continue to work, but have been deprecated in favor of new keys defined in
WKPluginInformation.h
* Shared/API/c/WKPluginInformation.cpp: Added.
* Shared/API/c/WKPluginInformation.h: Added.
Export new keys as SPI.
* Shared/Plugins/Netscape/PluginInformation.h: Added.
* Shared/Plugins/Netscape/PluginInformation.cpp: Added.
(WebKit::pluginInformationBundleIdentifierKey):
(WebKit::pluginInformationBundleVersionKey):
(WebKit::pluginInformationPathKey):
(WebKit::pluginInformationDisplayNameKey):
(WebKit::pluginInformationDefaultLoadPolicyKey):
(WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
(WebKit::pluginInformationHasSandboxProfileKey):
(WebKit::pluginInformationFrameURLKey):
(WebKit::pluginInformationMIMETypeKey):
(WebKit::pluginInformationPageURLKey):
(WebKit::pluginInformationPluginspageAttributeURLKey):
(WebKit::pluginInformationPluginURLKey):
Add new keys.
(WebKit::pluginModuleInformation):
(WebKit::createPluginInformationDictionary):
Add creation functions to simplify multiple sites.
* Shared/Plugins/Netscape/mac/PluginInformationMac.mm: Added.
(WebKit::platformPluginModuleInformation):
Add platform specific data to the dictionary.
* UIProcess/API/C/WKPage.cpp:
(WKPageGetPluginInformationBundleIdentifierKey):
(WKPageGetPluginInformationBundleVersionKey):
(WKPageGetPluginInformationDisplayNameKey):
(WKPageGetPluginInformationFrameURLKey):
(WKPageGetPluginInformationMIMETypeKey):
(WKPageGetPluginInformationPageURLKey):
(WKPageGetPluginInformationPluginspageAttributeURLKey):
(WKPageGetPluginInformationPluginURLKey):
* UIProcess/API/C/WKPage.h:
Deprecate the old keys.
* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextCopyPlugInInfoForBundleIdentifier):
(WKContextGetInfoForInstalledPlugIns):
Simplify by using the new createPluginInformationDictionary functions.
(WKPlugInInfoPathKey):
(WKPlugInInfoBundleIdentifierKey):
(WKPlugInInfoVersionKey):
(WKPlugInInfoLoadPolicyKey):
(WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
(WKPlugInInfoIsSandboxedKey):
Deprecate the old keys.
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didFailToInitializePlugin):
(WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
(WebKit::WebLoaderClient::pluginLoadPolicy):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::unavailablePluginButtonClicked):
* UIProcess/WebUIClient.h:
Optimize for the most recent callback type which takes a dictionary,
and pull out the necessary bits from it for deprecated callbacks as necessary.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::unavailablePluginButtonClicked):
(WebKit::WebPageProxy::didFailToInitializePlugin):
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
Use createPluginInformationDictionary() consistently, to get consistent results for callbacks.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2013-05-10 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: implement runOpenPanel callback for WebKit2 inspector
https://bugs.webkit.org/show_bug.cgi?id=115865
Reviewed by Sam Weinig.
* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::inspectorWindow):
Add an accessor for m_inspectorWindow.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::runOpenPanel):
Show the open panel dialog when requested.
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
Register the callback when the inspector page is created.
2013-05-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[WK2][CoordinatedGraphics] WKViewSetThemePath is EFL specific
https://bugs.webkit.org/show_bug.cgi?id=115928
Reviewed by Kenneth Rohde Christiansen.
WKViewSetThemePath was moved to WKViewEfl.h since it is EFL specific.
* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/API/C/efl/WKViewEfl.cpp:
(WKViewSetThemePath):
* UIProcess/API/C/efl/WKViewEfl.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
* UIProcess/CoordinatedGraphics/WebView.h:
(WebView):
* UIProcess/efl/ViewClientEfl.cpp:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebViewEfl::setThemePath):
* UIProcess/efl/WebViewEfl.h:
(WebViewEfl):
2013-05-10 Jer Noble <jer.noble@apple.com>
REGRESSION (r149439): Video turns blank upon entering full screen for the first time
https://bugs.webkit.org/show_bug.cgi?id=115617
Reviewed by Eric Carlson.
Partially revert the change introduced in r149439 for OS X 10.8 and previous. On these
platforms, create a window with a NSZeroSize initial frame, which fixes the "blank"
first-full screen behavior.
* UIProcess/API/mac/WKView.mm:
(-[WKView createFullScreenWindow]):
2013-05-10 Zan Dobersek <zdobersek@igalia.com>
[WK2] Make the WebSoupRequestManager a supplement to the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=115717
Reviewed by Andreas Kling.
WebSoupRequestManager should inherit from WebProcessSupplement and should be used as such
by the WebProcess. This removes the need for the m_soupRequestManager member variable in
the WebProcess class and brings the WebSoupRequestManager in line with other manager classes
of which instances are controlled by the WebProcess class.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Add the WebSoupRequestManager as a supplement.
* WebProcess/WebProcess.h:
(WebProcess): Remove the m_soupRequestManager member variable and its getter method.
* WebProcess/soup/WebKitSoupRequestGeneric.cpp:
(webkitSoupRequestGenericSendAsync): Access the WebSoupRequestManager as a supplement.
(webkitSoupRequestGenericSendFinish): Ditto.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess): Access the WebSoupRequestManager as a supplement.
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit::WebSoupRequestManager::supplementName): Specify the supplement's name.
* WebProcess/soup/WebSoupRequestManager.h:
(WebSoupRequestManager): Inherit from the WebProcessSupplement interface.
2013-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=115904
Reviewed by Martin Robinson.
* UIProcess/API/gtk/tests/TestInspectorServer.cpp:
(startTestServerMonitor):
* UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
(startTestServerMonitor):
2013-05-09 Anders Carlsson <andersca@apple.com>
Fix build.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
2013-05-09 Anders Carlsson <andersca@apple.com>
Enable UI process storage
https://bugs.webkit.org/show_bug.cgi?id=115879
<rdar://problem/12239765>
Reviewed by Beth Dakin.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
Flip the switch.
2013-05-09 Anders Carlsson <andersca@apple.com>
Remove extra spaces between right angle brackets in template declarations
https://bugs.webkit.org/show_bug.cgi?id=115877
Reviewed by Beth Dakin.
C++11 doesn't require spaces between right angle brackets so remove all of them.
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerBlobURL):
(WebKit::NetworkBlobRegistry::sandboxExtensions):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
(NetworkBlobRegistry):
* NetworkProcess/HostRecord.h:
(HostRecord):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::registerBlobURL):
* NetworkProcess/NetworkConnectionToWebProcess.h:
(NetworkConnectionToWebProcess):
* NetworkProcess/NetworkProcess.h:
(NetworkProcess):
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::servePendingRequests):
(WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
* NetworkProcess/NetworkResourceLoadScheduler.h:
* NetworkProcess/SchedulableLoader.cpp:
(WebKit::SchedulableLoader::SchedulableLoader):
* NetworkProcess/SchedulableLoader.h:
(SchedulableLoader):
* Platform/CoreIPC/ArgumentCoders.h:
* Platform/CoreIPC/Connection.cpp:
(Connection::SyncMessageState):
(CoreIPC::Connection::waitForMessage):
(CoreIPC::Connection::processIncomingMessage):
* Platform/CoreIPC/Connection.h:
(Connection):
* Platform/WorkQueue.h:
(WorkQueue):
* PluginProcess/PluginProcess.h:
(PluginProcess):
* Scripts/webkit2/messages_unittest.py:
(CoreIPC):
* Shared/BlockingResponseMap.h:
(BlockingResponseMap):
* Shared/ChildProcessProxy.h:
(ChildProcessProxy):
* Shared/ImmutableArray.cpp:
(WebKit::ImmutableArray::ImmutableArray):
* Shared/ImmutableArray.h:
(WebKit::ImmutableArray::adopt):
(ImmutableArray):
* Shared/ImmutableDictionary.cpp:
(WebKit::ImmutableDictionary::keys):
* Shared/ImmutableDictionary.h:
(ImmutableDictionary):
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
(CustomProtocolManager):
* Shared/SecurityOriginData.cpp:
(WebKit::performAPICallbackWithSecurityOriginDataVector):
* Shared/SessionState.cpp:
* Shared/StatisticsData.h:
(StatisticsData):
* Shared/UserMessageCoders.h:
(WebKit::UserMessageDecoder::baseDecode):
* Shared/WebArchive.cpp:
(WebKit::WebArchive::WebArchive):
(WebKit::WebArchive::subresources):
(WebKit::WebArchive::subframeArchives):
* Shared/WebContextMenuItem.cpp:
(WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
* Shared/WebOpenPanelParameters.cpp:
(WebKit::WebOpenPanelParameters::acceptMIMETypes):
(WebKit::WebOpenPanelParameters::selectedFileNames):
* Shared/mac/ArgumentCodersMac.mm:
(CoreIPC::encode):
* SharedWorkerProcess/SharedWorkerProcess.h:
(SharedWorkerProcess):
* UIProcess/API/mac/WKPrintingView.h:
(WebFrameProxy):
* UIProcess/API/mac/WKPrintingView.mm:
(-[WKPrintingView _drawPreview:]):
* UIProcess/API/mac/WKView.mm:
(WebKit):
* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::processDidClose):
* UIProcess/Downloads/DownloadProxyMap.h:
(DownloadProxyMap):
* UIProcess/GeolocationPermissionRequestManagerProxy.h:
(GeolocationPermissionRequestManagerProxy):
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
(DynamicLinkerEnvironmentExtractor):
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
(CustomProtocolManagerProxy):
* UIProcess/Network/NetworkProcessProxy.h:
(NetworkProcessProxy):
* UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h:
(NotificationPermissionRequestManagerProxy):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
(WebNotificationManagerProxy):
* UIProcess/Plugins/PluginProcessManager.h:
(PluginProcessManager):
* UIProcess/Plugins/PluginProcessProxy.h:
(PluginProcessProxy):
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::didGetSitesWithData):
* UIProcess/Plugins/WebPluginSiteDataManager.h:
(WebPluginSiteDataManager):
* UIProcess/SharedWorkers/SharedWorkerProcessManager.h:
(SharedWorkerProcessManager):
* UIProcess/SharedWorkers/SharedWorkerProcessProxy.h:
(SharedWorkerProcessProxy):
* UIProcess/StatisticsRequest.cpp:
(WebKit::StatisticsRequest::completedRequest):
* UIProcess/Storage/StorageManager.cpp:
(StorageManager::StorageArea):
(WebKit::StorageManager::StorageArea::dispatchEvents):
(StorageManager::SessionStorageNamespace):
(WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::SessionStorageNamespace::cloneTo):
(WebKit::StorageManager::createLocalStorageMap):
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::destroyStorageMap):
(WebKit::StorageManager::invalidateConnectionInternal):
(WebKit::StorageManager::findStorageArea):
(WebKit::StorageManager::getOrCreateLocalStorageNamespace):
* UIProcess/Storage/StorageManager.h:
(StorageManager):
* UIProcess/WebApplicationCacheManagerProxy.h:
(WebApplicationCacheManagerProxy):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addItem):
(WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
(WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
(WebKit::WebBackForwardList::clear):
* UIProcess/WebBackForwardList.h:
(WebKit):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::enableProcessTermination):
(WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
* UIProcess/WebContext.h:
(WebContext):
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
* UIProcess/WebCookieManagerProxy.h:
(WebCookieManagerProxy):
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
* UIProcess/WebDatabaseManagerProxy.h:
(WebDatabaseManagerProxy):
* UIProcess/WebFormClient.cpp:
(WebKit::WebFormClient::willSubmitForm):
* UIProcess/WebFormClient.h:
(WebFormClient):
* UIProcess/WebKeyValueStorageManagerProxy.h:
(WebKeyValueStorageManagerProxy):
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didChangeBackForwardList):
* UIProcess/WebLoaderClient.h:
(WebLoaderClient):
* UIProcess/WebMediaCacheManagerProxy.cpp:
(WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
* UIProcess/WebMediaCacheManagerProxy.h:
(WebMediaCacheManagerProxy):
* UIProcess/WebPageContextMenuClient.cpp:
(WebKit::WebPageContextMenuClient::showContextMenu):
* UIProcess/WebPageProxy.cpp:
(ExceededDatabaseQuotaRecords):
(WebKit::WebPageProxy::relatedPages):
(WebKit::WebPageProxy::didChangeBackForwardList):
(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::processNextQueuedWheelEvent):
(WebKit::WebPageProxy::findStringMatches):
(WebKit::WebPageProxy::willSubmitForm):
(WebKit::WebPageProxy::pluginInformationDictionary):
(WebKit::WebPageProxy::didFindStringMatches):
(WebKit::WebPageProxy::didReceiveEvent):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::disconnect):
(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::didBecomeUnresponsive):
(WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive):
(WebKit::WebProcessProxy::didBecomeResponsive):
(WebKit::WebProcessProxy::disconnectFramesFromPage):
(WebKit::WebProcessProxy::frameCountInPage):
* UIProcess/WebProcessProxy.h:
(WebProcessProxy):
* UIProcess/WebResourceCacheManagerProxy.h:
(WebResourceCacheManagerProxy):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::populateNSMenu):
(WebKit::nsMenuItemVector):
* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
(WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
* WebProcess/Geolocation/WebGeolocationManager.cpp:
(WebKit::WebGeolocationManager::didChangePosition):
(WebKit::WebGeolocationManager::didFailToDeterminePosition):
* WebProcess/IconDatabase/WebIconDatabaseProxy.h:
(WebIconDatabaseProxy):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::originsWithApplicationCache):
* WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
(WebKit::InjectedBundleBackForwardListItem::children):
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
(WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
(InjectedBundlePageEditorClient):
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
(WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
(WebKit::InjectedBundlePageFormClient::willSubmitForm):
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
(InjectedBundlePageFormClient):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::internallyFailedLoadTimerFired):
(WebKit::WebResourceLoadScheduler::networkProcessCrashed):
* WebProcess/Network/WebResourceLoadScheduler.h:
(WebResourceLoadScheduler):
* WebProcess/Notifications/NotificationPermissionRequestManager.h:
(NotificationPermissionRequestManager):
* WebProcess/Notifications/WebNotificationManager.h:
(WebNotificationManager):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::invalidate):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
(NPRuntimeObjectMap):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::stopAllStreams):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
(NetscapePlugin):
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
(NetscapePluginStream):
* WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
(getAllScriptsInPDFDocument):
(WebKit::SimplePDFPlugin::runScriptsInPDFDocument):
* WebProcess/Plugins/PluginProcessConnectionManager.h:
(PluginProcessConnectionManager):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::cancelAllStreams):
* WebProcess/Plugins/PluginView.h:
(PluginView):
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::dispatchLocalStorageEvent):
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::storageArea):
* WebProcess/Storage/StorageNamespaceImpl.h:
(StorageNamespaceImpl):
* WebProcess/Storage/WebKeyValueStorageManager.cpp:
(WebKit::keyValueStorageOriginIdentifiers):
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::getDatabasesByOrigin):
(WebKit::WebDatabaseManager::getDatabaseOrigins):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::getClientPasteboardDataForRange):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::documentFragmentFromAttributedString):
* WebProcess/WebPage/EventDispatcher.h:
(EventDispatcher):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findStringMatches):
* WebProcess/WebPage/FindController.h:
(FindController):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::childFrames):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::trackedRepaintRects):
* WebProcess/WebPage/WebPage.h:
(WebKit):
(WebPage):
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::visitedLinkStateChanged):
(WebKit::WebProcess::allVisitedLinkStateChanged):
(WebKit::WebProcess::focusedWebPage):
(WebKit::WebProcess::createWebPage):
(WebKit::WebProcess::didClose):
(WebKit::WebProcess::webPageGroup):
(WebKit::addCaseFoldedCharacters):
(WebKit::getWebCoreMemoryCacheStatistics):
(WebKit::WebProcess::setTextCheckerState):
* WebProcess/WebProcess.h:
(WebProcess):
2013-05-09 Anders Carlsson <andersca@apple.com>
Implement WebPlatformStrategies::transientLocalStorageNamespace
https://bugs.webkit.org/show_bug.cgi?id=115876
<rdar://problem/13852871>
Reviewed by Beth Dakin.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
Return a session storage namespace for a random page when UI process storage is enabled,
otherwise call the base class implementation.
2013-05-09 Anders Carlsson <andersca@apple.com>
Use explicit qualifiers for names in the std:: namespace
https://bugs.webkit.org/show_bug.cgi?id=115868
Reviewed by Andreas Kling.
* Shared/mac/ArgumentCodersMac.mm:
(CoreIPC::encode):
* UIProcess/API/C/WKPluginSiteDataManager.cpp:
(WKPluginSiteDataManagerClearAllSiteData):
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::findPluginForExtension):
* UIProcess/WebFrameProxy.cpp:
* UIProcess/WebProcessProxy.cpp:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::parsePostBuffer):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::loadURL):
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
(WebKit::NetscapePluginStream::deliverDataToPlugin):
* WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::countStringMatches):
(WebKit::FindController::updateFindUIAfterPageScroll):
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::drawPDFPage):
* WebProcess/mac/WebProcessMac.mm:
2013-05-09 Max Feil <mfeil@rim.com>
shouldUsePluginDocument() needs to be respected when a document is created
https://bugs.webkit.org/show_bug.cgi?id=110308
Reviewed by Rob Buis.
Renaming shouldUsePluginDocument() to shouldAlwaysUsePluginDocument()
for clarity.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldAlwaysUsePluginDocument):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
(WebFrameLoaderClient):
2013-05-09 Timothy Hatcher <timothy@apple.com>
Make dragging off a tab in Safari with a docked Inspector reattach the Inspector.
https://webkit.org/b/115832
rdar://problem/13605661
Reviewed by Benjamin Poulain.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformBringToFront):
If the Web Inspector is no longer in the same window as the inspected view,
then we need to reopen the Inspector to get it attached to the right window.
2013-05-08 Anders Carlsson <andersca@apple.com>
Fix a typo in a comment.
Rubber-stamped by Darin Adler.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection):
2013-05-08 Anders Carlsson <andersca@apple.com>
Remove bogus StorageAreaMap assertions
https://bugs.webkit.org/show_bug.cgi?id=115838
Reviewed by Sam Weinig.
It is possible for didGetValues, and didClear to be called even if m_hasPendingClear is false so remove the assertions.
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::didGetValues):
(WebKit::StorageAreaMap::didClear):
2013-05-08 Anders Carlsson <andersca@apple.com>
Handle incoming clear operations
https://bugs.webkit.org/show_bug.cgi?id=115829
Reviewed by Sam Weinig.
Handle clear by building up a new storage map with our pending changes.
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::applyChange):
2013-05-08 Anders Carlsson <andersca@apple.com>
Don't apply changes while we're clearing the database
https://bugs.webkit.org/show_bug.cgi?id=115826
Reviewed by Darin Adler.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::openDatabase):
Only call didOpenDatabaseWithOrigin if we actually did open the database.
(WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
Create the database if needed.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getValues):
Send back a DidGetValues message.
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::StorageAreaMap):
Initialize m_hasPendingClear.
(WebKit::StorageAreaMap::clear):
Set m_hasPendingClear to true.
(WebKit::StorageAreaMap::resetValues):
Set m_hasPendingClear back to false.
(WebKit::StorageAreaMap::loadValuesIfNeeded):
Set m_hasPendingClear to true so we'll ignore any changes that are already part of the returned items.
(WebKit::StorageAreaMap::didGetValues):
Set m_hasPendingClear back to false.
(WebKit::StorageAreaMap::didClear):
Set m_hasPendingClear back to false.
(WebKit::StorageAreaMap::applyChange):
Don't apply the change if m_hasPendingClear is true.
* WebProcess/Storage/StorageAreaMap.messages.in:
Add DidGetValues message.
2013-05-08 Andy Estes <aestes@apple.com>
[WebKit2] REGRESSION (Custom Protocols): Reproducible crash when navigating to URL with an invalid scheme
https://bugs.webkit.org/show_bug.cgi?id=115790
Reviewed by Alexey Proskuryakov.
NSMutableSet does not support adding or removing nil objects, and
WTF::HashSet does not support adding, removing, or checking for null
WTF::Strings.
For the NSMutableSet case, make sure that we don't try to add or remove
nil NSStrings.
For the WTF::HashSet case, NSURL will return a nil NSString if we ask
it for its scheme when it is invalid, which we will convert to a null
WTF::String. Don't try to check if our HashSet of registered schemes
contains a null String.
* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
(WebKit::CustomProtocolManager::registerScheme): Assert that the scheme
isn't null. We reject null schemes at the WKBrowsingContextController level.
(WebKit::CustomProtocolManager::unregisterScheme): Ditto.
(WebKit::CustomProtocolManager::supportsScheme): If scheme is null, return false.
* UIProcess/API/mac/WKBrowsingContextController.mm:
(+[WKBrowsingContextController registerSchemeForCustomProtocol:]): Do not register a nil scheme.
(+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]): Ditto.
2013-05-08 Anders Carlsson <andersca@apple.com>
Apply remote changes to storage maps locally
https://bugs.webkit.org/show_bug.cgi?id=115825
Reviewed by Beth Dakin.
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::resetValues):
Clear the pending values map.
(WebKit::StorageAreaMap::didSetItem):
If we failed to set the item, forget everything we know about this storage map.
Otherwise, remove the pending item.
(WebKit::StorageAreaMap::didRemoveItem):
Remove the pending item.
(WebKit::StorageAreaMap::shouldApplyChangeForKey):
Helper function that returns whether a change for a given key should be applied.
(WebKit::StorageAreaMap::applyChange):
Apply the change. Currently only adds and removes are handled.
(WebKit::StorageAreaMap::dispatchStorageEvent):
Apply the change locally as well if needed.
* WebProcess/Storage/StorageAreaMap.h:
2013-05-08 Anders Carlsson <andersca@apple.com>
Assert at compile time that we don't pass Objective-C object pointers to adoptCF
https://bugs.webkit.org/show_bug.cgi?id=115823
Reviewed by Geoffrey Garen.
Fix adoptNS/adoptCF mismatches. For the adopt(leakRef()) case we'd ideally want a static_pointer_cast overload for RetainPtr,
but this will do for now.
* Shared/mac/ArgumentCodersMac.mm:
(CoreIPC::decode):
2013-05-08 Sam Weinig <sam@webkit.org>
Add SPI to determine if a plugin is sandboxed
https://bugs.webkit.org/show_bug.cgi?id=115810
Reviewed by Anders Carlsson.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::initializeSandbox):
* Shared/Plugins/mac/PluginSandboxProfile.h: Added.
* Shared/Plugins/mac/PluginSandboxProfile.mm: Added.
(WebKit::pluginSandboxProfileDefaultDirectory):
(WebKit::pluginSandboxProfileDirectories):
(WebKit::pluginSandboxProfileName):
(WebKit::pluginSandboxCommonProfile):
(WebKit::pluginSandboxProfileForDirectory):
(WebKit::pluginSandboxProfile):
(WebKit::pluginHasSandboxProfileForDirectory):
(WebKit::pluginHasSandboxProfile):
Move sandbox code to its own file and refactor to use cocoa. Also adds pluginHasSandboxProfile function
which uses the newly refactored code.
* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKPlugInInfoIsSandboxedKey):
(createInfoDictionary):
Add WKPlugInInfoIsSandboxedKey.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2013-05-08 Anders Carlsson <andersca@apple.com>
Safari unexpectedly quits with invalid message from the web process with message ID 0x323002f (WebPageProxy.DecidePolicyForNavigationAction)
https://bugs.webkit.org/show_bug.cgi?id=115814
<rdar://problem/12331258>
Reviewed by Andreas Kling.
To ensure that any asynchronous messages are delivered to the UI process before
synchronous messages (except when doing so would lead to a deadlock), Call
setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage on the UI process connections.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection):
2013-05-08 Tim Horton <timothy_horton@apple.com>
Coalesce WKView visibleRect changes
https://bugs.webkit.org/show_bug.cgi?id=115792
<rdar://problem/13776842>
Reviewed by Simon Fraser.
The system can call renewGState much more often than we actually want
to update the WebProcess' notion of the exposed rect. Most importantly,
within an autolayout pass it is called many times, and often sees
[WKView visibleRect] be an intermediate value which will never be
flushed to the screen. We only care about the final value, so we should
wait until AppKit has finished - with a zero-delay timer - to inform the
WebProcess of exposed rect changes.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Add exposedRectChangedTimer.
(WebKit::WebPageProxy::close):
Cancel exposedRectChangedTimer when tearing down the WebPageProxy.
* UIProcess/WebPageProxy.h:
(WebPageProxy):
Add exposedRectChangedTimerFired, the timer itself, and two rects:
the most recent exposed rect from the WKView, and the last one we actually
sent across to the WebProcess.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::viewExposedRectChanged):
Instead of immediately sending exposed rect changes to the WebProcess,
start a zero-delay timer to do so.
(WebKit::WebPageProxy::exposedRectChangedTimerFired):
Once the zero-delay timer fires, send the new exposed rect to the WebProcess.
2013-05-08 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13776220> 13A451: PluginProcess(2225) deny file-read-data ~/Library/InputManagers
<rdar://problem/13642510> PluginProcess logs sandbox violations initializing TextServices
Reviewed by Anders Carlsson.
* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Allow more
TextServices and NSInputManager directories.
2013-05-08 Anders Carlsson <andersca@apple.com>
Remove BinarySemaphoreWin.cpp.
Rubber-stamped by Beth Dakin.
BinarySemaphoreWin has been moved to WTF, but the original was never removed.
* Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Removed.
2013-05-08 Zan Dobersek <zdobersek@igalia.com>
[WK2] Make the WebNetworkInfoManager a supplement to the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=115716
Reviewed by Andreas Kling.
WebNetworkInfoManager should inherit from WebProcessSupplement and should be used
as such by the WebProcess. This removes the need for the m_networkInfoManager member
variable in the WebProcess class and brings the WebNetworkInfoManager in line with
other manager classes of which instances are controlled by the WebProcess class.
* WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
(WebKit::WebNetworkInfoManager::supplementName): Specify the supplement's name.
(WebKit):
* WebProcess/NetworkInfo/WebNetworkInfoManager.h:
(WebKit): Alphabetically reorder the two forwarding declarations.
(WebNetworkInfoManager): Inherit from the WebProcessSupplement interface.
* WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp:
(WebKit::WebNetworkInfoClient::bandwidth): Access the WebNetworkInfoManager as a supplement.
(WebKit::WebNetworkInfoClient::metered): Ditto.
(WebKit::WebNetworkInfoClient::startUpdating): Ditto.
(WebKit::WebNetworkInfoClient::stopUpdating): Ditto.
(WebKit::WebNetworkInfoClient::networkInfoControllerDestroyed): Ditto.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Add the WebNetworkInfoManager instance as a supplement.
* WebProcess/WebProcess.h:
(WebProcess): Remove the m_networkInfoManager member variable and its getter method.
2013-05-08 Zan Dobersek <zdobersek@igalia.com>
[WK2] Make the WebBatteryManager a supplement to the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=115715
Reviewed by Andreas Kling.
WebBatteryManager should inherit from WebProcessSupplement and should be used as such
by the WebProcess. This removes the need for the m_batteryManager member variable in
the WebProcess class and brings the WebBatteryManager in line with other manager classes
of which instances are controlled by the WebProcess class.
* WebProcess/Battery/WebBatteryManager.cpp:
(WebKit::WebBatteryManager::supplementName): Specify the supplement's name.
(WebKit):
* WebProcess/Battery/WebBatteryManager.h:
(WebBatteryManager): Inherit from the WebProcessSupplement interface.
* WebProcess/WebCoreSupport/WebBatteryClient.cpp:
(WebKit::WebBatteryClient::startUpdating): Access the WebBatteryManager as a supplement.
(WebKit::WebBatteryClient::stopUpdating): Ditto.
(WebKit::WebBatteryClient::batteryControllerDestroyed): Ditto.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Add the WebBatteryManager instance as a supplement.
* WebProcess/WebProcess.h:
(WebProcess): Remove the m_batteryManager member variable and its getter method.
2013-05-06 Darin Adler <darin@apple.com>
Use adoptCF and adoptNS in more places
https://bugs.webkit.org/show_bug.cgi?id=115657
Reviewed by Sam Weinig.
* Shared/Downloads/cfnet/DownloadCFNet.cpp:
(WebKit::Download::useCredential):
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::cancel):
(WebKit::Download::didDecideDestination):
Use adoptCF and adoptNS.
2013-05-06 Sam Weinig <sam@webkit.org>
Add SPI to get an array of all the installed plug-ins
https://bugs.webkit.org/show_bug.cgi?id=115688
Reviewed by Anders Carlsson.
* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(createInfoDictionary):
Extract creation of info dictionary into helper.
(WKContextCopyPlugInInfoForBundleIdentifier):
Modified to use the new helper.
(WKContextGetInfoForInstalledPlugIns):
Added.
2013-05-07 Anders Carlsson <andersca@apple.com>
Clean up KeyframeValueList and related classes
https://bugs.webkit.org/show_bug.cgi?id=115738
Reviewed by Simon Fraser.
Update for WebCore changes.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::::decode):
2013-05-07 Anders Carlsson <andersca@apple.com>
Add and remove databases and origins from the database tracker
https://bugs.webkit.org/show_bug.cgi?id=115752
Reviewed by Andreas Kling.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::LocalStorageDatabase):
Rename m_databaseFilename to m_databasePath.
(WebKit::LocalStorageDatabase::tryToOpenDatabase):
Rename m_databaseFilename to m_databasePath.
* UIProcess/Storage/LocalStorageDatabase.h:
Rename m_databaseFilename to m_databasePath.
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::databasePath):
Rename databaseFilename to databasePath.
(WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
Call addDatabaseWithOriginIdentifier.
(WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
Call removeDatabaseWithOriginIdentifier.
(WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
Call databasePath instead of databaseFile.
(WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
Bail if the database is already open.
(WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
Call addDatabaseWithOriginIdentifier if this is an origin we don't know about.
(WebKit::LocalStorageDatabaseTracker::addDatabaseWithOriginIdentifier):
Add the database to the Origins table.
(WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
remove the database from the Origins table and delete it.
(WebKit::LocalStorageDatabaseTracker::pathForDatabaseWithOriginIdentifier):
Helper function that looks up a database path given its identifier.
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
Rename databaseFile to databasePath.
2013-05-07 Anders Carlsson <andersca@apple.com>
The storage database tracker should know when databases come and go
https://bugs.webkit.org/show_bug.cgi?id=115748
Reviewed by Andreas Kling.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::openDatabase):
If we've opened the database successfully, call LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin.
(WebKit::LocalStorageDatabase::tryToOpenDatabase):
Remove a FIXME; we run all storage related things on the same thread.
(WebKit::LocalStorageDatabase::close):
Close the database. If it's empty, call LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin.
(WebKit::LocalStorageDatabase::databaseIsEmpty):
Helper function for determining whether a database is empty.
* UIProcess/Storage/LocalStorageDatabase.h:
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::databaseFilename):
Add ".localstorage" to the filename.
(WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
(WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
Add empty stubs.
2013-05-07 Brady Eidson <beidson@apple.com>
Add JoinExistingSession to the Networking XPC.
<rdar://problem/12902288> and https://bugs.webkit.org/show_bug.cgi?id=114991
Reviewed by Sam Weinig.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist:
2013-05-07 Anders Carlsson <andersca@apple.com>
REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
https://bugs.webkit.org/show_bug.cgi?id=115711
Reviewed by Andreas Kling.
Handle setting the local storage directory more than once.
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
Close the database (if necessary) and clear the origins map before importing the origin identifiers.
2013-05-07 Antoine Quint <graouts@apple.com>
Re-establish autostart timeout extension on user interaction
https://bugs.webkit.org/show_bug.cgi?id=113232
Change WebProcess::pluginDidReceiveUserInteraction to use a tuple of
(pluginOrigin, pageOrigin, mimeType) arguments like the other similar
WebProcess methods and gather these arguments from the PlugInView's
plug-in element.
Reviewed by Dean Jackson.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginDidReceiveUserInteraction):
Cast the m_pluginElement to a HTMLPlugInImageElement so we can obtain the
tuple of (pluginOrigin, pageOrigin, mimeType) to pass to pluginDidReceiveUserInteraction().
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::plugInDidReceiveUserInteraction):
* WebProcess/WebProcess.h:
(WebProcess):
Update method signature to a tuple of (pluginOrigin, pageOrigin, mimeType)
and obtain the plug-in origin hash from that.
2013-05-07 Anders Carlsson <andersca@apple.com>
Each local storage database should know its origin
https://bugs.webkit.org/show_bug.cgi?id=115737
Reviewed by Andreas Kling.
Store the security origin in a member variable. It'll be used to communicate database state changes to the tracker.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::create):
(WebKit::LocalStorageDatabase::LocalStorageDatabase):
* UIProcess/Storage/LocalStorageDatabase.h:
(LocalStorageDatabase):
2013-05-07 Brady Eidson <beidson@apple.com>
Remove some unnecessary soft linking in NetworkProcess. (Take 2)
<rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683
Reviewed by Dean Jackson and owned by Andreas Kling.
As a followup to r149651, include the private headers conditionally.
Also, fix a bug introduced with r149651 (bool vs CFBooleanRef).
* NetworkProcess/mac/DiskCacheMonitor.mm:
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2013-05-07 Jinwoo Song <jinwoo7.song@samsung.com>
[EFL][WK2] Add ewk APIs for setting and getting user agent
https://bugs.webkit.org/show_bug.cgi?id=114429
Reviewed by Andreas Kling.
Provide ewk_view_user_agent_get/set APIs which wraps WK APIs.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
(EwkView::setUserAgent):
* UIProcess/API/efl/EwkView.h:
(EwkView::userAgent):
(EwkView):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_user_agent_get):
(ewk_view_user_agent_set):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
2013-05-07 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
https://bugs.webkit.org/show_bug.cgi?id=115646
Reviewed by Darin Adler.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::hostForURL):
* Shared/ImmutableDictionary.h:
(WebKit::ImmutableDictionary::get):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
(WebKit::StorageManager::findStorageArea):
* UIProcess/WebContext.h:
(WebKit::WebContext::supplement):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::webBackForwardItem):
(WebKit::WebProcessProxy::webFrame):
* UIProcess/efl/DownloadManagerEfl.cpp:
(WebKit::DownloadManagerEfl::ewkDownloadJob):
* WebProcess/Network/WebResourceLoadScheduler.h:
(WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::streamFromID):
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::cancelStreamLoad):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::itemForID):
(WebKit::WebBackForwardListProxy::itemAtIndex):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::webUndoStep):
(WebKit::WebPage::didFinishCheckingText):
(WebKit::WebPage::didCancelCheckingText):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::webPage):
(WebKit::WebProcess::webPageGroup):
Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
2013-05-06 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt] Unreviewed buildfix after r149637.
* Target.pri:
2013-05-06 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
https://bugs.webkit.org/show_bug.cgi?id=115711
Rubber-stamped by Anders Carlsson.
Temporarily removed the assertion. Andres is going to investigate it tomorrow.
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
2013-05-06 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues in KeyframeValueList
https://bugs.webkit.org/show_bug.cgi?id=115652
Reviewed by Simon Fraser.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Added adoptPtr
next to new when calling KeyframeValueList::insert.
2013-05-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, build fix on EFL port
* CMakeLists.txt: Add LocalStorageDatabaseTracker.cpp
2013-05-06 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK build fix after r149637.
* GNUmakefile.list.am: Add LocalStorageDatabaseTracker sources to
the build.
2013-05-06 Brady Eidson <beidson@apple.com>
Remove some unnecessary soft linking in NetworkProcess.
<rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683
Reviewed by Sam Weinig.
Replace some unneeded soft linking with forward declarations.
* NetworkProcess/mac/DiskCacheMonitor.mm:
(WebKit::DiskCacheMonitor::DiskCacheMonitor):
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse):
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2013-05-06 Anders Carlsson <andersca@apple.com>
More work on LocalStorageDatabaseTracker
https://bugs.webkit.org/show_bug.cgi?id=115680
Reviewed by Andreas Kling.
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::databaseFilename):
Call the new databaseFilename that takes a string.
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
Assert that we don't call this more than once. Dispatch a call to import origin identifiers.
(WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
New helper function that returns the tracker database path.
(WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
Open the database and create the Origins table if needed.
(WebKit::LocalStorageDatabaseTracker::importOriginIdentifiers):
Open the database and import the origin identifiers from it, then synchronize it with whatever files are on disk.
(WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
Bring the tracker database up to date from the database files on disk.
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
(LocalStorageDatabaseTracker):
2013-05-06 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13479806> [Mac] Pass information about open pages to LaunchServices
https://bugs.webkit.org/show_bug.cgi?id=115665
Reviewed by Darin Adler.
* WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad): Moved repeated
check for frame->isMainFrame() to the top, matching oter similar functions.
Call updateActivePages().
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::networkProcessConnectionClosed): Removed an obsolete FIXME.
(WebKit::WebProcess::updateActivePages): Empty implementation for platforms
that don't need to do anything here.
* WebProcess/WebProcess.h: Added updateActivePages().
* WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages):
Collect user visible origins of pages in the process and pass them to LS.
2013-05-06 Mark Rowe <mrowe@apple.com>
<rdar://problem/13775921> Switch off a deprecated API.
Reviewed by Oliver Hunt.
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::setProcessSuppressionEnabled): When disabling process suppression,
begin an activity that doesn't disable idle sleep, sudden termination or automatic termination.
When enabling process suppression, end the activity.
2013-05-06 Anders Carlsson <andersca@apple.com>
Move local storage directory handling to LocalStorageDatabaseTracker
https://bugs.webkit.org/show_bug.cgi?id=115676
Reviewed by Andreas Kling.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::create):
(WebKit::LocalStorageDatabase::LocalStorageDatabase):
* UIProcess/Storage/LocalStorageDatabase.h:
(WebCore):
(LocalStorageDatabase):
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory):
(WebKit):
(WebKit::LocalStorageDatabaseTracker::databaseFilename):
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
(WebCore):
(LocalStorageDatabaseTracker):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::StorageArea):
(WebKit::StorageManager::setLocalStorageDirectory):
* UIProcess/Storage/StorageManager.h:
(StorageManager):
2013-05-06 Manuel Rego Casasnovas <rego@igalia.com>
[GTK] Add webkit_uri_scheme_request_finish_error
https://bugs.webkit.org/show_bug.cgi?id=94316
Reviewed by Anders Carlsson.
This new method will allow to finish WebKitURISchemeRequest with a
GError that will be passed to the WebKitWebView through the
"load-failed" signal.
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
(webkit_uri_scheme_request_finish_error): Implement new method using
WebSoupRequestManagerProxy::didFailURIRequest().
* UIProcess/API/gtk/WebKitURISchemeRequest.h: Add new method header.
* UIProcess/API/gtk/WebKitWebContext.cpp: Include the usage of the new
method in the code example at webkit_web_context_register_uri_scheme()
documentation.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the new
method.
* UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
(loadFailedCallback): Set m_error to monitor it from the tests.
(LoadTrackingTest::loadURI): Clear m_error before each load.
(LoadTrackingTest::loadHtml): Ditto.
(LoadTrackingTest::loadPlainText): Ditto.
(LoadTrackingTest::loadRequest): Ditto.
(LoadTrackingTest::reload): Ditto.
(LoadTrackingTest::goBack): Ditto.
(LoadTrackingTest::goForward): Ditto.
* UIProcess/API/gtk/tests/LoadTrackingTest.h: Add new member m_error.
* UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
(testWebContextURIScheme): Modify test to check the behavior of the new
method.
* UIProcess/soup/WebSoupRequestManagerProxy.cpp:
(WebKit::WebSoupRequestManagerProxy::didFailURIRequest):
(WebKit): Implement new method using
WebSoupRequestManager::DidFailURIRequest().
* UIProcess/soup/WebSoupRequestManagerProxy.h:
(WebSoupRequestManagerProxy): Add new method header.
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit):
(WebKit::WebSoupRequestManager::didFailURIRequest): Implement new method
setting the error and completing the request.
* WebProcess/soup/WebSoupRequestManager.h:
(WebSoupRequestManager): Add new method header.
* WebProcess/soup/WebSoupRequestManager.messages.in: Add new method
signature.
2013-05-06 Anders Carlsson <andersca@apple.com>
Every LocalStorageDatabase should know about its tracker
https://bugs.webkit.org/show_bug.cgi?id=115673
Reviewed by Andreas Kling.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::create):
(WebKit::LocalStorageDatabase::LocalStorageDatabase):
* UIProcess/Storage/LocalStorageDatabase.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::StorageArea):
2013-05-06 Anders Carlsson <andersca@apple.com>
Add LocalStorageDatabaseTracker class
https://bugs.webkit.org/show_bug.cgi?id=115671
Reviewed by Andreas Kling.
Somewhat unsurprisingly, this class will be used for tracking local storage databases.
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp: Added.
(WebKit::LocalStorageDatabaseTracker::create):
(WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
(WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
* UIProcess/Storage/LocalStorageDatabaseTracker.h: Added.
(LocalStorageDatabaseTracker):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageManager):
Create a local storage database tracker.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2013-05-06 Anders Carlsson <andersca@apple.com>
Handle closing the local storage database
https://bugs.webkit.org/show_bug.cgi?id=115669
Reviewed by Beth Dakin.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::LocalStorageDatabase):
Initialize m_isClosed.
(WebKit::LocalStorageDatabase::~LocalStorageDatabase):
Assert that m_isClosed is false.
(WebKit::LocalStorageDatabase::close):
Set m_isClosed to true and write any pending changes to disk.
(WebKit::LocalStorageDatabase::updateDatabase):
Compute the changed items and pass them to updateDatabaseWithChangedItems.
(WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
Split out the code that actually writes to the database from updateDatabase and into this function.
* UIProcess/Storage/LocalStorageDatabase.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::~StorageArea):
Call close().
2013-05-06 Zan Dobersek <zdobersek@igalia.com>
[WK2] Make the WebNetworkInfoManagerProxy a supplement to the WebContext
https://bugs.webkit.org/show_bug.cgi?id=115654
Reviewed by Andreas Kling.
Rather than holding a RefPtr to the WebNetworkInfoManagerProxy object in WebContext, change the WebNetworkInfoManagerProxy
to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its
construction and cleanup, removing the specific RefPtr member variable and its correlating getter method.
* UIProcess/API/C/WKContext.cpp:
(WKContextGetNetworkInfoManager): Retrieve the WebNetworkInfoManagerProxy object from the suppplements of the WebContext.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext): Add the WebNetworkInfoManagerProxy object as a supplement instead of assigning it to
the now-removed member variable.
(WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the
supplements vector.
(WebKit::WebContext::disconnectProcess): Ditto.
* UIProcess/WebContext.h:
(WebContext): Remove the WebNetworkInfoManagerProxy RefPtr member variable and its getter method.
* UIProcess/WebNetworkInfoManagerProxy.cpp:
(WebKit::WebNetworkInfoManagerProxy::supplementName): Specift the supplement's name.
(WebKit::WebNetworkInfoManagerProxy::WebNetworkInfoManagerProxy): Initialize as a WebContextSupplement.
(WebKit::WebNetworkInfoManagerProxy::providerDidChangeNetworkInformation): Adjust to use the context() method instead of
accessing the private m_context directly.
(WebKit::WebNetworkInfoManagerProxy::contextDestroyed): Stop updating when invoked.
(WebKit::WebNetworkInfoManagerProxy::processDidClose): Ditto.
(WebKit::WebNetworkInfoManagerProxy::refWebContextSupplement): Call APIObject::ref.
(WebKit::WebNetworkInfoManagerProxy::derefWebContextSupplement): Call APIObject::deref.
* UIProcess/WebNetworkInfoManagerProxy.h:
(WebNetworkInfoManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods.
2013-05-06 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13479806> [Mac] Pass plug-in bundle ID to LaunchServices
https://bugs.webkit.org/show_bug.cgi?id=115483
Reviewed by Darin Adler.
* PluginProcess/PluginProcess.h: Added m_pluginBundleIdentifier. We now need it
in multiple places, so it's easier to pre-compute it.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::loadSandboxProfileForDirectory): Changed to use precomputed bundle ID.
(WebKit::loadSandboxProfile): Ditto.
(WebKit::PluginProcess::platformInitializeProcess): Pre-compute bundle ID.
(WebKit::PluginProcess::initializeProcessName): Pass it to LaunchServices.
(WebKit::PluginProcess::initializeSandbox): Pass precomputed bundle ID instead of
a path.
2013-05-06 Anders Carlsson <andersca@apple.com>
Handle removeItem and clear in LocalStorageDatabase
https://bugs.webkit.org/show_bug.cgi?id=115664
Reviewed by Darin Adler.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::removeItem):
Call itemDidChange with a null value, indicating that we want to remove this item.
(WebKit::LocalStorageDatabase::clear):
Clear items, set m_shouldClearItems and schedule a database update.
(WebKit::LocalStorageDatabase::updateDatabase):
If m_shouldClearItems is true, clear all items.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::removeItem):
Call through to the local storage database.
(WebKit::StorageManager::StorageArea::clear):
Ditto.
2013-05-06 Anders Carlsson <andersca@apple.com>
Write storage changes to disk
https://bugs.webkit.org/show_bug.cgi?id=115660
Reviewed by Andreas Kling.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::LocalStorageDatabase):
Initialize new member variables.
(WebKit::LocalStorageDatabase::tryToOpenDatabase):
Disable database threading checks.
(WebKit::LocalStorageDatabase::importItems):
Only import the items once.
(WebKit::LocalStorageDatabase::setItem):
Call itemDidChange.
(WebKit::LocalStorageDatabase::itemDidChange):
Record the change and schedule a database update.
(WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
Use WorkQueue::dispatchAfterDelay to schedule a datbase update.
(WebKit::LocalStorageDatabase::updateDatabase):
Write changes to disk. If there are more than 100 pending items, only write the first 100 and then schedule
another database update for the remaining items.
* UIProcess/Storage/LocalStorageDatabase.h:
Add new member variables.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::setItem):
Call LocalStorageDatabase::setItem.
2013-05-06 Zan Dobersek <zdobersek@igalia.com>
[WK2] Make the WebBatteryManagerProxy a supplement to the WebContext
https://bugs.webkit.org/show_bug.cgi?id=115625
Reviewed by Andreas Kling.
Rather than holding a RefPtr to the WebBatteryManagerProxy object in WebContext, change the WebBatteryManagerProxy
to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its
construction and cleanup, removing the specific RefPtr member variable and its correlating getter method.
* UIProcess/API/C/WKContext.cpp:
(WKContextGetBatteryManager): Retrieve the WebBatteryManagerProxy object from the supplements of the WebContext.
* UIProcess/WebBatteryManagerProxy.cpp:
(WebKit::WebBatteryManagerProxy::supplementName): Specify the supplement's name.
(WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy): Initialize as a WebContextSupplementable.
(WebKit::WebBatteryManagerProxy::providerDidChangeBatteryStatus): Adjust to use the context() method instead of accessing
the private m_context directly.
(WebKit::WebBatteryManagerProxy::providerUpdateBatteryStatus): Ditto.
(WebKit::WebBatteryManagerProxy::contextDestroyed): Stop updating when invoked.
(WebKit::WebBatteryManagerProxy::processDidClose): Ditto.
(WebKit::WebBatteryManagerProxy::refWebContextSupplement): Call APIObject::ref.
(WebKit::WebBatteryManagerProxy::derefWebContextSupplement): Call APIObject::deref.
(WebKit::WebBatteryManagerProxy::startUpdating): Fire up the provider if not yet updating.
(WebKit::WebBatteryManagerProxy::stopUpdating): Wind down the provider if updating.
* UIProcess/WebBatteryManagerProxy.h:
(WebBatteryManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext): Add the WebBatteryManagerProxy object as a supplement instead of assigning it to
the now-removed member variable.
(WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the
supplements vector.
(WebKit::WebContext::disconnectProcess): Ditto.
* UIProcess/WebContext.h:
(WebContext): Remove the WebBatteryManagerProxy RefPtr member variable and its getter method.
2013-05-06 Antoine Quint <graouts@apple.com>
Manage the presentation of the snapshotted plug-in using JavaScript
https://bugs.webkit.org/show_bug.cgi?id=115548
Reviewed by Dean Jackson.
Expose a new plugInExtraScript method to support the injection of
a JS file from the chrome client to customize the rendering of a
snapshotted plug-in's shadow tree. Additionally, it is expected
the chrome client will want to provide localized strings taking
into account the snapshotted plug-in's mime-type, so we're adding
this as a parameter to both plugInStartLabelTitle and
plugInStartLabelSubtitle methods.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle):
(WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle):
(WebKit::InjectedBundlePageUIClient::plugInExtraScript):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
(InjectedBundlePageUIClient):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::plugInStartLabelTitle):
(WebKit::WebChromeClient::plugInStartLabelSubtitle):
(WebKit::WebChromeClient::plugInExtraScript):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient):
2013-05-05 Chris Fleizach <cfleizach@apple.com>
WEB SPEECH: deny file-read-data /Library/Speech/Synthesizers
https://bugs.webkit.org/show_bug.cgi?id=115621
Reviewed by Alexey Proskuryakov.
Allow access to the location where 3rd party speech synthesizers are stored.
* WebProcess/com.apple.WebProcess.sb.in:
2013-05-05 Tim Horton <timothy_horton@apple.com>
[wk2] Page Overlays: deviceScaleFactor doesn't update when the display changes
https://bugs.webkit.org/show_bug.cgi?id=115577
<rdar://problem/13762583>
Reviewed by Darin Adler.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor):
Invalidate the page overlay layers' device scale factor when
TiledCoreAnimationDrawingArea is notified that it has changed.
2013-05-05 Anders Carlsson <andersca@apple.com>
Remove the Vector::append overload that takes a Vector
https://bugs.webkit.org/show_bug.cgi?id=115535
Reviewed by Andreas Kling.
Use Vector::appendVector instead.
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerBlobURL):
* NetworkProcess/SchedulableLoader.cpp:
(WebKit::SchedulableLoader::SchedulableLoader):
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::SyncMessageState::dispatchMessages):
* UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
(WebKit::PluginInfoStore::pluginsDirectories):
2013-05-04 Sam Weinig <sam@webkit.org>
Fix * placement in a few functions as noticed by Mark Rowe.
Rubber-stamped by Dan Bernstein.
* WebProcess/WebPage/PageBanner.h:
(PageBanner):
* WebProcess/WebPage/mac/PageBannerMac.mm:
(WebKit::PageBanner::create):
(WebKit::PageBanner::PageBanner):
2013-05-04 Sam Weinig <sam@webkit.org>
REGRESSION(r148312): Crash when calling WKPageClose(page) followed by WKPageTerminate(page)
<rdar://problem/13702008>
https://bugs.webkit.org/show_bug.cgi?id=115607
Reviewed by Benjamin Poulain.
API Test: WebKit2.CloseThenTerminate
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Don't try to reset the state if the page is closed, it won't work and its not worth it.
2013-05-04 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=115574
Crash using new WKBundlePageSetHeaderBanner() API to set a banner to null
Reviewed by Darin Adler.
Don't call addToPage() on a null banner.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setHeaderPageBanner):
(WebKit::WebPage::setFooterPageBanner):
2013-05-03 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13806836> Tweak sandbox profile.
Reviewed by Dan Bernstein.
* WebProcess/com.apple.WebProcess.sb.in:
2013-05-03 Tim Horton <timothy_horton@apple.com>
PDFPlugin: Changes being made to active annotation aren't saved when the PDF is exported
https://bugs.webkit.org/show_bug.cgi?id=115544
<rdar://problem/13801789>
Reviewed by Alexey Proskuryakov.
Commit changes to the active annotation (if there is one) before
returning the live PDF data, so that said changes are represented
in the exported or printed output.
* WebProcess/Plugins/PDF/PDFPlugin.h: Override liveData.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::liveData): Commit the active annotation if there is one.
* WebProcess/Plugins/PDF/SimplePDFPlugin.h:
(SimplePDFPlugin): Make liveData virtual.
2013-05-03 Tim Horton <timothy_horton@apple.com>
Web process crashes at WebPage::determinePrimarySnapshottedPlugInTimerFired + 8
https://bugs.webkit.org/show_bug.cgi?id=115056
<rdar://problem/13719543>
Reviewed by Simon Fraser.
Null-check m_page. In theory, we shouldn't get here, because we stop
the timer at the only point where m_page is cleared, but crash logs say
we're still crashing here.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugInTimerFired):
2013-05-03 Tim Horton <timothy_horton@apple.com>
Remove some "what" comments from FindController
https://bugs.webkit.org/show_bug.cgi?id=115546
Reviewed by Andreas Kling.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::countStringMatches):
(WebKit::FindController::updateFindUIAfterPageScroll):
(WebKit::FindController::willMoveToWebPage):
(WebKit::FindController::mouseEvent):
Remove or reword some comments.
2013-05-02 Andy Estes <aestes@apple.com>
[WK2][CustomProtocols] NSURLProtocolClient methods should be dispatched on NSURLConnection's resource loader run loop
https://bugs.webkit.org/show_bug.cgi?id=115539
Reviewed by Alexey Proskuryakov.
It turns out that calling NSURLProtocolClient methods from a different
thread than the one running the NSURLConnection run loop is unsafe.
Although I can't capture it reliably in a test case, doing so can
sometimes result in a load timing out because the call to
-[NSURLProtocolClient URLProtocolDidFinishLoading:] was ignored by
NSURLConnection.
Fix this by dispatching these methods on the NSURLConnection resource
load run loop. This matches where NSURLProtocolClient methods are
dispatched by typical NSURLProtocol implementations, and in my testing
this solves the timeout issue.
* Shared/Network/CustomProtocols/CustomProtocolManager.h: Declare
dispatchOnResourceLoaderRunLoop().
* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
Declare +[NSURLConnection resourceLoaderRunLoop] on a category of
NSURLConnection. Also include the header that declares it if it's present.
(WebKit::CustomProtocolManager::didFailWithError): Call the
NSURLProtocolClient method via dispatchOnResourceLoaderRunLoop().
(WebKit::CustomProtocolManager::didLoadData): Ditto.
(WebKit::CustomProtocolManager::didReceiveResponse): Ditto.
(WebKit::CustomProtocolManager::didFinishLoading): Ditto.
(WebKit::CustomProtocolManager::dispatchOnResourceLoaderRunLoop):
Dispatch a block on the NSURLConnection resource loader run loop and
then wake up the run loop.
2013-05-02 Brady Eidson <beidson@apple.com>
REGRESSION (149389) Main resources converted to downloads are immediately cancelled.
<rdar://problem/13795795> and https://bugs.webkit.org/show_bug.cgi?id=115530
Reviewed by Alexey Proskuryakov.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Call didConvertHandleToDownload
on the NetworkResourceLoader.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::didConvertHandleToDownload): Set m_handleConvertedToDownload to true.
(WebKit::NetworkResourceLoader::abort): Only cancel the handle if m_handleConvertedToDownload is false.
* NetworkProcess/NetworkResourceLoader.h:
2013-05-02 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13740375> Non-ASCII downloaded file names are garbled when using NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=115520
Reviewed by Darin Adler.
* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::::encodePlatformData):
(CoreIPC::::decodePlatformData):
Send the encoding fallback array over IPC, so that it's present when NetworkProcess does its loading.
2013-05-01 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r149422): -[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]
broken when second argument is nil
https://bugs.webkit.org/show_bug.cgi?id=115505
<rdar://problem/13787297>
Reviewed by Darin Adler.
* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile): Pass a URL string
to assumeReadAccessToBaseURL, as this is what it takes.
2013-05-01 Ryosuke Niwa <rniwa@webkit.org>
[Mac] WebKit doesn't enable or disable autocorrections when system preferences are changed
https://bugs.webkit.org/show_bug.cgi?id=115463
Reviewed by Darin Adler.
Observe the default notification center and propagate the changes to TextCheckerState and
to all WebProcesses when system preferences are updated.
* UIProcess/TextChecker.h:
* UIProcess/WebContext.h:
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::shouldAutomaticTextReplacementBeEnabled):
(WebKit::shouldAutomaticSpellingCorrectionBeEnabled):
(WebKit::shouldAutomaticQuoteSubstitutionBeEnabled):
(WebKit::shouldAutomaticDashSubstitutionBeEnabled):
(WebKit::initializeState):
(WebKit::TextChecker::didChangeAutomaticTextReplacementEnabled):
(WebKit::TextChecker::didChangeAutomaticSpellingCorrectionEnabled):
(WebKit::TextChecker::didChangeAutomaticQuoteSubstitutionEnabled):
(WebKit::TextChecker::didChangeAutomaticDashSubstitutionEnabled):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::registerNotificationObservers):
(WebKit::WebContext::unregisterNotificationObservers):
2013-05-01 Ryuan Choi <ryuan.choi@samsung.com>
[GTK] Fix build break after r149449
https://bugs.webkit.org/show_bug.cgi?id=115500
Reviewed by Gustavo Noronha Silva.
Unreviewed GTK build fix
* GNUmakefile.list.am: Added LocalStorageDatabase.[cpp|h] to the list of
sources.
2013-05-01 Martin Robinson <mrobinson@igalia.com>
[GTK] [WebKit2] Documentation for webkit_web_view_run_javascript should indicate what happens when JavaScript is disabled
https://bugs.webkit.org/show_bug.cgi?id=115492
Reviewed by Xan Lopez.
* UIProcess/API/gtk/WebKitWebView.cpp: Clarify the documentation.
2013-05-01 Tim Horton <timothy_horton@apple.com>
Move knowledge of PDF/PostScript MIME types into MIMETypeRegistry
https://bugs.webkit.org/show_bug.cgi?id=115487
Reviewed by Darin Adler.
* UIProcess/WebContext.cpp:
* UIProcess/WebContext.h:
Remove pdfAndPostScriptMIMETypes.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::canShowMIMEType): Move PDF bits to WebPageProxy.
(WebKit::WebFrameProxy::isDisplayingPDFDocument):
Make use of WebCore's newfound knowledge of PDF and PostScript MIME types,
so we don't have to duplicate it unnecessarily in WebKit2.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::canShowMIMEType):
Add code which used to be in WebFrameProxy::canShowMIMEType, and adapt it
to use WebCore's knowledge of PDF and PostScript MIME types.
* WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
(WebKit::SimplePDFPlugin::pluginInfo):
We previously supported the "text/pdf" MIME type for PDFViewController,
so SimplePDFPlugin and PDFPlugin should support it as well.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
Adopt MIMETypeRegistry::isPDFOrPostScriptMIMEType.
* WebProcess/WebPage/WebPage.h:
(WebPage):
Remove pdfAndPostScriptMIMETypes.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformPreferencesDidChange):
Adopt getPDFAndPostScriptMIMETypes instead of duplicating the list in WebKit2.
2013-05-01 Anders Carlsson <andersca@apple.com>
Implement LocalStorageDatabase::importItems
https://bugs.webkit.org/show_bug.cgi?id=115493
Reviewed by Andreas Kling.
Fetch items and insert them in the storage map.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::importItems):
2013-05-01 Anders Carlsson <andersca@apple.com>
Begin work on loading items from the local storage database
https://bugs.webkit.org/show_bug.cgi?id=115489
Reviewed by Andreas Kling.
Some of the LocalStorageDatabase code is originally from WebCore,
but has been simplified due to the fact that we don't need to load
database data asynchronously since we're already running on a non-main thread.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::LocalStorageDatabase):
(WebKit::LocalStorageDatabase::openDatabase):
(WebKit::LocalStorageDatabase::tryToOpenDatabase):
(WebKit::LocalStorageDatabase::migrateItemTableIfNeeded):
(WebKit::LocalStorageDatabase::importItems):
* UIProcess/Storage/LocalStorageDatabase.h:
(WebKit::StorageManager::StorageArea::setItem):
(WebKit::StorageManager::StorageArea::removeItem):
(WebKit::StorageManager::StorageArea::clear):
(WebKit::StorageManager::StorageArea::items):
Call importItemsFromDatabase().
(WebKit::StorageManager::StorageArea::importItemsFromDatabase):
Ask the database to import the items.
2013-05-01 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Unreviewed buildfix after r149449.
* CMakeLists.txt:
2013-05-01 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt] Unreviewed buildfix after r149449.
* Target.pri:
2013-05-01 Anders Carlsson <andersca@apple.com>
Add LocalStorageDatabase class
https://bugs.webkit.org/show_bug.cgi?id=115486
Reviewed by Sam Weinig.
The LocalStorageDatabase class will persist local storage data to disk.
* UIProcess/Storage/LocalStorageDatabase.cpp:
* UIProcess/Storage/LocalStorageDatabase.h: Added.
* UIProcess/Storage/StorageManager.cpp:
(StorageManager::StorageArea):
(WebKit::StorageManager::LocalStorageNamespace::storageManager):
Add getter.
(StorageManager::LocalStorageNamespace):
(WebKit::StorageManager::StorageArea::StorageArea):
If this is a local storage area, create a LocalStorageDatabase.
(WebKit::StorageManager::LocalStorageNamespace::databaseFilename):
Helper function for getting the name of the database for the given origin.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2013-05-01 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13781156> Launching NetworkProcess broken on some OS versions.
Reviewed by Anders Carlsson.
Adapt to LaunchServices changes.
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::setApplicationIsDaemon):
2013-05-01 Martin Robinson <mrobinson@igalia.com>
[GTK] [WebKit2] Add a setting to control whether or not accelerated 2D canvas is enabled
https://bugs.webkit.org/show_bug.cgi?id=114394
Reviewed by Anders Carlsson.
Add a setting to control accelerated 2D canvas, which determines whether
or not to consider rendering HTML canvas with hardware acceleration.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty): Added support for enable-accelerated-2d-canvas property.
(webKitSettingsGetProperty): Added support for enable-accelerated-2d-canvas property.
(webkit_settings_class_init): Added support for enable-accelerated-2d-canvas property.
(webkit_settings_get_enable_accelerated_2d_canvas): Added.
(webkit_settings_set_enable_accelerated_2d_canvas): Added.
* UIProcess/API/gtk/WebKitSettings.h: New methods.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new methods to the documentation.
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Added a simple test for the setting.
2013-04-30 Jer Noble <jer.noble@apple.com>
Entering full screen mode shows desktop linen instead of WKView the first time.
https://bugs.webkit.org/show_bug.cgi?id=115433
<rdar://problem/13774540>
Reviewed by Eric Carlson.
For certain types of windows created by subclasses of WKView, the window in question fails to paint
when created with a zero-size rect. Create the window with an initial size of the active screen frame
as that is the likely destination size.
* UIProcess/API/mac/WKView.mm:
(-[WKView createFullScreenWindow]):
2013-05-01 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt][Win] Fix build after r149416.
https://bugs.webkit.org/show_bug.cgi?id=115474
Reviewed by Anders Carlsson.
* Platform/CoreIPC/Connection.h:
(Connection):
* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::dispatchSentMessagesUntil):
2013-05-01 Sergio Villar Senin <svillar@igalia.com>
Unreviewed GTK build fix after r149417.
* GNUmakefile.list.am: Added PageBanner.[cpp|h] to the list of
sources.
2013-05-01 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Unreviewed buildfix after r149416 and r149417.
Unreviewed build fix.
* CMakeLists.txt:
2013-05-01 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt] Unreviewed buildfix after r149416 and r149417.
* Target.pri:
2013-04-30 Dongwoo Joshua Im <dw.im@samsung.com>
[EFL] Unreviewed, EFL build fix after r149416
https://bugs.webkit.org/show_bug.cgi?id=115467
Unreviewed build fix.
* CMakeLists.txt: Remove non-existing file, BinarySemaphore.cpp, from the list.
2013-04-30 Simon Cooper <scooper@apple.com>
ipc-posix-shm backwards compatibility
https://bugs.webkit.org/show_bug.cgi?id=115448
<rdar://problem/13743037>
Reviewed by Alexey Proskuryakov.
Add compatibility for older ipc-posix-shm operations, but prefer the
newer names when writing profiles.
* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2013-04-30 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK build fix after r149416.
* GNUmakefile.list.am: Remove references to non-existant
BinarySemaphore module.
2013-04-28 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13574729> Implement file path restrictions in WebKit Objective C API
https://bugs.webkit.org/show_bug.cgi?id=115321
Reviewed by Darin Adler.
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile):
* UIProcess/WebPageProxy.h:
Added and implemented a C API to load a file while only opening sandbox for
a specific directory.
* UIProcess/API/mac/WKBrowsingContextController.h: Fixed a typo in a comment.
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
Respect allowedDirectory argument. Updated the function to raise an exception for
incorrect input, as decribed in header file.
2013-04-29 Sam Weinig <sam@webkit.org>
Add API to allow WebKit2 banners to get mouse events
https://bugs.webkit.org/show_bug.cgi?id=115395
Reviewed by Beth Dakin.
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
Add banner type.
* WebKit2.xcodeproj/project.pbxproj:
Add files.
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
Add conversion.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetTopOverhangImage):
(WKBundlePageSetBottomOverhangImage):
Fix parameter names to be consistent.
(WKBundlePageSetHeaderBanner):
(WKBundlePageSetFooterBanner):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp: Added.
(WKBundlePageBannerGetTypeID):
* WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h: Added.
* WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.h: Added.
* WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: Added.
(PageBannerClientImpl):
(PageBannerClientImpl::create):
(PageBannerClientImpl::PageBannerClientImpl):
(PageBannerClientImpl::pageBannerDestroyed):
(PageBannerClientImpl::mouseEvent):
(WKBundlePageBannerCreateBannerWithCALayer):
(WKBundlePageBannerGetLayer):
Add banner API.
* WebProcess/WebPage/PageBanner.h: Added.
* WebProcess/WebPage/PageBanner.cpp: Added.
(WebKit::PageBanner::~PageBanner):
(WebKit::PageBanner::addToPage):
(WebKit::PageBanner::detachFromPage):
(WebKit::PageBanner::didChangeDeviceScaleFactor):
(WebKit::PageBanner::mouseEvent):
Add non-mac implementations.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::~WebPage):
(WebKit::WebPage::setHeaderPageBanner):
(WebKit::WebPage::headerPageBanner):
(WebKit::WebPage::setFooterPageBanner):
(WebKit::WebPage::footerPageBanner):
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::mouseEventSyncForTesting):
* WebProcess/WebPage/WebPage.h:
Add banner setter/getters and give the banners a chance to handle mouse events.
* WebProcess/WebPage/mac/PageBannerMac.mm: Added.
(WebKit::PageBanner::create):
(WebKit::PageBanner::PageBanner):
(WebKit::PageBanner::addToPage):
(WebKit::PageBanner::detachFromPage):
(WebKit::PageBanner::didChangeDeviceScaleFactor):
(WebKit::PageBanner::mouseEvent):
(WebKit::PageBanner::layer):
Add Mac implementation.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
Notify banners when the device scale changes.
2013-04-30 Anders Carlsson <andersca@apple.com>
Remove the WebKit2 BinarySemaphore class
https://bugs.webkit.org/show_bug.cgi?id=115458
Reviewed by Benjamin Poulain.
Remove the WK2 specific BinarySemaphore class and use the one from WTF.
* Platform/CoreIPC/BinarySemaphore.cpp: Removed.
* Platform/CoreIPC/BinarySemaphore.h: Removed.
* Platform/CoreIPC/Connection.cpp:
* Platform/CoreIPC/Connection.h:
* WebKit2.xcodeproj/project.pbxproj:
2013-04-30 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13757475> WebProcess deny ipc-posix-shm-read-data CFPBS:A2:
Reviewed by Anders Carlsson.
* WebProcess/com.apple.WebProcess.sb.in: Allow pbs shared memory.
2013-04-30 Alexey Proskuryakov <ap@apple.com>
[Mac] Don't open window server connection in network process
https://bugs.webkit.org/show_bug.cgi?id=115446
Reviewed by Anders Carlsson.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeProcess):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::initializeProcess):
(WebKit::NetworkProcess::initializeProcessName):
Instead of shutting down a connection after setting process name, just prevent
it from being created.
* Shared/ChildProcess.h:
* Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::setApplicationIsDaemon):
Expose a function for client processes to call if they don't run an NSApplication
run loop.
* OfflineStorageProcess/OfflineStorageProcess.cpp:
(WebKit::OfflineStorageProcess::initializeProcess):
* OfflineStorageProcess/OfflineStorageProcess.h:
* OfflineStorageProcess/mac/OfflineStorageProcessMac.mm:
(WebKit::OfflineStorageProcess::initializeProcess):
(WebKit::OfflineStorageProcess::initializeProcessName):
* SharedWorkerProcess/SharedWorkerProcess.cpp:
(WebKit::SharedWorkerProcess::initializeProcess):
(WebKit::SharedWorkerProcess::initializeProcessName):
* SharedWorkerProcess/SharedWorkerProcess.h:
* SharedWorkerProcess/mac/SharedWorkerProcessMac.mm:
(WebKit::SharedWorkerProcess::initializeProcess):
(WebKit::SharedWorkerProcess::initializeProcessName):
Match NetworkProcess for consistency.
* WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::initializeProcessName):
Don't null check UI process name. First, it can't be null, and second, some other
processes already don't have this check.
2013-04-30 Tim Horton <timothy_horton@apple.com>
Disable deprecation warnings around some NSProcessInfo API.
Rubber-stamped by Brady Eidson.
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::setProcessSuppressionEnabled):
2013-04-30 Brady Eidson <beidson@apple.com>
[WK2] Threads get stuck in NetworkProcess when canceling loads in WebProcess.
<rdar://problem/13757687> and https://bugs.webkit.org/show_bug.cgi?id=115319
Written and reviewed by both Alexey Proskuryakov and Brady Eidson.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didClose): Call abort() on all loaders
instead of connectionToWebProcessDidClose()
(WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Instead of removing
the loader from the scheduler, call abort() which will also end up removing it.
* NetworkProcess/SchedulableLoader.h: Add a virtual abort() call.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::sendAbortingOnFailure): Added a messageFlags argument so
callers can pass DispatchMessageEvenWhenWaitingForSyncReply.
(WebKit::NetworkResourceLoader::abort): Combined "abortInProgressLoad" and "cleanup" to
be a general purpose "cancel"
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::willSendRequestAsync):
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/SyncNetworkResourceLoader.cpp:
(WebKit::SyncNetworkResourceLoader::abort):
* NetworkProcess/SyncNetworkResourceLoader.h:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::remove): Remove an obsolete/incorrect comment.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Add comment stressing
the importance of this null check so it's not removed again.
2013-04-30 Carlos Garcia Campos <cgarcia@igalia.com>
[WK2][GTK] MiniBrowser won't play video in <embed> tag
https://bugs.webkit.org/show_bug.cgi?id=113107
Reviewed by Anders Carlsson.
The wrong clip region is used for windowed plugins, because it's
translated to window frame coords again.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformGeometryDidChange): Do not move
the current clip region.
2013-04-30 Timothy Hatcher <timothy@apple.com>
Make the Inspector dock to right button work in the WebKit nightlies on Safari 6.0.4.
https://webkit.org/b/115428
Reviewed by Joseph Pecoraro.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow): Reduce the required Safari version.
(WebKit::WebInspectorProxy::platformDetach): Simplify the frame restoring code so it
works on Safari 6.0.4.
2013-04-30 Artur Moryc <a.moryc@samsung.com>
[WK2][EFL] Spelling marker disappears while selection is being changed
https://bugs.webkit.org/show_bug.cgi?id=115165
Reviewed by Anders Carlsson.
The marker for a misspelled word disappears while the cursor is being navigated along the word.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
2013-04-30 Zalan Bujtas <zalan@apple.com>
Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
https://bugs.webkit.org/show_bug.cgi?id=111244
Reviewed by David Kilzer.
Enable performance.now() as a minimal subset of Web Timing API.
It returns DOMHighResTimeStamp, a monotonically increasing value representing the
number of milliseconds from the start of the navigation of the current document.
JS libraries use this API to check against the requestAnimationFrame() timestamp.
* Configurations/FeatureDefines.xcconfig:
2013-04-29 Chris Fleizach <cfleizach@apple.com>
WEB SPEECH: need to identify the default voice per language
https://bugs.webkit.org/show_bug.cgi?id=115366
Reviewed by Tim Horton.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2013-04-29 Benjamin Poulain <benjamin@webkit.org>
[WK2] Streamline the use of strings in WebProcess::getWebCoreStatistics
https://bugs.webkit.org/show_bug.cgi?id=115315
Reviewed by Geoffrey Garen.
Remove a couple of unjustified DEFINE_STATIC_LOCAL.
Use ASCIILiteral when allocating new String.
* WebProcess/WebProcess.cpp:
(WebKit::getWebCoreMemoryCacheStatistics):
(WebKit::WebProcess::getWebCoreStatistics):
2013-04-29 Anders Carlsson <andersca@apple.com>
Remove StorageTracker::originsLoaded
https://bugs.webkit.org/show_bug.cgi?id=115382
Reviewed by Sam Weinig.
Add m_didFinishLoadingOrigins.
* WebProcess/Storage/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::didFinishLoadingOrigins):
* WebProcess/Storage/WebKeyValueStorageManager.h:
(WebKeyValueStorageManager):
2013-04-29 Chris Fleizach <cfleizach@apple.com>
WEB SPEECH Update seatbelt profile to work with speech synthesis
https://bugs.webkit.org/show_bug.cgi?id=115368
Reviewed by Alexey Proskuryakov.
* WebProcess/com.apple.WebProcess.sb.in:
2013-04-28 Beth Dakin <bdakin@apple.com>
Need a LayoutMilestone to fire when we have done our first paint after suppressing
incremental layout
https://bugs.webkit.org/show_bug.cgi?id=115330
-and corresponding-
<rdar://problem/12722365>
Reviewed by Simon Fraser.
Two new millstones.
* Shared/API/c/WKPageLoadTypes.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toWKLayoutMilestones):
(WebKit::toLayoutMilestones):
This null-check is necessary now since this code ends up running at
WebFrame::init() time while we're setting up the Document.
setVisualUpdatesAllowed(true) has always been called as a part of that process,
and now the updateLayout(), ends up calling this code too, but we don't actually
have a mainFrame yet since it's still being created.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::findLargestFrameInFrameSet):
2013-04-29 Brady Eidson <beidson@apple.com>
REGRESSION: We see authentication challenge sheets for favicon requests.
<rdar://problem/13753470> and https://bugs.webkit.org/show_bug.cgi?id=115288
Reviewed by Alexey Proskuryakov.
Have NetworkResourceLoadParameters remember the ClientCredentialPolicy:
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
Pass along the ClientCredentialPolicy to the NetworkProcess:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
Have the SchedulableLoader remember the ClientCredentialPolicy:
* NetworkProcess/SchedulableLoader.cpp:
(WebKit::SchedulableLoader::SchedulableLoader):
* NetworkProcess/SchedulableLoader.h:
(WebKit::SchedulableLoader::clientCredentialPolicy):
Don’t message for credentials if the ClientCredentialPolicy forbids it:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
* NetworkProcess/NetworkResourceLoader.h:
Update for the new loadResourceSynchronously signature (which is still a no-op on the NetworkProcess side):
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously):
* NetworkProcess/NetworkProcessPlatformStrategies.h:
2013-04-29 Jer Noble <jer.noble@apple.com>
Unreviewed build fix. Point the Network process towards its own version of SecItemShim.dyld.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist:
2013-04-29 Alexey Proskuryakov <ap@apple.com>
Threads get stuck in NetworkProcess when canceling loads
https://bugs.webkit.org/show_bug.cgi?id=115319
Backing out part of the fix, as it's causing crashes.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
2013-04-29 Noam Rosenthal <noam@webkit.org>
Get rid of "non-composited contents" in CoordinatedLayerTreeHost
https://bugs.webkit.org/show_bug.cgi?id=110355
Reviewed by Jocelyn Turcotte.
Instead of using a special non-composited contents layer, we let RenderLayerCompositor create
a proper GraphicsLayer for that content.
CoordinatedLayerTreeHost now needs to find the main contents layer for the purpose of setting
the trajectory vector and applying the cover rect.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
Don't create the non-composited layer, instead keep a raw pointer to the root
compositing layer created by the WebCore compositor.
(WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay):
(WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplayInRect):
(WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
(WebKit::CoordinatedLayerTreeHost::sizeDidChange):
(WebKit::CoordinatedLayerTreeHost::paintContents):
(WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
(WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
Remove non-composited layer specialization.
2013-04-29 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt] Build fix. Enabling c++11 for Qt WK2 after r149259.
https://bugs.webkit.org/show_bug.cgi?id=115345
Reviewed by Anders Carlsson.
* WebKit2.pri:
2013-04-29 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
[WK2][EFL] Skip cancel fullscreen request if not made from FullScreen API
https://bugs.webkit.org/show_bug.cgi?id=108201
Reviewed by Andreas Kling.
Adds a check on WebFullScreenManagerProxyEfl whether fullscreen mode was
set from FullScreen API or not, so it can skip cancelling fullscreen
request if fullscreen mode was set by application, preventing
WebProcess' FullScreenManager from crashing.
EFL unit test available: ewk_view_cancel_full_screen_request.
* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewExitFullScreen):
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
WKViewExitFullScreen now returns a bool, indicating whether the
operation has succeeded or not.
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_fullscreen_exit):
Skip request if not in fullscreen mode.
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
Added ewk_view_cancel_full_screen_request unit test.
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::exitFullScreen):
* UIProcess/CoordinatedGraphics/WebView.h:
(WebView):
exitFullScreen now returns a bool, indicating whether the operation has
succeeded or not.
* UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
* UIProcess/WebFullScreenManagerProxy.h:
(WebFullScreenManagerProxy):
* UIProcess/efl/WebFullScreenManagerProxyEfl.cpp:
(WebKit::WebFullScreenManagerProxy::isFullScreen):
(WebKit::WebFullScreenManagerProxy::enterFullScreen):
(WebKit::WebFullScreenManagerProxy::exitFullScreen):
Added m_hasRequestedFullScreen boolean flag to EFL port. Used to
indicate if fullscreen mode is enabled, as well as sanity checks on both
{enter,exit}FullScreen functions.
2013-04-29 Anders Carlsson <andersca@apple.com>
Stop using range-based for syntax
https://bugs.webkit.org/show_bug.cgi?id=115356
Reviewed by Andreas Kling.
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::didClose):
2013-04-29 Sergio Correia <sergio.correia@openbossa.org>
[EFL][WK2]: WebProcessMain: hide call to ecore_x_shutdown() under guard
https://bugs.webkit.org/show_bug.cgi?id=115295
Reviewed by Andreas Kling.
Since the mentioned function is declared in a header that is included
conditionally depending on HAVE_ECORE_X being defined.
* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainEfl):
2013-04-29 Jinwoo Song <jinwoo7.song@samsung.com>
[WK2] Remove build warnings by -Wunused-parameter
https://bugs.webkit.org/show_bug.cgi?id=115344
Reviewed by Noam Rosenthal.
Fix build warnigs -Wunused-parameter.
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::createContextMenuProxy):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::connectionWillClose):
2013-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header files to compilation.
2013-04-28 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed fix build break on EFL port since r149259.
In EFL port, there is a non-compatible code when compiling based on C++11. This is a trivial build fix.
I got a confirm from Sam about landing a trivial build fix patch without sign-off from
WK2 owner.
* UIProcess/API/efl/EwkViewCallbacks.h:
2013-04-28 Dean Jackson <dino@apple.com>
[Mac] Disable canvas backing store scaling (HIGH_DPI_CANVAS)
https://bugs.webkit.org/show_bug.cgi?id=115310
Reviewed by Simon Fraser.
Remove ENABLE_HIGH_DPI_CANVAS_macosx.
* Configurations/FeatureDefines.xcconfig:
2013-04-28 Sam Weinig <sam@webkit.org>
[WebKit2] Adopt new API for detecting window occlusion
https://bugs.webkit.org/show_bug.cgi?id=115334
Reviewed by Simon Fraser.
Switch off of WKSI for window occlusion and use the new NSWindowDidChangeOcclusionState notification
instead.
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView viewWillMoveToWindow:]):
(-[WKView viewDidMoveToWindow]):
(-[WKView _windowDidOrderOnScreen:]):
(-[WKView _windowDidChangeOcclusionState:]):
(-[WKView _setIsWindowOccluded:]):
(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
(-[WKView windowOcclusionDetectionEnabled]):
(-[WKView setWindowOcclusionDetectionEnabled:]):
Only compile occlusion detection code where supported and remove calls to register/deregister
for detection callbacks, now that NSWindow will handle that for us. We also no longer need to
track all the WKViews, as that was only required to lookup the view that matched the window number
returned from the occlusion callback.
2013-04-26 Anders Carlsson <andersca@apple.com>
Use OwnPtr<PluginControllerProxy> for storing plug-in controllers in WebProcessConnection
https://bugs.webkit.org/show_bug.cgi?id=115259
Reviewed by Andreas Kling.
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::addPluginControllerProxy):
(WebKit::WebProcessConnection::removePluginControllerProxy):
(WebKit::WebProcessConnection::didClose):
* PluginProcess/WebProcessConnection.h:
(WebProcessConnection):
2013-04-27 Jessie Berlin <jberlin@apple.com>
Build fix.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveBuffer):
Do not declare another variable with the same name.
2013-04-27 Darin Adler <darin@apple.com>
Move from constructor and member function adoptCF/NS to free function adoptCF/NS.
https://bugs.webkit.org/show_bug.cgi?id=115307
Reviewed by Geoffrey Garen.
This change was done by a global replace followed by compiling and inspecting for
cases that needed to be tweaked by hand.
* Platform/cg/CGUtilities.cpp:
(WebKit::paintBitmapContext):
* Platform/mac/ModuleMac.mm:
(WebKit::Module::load):
(WebKit::Module::platformFunctionPointer):
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::initializeSandbox):
* Shared/API/c/mac/WKURLRequestNS.mm:
(WKURLRequestCreateWithNSURLRequest):
* Shared/API/c/mac/WKURLResponseNS.mm:
(WKURLResponseCreateWithNSURLResponse):
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
* Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h:
(WebKit::ChildProcessMain):
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::getPluginArchitecture):
(WebKit::contentsOfPropertyListAtURL):
(WebKit::getMIMETypesFromPluginBundle):
(WebKit::getStringListResource):
(WebKit::NetscapePluginModule::getPluginInfo):
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
* Shared/cf/ArgumentCodersCF.cpp:
(CoreIPC::decode):
(CoreIPC::encode):
* Shared/cg/ShareableBitmapCG.cpp:
(WebKit::ShareableBitmap::createGraphicsContext):
(WebKit::ShareableBitmap::makeCGImageCopy):
(WebKit::ShareableBitmap::makeCGImage):
(WebKit::ShareableBitmap::createCGImage):
* Shared/mac/ArgumentCodersMac.mm:
(CoreIPC::decode):
* Shared/mac/PlatformCertificateInfo.mm:
(WebKit::PlatformCertificateInfo::dump):
* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::::encodePlatformData):
(CoreIPC::::decodePlatformData):
* UIProcess/API/mac/FindIndicatorWindow.mm:
(WebKit::FindIndicatorWindow::setFindIndicator):
(WebKit::FindIndicatorWindow::startFadeOutTimerFired):
* UIProcess/API/mac/PDFViewController.mm:
(-[WKPDFView initWithFrame:PDFViewController:]):
(WebKit::PDFViewController::PDFViewController):
(WebKit::convertPostScriptDataSourceToPDF):
(WebKit::PDFViewController::setPDFDocumentData):
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::registerEditCommand):
(WebKit::PageClientImpl::setDragImage):
* UIProcess/API/mac/WKBrowsingContextController.mm:
(didFailProvisionalLoadWithErrorForFrame):
(didFailLoadWithErrorForFrame):
* UIProcess/API/mac/WKConnection.mm:
(didReceiveMessage):
* UIProcess/API/mac/WKPrintingView.mm:
(-[WKPrintingView drawRect:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView browsingContextController]):
(-[WKView _setAcceleratedCompositingModeRootLayer:]):
(-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
(-[WKView namesOfPromisedFilesDroppedAtDestination:]):
(-[WKView fullScreenWindowController]):
(-[WKView _executeSavedCommandBySelector:]):
(-[WKView printOperationWithPrintInfo:forFrame:]):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::createProcess):
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::pluginPathsInDirectory):
(WebKit::PluginInfoStore::getMIMETypeForExtension):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::beginModal):
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::sessionStateData):
(WebKit::WebPageProxy::restoreFromSessionStateData):
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):
* UIProcess/cf/WebPreferencesCF.cpp:
(WebKit::cfStringFromWebCoreString):
(WebKit::setStringValueIfInUserDefaults):
(WebKit::setBoolValueIfInUserDefaults):
(WebKit::setUInt32ValueIfInUserDefaults):
(WebKit::setDoubleValueIfInUserDefaults):
(WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
(WebKit::WebPreferences::platformUpdateDoubleValueForKey):
(WebKit::WebPreferences::platformUpdateFloatValueForKey):
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::resetScrolledRect):
(WebKit::BackingStore::backingStoreContext):
* UIProcess/mac/CorrectionPanel.mm:
(WebKit::CorrectionPanel::handleAcceptedReplacement):
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::updateSpellingUIWithGrammarString):
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
(-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultDiskCacheDirectory):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::nsMenuItemVector):
(WebKit::WebContextMenuProxyMac::populate):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::populate):
(WebKit::WebPopupMenuProxyMac::showPopupMenu):
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::load):
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::updatePluginLayer):
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
(WebKit::PluginProxy::pluginLayer):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::PDFPlugin):
(WebKit::PDFPlugin::createScrollbar):
(WebKit::PDFPlugin::pdfDocumentDidLoad):
(WebKit::PDFPlugin::writeItemsToPasteboard):
* WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
(getAllScriptsInPDFDocument):
(WebKit::SimplePDFPlugin::pdfDocumentDidLoad):
(WebKit::SimplePDFPlugin::streamDidReceiveData):
(WebKit::SimplePDFPlugin::manualStreamDidReceiveData):
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
(WebKit::WebResourceCacheManager::clearCacheForOrigin):
* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
(WebKit::WebResourceCacheManager::cfURLCacheHostNames):
(WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames):
* WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
(WebKit::createNSError):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawPagesToPDF):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForRange):
(WebKit::cachedResponseForURL):
(WebKit::WebPage::drawPagesToPDFFromPDFDocument):
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformSetCacheModel):
Use adoptCF and adoptNS free functions.
2013-04-27 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13757007> Crashes in NetworkResourceLoader::didReceiveResponseAsync
https://bugs.webkit.org/show_bug.cgi?id=115318
Reviewed by Darin Adler.
sendAbortingOnFailure may actually fail, and abort the request, making m_handle null.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync): Null check m_handle after
sending a message, because the request will cancelled when connection is invalid.
(WebKit::NetworkResourceLoader::didReceiveBuffer): Assert that m_handle matches
the handle that we are called with.
(WebKit::NetworkResourceLoader::didFinishLoading): Ditto.
(WebKit::NetworkResourceLoader::didFail): Ditto.
(WebKit::NetworkResourceLoader::willSendRequestAsync): Ditto.
(WebKit::NetworkResourceLoader::didSendData): Ditto.
(WebKit::NetworkResourceLoader::shouldUseCredentialStorage): Ditto.
(WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): Ditto.
(WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): Ditto.
(WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge): Ditto.
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): Ditto.
2013-04-27 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13757687> Threads get stuck in NetworkProcess when canceling loads
https://bugs.webkit.org/show_bug.cgi?id=115319
Reviewed by Darin Adler.
WebResourceLoader was second-guessing NetworkProcess as to whether it needs a response
to DidReceiveResponseWithCertificateInfo, and it was guessing wrong if the load was
alrady canceled on WebProcess side.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
2013-04-27 Alexey Proskuryakov <ap@apple.com>
Regression tests that reference a non-local resource crash with NetworkProcess enabled
https://bugs.webkit.org/show_bug.cgi?id=115290
Reviewed by Sam Weinig.
Covered by fast/dom/icon-url-change.html and many other existing tests.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::remove): Handle this case. Architecturally, it
would be better if SubresourceLoad::create just created an object an didn't do
further checks before returning a pointer, but changing that is beyond the scope
of the fix.
2013-04-26 Yael Aharon <yael.aharon@intel.com>
[WK2][EFL] Build break after r149212
https://bugs.webkit.org/show_bug.cgi?id=115294
Reviewed by Simon Fraser.
r144672 bumped up the revision of WKContextClient API, and introduced a version array
APIClientTraits<WKContextClient>::interfaceSizesByVersion .
In r149212, the version was bumped back down and the version array was emptied but not removed.
This causes a warning "array subscript is below array bounds", and in EFL the warning is
treated as error.
* Shared/APIClientTraits.cpp:
(WebKit):
* Shared/APIClientTraits.h:
2013-04-26 Martin Robinson <mrobinson@igalia.com>
[GTK] Add methods to add a user style sheet to the WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=99081
Reviewed by Carlos Garcia Campos, Gustavo Noronha Silva, and Benjamin Poulain.
Add methods to WebKitWebViewGroup to add and remove user style sheets.
This allows clients to inject style sheets into pages with a set of
rules for when those style sheets apply.
* UIProcess/API/gtk/WebKitWebViewGroup.cpp:
(toImmutableArray): Added this helper which converts the GList* parameters into
ImmutableArrays for use with the WebKit2 internal API.
(webkit_web_view_group_add_user_style_sheet): Added new API for adding a style sheet.
(webkit_web_view_group_remove_all_user_style_sheets): Add new API for clearing out all style sheets.
* UIProcess/API/gtk/WebKitWebViewGroup.h: Added new method declarations.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new API to the documentation.
* UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added a test for the new API.
(isStyleSheetInjectedForURLAtPath): Function to check whether the style sheet has been injected for a given URL.
(fillURLListFromPaths): Helper which converts paths passed via varargs into a whitelist or blacklist.
(removeOldInjectedStyleSheetsAndResetLists): Function to start afresh.
(testWebViewGroupInjectedStyleSheet): The actual test.
(serverCallback): Server callback for use with the test. We cannot use loadHTML or
loadAlternateHTML, because that checks the whitelist and blacklist against about:blank.
(beforeAll): Initialize the server and new test.
(afterAll): Clean up the server.
2013-04-26 Simon Cooper <scooper@apple.com>
Permit ~/Library or ~/Library/Preferences to be symlinks
https://bugs.webkit.org/show_bug.cgi?id=115142
<rdar://problem/12953603>
Reviewed by Alexey Proskuryakov.
Pass in two new parameters which are the resolved paths to ~/Library
and ~/Library/Preferences. Added new expansion functions and
substituted the new functions for home-regex, home-subpath and
home-literal for places referencing resources in "~/Library" or
"~/Library/Preferences".
* Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
* Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
* Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
* Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
* Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::initializeSandbox):
2013-04-26 Alexey Proskuryakov <ap@apple.com>
[WK2] WKContextClient doesn't need to be versioned yet
https://bugs.webkit.org/show_bug.cgi?id=115279
Reviewed by Anders Carlsson.
* Shared/APIClientTraits.cpp:
* Shared/APIClientTraits.h:
* UIProcess/API/C/WKContext.h:
2013-04-26 Anders Carlsson <andersca@apple.com>
Downloads need to be converted from the NSURLConnection, not canceled and restarted, when using the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=115277
<rdar://problem/12890184>
Reviewed by Sam Weinig.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
Ask the download manager to convert the main resource load to a download.
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
Add new message.
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::handle):
Add getter.
* Shared/Downloads/mac/DownloadMac.mm:
(dispatchOnMainThread):
Helper function that ensures that a given block is called on the main thread.
(-[WKDownloadAsDelegate downloadDidBegin:]):
(-[WKDownloadAsDelegate download:didReceiveAuthenticationChallenge:]):
(-[WKDownloadAsDelegate download:didReceiveResponse:]):
(-[WKDownloadAsDelegate download:didReceiveDataOfLength:]):
(-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
(-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
(-[WKDownloadAsDelegate download:didCreateDestination:]):
(-[WKDownloadAsDelegate downloadDidFinish:]):
(-[WKDownloadAsDelegate download:didFailWithError:]):
Use dispatchOnMainThread.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):
Remove code that cancels the current load and starts a new download.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::convertMainResourceLoadToDownload):
Send the ConvertMainResourceLoadToDownload message to the network process.
2013-04-25 Roger Fong <roger_fong@apple.com>
Disable sub-pixel layout on mac.
https://bugs.webkit.org/show_bug.cgi?id=114999.
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig:
2013-04-26 Simon Fraser <simon.fraser@apple.com>
Inspector window is often blank when opened
https://bugs.webkit.org/show_bug.cgi?id=115220
Reviewed by Tim Horton.
After disabling tiled scrolling and accelerated drawing in r149006, the
Inspector window was often missing its content after opening. This only
happened when the user has a preference on disk to use accelerated drawing
in the Inspector.
The missing content was caused by a failure to connect the correct contextID
for remote layer hosting. On window creation, we hook up a context using
WindowServer layer hosting (the default), but then switch back to app-hosted
layers for the Inspector window. This switching happens in didUpdateBackingStoreState(),
but that can be re-entered via its call to sendUpdateBackingStoreState(). In
that cause, on unwinding the stack it would call enterAcceleratedCompositingMode()
with a stale layerTreeContext.
Fix by moving the code that exits/enters accelerated compositing mode to before
the call to sendUpdateBackingStoreState() that can cause re-entrancy. That avoids
use of a possibly stale layerTreeContext.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
2013-04-26 Alexey Proskuryakov <ap@apple.com>
Crashes under ResourceHandle::continueDidReceiveResponse when loading blobs
https://bugs.webkit.org/show_bug.cgi?id=115273
Reviewed by Anders Carlsson.
Covered by multiple existing tests (when using NetworkProcess), including:
- http/tests/fileapi/blob-url-in-subframe.html
- http/tests/fileapi/create-blob-url-from-data-url.html
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueDidReceiveResponse):
Work around BlobResourceHandle badness.
2013-04-26 Alexey Proskuryakov <ap@apple.com>
[WK2] Remove NetworkResourceLoader::cleanupOnMainThread
https://bugs.webkit.org/show_bug.cgi?id=115268
Reviewed by Brady Eidson.
All cleanup() callers are now on main thread, and this indirection only complicates debugging.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::connectionToWebProcessDidClose):
(WebKit::NetworkResourceLoader::abortInProgressLoad):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFail):
* NetworkProcess/NetworkResourceLoader.h:
2013-04-26 Andy Estes <aestes@apple.com>
[WebKit2] CustomProtocolManager's m_registeredSchemes HashSet can be accessed by multiple threads
https://bugs.webkit.org/show_bug.cgi?id=115267
Reviewed by Alexey Proskuryakov.
* Shared/Network/CustomProtocols/CustomProtocolManager.h: Added a Mutex to protect m_registeredSchemes.
* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
(WebKit::CustomProtocolManager::registerScheme): Acquired the mutex before accessing m_registeredSchemes.
(WebKit::CustomProtocolManager::unregisterScheme): Ditto.
(WebKit::CustomProtocolManager::supportsScheme): Ditto.
2013-04-26 Alexey Proskuryakov <ap@apple.com>
Blobs are not associated with connection when there are no sandbox extensions
https://bugs.webkit.org/show_bug.cgi?id=115264
Reviewed by Brady Eidson.
Covered by multiple fast/files tests when using NetworkProcess.
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerBlobURL): Fixed a logic error.
2013-04-25 Andy Estes <aestes@apple.com>
[WebKit2] Loading a resource from a custom protocol in a synchronous XHR times out
https://bugs.webkit.org/show_bug.cgi?id=115223
Reviewed by Darin Adler.
When WebKit performs a synchronous load on the Mac, it spins a nested
run loop in a mode that only accepts input from the NSURLConnection
performing the load. When the load is for a custom protocol in WebKit2,
we proxy it to the UI process via CoreIPC messages, but the response
messages from the UI process are never processed as long as the run
loop is in a non-common mode (and we wouldn't want to process messages
that could re-enter WebCore in the middle of loading, anyway). Since
these messages never make it back to the NSURLConnection handling the
request, the connection eventually times out.
Fix this by using a work queue to handle custom protocol messages in
the networking process. The work queue can process incoming custom
protocol messages while the main thread is blocked.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeConnection): Called
initializeConnection() on all the NetworkProcess's supplements.
* Shared/ChildProcessSupplement.h: Added a base class for
NetworkProcessSupplement and WebProcessSupplement which defines
initializeConnection and provides an empty default implementation.
(WebKit::ChildProcessSupplement::~ChildProcessSupplement):
(WebKit::ChildProcessSupplement::initializeConnection):
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
(WebKit::CustomProtocolManager::CustomProtocolManager): Instantiated a
work queue for message processing.
(WebKit::CustomProtocolManager::initializeConnection): Added the work
queue as a message receiver on the CoreIPC connection.
(WebKit::CustomProtocolManager::initialize): If we're in the web
process and the network process is being used, unregister and destroy
the work queue we previously created. It'd be better to not create it
in the first place, but we have to register our work queue with the
CoreIPC connection before it is established, which is before the UI
process has told us whether the network process is in use.
* Shared/Network/NetworkProcessSupplement.h: Inherited from
ChildProcessSupplement.
* WebKit2.xcodeproj/project.pbxproj: Added ChildProcessSupplement.h.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection): Called
initializeConnection() on all the WebProcess's supplements.
* WebProcess/WebProcessSupplement.h: Inherited from
ChildProcessSupplement.
2013-04-26 Eduardo Lima Mitev <elima@igalia.com>
[GTK] Compilation of ProcessLauncherGtk.cpp fails due to unresolved symbols
https://bugs.webkit.org/show_bug.cgi?id=115240
Reviewed by Martin Robinson.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: Includes sys/socket.h if OS is Linux
2013-04-25 Zan Dobersek <zdobersek@igalia.com>
[GTK] Plugin process broken due to a missing symbol
https://bugs.webkit.org/show_bug.cgi?id=114901
Reviewed by Gustavo Noronha Silva.
Work around the missing symbols in the WebKitPluginProcess by specifying the required libraries
multiple times in the program's LDADD list. Libtool fights fiercely to avoid duplicate static library
references among the linker arguments (even if using the --preserve-dup-deps flag) so the required libraries
are specified in various ways.
The unresolved symbols in object files are no longer ignored as this can lead to further trouble (for instance
this patch also adds a few missing source files to the list of WebKitPluginProcess sources). The Freetype and
gamepad dependencies' libraries are also added to the binary's LDADD list.
* GNUmakefile.am:
* GNUmakefile.list.am: Add a few missing files to the build.
2013-04-24 Chris Fleizach <cfleizach@apple.com>
WEB SPEECH: language support does not work as expected
https://bugs.webkit.org/show_bug.cgi?id=115119
Reviewed by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2013-04-25 Anders Carlsson <andersca@apple.com>
Rename DecidePolicyForResponse message to DecidePolicyForResponseSync
https://bugs.webkit.org/show_bug.cgi?id=115207
Reviewed by Beth Dakin.
In preparation for adding a new async DecidePolicyForResponse message,
rename the current one to DecidePolicyForResponseSync. Also split out the async part
into a separate WebPageProxy::decidePolicyForResponse member function.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseSync):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2013-04-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ConsoleMessage should include line and column number where possible
https://bugs.webkit.org/show_bug.cgi?id=114929
Reviewed by Timothy Hatcher.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::addMessageToConsole):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2013-04-25 Brady Eidson <beidson@apple.com>
Thread safety issues in WKCustomProtocol.
<rdar://problem/13247304> and https://bugs.webkit.org/show_bug.cgi?id=115185
Reviewed by Alexey Proskuryakov.
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
(WebKit::CustomProtocolManager::addCustomProtocol): Protect m_customProtocolMap with its mutex.
(WebKit::CustomProtocolManager::removeCustomProtocol): Ditto.
(WebKit::CustomProtocolManager::didFailWithError):
(WebKit::CustomProtocolManager::didLoadData):
(WebKit::CustomProtocolManager::didReceiveResponse):
(WebKit::CustomProtocolManager::didFinishLoading):
(WebKit::CustomProtocolManager::protocolForID): Protect m_customProtocolMap with its mutex, and return
a RetainPtr instead of a raw pointer.
2013-04-25 Jer Noble <jer.noble@apple.com>
Further build fixes: correct two more misnames of WebProcessShim.dyld.
* WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
(WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
2013-04-25 Martin Robinson <mrobinson@igalia.com>
Make gobject-introspection warnings non-fatal
https://bugs.webkit.org/show_bug.cgi?id=115184
Reviewed by Carlos Garcia Campos.
* GNUmakefile.am: Make it so that gobject-introspection errors do not fail the buld
until we get to a point where gobject-introspection gives consistent warnings.
2013-04-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add WebKitWebViewGroup to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=111265
Reviewed by Anders Carlsson.
In the current API the settings are always shared by all web
views, because they are always created on the default page
group. This makes impossible to have different settings on
different web views. Expose the page group in the API,
so that users can create web views on a group different than the
default one to have their own settings.
* GNUmakefile.list.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkitSettingsGetPreferences): Helper private method to get the
WebPreferences wrapped by a WebKitSettings object.
* UIProcess/API/gtk/WebKitSettingsPrivate.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(_WebKitWebContextPrivate): Add a default WebKitWebViewGroup.
(webkitWebContextCreatePageForWebView): Create the WebPageProxy
with the WebPageGroup of the given WebKitWebViewGroup.
(webkitWebContextGetDefaultWebViewGroup): Helper private method to
get the default WebKitWebViewGroup.
* UIProcess/API/gtk/WebKitWebContextPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(_WebKitWebViewPrivate): Add a WebKitWebViewGroup in case the view
is created with a group.
(webkitWebViewUpdateSettings): Keep a reference of the group
settings to be able to disconnect the signals when the settings
object is replaced in the view group and connect to the signals
for the custom settings.
(webkitWebViewSettingsChanged): Disconnect the signals for the
previous settings and set the new settings.
(webkitWebViewDisconnectSettingsChangedSignalHandler): Disconnect
notify::settings signal of WebKitWebViewGroup.
(webkitWebViewConstructed): Pass the current WebKitWebViewGroup to
webkitWebContextCreatePageForWebView().
(webkitWebViewSetProperty): Add setter for group property.
(webkitWebViewGetProperty): Add getter for group property.
(webkitWebViewDispose): Call
webkitWebViewDisconnectSettingsChangedSignalHandler().
(webkit_web_view_class_init): Add WebKitWebView:group property.
(webkitWebViewHandleAuthenticationChallenge): Use
webkit_web_view_get_settings().
(webkit_web_view_new_with_group): Create a new web view with the
given WebKitWebViewGroup.
(webkit_web_view_get_group): Return the current WebKitWebViewGroup
or the default one if the view was not created with
webkit_web_view_new_with_group().
(webkit_web_view_set_settings): Set the settings of the current
WebKitWebViewGroup.
(webkit_web_view_get_settings): Get the settings of the current
WebKitWebViewGroup.
(webkit_web_view_set_zoom_level): Use
webkit_web_view_get_settings().
(webkit_web_view_get_zoom_level): Ditto.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewGroup.cpp: Added.
(_WebKitWebViewGroupPrivate):
(webkitWebViewGroupSetProperty):
(webkitWebViewGroupGetProperty):
(webkitWebViewGroupConstructed):
(webkit_web_view_group_class_init):
(webkitWebViewGroupAttachSettingsToPageGroup): Set the
WebPreferences of the current WebKitSettings to the WebPageGroup.
(webkitWebViewGroupCreate): Create a new WebKitWebViewGroup for
the given WebPageGroup.
(webkitWebViewGroupGetPageGroup): Helper private method to get the
WebPageGroup wrapped by the WebKitWebViewGroup.
(webkit_web_view_group_new): Create a new WebKitWebViewGroup.
(webkit_web_view_group_get_name): Return the name of a
WebKitWebViewGroup.
(webkit_web_view_group_get_settings): Get the settings of a
WebKitWebViewGroup.
(webkit_web_view_group_set_settings): Set new settings of a
WebKitWebViewGroup.
* UIProcess/API/gtk/WebKitWebViewGroup.h: Added.
(_WebKitWebViewGroup):
(_WebKitWebViewGroupClass):
* UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Added.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
WebKitWebViewGroup section.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_web_view_group_get_type.
* UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to
compilation.
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewSettings): We can't watch settings in the default view
group anymore, because they are not released with the web view but
with the web context that is freed after the Test destructor.
* UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added.
(testWebViewGroupDefault):
(testWebViewGroupNewGroup):
(testWebViewNewWithGroup):
(testWebViewGroupSettings):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/webkit2.h: Include WebKitWebViewGroup.h.
2013-04-25 Jer Noble <jer.noble@apple.com>
Unreviewed build fix: Fix the name of DyldInterpose.h in
SecItemShimLibrary.mm, fix the name of WebProcessShim.dyld in
WebContentServiceEntryPoint.mm, and stop linking against libWTF.a
directly (which means removing ASSERTs from
CookieStorageShimLibrary.cpp).
* Shared/mac/CookieStorageShimLibrary.cpp:
(WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL):
(WebKit::WebKitCookieStorageShimInitialize):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):
* WebProcess/mac/SecItemShimLibrary.mm:
2013-04-24 Tim Horton <timothy_horton@apple.com>
PDFPlugin: Cursor should become an i-beam when over selectable text
https://bugs.webkit.org/show_bug.cgi?id=115018
<rdar://problem/12645012>
Reviewed by Alexey Proskuryakov.
* WebProcess/Plugins/PDF/PDFPlugin.h:
Add updateCursor(), the UpdateCursorMode and HitTestResult enums, and
storage for the last PDF hit test result.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::updateCursor):
Hit test the PDF. If there is a word under the cursor, use the I-beam cursor,
otherwise, use the default pointer cursor. This approximates PDFKit's behavior,
though does not match it precisely in the case of annotations.
Only send the cursor update to the UIProcess if it is a change, or if
we're explicitly asked to update.
(WebKit::PDFPlugin::handleMouseEvent):
If we're processing a mouse moved event, update the cursor if needed.
(WebKit::PDFPlugin::handleMouseEnterEvent):
If the cursor just moved over the PDFPlugin, force-update the cursor,
even if it matches the previously-set cursor (because something else
likely updated the cursor while it was not over the PDFPlugin).
2013-04-24 Tim Horton <timothy_horton@apple.com>
Page Overlays shouldn't waste time flushing layers if we're not going to use it
https://bugs.webkit.org/show_bug.cgi?id=115145
Reviewed by Simon Fraser.
Don't flush the page overlay layer when it's installed - it starts out
with paintContents=false, so we don't really need a CALayer yet. We'll
flush later if need be.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
2013-04-24 Jer Noble <jer.noble@apple.com>
Further unreviewed build fix; CFNetwork.framework is the one which Lion
refuses to link against.
* WebKit2.xcodeproj/project.pbxproj:
2013-04-24 Jer Noble <jer.noble@apple.com>
Unreviewed build fix; link against CoreServices.framework instead of against
CoreFoundation.framework directly, to make the linker happy on Lion.
* WebKit2.xcodeproj/project.pbxproj:
2013-04-22 Jer Noble <jer.noble@apple.com>
WWDC session videos don’t play at developer.apple.com
https://bugs.webkit.org/show_bug.cgi?id=114858
Reviewed by Eric Carlson. Rubber stamped by Brady Eidson.
AVFoundation uses CFNetwork to store and retrieve cookies from the global store.
However, in the case where network access happens in the NetworkProcess, session
cookies are stored in-memory, and are not accessable in the WebProcess. Until such
a time as AVFoundation can provide an API which would allow us to provide cookies
for a specific request, we will interpose the CFNetwork method which they use to
retrieve the cookie string from the cookie store for their pending request.
Duplicate the previous SecItemShim target to a new, WebProcessShim target. This
target includes the SecItemShim functionality, but will add a new shim for cookie
retrieval:
* Shared/mac/CookieStorageShimLibrary.h: Added
(CookieStorageShimCallbacks):
* Shared/mac/CookieStorageShimLibrary.cpp: Added.
(WebKit::ShimProtector::ShimProtector): A simple stack-based counter class.
(WebKit::ShimProtector::~ShimProtector):
(WebKit::ShimProtector::count):
(WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL): Interpose
the CFNetwork call, and pass to the registered callback.
(WebKit::WebKitCookieStorageShimInitialize): Register the callbacks.
Add a helper singleton class which will talk to the shim through the
registered callbacks:
* Shared/mac/CookieStorageShim.h: Added
(WebKit::CookieStorageShim::CookieStorageShim):
* Shared/mac/CookieStorageShim.cpp: Added.
(WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL): Pass the request
over to the NetworkProcess.
(WebKit::CookieStorageShim::shared): Simple singleton.
(WebKit::CookieStorageShim::initialize): Call the library initializer.
Initialize the shim only when the WebProcess is delegating network loading
to the NetworkProcess:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Rename the WebProcess's shim from SecItemShim -> WebProcessShim:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::addDYLDEnvironmentAdditions):
* WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
(WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):
As the DYLD_INTERPOSE macro is used in multiple files now, put it in its
own header:
* Shared/mac/DyldInterpose.h: Added.
* PluginProcess/mac/PluginProcessShim.mm:
* WebProcess/mac/SecItemShimLibrary.mm:
Add new files to the project:
* WebKit2.xcodeproj/project.pbxproj:
2013-04-24 Byungwoo Lee <bw80.lee@samsung.com>
[EFL] Fix build error after r148963.
https://bugs.webkit.org/show_bug.cgi?id=115126
Reviewed by Laszlo Gombos.
Generate forwarding headers for 'CoordinatedGraphics' to generate WKView.h
* PlatformEfl.cmake:
2013-04-24 Anders Carlsson <andersca@apple.com>
Crash when trying to determine the length of an invalid message
https://bugs.webkit.org/show_bug.cgi?id=115127
<rdar://problem/13700736>
Reviewed by Beth Dakin.
Use message instead of incomingMessage since incomingMessage will always be null.
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::processIncomingMessage):
2013-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use stamp files for generate-forwarding-headers makefile rules
https://bugs.webkit.org/show_bug.cgi?id=115118
Reviewed by Martin Robinson.
Use a stamp file for the WebKit2 forwarding generator rule. Also
fix the rule dependencies that pointed to a non existent variable.
* GNUmakefile.am:
2013-04-24 Zan Dobersek <zdobersek@igalia.com>
[GTK][WK2] Implement LayerTreeHostGtk::pageBackgroundTransparencyChanged
https://bugs.webkit.org/show_bug.cgi?id=115094
Reviewed by Tim Horton.
The method was introduced in r149004 (and a stub implementation for the GTK port added in r149017).
Implement the method for the GTK port in the same manner it is implemented under the Mac port,
calling setContentsOpaque on the non-composited content layer.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):
2013-04-24 Simon Cooper <scooper@apple.com>
<rdar://problem/13614117> Refine the Flash Player profile
https://bugs.webkit.org/show_bug.cgi?id=115016
Reviewed by Alexey Proskuryakov.
Add some refinements to the Flash Player profile. Make a non-/ home
directory work. Fixes that allow file uploading via user selected files.
* Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2013-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
[WebKit2] Add CoordinatedGraphics to the list of platforms in generate-forwarding-headers.pl
https://bugs.webkit.org/show_bug.cgi?id=115098
Reviewed by Martin Robinson.
r148963 introduced a new WKView.h header in a directory not listed
as a platform prefix in generate-forwarding-headers.pl.
* Scripts/generate-forwarding-headers.pl: Replace unused chromium
plaform prefix with CoordinatedGraphics that is used now.
2013-04-24 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Add number to list from remote web inspector.
https://bugs.webkit.org/show_bug.cgi?id=115014
Reviewed by Benjamin Poulain.
* UIProcess/InspectorServer/front-end/inspectorPageIndex.html:
2013-04-24 Vlad Vasilyeu <vasvlad@gmail.com>
--minimal build fails with error: Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h:44:36: error: decode is not a member of WebCore::TextCheckingResult
https://bugs.webkit.org/show_bug.cgi?id=114367
Reviewed by Benjamin Poulain.
Include WebCoreArgumentCoders.h to WebEditorClientEfl.cpp from
WebKit2/Shared/ for successfully building with option --minimal
* WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
== Rolled over to ChangeLog-2013-04-24 ==