ea8f0bc7606457d7bf98a583e0db95e821683e92
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
2
3         <rdar://problem/13902706> Lion: com.apple.tsm.uiserver sandbox error in Console when
4         launching Safari
5
6         Reviewed by Anders Carlsson.
7
8         * WebProcess/com.apple.WebProcess.sb.in: Silence the violation.
9
10 2013-05-13  Anders Carlsson  <andersca@apple.com>
11
12         Frame::editor() should return a reference
13         https://bugs.webkit.org/show_bug.cgi?id=116037
14
15         Reviewed by Darin Adler.
16
17         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
18         (WebKit::WebContextMenuClient::searchWithGoogle):
19         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
20         (WebKit::WebEditorClient::updateGlobalSelection):
21         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
22         (WebKit::WebEditorClient::handleInputMethodKeydown):
23         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
24         (WebKit::WebEditorClient::executePendingEditorCommands):
25         (WebKit::WebEditorClient::handleKeyboardEvent):
26         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
27         (WebKit::WebContextMenuClient::searchWithGoogle):
28         (WebKit::WebContextMenuClient::searchWithSpotlight):
29         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
30         (WebKit::changeWordCase):
31         * WebProcess/WebPage/WebFrame.cpp:
32         (WebKit::WebFrame::selectionAsString):
33         (WebKit::WebFrame::setTextDirection):
34         * WebProcess/WebPage/WebPage.cpp:
35         (WebKit::WebPage::editorState):
36         (WebKit::WebPage::executeEditingCommand):
37         (WebKit::WebPage::isEditingCommandEnabled):
38         (WebKit::WebPage::validateCommand):
39         (WebKit::WebPage::handleEditingKeyboardEvent):
40         (WebKit::WebPage::advanceToNextMisspelling):
41         (WebKit::WebPage::uppercaseWord):
42         (WebKit::WebPage::lowercaseWord):
43         (WebKit::WebPage::capitalizeWord):
44         (WebKit::WebPage::replaceSelectionWithText):
45         (WebKit::WebPage::handleAlternativeTextUIResult):
46         (WebKit::WebPage::setCompositionForTesting):
47         (WebKit::WebPage::hasCompositionForTesting):
48         (WebKit::WebPage::confirmCompositionForTesting):
49         (WebKit::WebPage::setComposition):
50         (WebKit::WebPage::cancelComposition):
51         * WebProcess/WebPage/efl/WebPageEfl.cpp:
52         (WebKit::WebPage::confirmComposition):
53         (WebKit::WebPage::setComposition):
54         (WebKit::WebPage::cancelComposition):
55         * WebProcess/WebPage/mac/WebPageMac.mm:
56         (WebKit::WebPage::executeKeypressCommandsInternal):
57         (WebKit::WebPage::handleEditingKeyboardEvent):
58         (WebKit::WebPage::setComposition):
59         (WebKit::WebPage::confirmComposition):
60         (WebKit::WebPage::cancelComposition):
61         (WebKit::WebPage::insertText):
62         (WebKit::WebPage::insertDictatedText):
63         (WebKit::WebPage::getMarkedRange):
64         (WebKit::WebPage::firstRectForCharacterRange):
65         (WebKit::WebPage::readSelectionFromPasteboard):
66         (WebKit::WebPage::getStringSelectionForPasteboard):
67         (WebKit::WebPage::getDataSelectionForPasteboard):
68
69 2013-05-15  Anders Carlsson  <andersca@apple.com>
70
71         Need a way for NPAPI plug-ins to open preference panes
72         https://bugs.webkit.org/show_bug.cgi?id=116173
73         <rdar://problem/13503848>
74
75         Reviewed by Sam Weinig.
76
77         * PluginProcess/PluginControllerProxy.h:
78         Add openPluginPreferencePane().
79
80         * PluginProcess/mac/PluginControllerProxyMac.mm:
81         (WebKit::PluginControllerProxy::openPluginPreferencePane):
82         Send OpenPluginPreferencePane to the UI process.
83
84         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
85         (WebKit::NetscapePluginModule::getPluginInfo):
86         Get the preference pane path.
87         
88         * Shared/Plugins/PluginModuleInfo.h:
89         Add preferencePanePath member variable.
90
91         * UIProcess/Plugins/PluginProcessProxy.h:
92         Add openPluginPreferencePane message handler.
93
94         * UIProcess/Plugins/PluginProcessProxy.messages.in:
95         ADd OpenPluginPreferencePane message.
96
97         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
98         (WebKit::PluginProcessProxy::openPluginPreferencePane):
99         Get the path to the preference pane and use LS to open it.
100
101         * WebKit2.xcodeproj/project.pbxproj:
102         Add new files.
103
104         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
105         (WebKit::NPN_GetValue):
106         Handle WKNVPlugInContainer.
107
108         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
109         Add WKNVPlugInContainer member variable.
110
111         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
112         (WebKit::NetscapePlugin::openPluginPreferencePane):
113         Call through to the plug-in controller.
114
115         (WebKit::NetscapePlugin::plugInContainer):
116         Create a WKNPAPIPlugInContainer object if necessary.
117
118         (WebKit::NetscapePlugin::platformDestroy):
119         Invalidate the WKNPAPIPlugInContainer object.
120
121         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.h:
122         New file with the protocol definition.
123
124         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm:
125         (-[WKNPAPIPlugInContainer dealloc]):
126         Assert that the plug-in is null (that we've been invalidated).
127
128         (-[WKNPAPIPlugInContainer _invalidate]):
129         Set the plug-in to null.
130
131         (-[WKNPAPIPlugInContainer openPlugInPreferencePane]):
132         Call through to the plug-in.
133
134         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainerInternal.h:
135         New file with the interface declaration for the object that implements the protocol.
136
137         * WebProcess/Plugins/PluginController.h:
138         Add openPluginPreferencePane member function.
139
140         * WebProcess/Plugins/PluginView.cpp:
141         (WebKit::PluginView::openPluginPreferencePane):
142         Add stub; this should never be called since we always go through the UI process.
143
144 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
145
146         [WK2][Mac] Split resetTextInputState into two functions
147         https://bugs.webkit.org/show_bug.cgi?id=116174
148
149         Reviewed by Anders Carlsson.
150
151         Splitting resetTextInputState into resetSecureInputState and
152         notifyInputContextAboutDiscardedComposition, paving the way for a fix where these
153         won't be happening simultaneously.
154
155         * UIProcess/API/mac/PageClientImpl.h:
156         * UIProcess/API/mac/PageClientImpl.mm:
157         (WebKit::PageClientImpl::resetSecureInputState):
158         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
159         * UIProcess/API/mac/WKView.mm:
160         (-[WKView resignFirstResponder]):
161         (-[WKView _resetSecureInputState]):
162         (-[WKView _notifyInputContextAboutDiscardedComposition]):
163         * UIProcess/API/mac/WKViewInternal.h:
164         * UIProcess/PageClient.h:
165         * UIProcess/WebPageProxy.cpp:
166         (WebKit::WebPageProxy::didCommitLoadForFrame):
167
168 2013-05-15  Carlos Garcia Campos  <cgarcia@igalia.com>
169
170         [GTK] Add padding to all public class structs for future expansion without breaking ABI
171         https://bugs.webkit.org/show_bug.cgi?id=112565
172
173         Reviewed by Anders Carlsson.
174
175         Use 4 pointers for most of the classes that are unlikely to grow
176         and 8 for WebKitWebView and WebKitWebContext.
177
178         * UIProcess/API/gtk/WebKitBackForwardList.h:
179         (_WebKitBackForwardListClass):
180         * UIProcess/API/gtk/WebKitBackForwardListItem.h:
181         (_WebKitBackForwardListItemClass):
182         * UIProcess/API/gtk/WebKitContextMenu.h:
183         (_WebKitContextMenuClass):
184         * UIProcess/API/gtk/WebKitContextMenuItem.h:
185         (_WebKitContextMenuItemClass):
186         * UIProcess/API/gtk/WebKitCookieManager.h:
187         (_WebKitCookieManagerClass):
188         * UIProcess/API/gtk/WebKitDownload.h:
189         (_WebKitDownloadClass):
190         * UIProcess/API/gtk/WebKitFaviconDatabase.h:
191         (_WebKitFaviconDatabaseClass):
192         * UIProcess/API/gtk/WebKitFileChooserRequest.h:
193         (_WebKitFileChooserRequestClass):
194         * UIProcess/API/gtk/WebKitFindController.h:
195         (_WebKitFindControllerClass):
196         * UIProcess/API/gtk/WebKitFormSubmissionRequest.h:
197         (_WebKitFormSubmissionRequestClass):
198         * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h:
199         (_WebKitGeolocationPermissionRequestClass):
200         * UIProcess/API/gtk/WebKitHitTestResult.h:
201         (_WebKitHitTestResultClass):
202         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
203         (_WebKitNavigationPolicyDecisionClass):
204         * UIProcess/API/gtk/WebKitPlugin.h:
205         (_WebKitPluginClass):
206         * UIProcess/API/gtk/WebKitPolicyDecision.h:
207         (_WebKitPolicyDecisionClass):
208         * UIProcess/API/gtk/WebKitPrintOperation.h:
209         (_WebKitPrintOperationClass):
210         * UIProcess/API/gtk/WebKitResponsePolicyDecision.h:
211         (_WebKitResponsePolicyDecisionClass):
212         * UIProcess/API/gtk/WebKitSecurityManager.h:
213         (_WebKitSecurityManagerClass):
214         * UIProcess/API/gtk/WebKitSettings.h:
215         (_WebKitSettingsClass):
216         * UIProcess/API/gtk/WebKitURIRequest.h:
217         (_WebKitURIRequestClass):
218         * UIProcess/API/gtk/WebKitURIResponse.h:
219         (_WebKitURIResponseClass):
220         * UIProcess/API/gtk/WebKitURISchemeRequest.h:
221         (_WebKitURISchemeRequestClass):
222         * UIProcess/API/gtk/WebKitWebContext.h:
223         (_WebKitWebContextClass):
224         * UIProcess/API/gtk/WebKitWebInspector.h:
225         (_WebKitWebInspectorClass):
226         * UIProcess/API/gtk/WebKitWebResource.h:
227         (_WebKitWebResourceClass):
228         * UIProcess/API/gtk/WebKitWebView.h:
229         (_WebKitWebViewClass):
230         * UIProcess/API/gtk/WebKitWebViewBase.h:
231         (_WebKitWebViewBaseClass):
232         * UIProcess/API/gtk/WebKitWebViewGroup.h:
233         (_WebKitWebViewGroupClass):
234         * UIProcess/API/gtk/WebKitWindowProperties.h:
235         (_WebKitWindowPropertiesClass):
236
237 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
238
239         Remove WTF_USE_PLATFORM_STRATEGIES
240         https://bugs.webkit.org/show_bug.cgi?id=114431
241
242         Reviewed by Darin Adler.
243
244         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
245         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
246         * WebProcess/WebProcess.cpp:
247         (WebKit::WebProcess::WebProcess):
248
249 2013-05-14  Simon Cooper  <scooper@apple.com>
250
251         Add a preference that can disable the fake SYSV SHM shim
252         https://bugs.webkit.org/show_bug.cgi?id=116127
253         <rdar://problem/13810524>
254
255         Reviewed by Alexey Proskuryakov.
256
257         * PluginProcess/mac/PluginProcessShim.mm:
258         (WebKit::shim_disabled):
259         (WebKit::shim_shmdt):
260         (WebKit::shim_shmat):
261         (WebKit::shim_shmget):
262         (WebKit::shim_shmctl):
263
264 2013-05-14  Tim Horton  <timothy_horton@apple.com>
265
266         [wk2] Not updating tiled backing coverage when main frame scrollability changes
267         https://bugs.webkit.org/show_bug.cgi?id=116123
268         <rdar://problem/13836559>
269
270         Reviewed by Simon Fraser.
271
272         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
273         (TiledCoreAnimationDrawingArea):
274         Add updateMainFrameClipsToExposedRect.
275
276         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
277         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
278         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
279         Remove m_clipsToExposedRect. We don't actually need it.
280
281         (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
282         Call updateMainFrameClipsToExposedRect so that we can always update
283         tiled backing coverage and can factor out our calls to setClipsToExposedRect.
284
285         (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
286         Factor out setClipsToExposedRect calls to here, and also call
287         FrameView::adjustTiledBackingCoverage so that the FrameView's tiled
288         backing is informed to allow overdraw in the UI-process-scrolling case.
289
290         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
291         Use updateMainFrameClipsToExposedRect.
292
293 2013-05-14  Alexey Proskuryakov  <ap@apple.com>
294
295         [Mac] Add a testing shim for secure event input functions
296         https://bugs.webkit.org/show_bug.cgi?id=116122
297
298         Reviewed by Mark Rowe.
299
300         Moved DyldInterpose.h to WebCore, as we now use it there too.
301
302         * PluginProcess/mac/PluginProcessShim.mm:
303         * Shared/mac/CookieStorageShimLibrary.cpp:
304         * Shared/mac/DyldInterpose.h: Removed.
305         * WebKit2.xcodeproj/project.pbxproj:
306         * WebProcess/mac/SecItemShimLibrary.mm:
307
308 2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
309
310         [Win] REGRESSION(r149944): mmap is not available on Windows
311         https://bugs.webkit.org/show_bug.cgi?id=116015
312
313         Reviewed by Anders Carlsson.
314
315         Use fastAlloc/fastFree for platforms other than OS(DARWIN) where
316         using mmap is not necessary and maybe not available.
317
318         * Platform/CoreIPC/ArgumentEncoder.cpp:
319         (CoreIPC::allocBuffer):
320         (CoreIPC::freeBuffer):
321         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
322         (CoreIPC::ArgumentEncoder::grow):
323
324 2013-05-14  Zan Dobersek  <zdobersek@igalia.com>
325
326         [GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
327         https://bugs.webkit.org/show_bug.cgi?id=115921
328
329         Reviewed by Gustavo Noronha Silva.
330
331         * GNUmakefile.am: Add platform_cppflags to the list of libwebkit2gtk CPPFLAGS.
332
333 2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
334
335         [WK2][Win] Fix ASSERT(DeleteTimerQueueTimer...)
336         https://bugs.webkit.org/show_bug.cgi?id=116039
337
338         Reviewed by Benjamin Poulain.
339
340         According to the documentation, DeleteTimerQueueTimer can be expected to return
341         false with an ERROR_IO_PENDING error when called from the timer's callback.
342
343         * Platform/win/WorkQueueWin.cpp:
344         (WorkQueue::timerCallback):
345
346 2013-05-14  Alexey Proskuryakov  <ap@apple.com>
347
348         Remove unused "type" field from DictionaryPopupInfo
349         https://bugs.webkit.org/show_bug.cgi?id=116011
350
351         Reviewed by Darin Adler.
352
353         It is unused, and furthermore, PDFPlugin sets it incorrectly anyway.
354
355         * Shared/DictionaryPopupInfo.cpp:
356         (WebKit::DictionaryPopupInfo::encode):
357         (WebKit::DictionaryPopupInfo::decode):
358         * Shared/DictionaryPopupInfo.h:
359         * WebProcess/Plugins/PDF/PDFPlugin.mm:
360         (WebKit::PDFPlugin::showDefinitionForAttributedString):
361         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
362         (WebKit::WebContextMenuClient::lookUpInDictionary):
363         * WebProcess/WebPage/WebPage.h:
364         * WebProcess/WebPage/mac/WebPageMac.mm:
365         (WebKit::WebPage::performDictionaryLookupAtLocation):
366         (WebKit::WebPage::performDictionaryLookupForSelection):
367         (WebKit::WebPage::performDictionaryLookupForRange):
368
369 2013-05-14  Michael Brüning  <michael.bruning@digia.com>
370
371         [WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters().
372         https://bugs.webkit.org/show_bug.cgi?id=110218
373
374         Reviewed by Darin Adler.
375
376         Make the WebPageProxy::creationParameters use the accessor
377         deviceScaleFactor() instead of using m_intrinsicDeviceScaleFactor
378         directly. This will restore the custom device scale factor when
379         reattaching to the WebProcess after a crash.
380
381         Moreover, it will enable the Qt and ELF ports to use the
382         existing C API for overriding the device scale factor instead
383         of using the WebPageProxy directly or adding new C API to set
384         the intrinsic device scale factor.
385
386         * UIProcess/API/efl/EwkView.cpp:
387         (EwkView::setDeviceScaleFactor):
388         * UIProcess/API/qt/qquickwebpage.cpp:
389         (QQuickWebPage::updatePaintNode):
390         * UIProcess/WebPageProxy.cpp:
391         (WebKit::WebPageProxy::creationParameters):
392
393 2013-05-13  Alex Christensen  <achristensen@apple.com>
394
395         Added testRunner.setPrinting.
396         https://bugs.webkit.org/show_bug.cgi?id=42693
397         rdar://problem/8213845
398
399         Reviewed by Darin Adler.
400
401         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
402         (WKBundlePageCopyRenderTreeExternalRepresentationForPrinting): Added.
403         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
404         Added WKBundlePageCopyRenderTreeExternalRepresentationForPrinting declaration.
405         * WebProcess/WebPage/WebPage.cpp:
406         (WebKit::WebPage::renderTreeExternalRepresentationForPrinting): Added.
407         * WebProcess/WebPage/WebPage.h:
408         Added renderTreeExternalRepresentationForPrinting declaration.
409
410 2013-05-13  Timothy Hatcher  <timothy@apple.com>
411
412         Add support for updating the Web Inspector toolbar height.
413
414         https://bugs.webkit.org/show_bug.cgi?id=115996
415
416         Reviewed by Joseph Pecoraro and Benjamin Poulain.
417
418         * UIProcess/WebInspectorProxy.h:
419         (WebKit::WebInspectorProxy::setToolbarHeight):
420         (WebInspectorProxy):
421         * UIProcess/WebInspectorProxy.messages.in:
422         * UIProcess/efl/WebInspectorProxyEfl.cpp:
423         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
424         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
425         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
426         (WebKit):
427         * UIProcess/mac/WebInspectorProxyMac.mm:
428         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
429         * UIProcess/qt/WebInspectorProxyQt.cpp:
430         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
431         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
432         (WebKit::WebInspectorFrontendClient::setToolbarHeight):
433         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
434         (WebInspectorFrontendClient):
435         * WebProcess/WebPage/WebInspector.cpp:
436         (WebKit::WebInspector::setToolbarHeight):
437         * WebProcess/WebPage/WebInspector.h:
438
439 2013-05-13  Ryosuke Niwa  <rniwa@webkit.org>
440
441         Sometimes NSUndoManager can get into an inconsistent state
442         https://bugs.webkit.org/show_bug.cgi?id=116050
443
444         Reviewed by Enrica Casucci.
445
446         Always group undo items to work around a bug in NSUndoManager that manifests
447         when we call removeAllActionsWithTarget.
448
449         * UIProcess/API/mac/PageClientImpl.mm:
450         (WebKit::PageClientImpl::registerEditCommand):
451
452 2013-05-13  Anders Carlsson  <andersca@apple.com>
453
454         [WK2] Crash in WebKit::StorageAreaMap::didSetItem()
455         https://bugs.webkit.org/show_bug.cgi?id=116026
456
457         Reviewed by Andreas Kling.
458
459         Make sure that we ignore any leftover messages from the UI process after we've reset
460         the storage map. Achieve this by keeping a seed count in the StorageAreaMap object that's incremented
461         everytime the map is reset. Associate every storage area change with the seed and ignore any incoming 
462         notification messages from the UI process if the seeds are different.
463
464         * Platform/CoreIPC/HandleMessage.h:
465         (CoreIPC):
466         (CoreIPC::callMemberFunction):
467         * UIProcess/Storage/StorageManager.cpp:
468         (WebKit::StorageManager::getValues):
469         (WebKit::StorageManager::setItem):
470         (WebKit::StorageManager::removeItem):
471         (WebKit::StorageManager::clear):
472         * UIProcess/Storage/StorageManager.h:
473         (StorageManager):
474         * UIProcess/Storage/StorageManager.messages.in:
475         * WebProcess/Storage/StorageAreaMap.cpp:
476         (WebKit::StorageAreaMap::StorageAreaMap):
477         (WebKit::StorageAreaMap::setItem):
478         (WebKit::StorageAreaMap::removeItem):
479         (WebKit::StorageAreaMap::clear):
480         (WebKit::StorageAreaMap::resetValues):
481         (WebKit::StorageAreaMap::loadValuesIfNeeded):
482         (WebKit::StorageAreaMap::didGetValues):
483         (WebKit::StorageAreaMap::didSetItem):
484         (WebKit::StorageAreaMap::didRemoveItem):
485         (WebKit::StorageAreaMap::didClear):
486         (WebKit::StorageAreaMap::applyChange):
487         * WebProcess/Storage/StorageAreaMap.h:
488         (StorageAreaMap):
489         * WebProcess/Storage/StorageAreaMap.messages.in:
490
491 2013-05-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
492
493         [WK2][CoordinatedGraphics] Avoid dispensable calls to WebView::updateViewportSize()
494         https://bugs.webkit.org/show_bug.cgi?id=116045
495
496         Reviewed by Darin Adler.
497
498         * UIProcess/CoordinatedGraphics/WebView.cpp:
499         (WebKit::WebView::setSize):
500
501 2013-05-13  Jon Lee  <jonlee@apple.com>
502
503         [WK2] Notification manager removal should not be tied to termination of web processes
504         https://bugs.webkit.org/show_bug.cgi?id=116038
505         <rdar://problem/10968680>
506
507         Reviewed by Ryosuke Niwa.
508
509         WebNotificationManagerProxy incorrectly removes the manager when web processes close.
510         Since it is a supplemental on the web context, the manager should only be removed
511         when the context is destroyed.
512
513         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
514         * UIProcess/Notifications/WebNotificationManagerProxy.h: Remove implementation of
515         processDidClose().
516
517 2013-05-13  Martin Robinson  <mrobinson@igalia.com>
518
519         [GTK] [WebKit2] Use a template file for generated GObject enum files
520         https://bugs.webkit.org/show_bug.cgi?id=115867
521
522         Reviewed by Carlos Garcia Campos.
523
524         * GNUmakefile.am: Use a template file instead of specifying portions of the file on the command-line.
525         * UIProcess/API/gtk/WebKitEnumTypes.cpp.template: Added.
526         * UIProcess/API/gtk/WebKitEnumTypes.h.template: Added.
527         * UIProcess/API/gtk/WebKitFindController.cpp: We can no longer rely on WebKitEnumTypes.h to pull in WebKitWebView.h.
528
529 2013-05-13  Noam Rosenthal  <noam@webkit.org>
530
531         [CoordGfx] requestAnimationFrame performance issues
532         https://bugs.webkit.org/show_bug.cgi?id=112345
533
534         Reviewed by Jocelyn Turcotte.
535
536         Changed the logic of requestAnimationFrame in Coordinated Graphics.
537         We don't send any IPC messages for requestAnimationFrame. Instead, we do one of two things:
538         - If there is already a frame pending in the UI process, do nothing, as the animations would
539           be serviced when the frame is returned to the web process.
540         - If there is no frame pending, we schedule a flush, making sure that that flush occurs at 
541           least 1/60 seconds after the last animation service, so that we don't get an infinite loop
542           of flushes.
543
544         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
545         (WebKit::CoordinatedLayerTreeHostProxy::requestAnimationFrame):
546         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
547         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
548         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
549         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
550         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
551         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
552         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in:
553
554 2013-05-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
555
556         [WK2][CoordinatedGraphics] WKView needs API for handling opacity
557         https://bugs.webkit.org/show_bug.cgi?id=116032
558
559         Reviewed by Kenneth Rohde Christiansen.
560
561         Add WKViewSetOpacity and WKViewOpacity APIs and use them in
562         WebView.cpp.
563
564         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
565         (WKViewSetOpacity):
566         (WKViewOpacity):
567         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
568         * UIProcess/CoordinatedGraphics/WebView.cpp:
569         (WebKit::WebView::WebView):
570         (WebKit::WebView::paintToCurrentGLContext):
571         * UIProcess/CoordinatedGraphics/WebView.h:
572         (WebKit::WebView::setOpacity):
573         (WebKit::WebView::opacity):
574         (WebView):
575
576 2013-05-13  Zan Dobersek  <zdobersek@igalia.com>
577
578         [GTK] Use WebCore layer archives for TestWebCore, WebKitPluginProcess
579         https://bugs.webkit.org/show_bug.cgi?id=115918
580
581         Reviewed by Gustavo Noronha Silva.
582
583         Due to layer violations and circular dependencies the WebKitPluginProcess requires for the
584         libraries containing the built code of the intertwining Platform and WebCore layers to be
585         specified multiple times when linking. This can be avoided by packing the two layers' archives
586         into one big archive, named after the WebCore layer due to no clear boundary between it and the
587         Platform layer. The big archive can then be specified only once when linking, simplifying the code
588         and suppressing all the layering violations so they do not cause build problems.
589
590         First the libtool libraries that the WebCore layer (as required by the WebKitPluginProcess) depends on
591         are specified. These are then used as dependencies for the archive creation rule as well as the list
592         from which the archive file paths are constructed and then used to dump the member files from these archives.
593         The member files are then added to the big archive. The latter is added to the list of libraries the
594         WebKitPluginProcess requires to successfully link.
595
596         * GNUmakefile.am:
597
598 2013-05-13  Zalan Bujtas  <zalan@apple.com>
599
600         WebProcess consuming very high CPU on linkedin.com
601         https://bugs.webkit.org/show_bug.cgi?id=115601
602
603         Reviewed by Andreas Kling.
604
605         Disable WEB_TIMING_MINIMAL.
606         Turn off window.performance and performance.now(). Some JS frameworks expect
607         additional Web Timing APIs, when performance.now() is available.
608
609         * Configurations/FeatureDefines.xcconfig:
610
611 2013-05-12  Anders Carlsson  <andersca@apple.com>
612
613         Stop including UnusedParam.h
614         https://bugs.webkit.org/show_bug.cgi?id=116003
615
616         Reviewed by Sam Weinig.
617
618         UnusedParam.h is empty now so there's no need to include it anymore.
619
620         * UIProcess/API/C/WKContext.cpp:
621         * UIProcess/API/C/WKInspector.cpp:
622         * UIProcess/API/C/WKPage.cpp:
623         * UIProcess/API/efl/ewk_text_checker.cpp:
624         * UIProcess/API/efl/ewk_view.cpp:
625         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
626         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
627         * UIProcess/mac/WKFullScreenWindowController.mm:
628         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
629         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
630
631 2013-05-12  Andreas Kling  <akling@apple.com>
632
633         Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
634         <http://webkit.org/b/115988>
635         <rdar://problem/13870943>
636
637         Reviewed by Anders Carlsson.
638
639         Let WebCore control the UI process's suppression of the sudden termination mechanism.
640         This is implemented by having WebChromeClient push Enable/DisableSuddenTermination messages
641         over to the UI process where the appropriate NSProcessInfo calls are made.
642
643         We also use this information when deciding whether to insta-kill a web process when its last
644         page is closed. This mechanism is re-usable in WebCore to protect against sudden termination
645         by the UI process.
646
647         * UIProcess/WebProcessProxy.cpp:
648         (WebKit::WebProcessProxy::WebProcessProxy):
649         (WebKit::WebProcessProxy::removeWebPage):
650         (WebKit::WebProcessProxy::enableSuddenTermination):
651         (WebKit::WebProcessProxy::disableSuddenTermination):
652         * UIProcess/WebProcessProxy.h:
653         (WebProcessProxy):
654         * UIProcess/WebProcessProxy.messages.in:
655         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
656         (WebKit::WebChromeClient::enableSuddenTermination):
657         (WebKit::WebChromeClient::disableSuddenTermination):
658         * WebProcess/WebCoreSupport/WebChromeClient.h:
659         (WebChromeClient):
660
661 2013-05-12  Alexey Proskuryakov  <ap@apple.com>
662
663         <rdar://problem/13402976> Sandbox violations in com.nvidia.OpenGL on Lion.
664
665         Reviewed by Dan Bernstein.
666
667         * WebProcess/com.apple.WebProcess.sb.in: Silence the violations (on Lion only).
668
669 2013-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
670
671         [GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
672         https://bugs.webkit.org/show_bug.cgi?id=115914
673
674         Reviewed by Martin Robinson.
675
676         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
677         (webkitWebViewBaseRealize):
678
679 2013-05-12  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
680
681         Unreviewed build fix after r149944.
682
683         * Platform/CoreIPC/ArgumentEncoder.cpp: Include <sys/mman.h> for mmap(2).
684
685 2013-05-11  Anders Carlsson  <andersca@apple.com>
686
687         Don't pass malloced pointers as out-of-line data when sending Mach messages
688         https://bugs.webkit.org/show_bug.cgi?id=115970
689         <rdar://problem/13144680>
690
691         Reviewed by Sam Weinig.
692
693         Give ArgumentEncoder an inline buffer of 512 bytes. If we need more than that, use mmap to allocate data
694         since that gives us fresh zero-filled memory that we can safely share.
695
696         * Platform/CoreIPC/ArgumentEncoder.cpp:
697         (CoreIPC::ArgumentEncoder::ArgumentEncoder):
698         Set up the buffer pointers to point to the inline buffer.
699
700         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
701         Unmap the buffer if necessary.
702
703         (CoreIPC::ArgumentEncoder::grow):
704         Grow the allocation exponentially, rounded up to the nearest page. This is a simplification from the
705         current strategy, but most messages are either tiny in which case they will fit inside the inline buffer,
706         or big in which case we'll end up doing less allocations + memory copying.
707
708         * Platform/CoreIPC/ArgumentEncoder.h:
709         (ArgumentEncoder):
710
711 2013-05-11  Zan Dobersek  <zdobersek@igalia.com>
712
713         Unreviewed GTK build fix after r149904.
714
715         * GNUmakefile.list.am: Adding missing build targets.
716
717 2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
718
719         Unreviewed, Fix WK2 EFL build after r149904.
720
721         Add new PluginInformation.cpp file to CMake.
722
723         * CMakeLists.txt:
724
725 2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
726
727         Unreviewed, fix WK2 EFL build after r149904.
728
729         Add new WKPluginInformation.cpp file to CMake.
730
731         * CMakeLists.txt:
732
733 2013-05-11  Andreas Kling  <akling@apple.com>
734
735         When possible, terminate web processes immediately when closing their last page.
736         <http://webkit.org/b/115964>
737         <rdar://problem/13869266>
738
739         Reviewed by Geoffrey Garen.
740
741         When we're using a network process, there's no need for the UI process to wait for web processes
742         to clear resource caches and terminate nicely.
743
744         We can just kill them off right away in WebProcessProxy::removeWebPage() when the last page is closed.
745
746         * UIProcess/WebProcessProxy.cpp:
747         (WebKit::WebProcessProxy::removeWebPage):
748
749             Terminate the child process immediately if possible.
750
751         * UIProcess/WebProcessProxy.h:
752         (WebKit::WebProcessProxy::canTerminateChildProcess):
753         (WebKit::WebProcessProxy::shouldTerminate):
754
755             Broke out the logic from the shouldTerminate() IPC message handler into a separate function
756             so we can call it from removeWebPage().
757
758 2013-05-11  Anders Carlsson  <andersca@apple.com>
759
760         Crash when terminating a process that has not been fully launched
761         https://bugs.webkit.org/show_bug.cgi?id=115962
762         <rdar://problem/13660916>
763
764         Reviewed by Andreas Kling.
765
766         Handle terminating a process that has not been fully launched.
767
768         * UIProcess/Launcher/ProcessLauncher.cpp:
769         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
770         If we have been invalidated, dispose the connection identifier.
771
772         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
773         (WebKit::ProcessLauncher::terminateProcess):
774         If we're still launching the process, invalidate so the client won't get an unexpected
775         didFinishLaunching callback.
776
777         * UIProcess/WebProcessProxy.cpp:
778         (WebKit::WebProcessProxy::requestTermination):
779         Check if webConnection() is null before calling it. (It will be null if the process isn't fully launched).
780
781 2013-05-10  Brian J. Burg  <burg@cs.washington.edu>
782
783         Web Inspector: Implement WK2 version of WebInspectorFrontendClient::save
784         https://bugs.webkit.org/show_bug.cgi?id=115564
785
786         Reviewed by Benjamin Poulain.
787
788         Implement InspectorFrontendHost's save() and append() methods for
789         Mac WebKit2. Add canSave() for all ports.
790
791         * UIProcess/WebInspectorProxy.cpp:
792         (WebKit::WebInspectorProxy::save):
793         (WebKit):
794         (WebKit::WebInspectorProxy::append):
795         * UIProcess/WebInspectorProxy.h:
796         (WebInspectorProxy):
797         * UIProcess/WebInspectorProxy.messages.in:
798         * UIProcess/efl/WebInspectorProxyEfl.cpp:
799         (WebKit::WebInspectorProxy::platformSave):
800         (WebKit):
801         (WebKit::WebInspectorProxy::platformAppend):
802         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
803         (WebKit::WebInspectorProxy::platformSave):
804         (WebKit):
805         (WebKit::WebInspectorProxy::platformAppend):
806         * UIProcess/mac/WebInspectorProxyMac.mm:
807         (WebKit::WebInspectorProxy::platformSave):
808         (WebKit):
809         (WebKit::WebInspectorProxy::platformAppend):
810         * UIProcess/qt/WebInspectorProxyQt.cpp:
811         (WebKit::WebInspectorProxy::platformSave):
812         (WebKit):
813         (WebKit::WebInspectorProxy::platformAppend):
814         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
815         (WebKit::WebInspectorFrontendClient::canSave):
816         (WebKit):
817         (WebKit::WebInspectorFrontendClient::save):
818         (WebKit::WebInspectorFrontendClient::append):
819         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
820         (WebInspectorFrontendClient):
821         * WebProcess/WebPage/WebInspector.cpp:
822         (WebKit::WebInspector::save):
823         (WebKit):
824         (WebKit::WebInspector::append):
825         (WebKit::WebInspector::didSave):
826         (WebKit::WebInspector::didAppend):
827         * WebProcess/WebPage/WebInspector.h:
828         (WebInspector):
829         * WebProcess/WebPage/WebInspector.messages.in:
830         * WebProcess/WebPage/efl/WebInspectorEfl.cpp:
831         (WebKit::WebInspector::canSave):
832         (WebKit):
833         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
834         (WebKit::WebInspector::canSave):
835         (WebKit):
836         * WebProcess/WebPage/mac/WebInspectorMac.mm:
837         (WebKit::WebInspector::canSave):
838         (WebKit):
839         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
840         (WebKit::WebInspector::canSave):
841         (WebKit):
842
843 2013-05-10  Remy Demarest  <rdemarest@apple.com>
844
845         Copy WKPluginInformation.h header to the WebKit2 Framework private headers.
846         https://bugs.webkit.org/show_bug.cgi?id=115940
847
848         Reviewed by Darin Adler.
849
850         * WebKit2.xcodeproj/project.pbxproj:
851         Move WKPluginInformation.h file from the framework's Project Headers to
852         Private Headers.
853
854 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
855
856         [Qt][Mac] Unreviewed. Roll out the fix attempt in r149912.
857
858         * Target.pri:
859
860 2013-05-10  Simon Cooper  <scooper@apple.com>
861
862         Fix AppleConnect issues for WiFi interfaces
863         <rdar://problem/13776227&13776240&13776281>
864         https://bugs.webkit.org/show_bug.cgi?id=115932
865
866         Reviewed by Alexey Proskuryakov.
867
868         Add support for WiFi interfaces for the AppleConnect plugin.
869         Remove the FIXME.
870
871         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
872
873 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
874
875         [Qt][Mac] Unreviewed speculative build fix after r149904.
876
877         * Target.pri:
878
879 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
880
881         [Qt] Unreviewed buildfix after r149904.
882
883         * Target.pri:
884
885 2013-05-09  Sam Weinig  <sam@webkit.org>
886
887         Unify plug-in information dictionaries
888         <rdar://problem/13852080>
889         https://bugs.webkit.org/show_bug.cgi?id=115891
890
891         Reviewed by Anders Carlsson.
892
893         This unifies the plug-in information dictionaries vended by WKContextCopyPlugInInfoForBundleIdentifier
894         and WKContextGetInfoForInstalledPlugIns with those from the WKPageLoaderClient and WKPageUIClient.
895
896         All the old keys will continue to work, but have been deprecated in favor of new keys defined in 
897         WKPluginInformation.h
898
899         * Shared/API/c/WKPluginInformation.cpp: Added.
900         * Shared/API/c/WKPluginInformation.h: Added.
901         Export new keys as SPI.
902
903         * Shared/Plugins/Netscape/PluginInformation.h: Added.
904         * Shared/Plugins/Netscape/PluginInformation.cpp: Added.
905         (WebKit::pluginInformationBundleIdentifierKey):
906         (WebKit::pluginInformationBundleVersionKey):
907         (WebKit::pluginInformationPathKey):
908         (WebKit::pluginInformationDisplayNameKey):
909         (WebKit::pluginInformationDefaultLoadPolicyKey):
910         (WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
911         (WebKit::pluginInformationHasSandboxProfileKey):
912         (WebKit::pluginInformationFrameURLKey):
913         (WebKit::pluginInformationMIMETypeKey):
914         (WebKit::pluginInformationPageURLKey):
915         (WebKit::pluginInformationPluginspageAttributeURLKey):
916         (WebKit::pluginInformationPluginURLKey):
917         Add new keys.
918
919         (WebKit::pluginModuleInformation):
920         (WebKit::createPluginInformationDictionary):
921         Add creation functions to simplify multiple sites.
922
923         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: Added.
924         (WebKit::platformPluginModuleInformation):
925         Add platform specific data to the dictionary.
926
927         * UIProcess/API/C/WKPage.cpp:
928         (WKPageGetPluginInformationBundleIdentifierKey):
929         (WKPageGetPluginInformationBundleVersionKey):
930         (WKPageGetPluginInformationDisplayNameKey):
931         (WKPageGetPluginInformationFrameURLKey):
932         (WKPageGetPluginInformationMIMETypeKey):
933         (WKPageGetPluginInformationPageURLKey):
934         (WKPageGetPluginInformationPluginspageAttributeURLKey):
935         (WKPageGetPluginInformationPluginURLKey):
936         * UIProcess/API/C/WKPage.h:
937         Deprecate the old keys.
938
939         * UIProcess/API/C/mac/WKContextPrivateMac.h:
940         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
941         (WKContextCopyPlugInInfoForBundleIdentifier):
942         (WKContextGetInfoForInstalledPlugIns):
943         Simplify by using the new createPluginInformationDictionary functions.
944
945         (WKPlugInInfoPathKey):
946         (WKPlugInInfoBundleIdentifierKey):
947         (WKPlugInInfoVersionKey):
948         (WKPlugInInfoLoadPolicyKey):
949         (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
950         (WKPlugInInfoIsSandboxedKey):
951         Deprecate the old keys.
952
953         * UIProcess/WebLoaderClient.cpp:
954         (WebKit::WebLoaderClient::didFailToInitializePlugin):
955         (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
956         (WebKit::WebLoaderClient::pluginLoadPolicy):
957         * UIProcess/WebLoaderClient.h:
958         * UIProcess/WebUIClient.cpp:
959         (WebKit::WebUIClient::unavailablePluginButtonClicked):
960         * UIProcess/WebUIClient.h:
961         Optimize for the most recent callback type which takes a dictionary,
962         and pull out the necessary bits from it for deprecated callbacks as necessary.
963
964         * UIProcess/WebPageProxy.h:
965         * UIProcess/WebPageProxy.cpp:
966         (WebKit::WebPageProxy::findPlugin):
967         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
968         (WebKit::WebPageProxy::didFailToInitializePlugin):
969         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
970         Use createPluginInformationDictionary() consistently, to get consistent results for callbacks.
971
972         * WebKit2.xcodeproj/project.pbxproj:
973         Add new files.
974
975 2013-05-10  Brian J. Burg  <burg@cs.washington.edu>
976
977         Web Inspector: implement runOpenPanel callback for WebKit2 inspector
978         https://bugs.webkit.org/show_bug.cgi?id=115865
979
980         Reviewed by Sam Weinig.
981
982         * UIProcess/WebInspectorProxy.h:
983         (WebKit::WebInspectorProxy::inspectorWindow):
984         Add an accessor for m_inspectorWindow.
985
986         * UIProcess/mac/WebInspectorProxyMac.mm:
987         (WebKit::runOpenPanel):
988         Show the open panel dialog when requested.
989
990         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
991         Register the callback when the inspector page is created.
992
993 2013-05-10  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
994
995         [WK2][CoordinatedGraphics] WKViewSetThemePath is EFL specific
996         https://bugs.webkit.org/show_bug.cgi?id=115928
997
998         Reviewed by Kenneth Rohde Christiansen.
999
1000         WKViewSetThemePath was moved to WKViewEfl.h since it is EFL specific.
1001
1002         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
1003         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
1004         * UIProcess/API/C/efl/WKViewEfl.cpp:
1005         (WKViewSetThemePath):
1006         * UIProcess/API/C/efl/WKViewEfl.h:
1007         * UIProcess/CoordinatedGraphics/WebView.cpp:
1008         * UIProcess/CoordinatedGraphics/WebView.h:
1009         (WebView):
1010         * UIProcess/efl/ViewClientEfl.cpp:
1011         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1012         * UIProcess/efl/WebViewEfl.cpp:
1013         (WebKit::WebViewEfl::setThemePath):
1014         * UIProcess/efl/WebViewEfl.h:
1015         (WebViewEfl):
1016
1017 2013-05-10  Jer Noble  <jer.noble@apple.com>
1018
1019         REGRESSION (r149439): Video turns blank upon entering full screen for the first time
1020         https://bugs.webkit.org/show_bug.cgi?id=115617
1021
1022         Reviewed by Eric Carlson.
1023
1024         Partially revert the change introduced in r149439 for OS X 10.8 and previous. On these
1025         platforms, create a window with a NSZeroSize initial frame, which fixes the "blank"
1026         first-full screen behavior.
1027
1028         * UIProcess/API/mac/WKView.mm:
1029         (-[WKView createFullScreenWindow]):
1030
1031 2013-05-10  Zan Dobersek  <zdobersek@igalia.com>
1032
1033         [WK2] Make the WebSoupRequestManager a supplement to the WebProcess
1034         https://bugs.webkit.org/show_bug.cgi?id=115717
1035
1036         Reviewed by Andreas Kling.
1037
1038         WebSoupRequestManager should inherit from WebProcessSupplement and should be used as such
1039         by the WebProcess. This removes the need for the m_soupRequestManager member variable in
1040         the WebProcess class and brings the WebSoupRequestManager in line with other manager classes
1041         of which instances are controlled by the WebProcess class.
1042
1043         * WebProcess/WebProcess.cpp:
1044         (WebKit::WebProcess::WebProcess): Add  the WebSoupRequestManager as a supplement.
1045         * WebProcess/WebProcess.h:
1046         (WebProcess): Remove the m_soupRequestManager member variable and its getter method.
1047         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
1048         (webkitSoupRequestGenericSendAsync): Access the WebSoupRequestManager as a supplement.
1049         (webkitSoupRequestGenericSendFinish): Ditto.
1050         * WebProcess/soup/WebProcessSoup.cpp:
1051         (WebKit::WebProcess::platformInitializeWebProcess): Access the WebSoupRequestManager as a supplement.
1052         * WebProcess/soup/WebSoupRequestManager.cpp:
1053         (WebKit::WebSoupRequestManager::supplementName): Specify the supplement's name.
1054         * WebProcess/soup/WebSoupRequestManager.h:
1055         (WebSoupRequestManager): Inherit from the WebProcessSupplement interface.
1056
1057 2013-05-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1058
1059         [GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
1060         https://bugs.webkit.org/show_bug.cgi?id=115904
1061
1062         Reviewed by Martin Robinson.
1063
1064         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
1065         (startTestServerMonitor):
1066         * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
1067         (startTestServerMonitor):
1068
1069 2013-05-09  Anders Carlsson  <andersca@apple.com>
1070
1071         Fix build.
1072
1073         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
1074
1075 2013-05-09  Anders Carlsson  <andersca@apple.com>
1076
1077         Enable UI process storage
1078         https://bugs.webkit.org/show_bug.cgi?id=115879
1079         <rdar://problem/12239765>
1080
1081         Reviewed by Beth Dakin.
1082
1083         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1084         Flip the switch.
1085
1086 2013-05-09  Anders Carlsson  <andersca@apple.com>
1087
1088         Remove extra spaces between right angle brackets in template declarations
1089         https://bugs.webkit.org/show_bug.cgi?id=115877
1090
1091         Reviewed by Beth Dakin.
1092
1093         C++11 doesn't require spaces between right angle brackets so remove all of them.
1094
1095         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1096         (WebKit::NetworkBlobRegistry::registerBlobURL):
1097         (WebKit::NetworkBlobRegistry::sandboxExtensions):
1098         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1099         (NetworkBlobRegistry):
1100         * NetworkProcess/HostRecord.h:
1101         (HostRecord):
1102         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1103         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
1104         (WebKit::NetworkConnectionToWebProcess::didClose):
1105         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
1106         * NetworkProcess/NetworkConnectionToWebProcess.h:
1107         (NetworkConnectionToWebProcess):
1108         * NetworkProcess/NetworkProcess.h:
1109         (NetworkProcess):
1110         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
1111         (WebKit::NetworkResourceLoadScheduler::servePendingRequests):
1112         (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
1113         * NetworkProcess/NetworkResourceLoadScheduler.h:
1114         * NetworkProcess/SchedulableLoader.cpp:
1115         (WebKit::SchedulableLoader::SchedulableLoader):
1116         * NetworkProcess/SchedulableLoader.h:
1117         (SchedulableLoader):
1118         * Platform/CoreIPC/ArgumentCoders.h:
1119         * Platform/CoreIPC/Connection.cpp:
1120         (Connection::SyncMessageState):
1121         (CoreIPC::Connection::waitForMessage):
1122         (CoreIPC::Connection::processIncomingMessage):
1123         * Platform/CoreIPC/Connection.h:
1124         (Connection):
1125         * Platform/WorkQueue.h:
1126         (WorkQueue):
1127         * PluginProcess/PluginProcess.h:
1128         (PluginProcess):
1129         * Scripts/webkit2/messages_unittest.py:
1130         (CoreIPC):
1131         * Shared/BlockingResponseMap.h:
1132         (BlockingResponseMap):
1133         * Shared/ChildProcessProxy.h:
1134         (ChildProcessProxy):
1135         * Shared/ImmutableArray.cpp:
1136         (WebKit::ImmutableArray::ImmutableArray):
1137         * Shared/ImmutableArray.h:
1138         (WebKit::ImmutableArray::adopt):
1139         (ImmutableArray):
1140         * Shared/ImmutableDictionary.cpp:
1141         (WebKit::ImmutableDictionary::keys):
1142         * Shared/ImmutableDictionary.h:
1143         (ImmutableDictionary):
1144         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1145         (CustomProtocolManager):
1146         * Shared/SecurityOriginData.cpp:
1147         (WebKit::performAPICallbackWithSecurityOriginDataVector):
1148         * Shared/SessionState.cpp:
1149         * Shared/StatisticsData.h:
1150         (StatisticsData):
1151         * Shared/UserMessageCoders.h:
1152         (WebKit::UserMessageDecoder::baseDecode):
1153         * Shared/WebArchive.cpp:
1154         (WebKit::WebArchive::WebArchive):
1155         (WebKit::WebArchive::subresources):
1156         (WebKit::WebArchive::subframeArchives):
1157         * Shared/WebContextMenuItem.cpp:
1158         (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
1159         * Shared/WebOpenPanelParameters.cpp:
1160         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
1161         (WebKit::WebOpenPanelParameters::selectedFileNames):
1162         * Shared/mac/ArgumentCodersMac.mm:
1163         (CoreIPC::encode):
1164         * SharedWorkerProcess/SharedWorkerProcess.h:
1165         (SharedWorkerProcess):
1166         * UIProcess/API/mac/WKPrintingView.h:
1167         (WebFrameProxy):
1168         * UIProcess/API/mac/WKPrintingView.mm:
1169         (-[WKPrintingView _drawPreview:]):
1170         * UIProcess/API/mac/WKView.mm:
1171         (WebKit):
1172         * UIProcess/Downloads/DownloadProxyMap.cpp:
1173         (WebKit::DownloadProxyMap::processDidClose):
1174         * UIProcess/Downloads/DownloadProxyMap.h:
1175         (DownloadProxyMap):
1176         * UIProcess/GeolocationPermissionRequestManagerProxy.h:
1177         (GeolocationPermissionRequestManagerProxy):
1178         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
1179         (DynamicLinkerEnvironmentExtractor):
1180         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
1181         (CustomProtocolManagerProxy):
1182         * UIProcess/Network/NetworkProcessProxy.h:
1183         (NetworkProcessProxy):
1184         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h:
1185         (NotificationPermissionRequestManagerProxy):
1186         * UIProcess/Notifications/WebNotificationManagerProxy.h:
1187         (WebNotificationManagerProxy):
1188         * UIProcess/Plugins/PluginProcessManager.h:
1189         (PluginProcessManager):
1190         * UIProcess/Plugins/PluginProcessProxy.h:
1191         (PluginProcessProxy):
1192         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1193         (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
1194         * UIProcess/Plugins/WebPluginSiteDataManager.h:
1195         (WebPluginSiteDataManager):
1196         * UIProcess/SharedWorkers/SharedWorkerProcessManager.h:
1197         (SharedWorkerProcessManager):
1198         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h:
1199         (SharedWorkerProcessProxy):
1200         * UIProcess/StatisticsRequest.cpp:
1201         (WebKit::StatisticsRequest::completedRequest):
1202         * UIProcess/Storage/StorageManager.cpp:
1203         (StorageManager::StorageArea):
1204         (WebKit::StorageManager::StorageArea::dispatchEvents):
1205         (StorageManager::SessionStorageNamespace):
1206         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
1207         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
1208         (WebKit::StorageManager::createLocalStorageMap):
1209         (WebKit::StorageManager::createSessionStorageMap):
1210         (WebKit::StorageManager::destroyStorageMap):
1211         (WebKit::StorageManager::invalidateConnectionInternal):
1212         (WebKit::StorageManager::findStorageArea):
1213         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
1214         * UIProcess/Storage/StorageManager.h:
1215         (StorageManager):
1216         * UIProcess/WebApplicationCacheManagerProxy.h:
1217         (WebApplicationCacheManagerProxy):
1218         * UIProcess/WebBackForwardList.cpp:
1219         (WebKit::WebBackForwardList::addItem):
1220         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
1221         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
1222         (WebKit::WebBackForwardList::clear):
1223         * UIProcess/WebBackForwardList.h:
1224         (WebKit):
1225         * UIProcess/WebContext.cpp:
1226         (WebKit::WebContext::createNewWebProcess):
1227         (WebKit::WebContext::enableProcessTermination):
1228         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
1229         * UIProcess/WebContext.h:
1230         (WebContext):
1231         * UIProcess/WebCookieManagerProxy.cpp:
1232         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
1233         * UIProcess/WebCookieManagerProxy.h:
1234         (WebCookieManagerProxy):
1235         * UIProcess/WebDatabaseManagerProxy.cpp:
1236         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
1237         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
1238         * UIProcess/WebDatabaseManagerProxy.h:
1239         (WebDatabaseManagerProxy):
1240         * UIProcess/WebFormClient.cpp:
1241         (WebKit::WebFormClient::willSubmitForm):
1242         * UIProcess/WebFormClient.h:
1243         (WebFormClient):
1244         * UIProcess/WebKeyValueStorageManagerProxy.h:
1245         (WebKeyValueStorageManagerProxy):
1246         * UIProcess/WebLoaderClient.cpp:
1247         (WebKit::WebLoaderClient::didChangeBackForwardList):
1248         * UIProcess/WebLoaderClient.h:
1249         (WebLoaderClient):
1250         * UIProcess/WebMediaCacheManagerProxy.cpp:
1251         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
1252         * UIProcess/WebMediaCacheManagerProxy.h:
1253         (WebMediaCacheManagerProxy):
1254         * UIProcess/WebPageContextMenuClient.cpp:
1255         (WebKit::WebPageContextMenuClient::showContextMenu):
1256         * UIProcess/WebPageProxy.cpp:
1257         (ExceededDatabaseQuotaRecords):
1258         (WebKit::WebPageProxy::relatedPages):
1259         (WebKit::WebPageProxy::didChangeBackForwardList):
1260         (WebKit::WebPageProxy::handleWheelEvent):
1261         (WebKit::WebPageProxy::processNextQueuedWheelEvent):
1262         (WebKit::WebPageProxy::findStringMatches):
1263         (WebKit::WebPageProxy::willSubmitForm):
1264         (WebKit::WebPageProxy::pluginInformationDictionary):
1265         (WebKit::WebPageProxy::didFindStringMatches):
1266         (WebKit::WebPageProxy::didReceiveEvent):
1267         * UIProcess/WebPageProxy.h:
1268         (WebPageProxy):
1269         * UIProcess/WebPageProxy.messages.in:
1270         * UIProcess/WebProcessProxy.cpp:
1271         (WebKit::WebProcessProxy::disconnect):
1272         (WebKit::WebProcessProxy::didClose):
1273         (WebKit::WebProcessProxy::didBecomeUnresponsive):
1274         (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive):
1275         (WebKit::WebProcessProxy::didBecomeResponsive):
1276         (WebKit::WebProcessProxy::disconnectFramesFromPage):
1277         (WebKit::WebProcessProxy::frameCountInPage):
1278         * UIProcess/WebProcessProxy.h:
1279         (WebProcessProxy):
1280         * UIProcess/WebResourceCacheManagerProxy.h:
1281         (WebResourceCacheManagerProxy):
1282         * UIProcess/mac/WebContextMenuProxyMac.mm:
1283         (WebKit::populateNSMenu):
1284         (WebKit::nsMenuItemVector):
1285         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
1286         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
1287         * WebProcess/Geolocation/WebGeolocationManager.cpp:
1288         (WebKit::WebGeolocationManager::didChangePosition):
1289         (WebKit::WebGeolocationManager::didFailToDeterminePosition):
1290         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
1291         (WebIconDatabaseProxy):
1292         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
1293         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1294         (WebKit::InjectedBundle::originsWithApplicationCache):
1295         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
1296         (WebKit::InjectedBundleBackForwardListItem::children):
1297         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
1298         (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
1299         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
1300         (InjectedBundlePageEditorClient):
1301         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1302         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
1303         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
1304         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
1305         (InjectedBundlePageFormClient):
1306         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1307         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
1308         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1309         (WebKit::WebResourceLoadScheduler::internallyFailedLoadTimerFired):
1310         (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
1311         * WebProcess/Network/WebResourceLoadScheduler.h:
1312         (WebResourceLoadScheduler):
1313         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
1314         (NotificationPermissionRequestManager):
1315         * WebProcess/Notifications/WebNotificationManager.h:
1316         (WebNotificationManager):
1317         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1318         (WebKit::NPRuntimeObjectMap::invalidate):
1319         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
1320         (NPRuntimeObjectMap):
1321         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1322         (WebKit::NetscapePlugin::stopAllStreams):
1323         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1324         (NetscapePlugin):
1325         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1326         (NetscapePluginStream):
1327         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
1328         (getAllScriptsInPDFDocument):
1329         (WebKit::SimplePDFPlugin::runScriptsInPDFDocument):
1330         * WebProcess/Plugins/PluginProcessConnectionManager.h:
1331         (PluginProcessConnectionManager):
1332         * WebProcess/Plugins/PluginView.cpp:
1333         (WebKit::PluginView::cancelAllStreams):
1334         * WebProcess/Plugins/PluginView.h:
1335         (PluginView):
1336         * WebProcess/Storage/StorageAreaMap.cpp:
1337         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
1338         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
1339         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1340         (WebKit::StorageNamespaceImpl::storageArea):
1341         * WebProcess/Storage/StorageNamespaceImpl.h:
1342         (StorageNamespaceImpl):
1343         * WebProcess/Storage/WebKeyValueStorageManager.cpp:
1344         (WebKit::keyValueStorageOriginIdentifiers):
1345         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1346         (WebKit::WebDatabaseManager::getDatabasesByOrigin):
1347         (WebKit::WebDatabaseManager::getDatabaseOrigins):
1348         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1349         (WebKit::WebEditorClient::getClientPasteboardDataForRange):
1350         * WebProcess/WebCoreSupport/WebEditorClient.h:
1351         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1352         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
1353         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1354         (WebKit::WebEditorClient::documentFragmentFromAttributedString):
1355         * WebProcess/WebPage/EventDispatcher.h:
1356         (EventDispatcher):
1357         * WebProcess/WebPage/FindController.cpp:
1358         (WebKit::FindController::findStringMatches):
1359         * WebProcess/WebPage/FindController.h:
1360         (FindController):
1361         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1362         (WebKit):
1363         * WebProcess/WebPage/WebFrame.cpp:
1364         (WebKit::WebFrame::childFrames):
1365         * WebProcess/WebPage/WebPage.cpp:
1366         (WebKit::WebPage::trackedRepaintRects):
1367         * WebProcess/WebPage/WebPage.h:
1368         (WebKit):
1369         (WebPage):
1370         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
1371         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1372         (TiledCoreAnimationDrawingArea):
1373         * WebProcess/WebProcess.cpp:
1374         (WebKit::WebProcess::visitedLinkStateChanged):
1375         (WebKit::WebProcess::allVisitedLinkStateChanged):
1376         (WebKit::WebProcess::focusedWebPage):
1377         (WebKit::WebProcess::createWebPage):
1378         (WebKit::WebProcess::didClose):
1379         (WebKit::WebProcess::webPageGroup):
1380         (WebKit::addCaseFoldedCharacters):
1381         (WebKit::getWebCoreMemoryCacheStatistics):
1382         (WebKit::WebProcess::setTextCheckerState):
1383         * WebProcess/WebProcess.h:
1384         (WebProcess):
1385
1386 2013-05-09  Anders Carlsson  <andersca@apple.com>
1387
1388         Implement WebPlatformStrategies::transientLocalStorageNamespace
1389         https://bugs.webkit.org/show_bug.cgi?id=115876
1390         <rdar://problem/13852871>
1391
1392         Reviewed by Beth Dakin.
1393
1394         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1395         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
1396         Return a session storage namespace for a random page when UI process storage is enabled,
1397         otherwise call the base class implementation.
1398
1399 2013-05-09  Anders Carlsson  <andersca@apple.com>
1400
1401         Use explicit qualifiers for names in the std:: namespace
1402         https://bugs.webkit.org/show_bug.cgi?id=115868
1403
1404         Reviewed by Andreas Kling.
1405
1406         * Shared/mac/ArgumentCodersMac.mm:
1407         (CoreIPC::encode):
1408         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
1409         (WKPluginSiteDataManagerClearAllSiteData):
1410         * UIProcess/Plugins/PluginInfoStore.cpp:
1411         (WebKit::PluginInfoStore::findPluginForExtension):
1412         * UIProcess/WebFrameProxy.cpp:
1413         * UIProcess/WebProcessProxy.cpp:
1414         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1415         (WebKit::parsePostBuffer):
1416         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1417         (WebKit::NetscapePlugin::loadURL):
1418         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1419         (WebKit::NetscapePluginStream::deliverDataToPlugin):
1420         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
1421         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1422         * WebProcess/WebPage/FindController.cpp:
1423         (WebKit::FindController::countStringMatches):
1424         (WebKit::FindController::updateFindUIAfterPageScroll):
1425         * WebProcess/WebPage/WebPage.cpp:
1426         * WebProcess/WebPage/mac/WebPageMac.mm:
1427         (WebKit::drawPDFPage):
1428         * WebProcess/mac/WebProcessMac.mm:
1429
1430 2013-05-09  Max Feil  <mfeil@rim.com>
1431
1432         shouldUsePluginDocument() needs to be respected when a document is created
1433         https://bugs.webkit.org/show_bug.cgi?id=110308
1434
1435         Reviewed by Rob Buis.
1436
1437         Renaming shouldUsePluginDocument() to shouldAlwaysUsePluginDocument()
1438         for clarity.
1439
1440         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1441         (WebKit::WebFrameLoaderClient::shouldAlwaysUsePluginDocument):
1442         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1443         (WebFrameLoaderClient):
1444
1445 2013-05-09  Timothy Hatcher  <timothy@apple.com>
1446
1447         Make dragging off a tab in Safari with a docked Inspector reattach the Inspector.
1448
1449         https://webkit.org/b/115832
1450         rdar://problem/13605661
1451
1452         Reviewed by Benjamin Poulain.
1453
1454         * UIProcess/mac/WebInspectorProxyMac.mm:
1455         (WebKit::WebInspectorProxy::platformBringToFront):
1456         If the Web Inspector is no longer in the same window as the inspected view,
1457         then we need to reopen the Inspector to get it attached to the right window.
1458
1459 2013-05-08  Anders Carlsson  <andersca@apple.com>
1460
1461         Fix a typo in a comment.
1462
1463         Rubber-stamped by Darin Adler.
1464
1465         * WebProcess/WebProcess.cpp:
1466         (WebKit::WebProcess::initializeConnection):
1467
1468 2013-05-08  Anders Carlsson  <andersca@apple.com>
1469
1470         Remove bogus StorageAreaMap assertions
1471         https://bugs.webkit.org/show_bug.cgi?id=115838
1472
1473         Reviewed by Sam Weinig.
1474
1475         It is possible for didGetValues, and didClear to be called even if m_hasPendingClear is false so remove the assertions.
1476
1477         * WebProcess/Storage/StorageAreaMap.cpp:
1478         (WebKit::StorageAreaMap::didGetValues):
1479         (WebKit::StorageAreaMap::didClear):
1480
1481 2013-05-08  Anders Carlsson  <andersca@apple.com>
1482
1483         Handle incoming clear operations
1484         https://bugs.webkit.org/show_bug.cgi?id=115829
1485
1486         Reviewed by Sam Weinig.
1487
1488         Handle clear by building up a new storage map with our pending changes.
1489
1490         * WebProcess/Storage/StorageAreaMap.cpp:
1491         (WebKit::StorageAreaMap::applyChange):
1492
1493 2013-05-08  Anders Carlsson  <andersca@apple.com>
1494
1495         Don't apply changes while we're clearing the database
1496         https://bugs.webkit.org/show_bug.cgi?id=115826
1497
1498         Reviewed by Darin Adler.
1499
1500         * UIProcess/Storage/LocalStorageDatabase.cpp:
1501         (WebKit::LocalStorageDatabase::openDatabase):
1502         Only call didOpenDatabaseWithOrigin if we actually did open the database.
1503
1504         (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
1505         Create the database if needed.
1506
1507         * UIProcess/Storage/StorageManager.cpp:
1508         (WebKit::StorageManager::getValues):
1509         Send back a DidGetValues message.
1510
1511         * WebProcess/Storage/StorageAreaMap.cpp:
1512         (WebKit::StorageAreaMap::StorageAreaMap):
1513         Initialize m_hasPendingClear.
1514
1515         (WebKit::StorageAreaMap::clear):
1516         Set m_hasPendingClear to true.
1517
1518         (WebKit::StorageAreaMap::resetValues):
1519         Set m_hasPendingClear back to false.
1520
1521         (WebKit::StorageAreaMap::loadValuesIfNeeded):
1522         Set m_hasPendingClear to true so we'll ignore any changes that are already part of the returned items.
1523
1524         (WebKit::StorageAreaMap::didGetValues):
1525         Set m_hasPendingClear back to false.
1526
1527         (WebKit::StorageAreaMap::didClear):
1528         Set m_hasPendingClear back to false.
1529
1530         (WebKit::StorageAreaMap::applyChange):
1531         Don't apply the change if m_hasPendingClear is true.
1532
1533         * WebProcess/Storage/StorageAreaMap.messages.in:
1534         Add DidGetValues message.
1535
1536 2013-05-08  Andy Estes  <aestes@apple.com>
1537
1538         [WebKit2] REGRESSION (Custom Protocols): Reproducible crash when navigating to URL with an invalid scheme
1539         https://bugs.webkit.org/show_bug.cgi?id=115790
1540
1541         Reviewed by Alexey Proskuryakov.
1542
1543         NSMutableSet does not support adding or removing nil objects, and
1544         WTF::HashSet does not support adding, removing, or checking for null
1545         WTF::Strings.
1546
1547         For the NSMutableSet case, make sure that we don't try to add or remove
1548         nil NSStrings.
1549
1550         For the WTF::HashSet case, NSURL will return a nil NSString if we ask
1551         it for its scheme when it is invalid, which we will convert to a null
1552         WTF::String. Don't try to check if our HashSet of registered schemes
1553         contains a null String.
1554
1555         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
1556         (WebKit::CustomProtocolManager::registerScheme): Assert that the scheme
1557         isn't null. We reject null schemes at the WKBrowsingContextController level.
1558         (WebKit::CustomProtocolManager::unregisterScheme): Ditto.
1559         (WebKit::CustomProtocolManager::supportsScheme): If scheme is null, return false.
1560         * UIProcess/API/mac/WKBrowsingContextController.mm:
1561         (+[WKBrowsingContextController registerSchemeForCustomProtocol:]): Do not register a nil scheme.
1562         (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]): Ditto.
1563
1564 2013-05-08  Anders Carlsson  <andersca@apple.com>
1565
1566         Apply remote changes to storage maps locally
1567         https://bugs.webkit.org/show_bug.cgi?id=115825
1568
1569         Reviewed by Beth Dakin.
1570
1571         * WebProcess/Storage/StorageAreaMap.cpp:
1572         (WebKit::StorageAreaMap::resetValues):
1573         Clear the pending values map.
1574
1575         (WebKit::StorageAreaMap::didSetItem):
1576         If we failed to set the item, forget everything we know about this storage map.
1577         Otherwise, remove the pending item.
1578
1579         (WebKit::StorageAreaMap::didRemoveItem):
1580         Remove the pending item.
1581
1582         (WebKit::StorageAreaMap::shouldApplyChangeForKey):
1583         Helper function that returns whether a change for a given key should be applied.
1584
1585         (WebKit::StorageAreaMap::applyChange):
1586         Apply the change. Currently only adds and removes are handled.
1587
1588         (WebKit::StorageAreaMap::dispatchStorageEvent):
1589         Apply the change locally as well if needed.
1590
1591         * WebProcess/Storage/StorageAreaMap.h:
1592
1593 2013-05-08  Anders Carlsson  <andersca@apple.com>
1594
1595         Assert at compile time that we don't pass Objective-C object pointers to adoptCF
1596         https://bugs.webkit.org/show_bug.cgi?id=115823
1597
1598         Reviewed by Geoffrey Garen.
1599
1600         Fix adoptNS/adoptCF mismatches. For the adopt(leakRef()) case we'd ideally want a static_pointer_cast overload for RetainPtr,
1601         but this will do for now.
1602         
1603         * Shared/mac/ArgumentCodersMac.mm:
1604         (CoreIPC::decode):
1605
1606 2013-05-08  Sam Weinig  <sam@webkit.org>
1607
1608         Add SPI to determine if a plugin is sandboxed
1609         https://bugs.webkit.org/show_bug.cgi?id=115810
1610
1611         Reviewed by Anders Carlsson.
1612
1613         * PluginProcess/mac/PluginProcessMac.mm:
1614         (WebKit::PluginProcess::initializeSandbox):
1615         * Shared/Plugins/mac/PluginSandboxProfile.h: Added.
1616         * Shared/Plugins/mac/PluginSandboxProfile.mm: Added.
1617         (WebKit::pluginSandboxProfileDefaultDirectory):
1618         (WebKit::pluginSandboxProfileDirectories):
1619         (WebKit::pluginSandboxProfileName):
1620         (WebKit::pluginSandboxCommonProfile):
1621         (WebKit::pluginSandboxProfileForDirectory):
1622         (WebKit::pluginSandboxProfile):
1623         (WebKit::pluginHasSandboxProfileForDirectory):
1624         (WebKit::pluginHasSandboxProfile):
1625         Move sandbox code to its own file and refactor to use cocoa. Also adds pluginHasSandboxProfile function
1626         which uses the newly refactored code.
1627
1628         * UIProcess/API/C/mac/WKContextPrivateMac.h:
1629         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
1630         (WKPlugInInfoIsSandboxedKey):
1631         (createInfoDictionary):
1632         Add WKPlugInInfoIsSandboxedKey.
1633
1634         * WebKit2.xcodeproj/project.pbxproj:
1635         Add new files.
1636
1637 2013-05-08  Anders Carlsson  <andersca@apple.com>
1638
1639         Safari unexpectedly quits with invalid message from the web process with message ID 0x323002f (WebPageProxy.DecidePolicyForNavigationAction)
1640         https://bugs.webkit.org/show_bug.cgi?id=115814
1641         <rdar://problem/12331258>
1642
1643         Reviewed by Andreas Kling.
1644
1645         To ensure that any asynchronous messages are delivered to the UI process before
1646         synchronous messages (except when doing so would lead to a deadlock), Call
1647         setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage on the UI process connections.
1648
1649         * WebProcess/WebProcess.cpp:
1650         (WebKit::WebProcess::initializeConnection):
1651
1652 2013-05-08  Tim Horton  <timothy_horton@apple.com>
1653
1654         Coalesce WKView visibleRect changes
1655         https://bugs.webkit.org/show_bug.cgi?id=115792
1656         <rdar://problem/13776842>
1657
1658         Reviewed by Simon Fraser.
1659
1660         The system can call renewGState much more often than we actually want
1661         to update the WebProcess' notion of the exposed rect. Most importantly,
1662         within an autolayout pass it is called many times, and often sees
1663         [WKView visibleRect] be an intermediate value which will never be
1664         flushed to the screen. We only care about the final value, so we should
1665         wait until AppKit has finished - with a zero-delay timer - to inform the
1666         WebProcess of exposed rect changes.
1667
1668         * UIProcess/WebPageProxy.cpp:
1669         (WebKit::WebPageProxy::WebPageProxy):
1670         Add exposedRectChangedTimer.
1671         (WebKit::WebPageProxy::close):
1672         Cancel exposedRectChangedTimer when tearing down the WebPageProxy.
1673         * UIProcess/WebPageProxy.h:
1674         (WebPageProxy):
1675         Add exposedRectChangedTimerFired, the timer itself, and two rects:
1676         the most recent exposed rect from the WKView, and the last one we actually
1677         sent across to the WebProcess.
1678         * UIProcess/mac/WebPageProxyMac.mm:
1679         (WebKit::WebPageProxy::viewExposedRectChanged):
1680         Instead of immediately sending exposed rect changes to the WebProcess,
1681         start a zero-delay timer to do so.
1682         (WebKit::WebPageProxy::exposedRectChangedTimerFired):
1683         Once the zero-delay timer fires, send the new exposed rect to the WebProcess.
1684
1685 2013-05-08  Alexey Proskuryakov  <ap@apple.com>
1686
1687         <rdar://problem/13776220> 13A451: PluginProcess(2225) deny file-read-data ~/Library/InputManagers
1688         <rdar://problem/13642510> PluginProcess logs sandbox violations initializing TextServices
1689
1690         Reviewed by Anders Carlsson.
1691
1692         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Allow more
1693         TextServices and NSInputManager directories.
1694
1695 2013-05-08  Anders Carlsson  <andersca@apple.com>
1696
1697         Remove BinarySemaphoreWin.cpp.
1698
1699         Rubber-stamped by Beth Dakin.
1700
1701         BinarySemaphoreWin has been moved to WTF, but the original was never removed.
1702
1703         * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Removed.
1704
1705 2013-05-08  Zan Dobersek  <zdobersek@igalia.com>
1706
1707         [WK2] Make the WebNetworkInfoManager a supplement to the WebProcess
1708         https://bugs.webkit.org/show_bug.cgi?id=115716
1709
1710         Reviewed by Andreas Kling.
1711
1712         WebNetworkInfoManager should inherit from WebProcessSupplement and should be used
1713         as such by the WebProcess. This removes the need for the m_networkInfoManager member
1714         variable in the WebProcess class and brings the WebNetworkInfoManager in line with
1715         other manager classes of which instances are controlled by the WebProcess class.
1716
1717         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
1718         (WebKit::WebNetworkInfoManager::supplementName): Specify the supplement's name.
1719         (WebKit):
1720         * WebProcess/NetworkInfo/WebNetworkInfoManager.h:
1721         (WebKit): Alphabetically reorder the two forwarding declarations.
1722         (WebNetworkInfoManager): Inherit from the WebProcessSupplement interface.
1723         * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp:
1724         (WebKit::WebNetworkInfoClient::bandwidth): Access the WebNetworkInfoManager as a supplement.
1725         (WebKit::WebNetworkInfoClient::metered): Ditto.
1726         (WebKit::WebNetworkInfoClient::startUpdating): Ditto.
1727         (WebKit::WebNetworkInfoClient::stopUpdating): Ditto.
1728         (WebKit::WebNetworkInfoClient::networkInfoControllerDestroyed): Ditto.
1729         * WebProcess/WebProcess.cpp:
1730         (WebKit::WebProcess::WebProcess): Add the WebNetworkInfoManager instance as a supplement.
1731         * WebProcess/WebProcess.h:
1732         (WebProcess): Remove the m_networkInfoManager member variable and its getter method.
1733
1734 2013-05-08  Zan Dobersek  <zdobersek@igalia.com>
1735
1736         [WK2] Make the WebBatteryManager a supplement to the WebProcess
1737         https://bugs.webkit.org/show_bug.cgi?id=115715
1738
1739         Reviewed by Andreas Kling.
1740
1741         WebBatteryManager should inherit from WebProcessSupplement and should be used as such
1742         by the WebProcess. This removes the need for the m_batteryManager member variable in
1743         the WebProcess class and brings the WebBatteryManager in line with other manager classes
1744         of which instances are controlled by the WebProcess class.
1745
1746         * WebProcess/Battery/WebBatteryManager.cpp:
1747         (WebKit::WebBatteryManager::supplementName): Specify the supplement's name.
1748         (WebKit):
1749         * WebProcess/Battery/WebBatteryManager.h:
1750         (WebBatteryManager): Inherit from the WebProcessSupplement interface.
1751         * WebProcess/WebCoreSupport/WebBatteryClient.cpp:
1752         (WebKit::WebBatteryClient::startUpdating): Access the WebBatteryManager as a supplement.
1753         (WebKit::WebBatteryClient::stopUpdating): Ditto.
1754         (WebKit::WebBatteryClient::batteryControllerDestroyed): Ditto.
1755         * WebProcess/WebProcess.cpp:
1756         (WebKit::WebProcess::WebProcess): Add the WebBatteryManager instance as a supplement.
1757         * WebProcess/WebProcess.h:
1758         (WebProcess): Remove the m_batteryManager member variable and its getter method.
1759
1760 2013-05-06  Darin Adler  <darin@apple.com>
1761
1762         Use adoptCF and adoptNS in more places
1763         https://bugs.webkit.org/show_bug.cgi?id=115657
1764
1765         Reviewed by Sam Weinig.
1766
1767         * Shared/Downloads/cfnet/DownloadCFNet.cpp:
1768         (WebKit::Download::useCredential):
1769         (WebKit::Download::start):
1770         (WebKit::Download::startWithHandle):
1771         (WebKit::Download::cancel):
1772         (WebKit::Download::didDecideDestination):
1773         Use adoptCF and adoptNS.
1774
1775 2013-05-06  Sam Weinig  <sam@webkit.org>
1776
1777         Add SPI to get an array of all the installed plug-ins
1778         https://bugs.webkit.org/show_bug.cgi?id=115688
1779
1780         Reviewed by Anders Carlsson.
1781
1782         * UIProcess/API/C/mac/WKContextPrivateMac.h:
1783         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
1784         (createInfoDictionary):
1785         Extract creation of info dictionary into helper.
1786         (WKContextCopyPlugInInfoForBundleIdentifier):
1787         Modified to use the new helper.
1788         (WKContextGetInfoForInstalledPlugIns):
1789         Added.
1790
1791 2013-05-07  Anders Carlsson  <andersca@apple.com>
1792
1793         Clean up KeyframeValueList and related classes
1794         https://bugs.webkit.org/show_bug.cgi?id=115738
1795
1796         Reviewed by Simon Fraser.
1797
1798         Update for WebCore changes.
1799
1800         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1801         (CoreIPC::::decode):
1802
1803 2013-05-07  Anders Carlsson  <andersca@apple.com>
1804
1805         Add and remove databases and origins from the database tracker
1806         https://bugs.webkit.org/show_bug.cgi?id=115752
1807
1808         Reviewed by Andreas Kling.
1809
1810         * UIProcess/Storage/LocalStorageDatabase.cpp:
1811         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1812         Rename m_databaseFilename to m_databasePath.
1813
1814         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
1815         Rename m_databaseFilename to m_databasePath.
1816
1817         * UIProcess/Storage/LocalStorageDatabase.h:
1818         Rename m_databaseFilename to m_databasePath.
1819
1820         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1821         (WebKit::LocalStorageDatabaseTracker::databasePath):
1822         Rename databaseFilename to databasePath.
1823
1824         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
1825         Call addDatabaseWithOriginIdentifier.
1826
1827         (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
1828         Call removeDatabaseWithOriginIdentifier.
1829
1830         (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
1831         Call databasePath instead of databaseFile.
1832
1833         (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
1834         Bail if the database is already open.
1835
1836         (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
1837         Call addDatabaseWithOriginIdentifier if this is an origin we don't know about.
1838
1839         (WebKit::LocalStorageDatabaseTracker::addDatabaseWithOriginIdentifier):
1840         Add the database to the Origins table.
1841
1842         (WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
1843         remove the database from the Origins table and delete it.
1844
1845         (WebKit::LocalStorageDatabaseTracker::pathForDatabaseWithOriginIdentifier):
1846         Helper function that looks up a database path given its identifier.
1847         
1848         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
1849         Rename databaseFile to databasePath.
1850
1851 2013-05-07  Anders Carlsson  <andersca@apple.com>
1852
1853         The storage database tracker should know when databases come and go
1854         https://bugs.webkit.org/show_bug.cgi?id=115748
1855
1856         Reviewed by Andreas Kling.
1857
1858         * UIProcess/Storage/LocalStorageDatabase.cpp:
1859         (WebKit::LocalStorageDatabase::openDatabase):
1860         If we've opened the database successfully, call LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin.
1861
1862         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
1863         Remove a FIXME; we run all storage related things on the same thread.
1864
1865         (WebKit::LocalStorageDatabase::close):
1866         Close the database. If it's empty, call LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin.
1867
1868         (WebKit::LocalStorageDatabase::databaseIsEmpty):
1869         Helper function for determining whether a database is empty.
1870         
1871         * UIProcess/Storage/LocalStorageDatabase.h:
1872         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1873         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
1874         Add ".localstorage" to the filename.
1875
1876         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
1877         (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
1878         Add empty stubs.
1879
1880 2013-05-07  Brady Eidson  <beidson@apple.com>
1881
1882         Add JoinExistingSession to the Networking XPC.
1883         <rdar://problem/12902288> and https://bugs.webkit.org/show_bug.cgi?id=114991
1884
1885         Reviewed by Sam Weinig.
1886
1887         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist:
1888         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist:
1889
1890 2013-05-07  Anders Carlsson  <andersca@apple.com>
1891
1892         REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
1893         https://bugs.webkit.org/show_bug.cgi?id=115711
1894
1895         Reviewed by Andreas Kling.
1896
1897         Handle setting the local storage directory more than once.
1898
1899         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1900         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
1901         Close the database (if necessary) and clear the origins map before importing the origin identifiers.
1902
1903 2013-05-07  Antoine Quint  <graouts@apple.com>
1904
1905         Re-establish autostart timeout extension on user interaction
1906         https://bugs.webkit.org/show_bug.cgi?id=113232
1907
1908         Change WebProcess::pluginDidReceiveUserInteraction to use a tuple of
1909         (pluginOrigin, pageOrigin, mimeType) arguments like the other similar
1910         WebProcess methods and gather these arguments from the PlugInView's
1911         plug-in element.
1912
1913         Reviewed by Dean Jackson.
1914
1915         * WebProcess/Plugins/PluginView.cpp:
1916         (WebKit::PluginView::pluginDidReceiveUserInteraction):
1917         Cast the m_pluginElement to a HTMLPlugInImageElement so we can obtain the
1918         tuple of (pluginOrigin, pageOrigin, mimeType) to pass to pluginDidReceiveUserInteraction().
1919
1920         * WebProcess/WebProcess.cpp:
1921         (WebKit::WebProcess::plugInDidReceiveUserInteraction):
1922         * WebProcess/WebProcess.h:
1923         (WebProcess):
1924         Update method signature to a tuple of (pluginOrigin, pageOrigin, mimeType)
1925         and obtain the plug-in origin hash from that.
1926
1927 2013-05-07  Anders Carlsson  <andersca@apple.com>
1928
1929         Each local storage database should know its origin
1930         https://bugs.webkit.org/show_bug.cgi?id=115737
1931
1932         Reviewed by Andreas Kling.
1933
1934         Store the security origin in a member variable. It'll be used to communicate database state changes to the tracker.
1935
1936         * UIProcess/Storage/LocalStorageDatabase.cpp:
1937         (WebKit::LocalStorageDatabase::create):
1938         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1939         * UIProcess/Storage/LocalStorageDatabase.h:
1940         (LocalStorageDatabase):
1941
1942 2013-05-07  Brady Eidson  <beidson@apple.com>
1943
1944         Remove some unnecessary soft linking in NetworkProcess. (Take 2)
1945         <rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683
1946
1947         Reviewed by Dean Jackson and owned by Andreas Kling.
1948
1949         As a followup to r149651, include the private headers conditionally.
1950         Also, fix a bug introduced with r149651 (bool vs CFBooleanRef).
1951
1952         * NetworkProcess/mac/DiskCacheMonitor.mm:
1953         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
1954         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
1955
1956 2013-05-07  Jinwoo Song  <jinwoo7.song@samsung.com>
1957
1958         [EFL][WK2] Add ewk APIs for setting and getting user agent
1959         https://bugs.webkit.org/show_bug.cgi?id=114429
1960
1961         Reviewed by Andreas Kling.
1962
1963         Provide ewk_view_user_agent_get/set APIs which wraps WK APIs.
1964
1965         * UIProcess/API/efl/EwkView.cpp:
1966         (EwkView::EwkView):
1967         (EwkView::setUserAgent):
1968         * UIProcess/API/efl/EwkView.h:
1969         (EwkView::userAgent):
1970         (EwkView):
1971         * UIProcess/API/efl/ewk_view.cpp:
1972         (ewk_view_user_agent_get):
1973         (ewk_view_user_agent_set):
1974         * UIProcess/API/efl/ewk_view.h:
1975         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1976         (TEST_F):
1977
1978 2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1979
1980         HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
1981         https://bugs.webkit.org/show_bug.cgi?id=115646
1982
1983         Reviewed by Darin Adler.
1984
1985         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1986         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
1987         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
1988         (WebKit::NetworkResourceLoadScheduler::hostForURL):
1989         * Shared/ImmutableDictionary.h:
1990         (WebKit::ImmutableDictionary::get):
1991         * UIProcess/Storage/StorageManager.cpp:
1992         (WebKit::StorageManager::createSessionStorageMap):
1993         (WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
1994         (WebKit::StorageManager::findStorageArea):
1995         * UIProcess/WebContext.h:
1996         (WebKit::WebContext::supplement):
1997         * UIProcess/WebProcessProxy.cpp:
1998         (WebKit::WebProcessProxy::webBackForwardItem):
1999         (WebKit::WebProcessProxy::webFrame):
2000         * UIProcess/efl/DownloadManagerEfl.cpp:
2001         (WebKit::DownloadManagerEfl::ewkDownloadJob):
2002         * WebProcess/Network/WebResourceLoadScheduler.h:
2003         (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
2004         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2005         (WebKit::NetscapePlugin::streamFromID):
2006         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2007         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
2008         * WebProcess/Plugins/PluginView.cpp:
2009         (WebKit::PluginView::cancelStreamLoad):
2010         * WebProcess/WebPage/EventDispatcher.cpp:
2011         (WebKit::EventDispatcher::wheelEvent):
2012         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2013         (WebKit::WebBackForwardListProxy::itemForID):
2014         (WebKit::WebBackForwardListProxy::itemAtIndex):
2015         * WebProcess/WebPage/WebPage.cpp:
2016         (WebKit::WebPage::webUndoStep):
2017         (WebKit::WebPage::didFinishCheckingText):
2018         (WebKit::WebPage::didCancelCheckingText):
2019         * WebProcess/WebProcess.cpp:
2020         (WebKit::WebProcess::webPage):
2021         (WebKit::WebProcess::webPageGroup):
2022             Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
2023
2024 2013-05-06  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2025
2026         [Qt] Unreviewed buildfix after r149637.
2027
2028         * Target.pri:
2029
2030 2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>
2031
2032         REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
2033         https://bugs.webkit.org/show_bug.cgi?id=115711    
2034
2035         Rubber-stamped by Anders Carlsson.
2036
2037         Temporarily removed the assertion. Andres is going to investigate it tomorrow.
2038
2039         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2040         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
2041
2042 2013-05-06  Darin Adler  <darin@apple.com>
2043
2044         Use OwnPtr instead of deleteAllValues in KeyframeValueList
2045         https://bugs.webkit.org/show_bug.cgi?id=115652
2046
2047         Reviewed by Simon Fraser.
2048
2049         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2050         (CoreIPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Added adoptPtr
2051         next to new when calling KeyframeValueList::insert.
2052
2053 2013-05-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2054
2055         Unreviewed, build fix on EFL port
2056
2057         * CMakeLists.txt: Add LocalStorageDatabaseTracker.cpp
2058
2059 2013-05-06  Philippe Normand  <pnormand@igalia.com>
2060
2061         Unreviewed, GTK build fix after r149637.
2062
2063         * GNUmakefile.list.am: Add LocalStorageDatabaseTracker sources to
2064         the build.
2065
2066 2013-05-06  Brady Eidson  <beidson@apple.com>
2067
2068         Remove some unnecessary soft linking in NetworkProcess.
2069         <rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683
2070
2071         Reviewed by Sam Weinig.
2072
2073         Replace some unneeded soft linking with forward declarations.
2074
2075         * NetworkProcess/mac/DiskCacheMonitor.mm:
2076         (WebKit::DiskCacheMonitor::DiskCacheMonitor):
2077         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2078         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse):
2079         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2080
2081 2013-05-06  Anders Carlsson  <andersca@apple.com>
2082
2083         More work on LocalStorageDatabaseTracker
2084         https://bugs.webkit.org/show_bug.cgi?id=115680
2085
2086         Reviewed by Andreas Kling.
2087
2088         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2089         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
2090         Call the new databaseFilename that takes a string.
2091
2092         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
2093         Assert that we don't call this more than once. Dispatch a call to import origin identifiers.
2094
2095         (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
2096         New helper function that returns the tracker database path.
2097
2098         (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
2099         Open the database and create the Origins table if needed.
2100
2101         (WebKit::LocalStorageDatabaseTracker::importOriginIdentifiers):
2102         Open the database and import the origin identifiers from it, then synchronize it with whatever files are on disk.
2103
2104         (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
2105         Bring the tracker database up to date from the database files on disk.
2106
2107         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2108         (LocalStorageDatabaseTracker):
2109
2110 2013-05-06  Alexey Proskuryakov  <ap@apple.com>
2111
2112         <rdar://problem/13479806> [Mac] Pass information about open pages to LaunchServices
2113         https://bugs.webkit.org/show_bug.cgi?id=115665
2114
2115         Reviewed by Darin Adler.
2116
2117         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad): Moved repeated
2118         check for frame->isMainFrame() to the top, matching oter similar functions.
2119         Call updateActivePages().
2120
2121         * WebProcess/WebProcess.cpp:
2122         (WebKit::WebProcess::networkProcessConnectionClosed): Removed an obsolete FIXME.
2123         (WebKit::WebProcess::updateActivePages): Empty implementation for platforms
2124         that don't need to do anything here.
2125
2126         * WebProcess/WebProcess.h: Added updateActivePages().
2127
2128         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages):
2129         Collect user visible origins of pages in the process and pass them to LS.
2130
2131 2013-05-06  Mark Rowe  <mrowe@apple.com>
2132
2133         <rdar://problem/13775921> Switch off a deprecated API.
2134
2135         Reviewed by Oliver Hunt.
2136
2137         * Shared/mac/ChildProcessMac.mm:
2138         (WebKit::ChildProcess::setProcessSuppressionEnabled): When disabling process suppression,
2139         begin an activity that doesn't disable idle sleep, sudden termination or automatic termination.
2140         When enabling process suppression, end the activity.
2141
2142 2013-05-06  Anders Carlsson  <andersca@apple.com>
2143
2144         Move local storage directory handling to LocalStorageDatabaseTracker
2145         https://bugs.webkit.org/show_bug.cgi?id=115676
2146
2147         Reviewed by Andreas Kling.
2148
2149         * UIProcess/Storage/LocalStorageDatabase.cpp:
2150         (WebKit::LocalStorageDatabase::create):
2151         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
2152         * UIProcess/Storage/LocalStorageDatabase.h:
2153         (WebCore):
2154         (LocalStorageDatabase):
2155         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2156         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory):
2157         (WebKit):
2158         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
2159         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
2160         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2161         (WebCore):
2162         (LocalStorageDatabaseTracker):
2163         * UIProcess/Storage/StorageManager.cpp:
2164         (WebKit::StorageManager::StorageArea::StorageArea):
2165         (WebKit::StorageManager::setLocalStorageDirectory):
2166         * UIProcess/Storage/StorageManager.h:
2167         (StorageManager):
2168
2169 2013-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
2170
2171         [GTK] Add webkit_uri_scheme_request_finish_error
2172         https://bugs.webkit.org/show_bug.cgi?id=94316
2173
2174         Reviewed by Anders Carlsson.
2175
2176         This new method will allow to finish WebKitURISchemeRequest with a
2177         GError that will be passed to the WebKitWebView through the
2178         "load-failed" signal.
2179
2180         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
2181         (webkit_uri_scheme_request_finish_error): Implement new method using
2182         WebSoupRequestManagerProxy::didFailURIRequest().
2183         * UIProcess/API/gtk/WebKitURISchemeRequest.h: Add new method header.
2184         * UIProcess/API/gtk/WebKitWebContext.cpp: Include the usage of the new
2185         method in the code example at webkit_web_context_register_uri_scheme()
2186         documentation.
2187         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the new
2188         method.
2189         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
2190         (loadFailedCallback): Set m_error to monitor it from the tests.
2191         (LoadTrackingTest::loadURI): Clear m_error before each load.
2192         (LoadTrackingTest::loadHtml): Ditto.
2193         (LoadTrackingTest::loadPlainText): Ditto.
2194         (LoadTrackingTest::loadRequest): Ditto.
2195         (LoadTrackingTest::reload): Ditto.
2196         (LoadTrackingTest::goBack): Ditto.
2197         (LoadTrackingTest::goForward): Ditto.
2198         * UIProcess/API/gtk/tests/LoadTrackingTest.h: Add new member m_error.
2199         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
2200         (testWebContextURIScheme): Modify test to check the behavior of the new
2201         method.
2202         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
2203         (WebKit::WebSoupRequestManagerProxy::didFailURIRequest):
2204         (WebKit): Implement new method using
2205         WebSoupRequestManager::DidFailURIRequest().
2206         * UIProcess/soup/WebSoupRequestManagerProxy.h:
2207         (WebSoupRequestManagerProxy): Add new method header.
2208         * WebProcess/soup/WebSoupRequestManager.cpp:
2209         (WebKit):
2210         (WebKit::WebSoupRequestManager::didFailURIRequest): Implement new method
2211         setting the error and completing the request.
2212         * WebProcess/soup/WebSoupRequestManager.h:
2213         (WebSoupRequestManager): Add new method header.
2214         * WebProcess/soup/WebSoupRequestManager.messages.in: Add new method
2215         signature.
2216
2217 2013-05-06  Anders Carlsson  <andersca@apple.com>
2218
2219         Every LocalStorageDatabase should know about its tracker
2220         https://bugs.webkit.org/show_bug.cgi?id=115673
2221
2222         Reviewed by Andreas Kling.
2223
2224         * UIProcess/Storage/LocalStorageDatabase.cpp:
2225         (WebKit::LocalStorageDatabase::create):
2226         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
2227         * UIProcess/Storage/LocalStorageDatabase.h:
2228         * UIProcess/Storage/StorageManager.cpp:
2229         (WebKit::StorageManager::StorageArea::StorageArea):
2230
2231 2013-05-06  Anders Carlsson  <andersca@apple.com>
2232
2233         Add LocalStorageDatabaseTracker class
2234         https://bugs.webkit.org/show_bug.cgi?id=115671
2235
2236         Reviewed by Andreas Kling.
2237
2238         Somewhat unsurprisingly, this class will be used for tracking local storage databases.
2239
2240         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: Added.
2241         (WebKit::LocalStorageDatabaseTracker::create):
2242         (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
2243         (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
2244         * UIProcess/Storage/LocalStorageDatabaseTracker.h: Added.
2245         (LocalStorageDatabaseTracker):
2246         
2247         * UIProcess/Storage/StorageManager.cpp:
2248         (WebKit::StorageManager::StorageManager):
2249         Create a local storage database tracker.
2250
2251         * WebKit2.xcodeproj/project.pbxproj:
2252         Add new files.
2253
2254 2013-05-06  Anders Carlsson  <andersca@apple.com>
2255
2256         Handle closing the local storage database
2257         https://bugs.webkit.org/show_bug.cgi?id=115669
2258
2259         Reviewed by Beth Dakin.
2260
2261         * UIProcess/Storage/LocalStorageDatabase.cpp:
2262         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
2263         Initialize m_isClosed.
2264     
2265         (WebKit::LocalStorageDatabase::~LocalStorageDatabase):
2266         Assert that m_isClosed is false.
2267
2268         (WebKit::LocalStorageDatabase::close):
2269         Set m_isClosed to true and write any pending changes to disk.
2270
2271         (WebKit::LocalStorageDatabase::updateDatabase):
2272         Compute the changed items and pass them to updateDatabaseWithChangedItems.
2273
2274         (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
2275         Split out the code that actually writes to the database from updateDatabase and into this function.
2276
2277         * UIProcess/Storage/LocalStorageDatabase.h:
2278         * UIProcess/Storage/StorageManager.cpp:
2279         (WebKit::StorageManager::StorageArea::~StorageArea):
2280         Call close().
2281
2282 2013-05-06  Zan Dobersek  <zdobersek@igalia.com>
2283
2284         [WK2] Make the WebNetworkInfoManagerProxy a supplement to the WebContext
2285         https://bugs.webkit.org/show_bug.cgi?id=115654
2286
2287         Reviewed by Andreas Kling.
2288
2289         Rather than holding a RefPtr to the WebNetworkInfoManagerProxy object in WebContext, change the WebNetworkInfoManagerProxy
2290         to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its
2291         construction and cleanup, removing the specific RefPtr member variable and its correlating getter method.
2292
2293         * UIProcess/API/C/WKContext.cpp:
2294         (WKContextGetNetworkInfoManager): Retrieve the WebNetworkInfoManagerProxy object from the suppplements of the WebContext.
2295         * UIProcess/WebContext.cpp:
2296         (WebKit::WebContext::WebContext): Add the WebNetworkInfoManagerProxy object as a supplement instead of assigning it to
2297         the now-removed member variable.
2298         (WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the
2299         supplements vector.
2300         (WebKit::WebContext::disconnectProcess): Ditto.
2301         * UIProcess/WebContext.h:
2302         (WebContext): Remove the WebNetworkInfoManagerProxy RefPtr member variable and its getter method.
2303         * UIProcess/WebNetworkInfoManagerProxy.cpp:
2304         (WebKit::WebNetworkInfoManagerProxy::supplementName): Specift the supplement's name.
2305         (WebKit::WebNetworkInfoManagerProxy::WebNetworkInfoManagerProxy): Initialize as a WebContextSupplement.
2306         (WebKit::WebNetworkInfoManagerProxy::providerDidChangeNetworkInformation): Adjust to use the context() method instead of
2307         accessing the private m_context directly.
2308         (WebKit::WebNetworkInfoManagerProxy::contextDestroyed): Stop updating when invoked.
2309         (WebKit::WebNetworkInfoManagerProxy::processDidClose): Ditto.
2310         (WebKit::WebNetworkInfoManagerProxy::refWebContextSupplement): Call APIObject::ref.
2311         (WebKit::WebNetworkInfoManagerProxy::derefWebContextSupplement): Call APIObject::deref.
2312         * UIProcess/WebNetworkInfoManagerProxy.h:
2313         (WebNetworkInfoManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods.
2314
2315 2013-05-06  Alexey Proskuryakov  <ap@apple.com>
2316
2317         <rdar://problem/13479806> [Mac] Pass plug-in bundle ID to LaunchServices
2318         https://bugs.webkit.org/show_bug.cgi?id=115483
2319
2320         Reviewed by Darin Adler.
2321
2322         * PluginProcess/PluginProcess.h: Added m_pluginBundleIdentifier. We now need it
2323         in multiple places, so it's easier to pre-compute it.
2324
2325         * PluginProcess/mac/PluginProcessMac.mm:
2326         (WebKit::loadSandboxProfileForDirectory): Changed to use precomputed bundle ID.
2327         (WebKit::loadSandboxProfile): Ditto.
2328         (WebKit::PluginProcess::platformInitializeProcess): Pre-compute bundle ID.
2329         (WebKit::PluginProcess::initializeProcessName): Pass it to LaunchServices.
2330         (WebKit::PluginProcess::initializeSandbox): Pass precomputed bundle ID instead of
2331         a path.
2332
2333 2013-05-06  Anders Carlsson  <andersca@apple.com>
2334
2335         Handle removeItem and clear in LocalStorageDatabase
2336         https://bugs.webkit.org/show_bug.cgi?id=115664
2337
2338         Reviewed by Darin Adler.
2339
2340         * UIProcess/Storage/LocalStorageDatabase.cpp:
2341         (WebKit::LocalStorageDatabase::removeItem):
2342         Call itemDidChange with a null value, indicating that we want to remove this item.
2343
2344         (WebKit::LocalStorageDatabase::clear):
2345         Clear items, set m_shouldClearItems and schedule a database update.
2346
2347         (WebKit::LocalStorageDatabase::updateDatabase):
2348         If m_shouldClearItems is true, clear all items.
2349
2350         * UIProcess/Storage/StorageManager.cpp:
2351         (WebKit::StorageManager::StorageArea::removeItem):
2352         Call through to the local storage database.
2353
2354         (WebKit::StorageManager::StorageArea::clear):
2355         Ditto.
2356
2357 2013-05-06  Anders Carlsson  <andersca@apple.com>
2358
2359         Write storage changes to disk
2360         https://bugs.webkit.org/show_bug.cgi?id=115660
2361
2362         Reviewed by Andreas Kling.
2363
2364         * UIProcess/Storage/LocalStorageDatabase.cpp:
2365         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
2366         Initialize new member variables.
2367
2368         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
2369         Disable database threading checks.
2370
2371         (WebKit::LocalStorageDatabase::importItems):
2372         Only import the items once.
2373
2374         (WebKit::LocalStorageDatabase::setItem):
2375         Call itemDidChange.
2376
2377         (WebKit::LocalStorageDatabase::itemDidChange):
2378         Record the change and schedule a database update.
2379
2380         (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
2381         Use WorkQueue::dispatchAfterDelay to schedule a datbase update.
2382
2383         (WebKit::LocalStorageDatabase::updateDatabase):
2384         Write changes to disk. If there are more than 100 pending items, only write the first 100 and then schedule
2385         another database update for the remaining items.
2386
2387         * UIProcess/Storage/LocalStorageDatabase.h:
2388         Add new member variables.
2389
2390         * UIProcess/Storage/StorageManager.cpp:
2391         (WebKit::StorageManager::StorageArea::setItem):
2392         Call LocalStorageDatabase::setItem.
2393
2394 2013-05-06  Zan Dobersek  <zdobersek@igalia.com>
2395
2396         [WK2] Make the WebBatteryManagerProxy a supplement to the WebContext
2397         https://bugs.webkit.org/show_bug.cgi?id=115625
2398
2399         Reviewed by Andreas Kling.
2400
2401         Rather than holding a RefPtr to the WebBatteryManagerProxy object in WebContext, change the WebBatteryManagerProxy
2402         to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its
2403         construction and cleanup, removing the specific RefPtr member variable and its correlating getter method.
2404
2405         * UIProcess/API/C/WKContext.cpp:
2406         (WKContextGetBatteryManager): Retrieve the WebBatteryManagerProxy object from the supplements of the WebContext.
2407         * UIProcess/WebBatteryManagerProxy.cpp:
2408         (WebKit::WebBatteryManagerProxy::supplementName): Specify the supplement's name.
2409         (WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy): Initialize as a WebContextSupplementable.
2410         (WebKit::WebBatteryManagerProxy::providerDidChangeBatteryStatus): Adjust to use the context() method instead of accessing
2411         the private m_context directly.
2412         (WebKit::WebBatteryManagerProxy::providerUpdateBatteryStatus): Ditto.
2413         (WebKit::WebBatteryManagerProxy::contextDestroyed): Stop updating when invoked.
2414         (WebKit::WebBatteryManagerProxy::processDidClose): Ditto.
2415         (WebKit::WebBatteryManagerProxy::refWebContextSupplement): Call APIObject::ref.
2416         (WebKit::WebBatteryManagerProxy::derefWebContextSupplement): Call APIObject::deref.
2417         (WebKit::WebBatteryManagerProxy::startUpdating): Fire up the provider if not yet updating.
2418         (WebKit::WebBatteryManagerProxy::stopUpdating): Wind down the provider if updating.
2419         * UIProcess/WebBatteryManagerProxy.h:
2420         (WebBatteryManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods.
2421         * UIProcess/WebContext.cpp:
2422         (WebKit::WebContext::WebContext): Add the WebBatteryManagerProxy object as a supplement instead of assigning it to
2423         the now-removed member variable.
2424         (WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the
2425         supplements vector.
2426         (WebKit::WebContext::disconnectProcess): Ditto.
2427         * UIProcess/WebContext.h:
2428         (WebContext): Remove the WebBatteryManagerProxy RefPtr member variable and its getter method.
2429
2430 2013-05-06  Antoine Quint  <graouts@apple.com>
2431
2432         Manage the presentation of the snapshotted plug-in using JavaScript
2433         https://bugs.webkit.org/show_bug.cgi?id=115548
2434
2435         Reviewed by Dean Jackson.
2436
2437         Expose a new plugInExtraScript method to support the injection of
2438         a JS file from the chrome client to customize the rendering of a
2439         snapshotted plug-in's shadow tree. Additionally, it is expected
2440         the chrome client will want to provide localized strings taking
2441         into account the snapshotted plug-in's mime-type, so we're adding
2442         this as a parameter to both plugInStartLabelTitle and
2443         plugInStartLabelSubtitle methods.
2444
2445         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2446         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2447         (WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle):
2448         (WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle):
2449         (WebKit::InjectedBundlePageUIClient::plugInExtraScript):
2450         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
2451         (InjectedBundlePageUIClient):
2452         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2453         (WebKit::WebChromeClient::plugInStartLabelTitle):
2454         (WebKit::WebChromeClient::plugInStartLabelSubtitle):
2455         (WebKit::WebChromeClient::plugInExtraScript):
2456         * WebProcess/WebCoreSupport/WebChromeClient.h:
2457         (WebChromeClient):
2458
2459 2013-05-05  Chris Fleizach  <cfleizach@apple.com>
2460
2461         WEB SPEECH: deny file-read-data /Library/Speech/Synthesizers
2462         https://bugs.webkit.org/show_bug.cgi?id=115621
2463
2464         Reviewed by Alexey Proskuryakov.
2465
2466         Allow access to the location where 3rd party speech synthesizers are stored.
2467
2468         * WebProcess/com.apple.WebProcess.sb.in:
2469
2470 2013-05-05  Tim Horton  <timothy_horton@apple.com>
2471
2472         [wk2] Page Overlays: deviceScaleFactor doesn't update when the display changes
2473         https://bugs.webkit.org/show_bug.cgi?id=115577
2474         <rdar://problem/13762583>
2475
2476         Reviewed by Darin Adler.
2477
2478         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2479         (WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor):
2480         Invalidate the page overlay layers' device scale factor when
2481         TiledCoreAnimationDrawingArea is notified that it has changed.
2482
2483 2013-05-05  Anders Carlsson  <andersca@apple.com>
2484
2485         Remove the Vector::append overload that takes a Vector
2486         https://bugs.webkit.org/show_bug.cgi?id=115535
2487
2488         Reviewed by Andreas Kling.
2489
2490         Use Vector::appendVector instead.
2491
2492         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2493         (WebKit::NetworkBlobRegistry::registerBlobURL):
2494         * NetworkProcess/SchedulableLoader.cpp:
2495         (WebKit::SchedulableLoader::SchedulableLoader):
2496         * Platform/CoreIPC/Connection.cpp:
2497         (CoreIPC::Connection::SyncMessageState::dispatchMessages):
2498         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
2499         (WebKit::PluginInfoStore::pluginsDirectories):
2500
2501 2013-05-04  Sam Weinig  <sam@webkit.org>
2502
2503         Fix * placement in a few functions as noticed by Mark Rowe.
2504
2505         Rubber-stamped by Dan Bernstein.
2506
2507         * WebProcess/WebPage/PageBanner.h:
2508         (PageBanner):
2509         * WebProcess/WebPage/mac/PageBannerMac.mm:
2510         (WebKit::PageBanner::create):
2511         (WebKit::PageBanner::PageBanner):
2512
2513 2013-05-04  Sam Weinig  <sam@webkit.org>
2514
2515         REGRESSION(r148312): Crash when calling WKPageClose(page) followed by WKPageTerminate(page)
2516         <rdar://problem/13702008>
2517         https://bugs.webkit.org/show_bug.cgi?id=115607
2518
2519         Reviewed by Benjamin Poulain.
2520
2521         API Test: WebKit2.CloseThenTerminate
2522
2523         * UIProcess/WebPageProxy.cpp:
2524         (WebKit::WebPageProxy::resetStateAfterProcessExited):
2525         Don't try to reset the state if the page is closed, it won't work and its not worth it.
2526
2527 2013-05-04  Beth Dakin  <bdakin@apple.com>
2528
2529         https://bugs.webkit.org/show_bug.cgi?id=115574
2530         Crash using new WKBundlePageSetHeaderBanner() API to set a banner to null
2531
2532         Reviewed by Darin Adler.
2533
2534         Don't call addToPage() on a null banner.
2535         * WebProcess/WebPage/WebPage.cpp:
2536         (WebKit::WebPage::setHeaderPageBanner):
2537         (WebKit::WebPage::setFooterPageBanner):
2538
2539 2013-05-03  Alexey Proskuryakov  <ap@apple.com>
2540
2541         <rdar://problem/13806836> Tweak sandbox profile.
2542
2543         Reviewed by Dan Bernstein.
2544
2545         * WebProcess/com.apple.WebProcess.sb.in:
2546
2547 2013-05-03  Tim Horton  <timothy_horton@apple.com>
2548
2549         PDFPlugin: Changes being made to active annotation aren't saved when the PDF is exported
2550         https://bugs.webkit.org/show_bug.cgi?id=115544
2551         <rdar://problem/13801789>
2552
2553         Reviewed by Alexey Proskuryakov.
2554
2555         Commit changes to the active annotation (if there is one) before
2556         returning the live PDF data, so that said changes are represented
2557         in the exported or printed output.
2558
2559         * WebProcess/Plugins/PDF/PDFPlugin.h: Override liveData.
2560         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2561         (WebKit::PDFPlugin::liveData): Commit the active annotation if there is one.
2562         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
2563         (SimplePDFPlugin): Make liveData virtual.
2564
2565 2013-05-03  Tim Horton  <timothy_horton@apple.com>
2566
2567         Web process crashes at WebPage::determinePrimarySnapshottedPlugInTimerFired + 8
2568         https://bugs.webkit.org/show_bug.cgi?id=115056
2569         <rdar://problem/13719543>
2570
2571         Reviewed by Simon Fraser.
2572
2573         Null-check m_page. In theory, we shouldn't get here, because we stop
2574         the timer at the only point where m_page is cleared, but crash logs say
2575         we're still crashing here.
2576
2577         * WebProcess/WebPage/WebPage.cpp:
2578         (WebKit::WebPage::determinePrimarySnapshottedPlugInTimerFired):
2579
2580 2013-05-03  Tim Horton  <timothy_horton@apple.com>
2581
2582         Remove some "what" comments from FindController
2583         https://bugs.webkit.org/show_bug.cgi?id=115546
2584
2585         Reviewed by Andreas Kling.
2586
2587         * WebProcess/WebPage/FindController.cpp:
2588         (WebKit::FindController::countStringMatches):
2589         (WebKit::FindController::updateFindUIAfterPageScroll):
2590         (WebKit::FindController::willMoveToWebPage):
2591         (WebKit::FindController::mouseEvent):
2592         Remove or reword some comments.
2593
2594 2013-05-02  Andy Estes  <aestes@apple.com>
2595
2596         [WK2][CustomProtocols] NSURLProtocolClient methods should be dispatched on NSURLConnection's resource loader run loop
2597         https://bugs.webkit.org/show_bug.cgi?id=115539
2598
2599         Reviewed by Alexey Proskuryakov.
2600
2601         It turns out that calling NSURLProtocolClient methods from a different
2602         thread than the one running the NSURLConnection run loop is unsafe.
2603         Although I can't capture it reliably in a test case, doing so can
2604         sometimes result in a load timing out because the call to
2605         -[NSURLProtocolClient URLProtocolDidFinishLoading:] was ignored by
2606         NSURLConnection.
2607
2608         Fix this by dispatching these methods on the NSURLConnection resource
2609         load run loop. This matches where NSURLProtocolClient methods are
2610         dispatched by typical NSURLProtocol implementations, and in my testing
2611         this solves the timeout issue.
2612
2613         * Shared/Network/CustomProtocols/CustomProtocolManager.h: Declare
2614         dispatchOnResourceLoaderRunLoop().
2615         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
2616         Declare +[NSURLConnection resourceLoaderRunLoop] on a category of
2617         NSURLConnection. Also include the header that declares it if it's present.
2618         (WebKit::CustomProtocolManager::didFailWithError): Call the
2619         NSURLProtocolClient method via dispatchOnResourceLoaderRunLoop().
2620         (WebKit::CustomProtocolManager::didLoadData): Ditto.
2621         (WebKit::CustomProtocolManager::didReceiveResponse): Ditto.
2622         (WebKit::CustomProtocolManager::didFinishLoading): Ditto.
2623         (WebKit::CustomProtocolManager::dispatchOnResourceLoaderRunLoop):
2624         Dispatch a block on the NSURLConnection resource loader run loop and
2625         then wake up the run loop.
2626
2627 2013-05-02  Brady Eidson  <beidson@apple.com>
2628
2629         REGRESSION (149389) Main resources converted to downloads are immediately cancelled.
2630         <rdar://problem/13795795> and https://bugs.webkit.org/show_bug.cgi?id=115530
2631
2632         Reviewed by Alexey Proskuryakov.
2633
2634         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2635         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Call didConvertHandleToDownload
2636           on the NetworkResourceLoader.
2637
2638         * NetworkProcess/NetworkResourceLoader.cpp:
2639         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2640         (WebKit::NetworkResourceLoader::didConvertHandleToDownload): Set m_handleConvertedToDownload to true.
2641         (WebKit::NetworkResourceLoader::abort): Only cancel the handle if m_handleConvertedToDownload is false.
2642         * NetworkProcess/NetworkResourceLoader.h:
2643
2644 2013-05-02  Alexey Proskuryakov  <ap@apple.com>
2645
2646         <rdar://problem/13740375> Non-ASCII downloaded file names are garbled when using NetworkProcess
2647         https://bugs.webkit.org/show_bug.cgi?id=115520
2648
2649         Reviewed by Darin Adler.
2650
2651         * Shared/mac/WebCoreArgumentCodersMac.mm:
2652         (CoreIPC::::encodePlatformData):
2653         (CoreIPC::::decodePlatformData):
2654         Send the encoding fallback array over IPC, so that it's present when NetworkProcess does its loading.
2655
2656 2013-05-01  Alexey Proskuryakov  <ap@apple.com>
2657
2658         REGRESSION (r149422): -[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]
2659         broken when second argument is nil
2660         https://bugs.webkit.org/show_bug.cgi?id=115505
2661         <rdar://problem/13787297>
2662
2663         Reviewed by Darin Adler.
2664
2665         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile): Pass a URL string
2666         to assumeReadAccessToBaseURL, as this is what it takes.
2667
2668 2013-05-01  Ryosuke Niwa  <rniwa@webkit.org>
2669
2670         [Mac] WebKit doesn't enable or disable autocorrections when system preferences are changed
2671         https://bugs.webkit.org/show_bug.cgi?id=115463
2672
2673         Reviewed by Darin Adler.
2674
2675         Observe the default notification center and propagate the changes to TextCheckerState and
2676         to all WebProcesses when system preferences are updated.
2677
2678         * UIProcess/TextChecker.h:
2679         * UIProcess/WebContext.h:
2680         * UIProcess/mac/TextCheckerMac.mm:
2681         (WebKit::shouldAutomaticTextReplacementBeEnabled):
2682         (WebKit::shouldAutomaticSpellingCorrectionBeEnabled):
2683         (WebKit::shouldAutomaticQuoteSubstitutionBeEnabled):
2684         (WebKit::shouldAutomaticDashSubstitutionBeEnabled):
2685         (WebKit::initializeState):
2686         (WebKit::TextChecker::didChangeAutomaticTextReplacementEnabled):
2687         (WebKit::TextChecker::didChangeAutomaticSpellingCorrectionEnabled):
2688         (WebKit::TextChecker::didChangeAutomaticQuoteSubstitutionEnabled):
2689         (WebKit::TextChecker::didChangeAutomaticDashSubstitutionEnabled):
2690         * UIProcess/mac/WebContextMac.mm:
2691         (WebKit::WebContext::registerNotificationObservers):
2692         (WebKit::WebContext::unregisterNotificationObservers):
2693
2694 2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
2695
2696         [GTK] Fix build break after r149449
2697         https://bugs.webkit.org/show_bug.cgi?id=115500
2698
2699         Reviewed by Gustavo Noronha Silva.
2700
2701         Unreviewed GTK build fix
2702
2703         * GNUmakefile.list.am: Added LocalStorageDatabase.[cpp|h] to the list of
2704         sources.
2705
2706 2013-05-01  Martin Robinson  <mrobinson@igalia.com>
2707
2708         [GTK] [WebKit2] Documentation for webkit_web_view_run_javascript should indicate what happens when JavaScript is disabled
2709         https://bugs.webkit.org/show_bug.cgi?id=115492
2710
2711         Reviewed by Xan Lopez.
2712
2713         * UIProcess/API/gtk/WebKitWebView.cpp: Clarify the documentation.
2714
2715 2013-05-01  Tim Horton  <timothy_horton@apple.com>
2716
2717         Move knowledge of PDF/PostScript MIME types into MIMETypeRegistry
2718         https://bugs.webkit.org/show_bug.cgi?id=115487
2719
2720         Reviewed by Darin Adler.
2721
2722         * UIProcess/WebContext.cpp:
2723         * UIProcess/WebContext.h:
2724         Remove pdfAndPostScriptMIMETypes.
2725
2726         * UIProcess/WebFrameProxy.cpp:
2727         (WebKit::WebFrameProxy::canShowMIMEType): Move PDF bits to WebPageProxy.
2728         (WebKit::WebFrameProxy::isDisplayingPDFDocument):
2729         Make use of WebCore's newfound knowledge of PDF and PostScript MIME types,
2730         so we don't have to duplicate it unnecessarily in WebKit2.
2731
2732         * UIProcess/WebPageProxy.cpp:
2733         (WebKit::WebPageProxy::canShowMIMEType):
2734         Add code which used to be in WebFrameProxy::canShowMIMEType, and adapt it
2735         to use WebCore's knowledge of PDF and PostScript MIME types.
2736
2737         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
2738         (WebKit::SimplePDFPlugin::pluginInfo):
2739         We previously supported the "text/pdf" MIME type for PDFViewController,
2740         so SimplePDFPlugin and PDFPlugin should support it as well.
2741
2742         * WebProcess/WebPage/WebPage.cpp:
2743         (WebKit::WebPage::createPlugin):
2744         Adopt MIMETypeRegistry::isPDFOrPostScriptMIMEType.
2745
2746         * WebProcess/WebPage/WebPage.h:
2747         (WebPage):
2748         Remove pdfAndPostScriptMIMETypes.
2749
2750         * WebProcess/WebPage/mac/WebPageMac.mm:
2751         (WebKit::WebPage::platformPreferencesDidChange):
2752         Adopt getPDFAndPostScriptMIMETypes instead of duplicating the list in WebKit2.
2753
2754 2013-05-01  Anders Carlsson  <andersca@apple.com>
2755
2756         Implement LocalStorageDatabase::importItems
2757         https://bugs.webkit.org/show_bug.cgi?id=115493
2758
2759         Reviewed by Andreas Kling.
2760
2761         Fetch items and insert them in the storage map.
2762         * UIProcess/Storage/LocalStorageDatabase.cpp:
2763         (WebKit::LocalStorageDatabase::importItems):
2764
2765 2013-05-01  Anders Carlsson  <andersca@apple.com>
2766
2767         Begin work on loading items from the local storage database
2768         https://bugs.webkit.org/show_bug.cgi?id=115489
2769
2770         Reviewed by Andreas Kling.
2771
2772         Some of the LocalStorageDatabase code is originally from WebCore,
2773         but has been simplified due to the fact that we don't need to load
2774         database data asynchronously since we're already running on a non-main thread.
2775
2776         * UIProcess/Storage/LocalStorageDatabase.cpp:
2777         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
2778         (WebKit::LocalStorageDatabase::openDatabase):
2779         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
2780         (WebKit::LocalStorageDatabase::migrateItemTableIfNeeded):
2781         (WebKit::LocalStorageDatabase::importItems):
2782
2783         * UIProcess/Storage/LocalStorageDatabase.h:
2784         (WebKit::StorageManager::StorageArea::setItem):
2785         (WebKit::StorageManager::StorageArea::removeItem):
2786         (WebKit::StorageManager::StorageArea::clear):
2787         (WebKit::StorageManager::StorageArea::items):
2788         Call importItemsFromDatabase().
2789         
2790         (WebKit::StorageManager::StorageArea::importItemsFromDatabase):
2791         Ask the database to import the items.
2792
2793 2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
2794
2795         [EFL] Unreviewed buildfix after r149449.
2796
2797         * CMakeLists.txt:
2798
2799 2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2800
2801         [Qt] Unreviewed buildfix after r149449.
2802
2803         * Target.pri:
2804
2805 2013-05-01  Anders Carlsson  <andersca@apple.com>
2806
2807         Add LocalStorageDatabase class
2808         https://bugs.webkit.org/show_bug.cgi?id=115486
2809
2810         Reviewed by Sam Weinig.
2811
2812         The LocalStorageDatabase class will persist local storage data to disk.
2813
2814         * UIProcess/Storage/LocalStorageDatabase.cpp:
2815         * UIProcess/Storage/LocalStorageDatabase.h: Added.
2816
2817         * UIProcess/Storage/StorageManager.cpp:
2818         (StorageManager::StorageArea):
2819         (WebKit::StorageManager::LocalStorageNamespace::storageManager):
2820         Add getter.
2821
2822         (StorageManager::LocalStorageNamespace):
2823         (WebKit::StorageManager::StorageArea::StorageArea):
2824         If this is a local storage area, create a LocalStorageDatabase.
2825
2826         (WebKit::StorageManager::LocalStorageNamespace::databaseFilename):
2827         Helper function for getting the name of the database for the given origin.
2828
2829         * WebKit2.xcodeproj/project.pbxproj:
2830         Add new files.
2831
2832 2013-05-01  Alexey Proskuryakov  <ap@apple.com>
2833
2834         <rdar://problem/13781156> Launching NetworkProcess broken on some OS versions.
2835
2836         Reviewed by Anders Carlsson.
2837
2838         Adapt to LaunchServices changes.
2839
2840         * Shared/mac/ChildProcessMac.mm:
2841         (WebKit::ChildProcess::setApplicationIsDaemon):
2842
2843 2013-05-01  Martin Robinson  <mrobinson@igalia.com>
2844
2845         [GTK] [WebKit2] Add a setting to control whether or not accelerated 2D canvas is enabled
2846         https://bugs.webkit.org/show_bug.cgi?id=114394
2847
2848         Reviewed by Anders Carlsson.
2849
2850         Add a setting to control accelerated 2D canvas, which determines whether
2851         or not to consider rendering HTML canvas with hardware acceleration.
2852
2853         * UIProcess/API/gtk/WebKitSettings.cpp:
2854         (webKitSettingsSetProperty): Added support for enable-accelerated-2d-canvas property.
2855         (webKitSettingsGetProperty): Added support for enable-accelerated-2d-canvas property.
2856         (webkit_settings_class_init): Added support for enable-accelerated-2d-canvas property.
2857         (webkit_settings_get_enable_accelerated_2d_canvas): Added.
2858         (webkit_settings_set_enable_accelerated_2d_canvas): Added.
2859         * UIProcess/API/gtk/WebKitSettings.h: New methods.
2860         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new methods to the documentation.
2861         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
2862         (testWebKitSettings): Added a simple test for the setting.
2863
2864 2013-04-30  Jer Noble  <jer.noble@apple.com>
2865
2866         Entering full screen mode shows desktop linen instead of WKView the first time.
2867         https://bugs.webkit.org/show_bug.cgi?id=115433
2868         <rdar://problem/13774540>
2869
2870         Reviewed by Eric Carlson.
2871
2872         For certain types of windows created by subclasses of WKView, the window in question fails to paint
2873         when created with a zero-size rect. Create the window with an initial size of the active screen frame
2874         as that is the likely destination size.
2875
2876         * UIProcess/API/mac/WKView.mm:
2877         (-[WKView createFullScreenWindow]):
2878
2879 2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2880
2881         [Qt][Win] Fix build after r149416.
2882         https://bugs.webkit.org/show_bug.cgi?id=115474
2883
2884         Reviewed by Anders Carlsson.
2885
2886         * Platform/CoreIPC/Connection.h:
2887         (Connection):
2888         * Platform/CoreIPC/win/ConnectionWin.cpp:
2889         (CoreIPC::Connection::dispatchSentMessagesUntil):
2890
2891 2013-05-01  Sergio Villar Senin  <svillar@igalia.com>
2892
2893         Unreviewed GTK build fix after r149417.
2894
2895         * GNUmakefile.list.am: Added PageBanner.[cpp|h] to the list of
2896         sources.
2897
2898 2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
2899
2900         [EFL] Unreviewed buildfix after r149416 and r149417.
2901
2902         Unreviewed build fix.
2903
2904         * CMakeLists.txt:
2905
2906 2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2907
2908         [Qt] Unreviewed buildfix after r149416 and r149417.
2909
2910         * Target.pri:
2911
2912 2013-04-30  Dongwoo Joshua Im  <dw.im@samsung.com>
2913
2914         [EFL] Unreviewed, EFL build fix after r149416
2915         https://bugs.webkit.org/show_bug.cgi?id=115467
2916
2917         Unreviewed build fix.
2918
2919         * CMakeLists.txt: Remove non-existing file, BinarySemaphore.cpp, from the list.
2920
2921 2013-04-30  Simon Cooper  <scooper@apple.com>
2922
2923         ipc-posix-shm backwards compatibility 
2924         https://bugs.webkit.org/show_bug.cgi?id=115448
2925         <rdar://problem/13743037>
2926
2927         Reviewed by Alexey Proskuryakov.
2928
2929         Add compatibility for older ipc-posix-shm operations, but prefer the
2930         newer names when writing profiles.
2931
2932         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2933
2934 2013-04-30  Philippe Normand  <pnormand@igalia.com>
2935
2936         Unreviewed, GTK build fix after r149416.
2937
2938         * GNUmakefile.list.am: Remove references to non-existant
2939         BinarySemaphore module.
2940
2941 2013-04-28  Alexey Proskuryakov  <ap@apple.com>
2942
2943         <rdar://problem/13574729> Implement file path restrictions in WebKit Objective C API
2944         https://bugs.webkit.org/show_bug.cgi?id=115321
2945
2946         Reviewed by Darin Adler.
2947
2948         * UIProcess/API/C/WKPage.cpp:
2949         * UIProcess/API/C/WKPage.h: 
2950         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile):
2951         * UIProcess/WebPageProxy.h:
2952         Added and implemented a C API to load a file while only opening sandbox for
2953         a specific directory.
2954
2955         * UIProcess/API/mac/WKBrowsingContextController.h: Fixed a typo in a comment.
2956
2957         * UIProcess/API/mac/WKBrowsingContextController.mm:
2958         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
2959         Respect allowedDirectory argument. Updated the function to raise an exception for
2960         incorrect input, as decribed in header file.
2961
2962 2013-04-29  Sam Weinig  <sam@webkit.org>
2963
2964         Add API to allow WebKit2 banners to get mouse events
2965         https://bugs.webkit.org/show_bug.cgi?id=115395
2966
2967         Reviewed by Beth Dakin.
2968
2969         * Shared/API/c/WKBase.h:
2970         * Shared/APIObject.h:
2971         Add banner type.
2972
2973         * WebKit2.xcodeproj/project.pbxproj:
2974         Add files.
2975
2976         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
2977         Add conversion.
2978
2979         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2980         (WKBundlePageSetTopOverhangImage):
2981         (WKBundlePageSetBottomOverhangImage):
2982         Fix parameter names to be consistent.
2983
2984         (WKBundlePageSetHeaderBanner):
2985         (WKBundlePageSetFooterBanner):
2986         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2987         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp: Added.
2988         (WKBundlePageBannerGetTypeID):
2989         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h: Added.
2990         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.h: Added.
2991         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: Added.
2992         (PageBannerClientImpl):
2993         (PageBannerClientImpl::create):
2994         (PageBannerClientImpl::PageBannerClientImpl):
2995         (PageBannerClientImpl::pageBannerDestroyed):
2996         (PageBannerClientImpl::mouseEvent):
2997         (WKBundlePageBannerCreateBannerWithCALayer):
2998         (WKBundlePageBannerGetLayer):
2999         Add banner API.
3000
3001         * WebProcess/WebPage/PageBanner.h: Added.
3002         * WebProcess/WebPage/PageBanner.cpp: Added.
3003         (WebKit::PageBanner::~PageBanner):
3004         (WebKit::PageBanner::addToPage):
3005         (WebKit::PageBanner::detachFromPage):
3006         (WebKit::PageBanner::didChangeDeviceScaleFactor):
3007         (WebKit::PageBanner::mouseEvent):
3008         Add non-mac implementations.
3009
3010         * WebProcess/WebPage/WebPage.cpp:
3011         (WebKit::WebPage::~WebPage):
3012         (WebKit::WebPage::setHeaderPageBanner):
3013         (WebKit::WebPage::headerPageBanner):
3014         (WebKit::WebPage::setFooterPageBanner):
3015         (WebKit::WebPage::footerPageBanner):
3016         (WebKit::WebPage::mouseEvent):
3017         (WebKit::WebPage::mouseEventSyncForTesting):
3018         * WebProcess/WebPage/WebPage.h:
3019         Add banner setter/getters and give the banners a chance to handle mouse events.
3020
3021         * WebProcess/WebPage/mac/PageBannerMac.mm: Added.
3022         (WebKit::PageBanner::create):
3023         (WebKit::PageBanner::PageBanner):
3024         (WebKit::PageBanner::addToPage):
3025         (WebKit::PageBanner::detachFromPage):
3026         (WebKit::PageBanner::didChangeDeviceScaleFactor):
3027         (WebKit::PageBanner::mouseEvent):
3028         (WebKit::PageBanner::layer):
3029         Add Mac implementation.
3030
3031         * WebProcess/WebPage/mac/WebPageMac.mm:
3032         (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
3033         Notify banners when the device scale changes.
3034
3035 2013-04-30  Anders Carlsson  <andersca@apple.com>
3036
3037         Remove the WebKit2 BinarySemaphore class
3038         https://bugs.webkit.org/show_bug.cgi?id=115458
3039
3040         Reviewed by Benjamin Poulain.
3041
3042         Remove the WK2 specific BinarySemaphore class and use the one from WTF.
3043
3044         * Platform/CoreIPC/BinarySemaphore.cpp: Removed.
3045         * Platform/CoreIPC/BinarySemaphore.h: Removed.
3046         * Platform/CoreIPC/Connection.cpp:
3047         * Platform/CoreIPC/Connection.h:
3048         * WebKit2.xcodeproj/project.pbxproj:
3049
3050 2013-04-30  Alexey Proskuryakov  <ap@apple.com>
3051
3052         <rdar://problem/13757475> WebProcess deny ipc-posix-shm-read-data CFPBS:A2:
3053
3054         Reviewed by Anders Carlsson.
3055
3056         * WebProcess/com.apple.WebProcess.sb.in: Allow pbs shared memory.
3057
3058 2013-04-30  Alexey Proskuryakov  <ap@apple.com>
3059
3060         [Mac] Don't open window server connection in network process
3061         https://bugs.webkit.org/show_bug.cgi?id=115446
3062
3063         Reviewed by Anders Carlsson.
3064
3065         * NetworkProcess/NetworkProcess.cpp:
3066         (WebKit::NetworkProcess::initializeProcess):
3067         * NetworkProcess/NetworkProcess.h:
3068         * NetworkProcess/mac/NetworkProcessMac.mm:
3069         (WebKit::NetworkProcess::initializeProcess):
3070         (WebKit::NetworkProcess::initializeProcessName):
3071         Instead of shutting down a connection after setting process name, just prevent
3072         it from being created.
3073
3074         * Shared/ChildProcess.h:
3075         * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::setApplicationIsDaemon):
3076         Expose a function for client processes to call if they don't run an NSApplication
3077         run loop.
3078
3079         * OfflineStorageProcess/OfflineStorageProcess.cpp:
3080         (WebKit::OfflineStorageProcess::initializeProcess):
3081         * OfflineStorageProcess/OfflineStorageProcess.h:
3082         * OfflineStorageProcess/mac/OfflineStorageProcessMac.mm:
3083         (WebKit::OfflineStorageProcess::initializeProcess):
3084         (WebKit::OfflineStorageProcess::initializeProcessName):
3085         * SharedWorkerProcess/SharedWorkerProcess.cpp:
3086         (WebKit::SharedWorkerProcess::initializeProcess):
3087         (WebKit::SharedWorkerProcess::initializeProcessName):
3088         * SharedWorkerProcess/SharedWorkerProcess.h:
3089         * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm:
3090         (WebKit::SharedWorkerProcess::initializeProcess):
3091         (WebKit::SharedWorkerProcess::initializeProcessName):
3092         Match NetworkProcess for consistency.
3093
3094         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::initializeProcessName):
3095         Don't null check UI process name. First, it can't be null, and second, some other
3096         processes already don't have this check.
3097
3098 2013-04-30  Tim Horton  <timothy_horton@apple.com>
3099
3100         Disable deprecation warnings around some NSProcessInfo API.
3101
3102         Rubber-stamped by Brady Eidson.
3103
3104         * Shared/mac/ChildProcessMac.mm:
3105         (WebKit::ChildProcess::setProcessSuppressionEnabled):
3106
3107 2013-04-30  Brady Eidson  <beidson@apple.com>
3108
3109         [WK2] Threads get stuck in NetworkProcess when canceling loads in WebProcess.
3110         <rdar://problem/13757687> and https://bugs.webkit.org/show_bug.cgi?id=115319
3111
3112         Written and reviewed by both Alexey Proskuryakov and Brady Eidson.
3113
3114         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3115         (WebKit::NetworkConnectionToWebProcess::didClose): Call abort() on all loaders
3116           instead of connectionToWebProcessDidClose()
3117         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Instead of removing
3118           the loader from the scheduler, call abort() which will also end up removing it.
3119
3120         * NetworkProcess/SchedulableLoader.h: Add a virtual abort() call.
3121
3122         * NetworkProcess/NetworkResourceLoader.cpp:
3123         (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Added a messageFlags argument so 
3124           callers can pass DispatchMessageEvenWhenWaitingForSyncReply.
3125         (WebKit::NetworkResourceLoader::abort): Combined "abortInProgressLoad" and "cleanup" to
3126           be a general purpose "cancel"
3127         (WebKit::NetworkResourceLoader::didReceiveBuffer):
3128         (WebKit::NetworkResourceLoader::willSendRequestAsync):
3129         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
3130         * NetworkProcess/NetworkResourceLoader.h:
3131
3132         * NetworkProcess/SyncNetworkResourceLoader.cpp:
3133         (WebKit::SyncNetworkResourceLoader::abort):
3134         * NetworkProcess/SyncNetworkResourceLoader.h:
3135
3136         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3137         (WebKit::WebResourceLoadScheduler::remove): Remove an obsolete/incorrect comment.
3138
3139         * WebProcess/Network/WebResourceLoader.cpp:
3140         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Add comment stressing
3141           the importance of this null check so it's not removed again.
3142
3143 2013-04-30  Carlos Garcia Campos  <cgarcia@igalia.com>
3144
3145         [WK2][GTK] MiniBrowser won't play video in <embed> tag
3146         https://bugs.webkit.org/show_bug.cgi?id=113107
3147
3148         Reviewed by Anders Carlsson.
3149
3150         The wrong clip region is used for windowed plugins, because it's
3151         translated to window frame coords again.
3152
3153         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3154         (WebKit::NetscapePlugin::platformGeometryDidChange): Do not move
3155         the current clip region.
3156
3157 2013-04-30  Timothy Hatcher  <timothy@apple.com>
3158
3159         Make the Inspector dock to right button work in the WebKit nightlies on Safari 6.0.4.
3160
3161         https://webkit.org/b/115428
3162
3163         Reviewed by Joseph Pecoraro.
3164
3165         * UIProcess/mac/WebInspectorProxyMac.mm:
3166         (WebKit::WebInspectorProxy::createInspectorWindow): Reduce the required Safari version.
3167         (WebKit::WebInspectorProxy::platformDetach): Simplify the frame restoring code so it
3168         works on Safari 6.0.4.
3169
3170 2013-04-30  Artur Moryc  <a.moryc@samsung.com>
3171
3172         [WK2][EFL] Spelling marker disappears while selection is being changed
3173         https://bugs.webkit.org/show_bug.cgi?id=115165
3174
3175         Reviewed by Anders Carlsson.
3176
3177         The marker for a misspelled word disappears while the cursor is being navigated along the word.
3178
3179         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3180         (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
3181
3182 2013-04-30  Zalan Bujtas  <zalan@apple.com>
3183
3184         Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
3185         https://bugs.webkit.org/show_bug.cgi?id=111244
3186
3187         Reviewed by David Kilzer.
3188         
3189         Enable performance.now() as a minimal subset of Web Timing API. 
3190         It returns DOMHighResTimeStamp, a monotonically increasing value representing the 
3191         number of milliseconds from the start of the navigation of the current document.
3192         JS libraries use this API to check against the requestAnimationFrame() timestamp.
3193
3194         * Configurations/FeatureDefines.xcconfig:
3195
3196 2013-04-29  Chris Fleizach  <cfleizach@apple.com>
3197
3198         WEB SPEECH: need to identify the default voice per language
3199         https://bugs.webkit.org/show_bug.cgi?id=115366
3200
3201         Reviewed by Tim Horton.
3202
3203         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3204         (InitWebCoreSystemInterface):
3205
3206 2013-04-29  Benjamin Poulain  <benjamin@webkit.org>
3207
3208         [WK2] Streamline the use of strings in WebProcess::getWebCoreStatistics
3209         https://bugs.webkit.org/show_bug.cgi?id=115315
3210
3211         Reviewed by Geoffrey Garen.
3212
3213         Remove a couple of unjustified DEFINE_STATIC_LOCAL.
3214         Use ASCIILiteral when allocating new String.
3215
3216         * WebProcess/WebProcess.cpp:
3217         (WebKit::getWebCoreMemoryCacheStatistics):
3218         (WebKit::WebProcess::getWebCoreStatistics):
3219
3220 2013-04-29  Anders Carlsson  <andersca@apple.com>
3221
3222         Remove StorageTracker::originsLoaded
3223         https://bugs.webkit.org/show_bug.cgi?id=115382
3224
3225         Reviewed by Sam Weinig.
3226
3227         Add m_didFinishLoadingOrigins.
3228
3229         * WebProcess/Storage/WebKeyValueStorageManager.cpp:
3230         (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
3231         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
3232         (WebKit::WebKeyValueStorageManager::didFinishLoadingOrigins):
3233         * WebProcess/Storage/WebKeyValueStorageManager.h:
3234         (WebKeyValueStorageManager):
3235
3236 2013-04-29  Chris Fleizach  <cfleizach@apple.com>
3237
3238         WEB SPEECH Update seatbelt profile to work with speech synthesis
3239         https://bugs.webkit.org/show_bug.cgi?id=115368
3240
3241         Reviewed by Alexey Proskuryakov.
3242
3243         * WebProcess/com.apple.WebProcess.sb.in:
3244
3245 2013-04-28  Beth Dakin  <bdakin@apple.com>
3246
3247         Need a LayoutMilestone to fire when we have done our first paint after suppressing 
3248         incremental layout
3249         https://bugs.webkit.org/show_bug.cgi?id=115330
3250         -and corresponding-
3251         <rdar://problem/12722365>
3252
3253         Reviewed by Simon Fraser.
3254
3255         Two new millstones.
3256         * Shared/API/c/WKPageLoadTypes.h:
3257         * Shared/API/c/WKSharedAPICast.h:
3258         (WebKit::toWKLayoutMilestones):
3259         (WebKit::toLayoutMilestones):
3260
3261         This null-check is necessary now since this code ends up running at 
3262         WebFrame::init() time while we're setting up the Document. 
3263         setVisualUpdatesAllowed(true) has always been called as a part of that process, 
3264         and now the updateLayout(), ends up calling this code too, but we don't actually 
3265         have a mainFrame yet since it's still being created.
3266         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3267         (WebKit::findLargestFrameInFrameSet):
3268
3269 2013-04-29  Brady Eidson  <beidson@apple.com>
3270
3271         REGRESSION: We see authentication challenge sheets for favicon requests.
3272         <rdar://problem/13753470> and https://bugs.webkit.org/show_bug.cgi?id=115288
3273
3274         Reviewed by Alexey Proskuryakov.
3275
3276         Have NetworkResourceLoadParameters remember the ClientCredentialPolicy:
3277         * Shared/Network/NetworkResourceLoadParameters.cpp:
3278         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
3279         (WebKit::NetworkResourceLoadParameters::encode):
3280         (WebKit::NetworkResourceLoadParameters::decode):
3281         * Shared/Network/NetworkResourceLoadParameters.h:
3282
3283         Pass along the ClientCredentialPolicy to the NetworkProcess:
3284         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3285         (WebKit::WebResourceLoadScheduler::scheduleLoad):
3286         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3287         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
3288         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3289
3290         Have the SchedulableLoader remember the ClientCredentialPolicy:
3291         * NetworkProcess/SchedulableLoader.cpp:
3292         (WebKit::SchedulableLoader::SchedulableLoader):
3293         * NetworkProcess/SchedulableLoader.h:
3294         (WebKit::SchedulableLoader::clientCredentialPolicy):
3295
3296         Don’t message for credentials if the ClientCredentialPolicy forbids it:
3297         * NetworkProcess/NetworkResourceLoader.cpp:
3298         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
3299         * NetworkProcess/NetworkResourceLoader.h:
3300
3301         Update for the new loadResourceSynchronously signature (which is still a no-op on the NetworkProcess side):
3302         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
3303         (WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously):
3304         * NetworkProcess/NetworkProcessPlatformStrategies.h:
3305
3306 2013-04-29  Jer Noble  <jer.noble@apple.com>
3307
3308         Unreviewed build fix. Point the Network process towards its own version of SecItemShim.dyld.
3309
3310         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist:
3311
3312 2013-04-29  Alexey Proskuryakov  <ap@apple.com>
3313
3314         Threads get stuck in NetworkProcess when canceling loads
3315         https://bugs.webkit.org/show_bug.cgi?id=115319
3316
3317         Backing out part of the fix, as it's causing crashes.
3318
3319         * WebProcess/Network/WebResourceLoader.cpp:
3320         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
3321
3322 2013-04-29  Noam Rosenthal  <noam@webkit.org>
3323
3324         Get rid of "non-composited contents" in CoordinatedLayerTreeHost
3325         https://bugs.webkit.org/show_bug.cgi?id=110355
3326
3327         Reviewed by Jocelyn Turcotte.
3328
3329         Instead of using a special non-composited contents layer, we let RenderLayerCompositor create
3330         a proper GraphicsLayer for that content.
3331         CoordinatedLayerTreeHost now needs to find the main contents layer for the purpose of setting
3332         the trajectory vector and applying the cover rect.
3333
3334         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3335         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
3336         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
3337             Don't create the non-composited layer, instead keep a raw pointer to the root
3338             compositing layer created by the WebCore compositor.
3339
3340         (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay):
3341         (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplayInRect):
3342         (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
3343         (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
3344         (WebKit::CoordinatedLayerTreeHost::paintContents):
3345         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
3346         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
3347             Remove non-composited layer specialization.
3348
3349 2013-04-29  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3350
3351         [Qt] Build fix. Enabling c++11 for Qt WK2 after r149259.
3352         https://bugs.webkit.org/show_bug.cgi?id=115345
3353
3354         Reviewed by Anders Carlsson.
3355
3356         * WebKit2.pri:
3357
3358 2013-04-29  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3359
3360         [WK2][EFL] Skip cancel fullscreen request if not made from FullScreen API
3361         https://bugs.webkit.org/show_bug.cgi?id=108201
3362
3363         Reviewed by Andreas Kling.
3364
3365         Adds a check on WebFullScreenManagerProxyEfl whether fullscreen mode was
3366         set from FullScreen API or not, so it can skip cancelling fullscreen
3367         request if fullscreen mode was set by application, preventing
3368         WebProcess' FullScreenManager from crashing.
3369
3370         EFL unit test available: ewk_view_cancel_full_screen_request.
3371
3372         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
3373         (WKViewExitFullScreen):
3374         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
3375         WKViewExitFullScreen now returns a bool, indicating whether the
3376         operation has succeeded or not.
3377
3378         * UIProcess/API/efl/ewk_view.cpp:
3379         (ewk_view_fullscreen_exit):
3380         Skip request if not in fullscreen mode.
3381
3382         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3383         (TEST_F):
3384         Added ewk_view_cancel_full_screen_request unit test.
3385
3386         * UIProcess/CoordinatedGraphics/WebView.cpp:
3387         (WebKit::WebView::exitFullScreen):
3388         * UIProcess/CoordinatedGraphics/WebView.h:
3389         (WebView):
3390         exitFullScreen now returns a bool, indicating whether the operation has
3391         succeeded or not.
3392
3393         * UIProcess/WebFullScreenManagerProxy.cpp:
3394         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
3395         * UIProcess/WebFullScreenManagerProxy.h:
3396         (WebFullScreenManagerProxy):
3397         * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp:
3398         (WebKit::WebFullScreenManagerProxy::isFullScreen):
3399         (WebKit::WebFullScreenManagerProxy::enterFullScreen):
3400         (WebKit::WebFullScreenManagerProxy::exitFullScreen):
3401         Added m_hasRequestedFullScreen boolean flag to EFL port. Used to
3402         indicate if fullscreen mode is enabled, as well as sanity checks on both
3403         {enter,exit}FullScreen functions.
3404
3405 2013-04-29  Anders Carlsson  <andersca@apple.com>
3406
3407         Stop using range-based for syntax
3408         https://bugs.webkit.org/show_bug.cgi?id=115356
3409
3410         Reviewed by Andreas Kling.
3411
3412         * PluginProcess/WebProcessConnection.cpp:
3413         (WebKit::WebProcessConnection::didClose):
3414
3415 2013-04-29  Sergio Correia  <sergio.correia@openbossa.org>
3416
3417         [EFL][WK2]: WebProcessMain: hide call to ecore_x_shutdown() under guard
3418         https://bugs.webkit.org/show_bug.cgi?id=115295
3419
3420         Reviewed by Andreas Kling.
3421
3422         Since the mentioned function is declared in a header that is included
3423         conditionally depending on HAVE_ECORE_X being defined.
3424
3425         * WebProcess/efl/WebProcessMainEfl.cpp:
3426         (WebKit::WebProcessMainEfl):
3427
3428 2013-04-29  Jinwoo Song  <jinwoo7.song@samsung.com>
3429
3430         [WK2] Remove build warnings by -Wunused-parameter
3431         https://bugs.webkit.org/show_bug.cgi?id=115344
3432
3433         Reviewed by Noam Rosenthal.
3434
3435         Fix build warnigs -Wunused-parameter.
3436
3437         * UIProcess/CoordinatedGraphics/WebView.cpp:
3438         (WebKit::WebView::createContextMenuProxy):
3439         * UIProcess/DrawingAreaProxy.h:
3440         (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate):
3441         * UIProcess/WebPageProxy.cpp:
3442         (WebKit::WebPageProxy::connectionWillClose):
3443
3444 2013-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3445
3446         Unreviewed. Fix make distcheck.
3447
3448         * GNUmakefile.list.am: Add missing header files to compilation.
3449
3450 2013-04-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3451
3452         Unreviewed fix build break on EFL port since r149259.
3453
3454         In EFL port, there is a non-compatible code when compiling based on C++11. This is a trivial build fix.
3455
3456         I got a confirm from Sam about landing a trivial build fix patch without sign-off from
3457         WK2 owner.
3458
3459         * UIProcess/API/efl/EwkViewCallbacks.h:
3460
3461 2013-04-28  Dean Jackson  <dino@apple.com>
3462
3463         [Mac] Disable canvas backing store scaling (HIGH_DPI_CANVAS)
3464         https://bugs.webkit.org/show_bug.cgi?id=115310
3465
3466         Reviewed by Simon Fraser.
3467
3468         Remove ENABLE_HIGH_DPI_CANVAS_macosx.
3469
3470         * Configurations/FeatureDefines.xcconfig:
3471
3472 2013-04-28  Sam Weinig  <sam@webkit.org>
3473
3474         [WebKit2] Adopt new API for detecting window occlusion
3475         https://bugs.webkit.org/show_bug.cgi?id=115334
3476
3477         Reviewed by Simon Fraser.
3478
3479         Switch off of WKSI for window occlusion and use the new NSWindowDidChangeOcclusionState notification
3480         instead.
3481
3482         * UIProcess/API/mac/WKView.mm:
3483         (-[WKView dealloc]):
3484         (-[WKView addWindowObserversForWindow:]):
3485         (-[WKView removeWindowObservers]):
3486         (-[WKView viewWillMoveToWindow:]):
3487         (-[WKView viewDidMoveToWindow]):
3488         (-[WKView _windowDidOrderOnScreen:]):
3489         (-[WKView _windowDidChangeOcclusionState:]):
3490         (-[WKView _setIsWindowOccluded:]):
3491         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
3492         (-[WKView windowOcclusionDetectionEnabled]):
3493         (-[WKView setWindowOcclusionDetectionEnabled:]):
3494         Only compile occlusion detection code where supported and remove calls to register/deregister
3495         for detection callbacks, now that NSWindow will handle that for us. We also no longer need to
3496         track all the WKViews, as that was only required to lookup the view that matched the window number
3497         returned from the occlusion callback.
3498
3499 2013-04-26  Anders Carlsson  <andersca@apple.com>
3500
3501         Use OwnPtr<PluginControllerProxy> for storing plug-in controllers in WebProcessConnection
3502         https://bugs.webkit.org/show_bug.cgi?id=115259
3503
3504         Reviewed by Andreas Kling.
3505
3506         * PluginProcess/WebProcessConnection.cpp:
3507         (WebKit::WebProcessConnection::addPluginControllerProxy):
3508         (WebKit::WebProcessConnection::removePluginControllerProxy):
3509         (WebKit::WebProcessConnection::didClose):
3510         * PluginProcess/WebProcessConnection.h:
3511         (WebProcessConnection):
3512
3513 2013-04-27  Jessie Berlin  <jberlin@apple.com>
3514
3515         Build fix.
3516
3517         * NetworkProcess/NetworkResourceLoader.cpp:
3518         (WebKit::NetworkResourceLoader::didReceiveBuffer):
3519         Do not declare another variable with the same name.
3520
3521 2013-04-27  Darin Adler  <darin@apple.com>
3522
3523         Move from constructor and member function adoptCF/NS to free function adoptCF/NS.
3524         https://bugs.webkit.org/show_bug.cgi?id=115307
3525
3526         Reviewed by Geoffrey Garen.
3527
3528         This change was done by a global replace followed by compiling and inspecting for
3529         cases that needed to be tweaked by hand.
3530
3531         * Platform/cg/CGUtilities.cpp:
3532         (WebKit::paintBitmapContext):
3533         * Platform/mac/ModuleMac.mm:
3534         (WebKit::Module::load):
3535         (WebKit::Module::platformFunctionPointer):
3536         * PluginProcess/mac/PluginProcessMac.mm:
3537         (WebKit::PluginProcess::initializeSandbox):
3538         * Shared/API/c/mac/WKURLRequestNS.mm:
3539         (WKURLRequestCreateWithNSURLRequest):
3540         * Shared/API/c/mac/WKURLResponseNS.mm:
3541         (WKURLResponseCreateWithNSURLResponse):
3542         * Shared/Downloads/mac/DownloadMac.mm:
3543         (WebKit::Download::start):
3544         (WebKit::Download::startWithHandle):
3545         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h:
3546         (WebKit::ChildProcessMain):
3547         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
3548         (WebKit::getPluginArchitecture):
3549         (WebKit::contentsOfPropertyListAtURL):
3550         (WebKit::getMIMETypesFromPluginBundle):
3551         (WebKit::getStringListResource):
3552         (WebKit::NetscapePluginModule::getPluginInfo):
3553         * Shared/ShareableResource.cpp:
3554         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
3555         * Shared/cf/ArgumentCodersCF.cpp:
3556         (CoreIPC::decode):
3557         (CoreIPC::encode):
3558         * Shared/cg/ShareableBitmapCG.cpp:
3559         (WebKit::ShareableBitmap::createGraphicsContext):
3560         (WebKit::ShareableBitmap::makeCGImageCopy):
3561         (WebKit::ShareableBitmap::makeCGImage):
3562         (WebKit::ShareableBitmap::createCGImage):
3563         * Shared/mac/ArgumentCodersMac.mm:
3564         (CoreIPC::decode):
3565         * Shared/mac/PlatformCertificateInfo.mm:
3566         (WebKit::PlatformCertificateInfo::dump):
3567         * Shared/mac/WebCoreArgumentCodersMac.mm:
3568         (CoreIPC::::encodePlatformData):
3569         (CoreIPC::::decodePlatformData):
3570         * UIProcess/API/mac/FindIndicatorWindow.mm:
3571         (WebKit::FindIndicatorWindow::setFindIndicator):
3572         (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
3573         * UIProcess/API/mac/PDFViewController.mm:
3574         (-[WKPDFView initWithFrame:PDFViewController:]):
3575         (WebKit::PDFViewController::PDFViewController):
3576         (WebKit::convertPostScriptDataSourceToPDF):
3577         (WebKit::PDFViewController::setPDFDocumentData):
3578         * UIProcess/API/mac/PageClientImpl.mm:
3579         (WebKit::PageClientImpl::PageClientImpl):
3580         (WebKit::PageClientImpl::registerEditCommand):
3581         (WebKit::PageClientImpl::setDragImage):
3582         * UIProcess/API/mac/WKBrowsingContextController.mm:
3583         (didFailProvisionalLoadWithErrorForFrame):
3584         (didFailLoadWithErrorForFrame):
3585         * UIProcess/API/mac/WKConnection.mm:
3586         (didReceiveMessage):
3587         * UIProcess/API/mac/WKPrintingView.mm:
3588         (-[WKPrintingView drawRect:]):
3589         * UIProcess/API/mac/WKView.mm:
3590         (-[WKView browsingContextController]):
3591         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
3592         (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
3593         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
3594         (-[WKView fullScreenWindowController]):
3595         (-[WKView _executeSavedCommandBySelector:]):
3596         (-[WKView printOperationWithPrintInfo:forFrame:]):
3597         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3598         (WebKit::createProcess):
3599         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
3600         (WebKit::PluginInfoStore::pluginPathsInDirectory):
3601         (WebKit::PluginInfoStore::getMIMETypeForExtension):
3602         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3603         (WebKit::PluginProcessProxy::beginModal):
3604         * UIProcess/cf/WebBackForwardListCF.cpp:
3605         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
3606         * UIProcess/cf/WebPageProxyCF.cpp:
3607         (WebKit::WebPageProxy::sessionStateData):
3608         (WebKit::WebPageProxy::restoreFromSessionStateData):
3609         (WebKit::WebPageProxy::saveRecentSearches):
3610         (WebKit::WebPageProxy::loadRecentSearches):
3611         * UIProcess/cf/WebPreferencesCF.cpp:
3612         (WebKit::cfStringFromWebCoreString):
3613         (WebKit::setStringValueIfInUserDefaults):
3614         (WebKit::setBoolValueIfInUserDefaults):
3615         (WebKit::setUInt32ValueIfInUserDefaults):
3616         (WebKit::setDoubleValueIfInUserDefaults):
3617         (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
3618         (WebKit::WebPreferences::platformUpdateDoubleValueForKey):
3619         (WebKit::WebPreferences::platformUpdateFloatValueForKey):
3620         * UIProcess/mac/BackingStoreMac.mm:
3621         (WebKit::BackingStore::resetScrolledRect):
3622         (WebKit::BackingStore::backingStoreContext):
3623         * UIProcess/mac/CorrectionPanel.mm:
3624         (WebKit::CorrectionPanel::handleAcceptedReplacement):
3625         * UIProcess/mac/TextCheckerMac.mm:
3626         (WebKit::TextChecker::checkTextOfParagraph):
3627         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
3628         * UIProcess/mac/WKFullScreenWindowController.mm:
3629         (-[WKFullScreenWindowController enterFullScreen:]):
3630         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
3631         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
3632         * UIProcess/mac/WebContextMac.mm:
3633         (WebKit::WebContext::platformDefaultDiskCacheDirectory):
3634         * UIProcess/mac/WebContextMenuProxyMac.mm:
3635         (WebKit::nsMenuItemVector):
3636         (WebKit::WebContextMenuProxyMac::populate):
3637         * UIProcess/mac/WebInspectorProxyMac.mm:
3638         (WebKit::WebInspectorProxy::createInspectorWindow):
3639         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3640         * UIProcess/mac/WebPopupMenuProxyMac.mm:
3641         (WebKit::WebPopupMenuProxyMac::populate):
3642         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
3643         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
3644         (WebKit::InjectedBundle::load):
3645         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3646         (WebKit::NetscapePlugin::updatePluginLayer):
3647         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
3648         (WebKit::PluginProxy::pluginLayer):
3649         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3650         (WebKit::PDFPlugin::PDFPlugin):
3651         (WebKit::PDFPlugin::createScrollbar):
3652         (WebKit::PDFPlugin::pdfDocumentDidLoad):
3653         (WebKit::PDFPlugin::writeItemsToPasteboard):
3654         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
3655         (getAllScriptsInPDFDocument):
3656         (WebKit::SimplePDFPlugin::pdfDocumentDidLoad):
3657         (WebKit::SimplePDFPlugin::streamDidReceiveData):
3658         (WebKit::SimplePDFPlugin::manualStreamDidReceiveData):
3659         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
3660         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
3661         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
3662         (WebKit::WebResourceCacheManager::cfURLCacheHostNames):
3663         (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames):
3664         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
3665         (WebKit::createNSError):
3666         * WebProcess/WebPage/WebPage.cpp:
3667         (WebKit::WebPage::drawPagesToPDF):
3668         * WebProcess/WebPage/mac/WebPageMac.mm:
3669         (WebKit::WebPage::performDictionaryLookupForRange):
3670         (WebKit::cachedResponseForURL):
3671         (WebKit::WebPage::drawPagesToPDFFromPDFDocument):
3672         * WebProcess/mac/WebProcessMac.mm:
3673         (WebKit::WebProcess::platformSetCacheModel):
3674         Use adoptCF and adoptNS free functions.
3675
3676 2013-04-27  Alexey Proskuryakov  <ap@apple.com>
3677
3678         <rdar://problem/13757007> Crashes in NetworkResourceLoader::didReceiveResponseAsync
3679         https://bugs.webkit.org/show_bug.cgi?id=115318
3680
3681         Reviewed by Darin Adler.
3682
3683         sendAbortingOnFailure may actually fail, and abort the request, making m_handle null.
3684
3685         * NetworkProcess/NetworkResourceLoader.cpp:
3686         (WebKit::NetworkResourceLoader::didReceiveResponseAsync): Null check m_handle after
3687         sending a message, because the request will cancelled when connection is invalid.
3688         (WebKit::NetworkResourceLoader::didReceiveBuffer): Assert that m_handle matches
3689         the handle that we are called with.
3690         (WebKit::NetworkResourceLoader::didFinishLoading): Ditto.
3691         (WebKit::NetworkResourceLoader::didFail): Ditto.
3692         (WebKit::NetworkResourceLoader::willSendRequestAsync): Ditto.
3693         (WebKit::NetworkResourceLoader::didSendData): Ditto.
3694         (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): Ditto.
3695         (WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): Ditto.
3696         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): Ditto.
3697         (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge): Ditto.
3698         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): Ditto.
3699
3700 2013-04-27  Alexey Proskuryakov  <ap@apple.com>
3701
3702         <rdar://problem/13757687> Threads get stuck in NetworkProcess when canceling loads
3703         https://bugs.webkit.org/show_bug.cgi?id=115319
3704
3705         Reviewed by Darin Adler.
3706
3707         WebResourceLoader was second-guessing NetworkProcess as to whether it needs a response
3708         to DidReceiveResponseWithCertificateInfo, and it was guessing wrong if the load was
3709         alrady canceled on WebProcess side.
3710
3711         * NetworkProcess/NetworkResourceLoader.cpp:
3712         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
3713         * WebProcess/Network/WebResourceLoader.cpp:
3714         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
3715         * WebProcess/Network/WebResourceLoader.h:
3716         * WebProcess/Network/WebResourceLoader.messages.in:
3717
3718 2013-04-27  Alexey Proskuryakov  <ap@apple.com>
3719
3720         Regression tests that reference a non-local resource crash with NetworkProcess enabled
3721         https://bugs.webkit.org/show_bug.cgi?id=115290
3722
3723         Reviewed by Sam Weinig.
3724
3725         Covered by fast/dom/icon-url-change.html and many other existing tests.
3726
3727         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3728         (WebKit::WebResourceLoadScheduler::remove): Handle this case. Architecturally, it
3729         would be better if SubresourceLoad::create just created an object an didn't do
3730         further checks before returning a pointer, but changing that is beyond the scope
3731         of the fix.
3732
3733 2013-04-26  Yael Aharon  <yael.aharon@intel.com>
3734
3735         [WK2][EFL] Build break after r149212
3736         https://bugs.webkit.org/show_bug.cgi?id=115294
3737
3738         Reviewed by Simon Fraser.
3739         r144672 bumped up the revision of WKContextClient API, and introduced a version array
3740         APIClientTraits<WKContextClient>::interfaceSizesByVersion .
3741         In r149212, the version was bumped back down and the version array was emptied but not removed.
3742         This causes a warning "array subscript is below array bounds", and in EFL the warning is
3743         treated as error.
3744
3745         * Shared/APIClientTraits.cpp:
3746         (WebKit):
3747         * Shared/APIClientTraits.h:
3748
3749 2013-04-26  Martin Robinson  <mrobinson@igalia.com>
3750
3751         [GTK] Add methods to add a user style sheet to the WebKit2 GTK+ API
3752         https://bugs.webkit.org/show_bug.cgi?id=99081
3753
3754         Reviewed by Carlos Garcia Campos, Gustavo Noronha Silva, and Benjamin Poulain.
3755
3756         Add methods to WebKitWebViewGroup to add and remove user style sheets.
3757         This allows clients to inject style sheets into pages with a set of
3758         rules for when those style sheets apply.
3759
3760         * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
3761         (toImmutableArray): Added this helper which converts the GList* parameters into
3762         ImmutableArrays for use with the WebKit2 internal API.
3763         (webkit_web_view_group_add_user_style_sheet): Added new API for adding a style sheet.
3764         (webkit_web_view_group_remove_all_user_style_sheets): Add new API for clearing out all style sheets.
3765         * UIProcess/API/gtk/WebKitWebViewGroup.h: Added new method declarations.
3766         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new API to the documentation.
3767         * UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added a test for the new API.
3768         (isStyleSheetInjectedForURLAtPath): Function to check whether the style sheet has been injected for a given URL.
3769         (fillURLListFromPaths): Helper which converts paths passed via varargs into a whitelist or blacklist.
3770         (removeOldInjectedStyleSheetsAndResetLists): Function to start afresh.
3771         (testWebViewGroupInjectedStyleSheet): The actual test.
3772         (serverCallback): Server callback for use with the test. We cannot use loadHTML or
3773         loadAlternateHTML, because that checks the whitelist and blacklist against about:blank.
3774         (beforeAll): Initialize the server and new test.
3775         (afterAll): Clean up the server.
3776
3777 2013-04-26  Simon Cooper  <scooper@apple.com>
3778
3779         Permit ~/Library or ~/Library/Preferences to be symlinks
3780         https://bugs.webkit.org/show_bug.cgi?id=115142
3781         <rdar://problem/12953603>
3782
3783         Reviewed by Alexey Proskuryakov.
3784
3785         Pass in two new parameters which are the resolved paths to ~/Library
3786         and ~/Library/Preferences. Added new expansion functions and
3787         substituted the new functions for home-regex, home-subpath and
3788         home-literal for places referencing resources in "~/Library" or
3789         "~/Library/Preferences".
3790
3791         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
3792         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3793         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
3794         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
3795         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
3796         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
3797         * Shared/mac/ChildProcessMac.mm:
3798         (WebKit::ChildProcess::initializeSandbox):
3799
3800 2013-04-26  Alexey Proskuryakov  <ap@apple.com>
3801
3802         [WK2] WKContextClient doesn't need to be versioned yet
3803         https://bugs.webkit.org/show_bug.cgi?id=115279
3804
3805         Reviewed by Anders Carlsson.
3806
3807         * Shared/APIClientTraits.cpp:
3808         * Shared/APIClientTraits.h:
3809         * UIProcess/API/C/WKContext.h:
3810
3811 2013-04-26  Anders Carlsson  <andersca@apple.com>
3812
3813         Downloads need to be converted from the NSURLConnection, not canceled and restarted, when using the NetworkProcess
3814         https://bugs.webkit.org/show_bug.cgi?id=115277
3815         <rdar://problem/12890184>
3816
3817         Reviewed by Sam Weinig.
3818
3819         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3820         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
3821         Ask the download manager to convert the main resource load to a download.
3822
3823         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3824         Add new message.
3825
3826         * NetworkProcess/NetworkResourceLoader.h:
3827         (WebKit::NetworkResourceLoader::handle):
3828         Add getter.
3829
3830         * Shared/Downloads/mac/DownloadMac.mm:
3831         (dispatchOnMainThread):
3832         Helper function that ensures that a given block is called on the main thread.
3833
3834         (-[WKDownloadAsDelegate downloadDidBegin:]):
3835         (-[WKDownloadAsDelegate download:didReceiveAuthenticationChallenge:]):
3836         (-[WKDownloadAsDelegate download:didReceiveResponse:]):
3837         (-[WKDownloadAsDelegate download:didReceiveDataOfLength:]):
3838         (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
3839         (-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
3840         (-[WKDownloadAsDelegate download:didCreateDestination:]):
3841         (-[WKDownloadAsDelegate downloadDidFinish:]):
3842         (-[WKDownloadAsDelegate download:didFailWithError:]):
3843         Use dispatchOnMainThread.
3844
3845         * UIProcess/WebPageProxy.cpp:
3846         (WebKit::WebPageProxy::receivedPolicyDecision):
3847         Remove code that cancels the current load and starts a new download.
3848
3849         * WebProcess/WebPage/WebFrame.cpp:
3850         (WebKit::WebFrame::convertMainResourceLoadToDownload):
3851         Send the ConvertMainResourceLoadToDownload message to the network process.
3852
3853 2013-04-25  Roger Fong  <roger_fong@apple.com>
3854
3855         Disable sub-pixel layout on mac.
3856         https://bugs.webkit.org/show_bug.cgi?id=114999.
3857
3858         Reviewed by Simon Fraser.
3859
3860         * Configurations/FeatureDefines.xcconfig:
3861
3862 2013-04-26  Simon Fraser  <simon.fraser@apple.com>
3863
3864         Inspector window is often blank when opened
3865         https://bugs.webkit.org/show_bug.cgi?id=115220
3866
3867         Reviewed by Tim Horton.
3868         
3869         After disabling tiled scrolling and accelerated drawing in r149006, the
3870         Inspector window was often missing its content after opening. This only
3871         happened when the user has a preference on disk to use accelerated drawing
3872         in the Inspector.
3873         
3874         The missing content was caused by a failure to connect the correct contextID
3875         for remote layer hosting. On window creation, we hook up a context using
3876         WindowServer layer hosting (the default), but then switch back to app-hosted
3877         layers for the Inspector window. This switching happens in didUpdateBackingStoreState(),
3878         but that can be re-entered via its call to sendUpdateBackingStoreState(). In
3879         that cause, on unwinding the stack it would call enterAcceleratedCompositingMode()
3880         with a stale layerTreeContext.
3881         
3882         Fix by moving the code that exits/enters accelerated compositing mode to before
3883         the call to sendUpdateBackingStoreState() that can cause re-entrancy. That avoids
3884         use of a possibly stale layerTreeContext.
3885
3886         * UIProcess/DrawingAreaProxyImpl.cpp:
3887         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
3888
3889 2013-04-26  Alexey Proskuryakov  <ap@apple.com>
3890
3891         Crashes under ResourceHandle::continueDidReceiveResponse when loading blobs
3892         https://bugs.webkit.org/show_bug.cgi?id=115273
3893
3894         Reviewed by Anders Carlsson.
3895
3896         Covered by multiple existing tests (when using NetworkProcess), including:
3897         - http/tests/fileapi/blob-url-in-subframe.html
3898         - http/tests/fileapi/create-blob-url-from-data-url.html
3899
3900         * NetworkProcess/NetworkResourceLoader.cpp:
3901         (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
3902         Work around BlobResourceHandle badness.
3903
3904 2013-04-26  Alexey Proskuryakov  <ap@apple.com>
3905
3906         [WK2] Remove NetworkResourceLoader::cleanupOnMainThread
3907         https://bugs.webkit.org/show_bug.cgi?id=115268
3908
3909         Reviewed by Brady Eidson.
3910
3911         All cleanup() callers are now on main thread, and this indirection only complicates debugging.
3912
3913         * NetworkProcess/NetworkResourceLoader.cpp:
3914         (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose):
3915         (WebKit::NetworkResourceLoader::abortInProgressLoad):
3916         (WebKit::NetworkResourceLoader::didFinishLoading):
3917         (WebKit::NetworkResourceLoader::didFail):
3918         * NetworkProcess/NetworkResourceLoader.h:
3919
3920 2013-04-26  Andy Estes  <aestes@apple.com>
3921
3922         [WebKit2] CustomProtocolManager's m_registeredSchemes HashSet can be accessed by multiple threads
3923         https://bugs.webkit.org/show_bug.cgi?id=115267
3924
3925         Reviewed by Alexey Proskuryakov.
3926
3927         * Shared/Network/CustomProtocols/CustomProtocolManager.h: Added a Mutex to protect m_registeredSchemes.
3928         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
3929         (WebKit::CustomProtocolManager::registerScheme): Acquired the mutex before accessing m_registeredSchemes.
3930         (WebKit::CustomProtocolManager::unregisterScheme): Ditto.
3931         (WebKit::CustomProtocolManager::supportsScheme): Ditto.
3932
3933 2013-04-26  Alexey Proskuryakov  <ap@apple.com>
3934
3935         Blobs are not associated with connection when there are no sandbox extensions
3936         https://bugs.webkit.org/show_bug.cgi?id=115264
3937
3938         Reviewed by Brady Eidson.
3939
3940         Covered by multiple fast/files tests when using NetworkProcess.
3941
3942         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3943         (WebKit::NetworkBlobRegistry::registerBlobURL): Fixed a logic error.
3944
3945 2013-04-25  Andy Estes  <aestes@apple.com>
3946
3947         [WebKit2] Loading a resource from a custom protocol in a synchronous XHR times out
3948         https://bugs.webkit.org/show_bug.cgi?id=115223
3949
3950         Reviewed by Darin Adler.
3951
3952         When WebKit performs a synchronous load on the Mac, it spins a nested
3953         run loop in a mode that only accepts input from the NSURLConnection
3954         performing the load. When the load is for a custom protocol in WebKit2,
3955         we proxy it to the UI process via CoreIPC messages, but the response
3956         messages from the UI process are never processed as long as the run
3957         loop is in a non-common mode (and we wouldn't want to process messages
3958         that could re-enter WebCore in the middle of loading, anyway). Since
3959         these messages never make it back to the NSURLConnection handling the
3960         request, the connection eventually times out.
3961
3962         Fix this by using a work queue to handle custom protocol messages in
3963         the networking process. The work queue can process incoming custom
3964         protocol messages while the main thread is blocked.
3965
3966         * NetworkProcess/NetworkProcess.cpp:
3967         (WebKit::NetworkProcess::initializeConnection): Called
3968         initializeConnection() on all the NetworkProcess's supplements.
3969         * Shared/ChildProcessSupplement.h: Added a base class for
3970         NetworkProcessSupplement and WebProcessSupplement which defines
3971         initializeConnection and provides an empty default implementation.
3972         (WebKit::ChildProcessSupplement::~ChildProcessSupplement):
3973         (WebKit::ChildProcessSupplement::initializeConnection):
3974         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
3975         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
3976         (WebKit::CustomProtocolManager::CustomProtocolManager): Instantiated a
3977         work queue for message processing.
3978         (WebKit::CustomProtocolManager::initializeConnection): Added the work
3979         queue as a message receiver on the CoreIPC connection.
3980         (WebKit::CustomProtocolManager::initialize): If we're in the web
3981         process and the network process is being used, unregister and destroy
3982         the work queue we previously created. It'd be better to not create it
3983         in the first place, but we have to register our work queue with the
3984         CoreIPC connection before it is established, which is before the UI
3985         process has told us whether the network process is in use.
3986         * Shared/Network/NetworkProcessSupplement.h: Inherited from
3987         ChildProcessSupplement.
3988         * WebKit2.xcodeproj/project.pbxproj: Added ChildProcessSupplement.h.
3989         * WebProcess/WebProcess.cpp:
3990         (WebKit::WebProcess::initializeConnection): Called
3991         initializeConnection() on all the WebProcess's supplements.
3992         * WebProcess/WebProcessSupplement.h: Inherited from
3993         ChildProcessSupplement.
3994
3995 2013-04-26  Eduardo Lima Mitev  <elima@igalia.com>
3996
3997         [GTK] Compilation of ProcessLauncherGtk.cpp fails due to unresolved symbols
3998         https://bugs.webkit.org/show_bug.cgi?id=115240
3999
4000         Reviewed by Martin Robinson.
4001
4002         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: Includes sys/socket.h if OS is Linux
4003
4004 2013-04-25  Zan Dobersek  <zdobersek@igalia.com>
4005
4006         [GTK] Plugin process broken due to a missing symbol
4007         https://bugs.webkit.org/show_bug.cgi?id=114901
4008
4009         Reviewed by Gustavo Noronha Silva.
4010
4011         Work around the missing symbols in the WebKitPluginProcess by specifying the required libraries
4012         multiple times in the program's LDADD list. Libtool fights fiercely to avoid duplicate static library
4013         references among the linker arguments (even if using the --preserve-dup-deps flag) so the required libraries
4014         are specified in various ways.
4015
4016         The unresolved symbols in object files are no longer ignored as this can lead to further trouble (for instance
4017         this patch also adds a few missing source files to the list of WebKitPluginProcess sources). The Freetype and
4018         gamepad dependencies' libraries are also added to the binary's LDADD list.
4019
4020         * GNUmakefile.am:
4021         * GNUmakefile.list.am: Add a few missing files to the build.
4022
4023 2013-04-24  Chris Fleizach  <cfleizach@apple.com>
4024
4025         WEB SPEECH: language support does not work as expected
4026         https://bugs.webkit.org/show_bug.cgi?id=115119
4027
4028         Reviewed by Alexey Proskuryakov.
4029
4030         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
4031         (InitWebCoreSystemInterface):
4032
4033 2013-04-25  Anders Carlsson  <andersca@apple.com>
4034
4035         Rename DecidePolicyForResponse message to DecidePolicyForResponseSync
4036         https://bugs.webkit.org/show_bug.cgi?id=115207
4037
4038         Reviewed by Beth Dakin.
4039
4040         In preparation for adding a new async DecidePolicyForResponse message,
4041         rename the current one to DecidePolicyForResponseSync. Also split out the async part
4042         into a separate WebPageProxy::decidePolicyForResponse member function.
4043
4044         * UIProcess/WebPageProxy.cpp:
4045         (WebKit::WebPageProxy::WebPageProxy):
4046         (WebKit::WebPageProxy::receivedPolicyDecision):
4047         (WebKit::WebPageProxy::decidePolicyForResponse):
4048         (WebKit::WebPageProxy::decidePolicyForResponseSync):
4049         * UIProcess/WebPageProxy.h:
4050         (WebPageProxy):
4051         * UIProcess/WebPageProxy.messages.in:
4052         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4053         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
4054
4055 2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
4056
4057         Web Inspector: ConsoleMessage should include line and column number where possible
4058         https://bugs.webkit.org/show_bug.cgi?id=114929
4059
4060         Reviewed by Timothy Hatcher.
4061
4062         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
4063         (WebKit::WebChromeClient::addMessageToConsole):
4064         * WebProcess/WebCoreSupport/WebChromeClient.h:
4065
4066 2013-04-25  Brady Eidson  <beidson@apple.com>
4067
4068         Thread safety issues in WKCustomProtocol.
4069         <rdar://problem/13247304> and https://bugs.webkit.org/show_bug.cgi?id=115185
4070
4071         Reviewed by Alexey Proskuryakov.
4072
4073         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
4074
4075         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
4076         (WebKit::CustomProtocolManager::addCustomProtocol): Protect m_customProtocolMap with its mutex.
4077         (WebKit::CustomProtocolManager::removeCustomProtocol): Ditto.
4078         (WebKit::CustomProtocolManager::didFailWithError):
4079         (WebKit::CustomProtocolManager::didLoadData):
4080         (WebKit::CustomProtocolManager::didReceiveResponse):
4081         (WebKit::CustomProtocolManager::didFinishLoading):
4082         (WebKit::CustomProtocolManager::protocolForID): Protect m_customProtocolMap with its mutex, and return
4083           a RetainPtr instead of a raw pointer.
4084
4085 2013-04-25  Jer Noble  <jer.noble@apple.com>
4086
4087         Further build fixes: correct two more misnames of WebProcessShim.dyld.
4088
4089         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
4090         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
4091         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
4092
4093 2013-04-25  Martin Robinson  <mrobinson@igalia.com>
4094
4095         Make gobject-introspection warnings non-fatal
4096         https://bugs.webkit.org/show_bug.cgi?id=115184
4097
4098         Reviewed by Carlos Garcia Campos.
4099
4100         * GNUmakefile.am: Make it so that gobject-introspection errors do not fail the buld
4101         until we get to a point where gobject-introspection gives consistent warnings.
4102
4103 2013-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>
4104
4105         [GTK] Add WebKitWebViewGroup to WebKit2 GTK+ API
4106         https://bugs.webkit.org/show_bug.cgi?id=111265
4107
4108         Reviewed by Anders Carlsson.
4109
4110         In the current API the settings are always shared by all web
4111         views, because they are always created on the default page
4112         group. This makes impossible to have different settings on
4113         different web views. Expose the page group in the API,
4114         so that users can create web views on a group different than the