deaac6d7ab94dd45be4a130333cc3090dc4db8d0
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-10-03  Brady Eidson  <beidson@apple.com>
2
3         Move IDBFactoryBackend creation to DatabaseStrategy.
4         https://bugs.webkit.org/show_bug.cgi?id=122284
5
6         Reviewed by Alexey Proskuryakov.
7
8         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
9         (WebKit::WebPlatformStrategies::createIDBFactoryBackend): Fallback to the default for now.
10         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
11
12 2013-10-03  Zan Dobersek  <zdobersek@igalia.com>
13
14         Unreviewed fix of DrawingArea creation on non-Mac platforms after r156793.
15         std::make_unique<DrawingAreaImpl>() should be used, as before that revision.
16
17         * WebProcess/WebPage/DrawingArea.cpp:
18         (WebKit::DrawingArea::create):
19
20 2013-10-02  Anders Carlsson  <andersca@apple.com>
21
22         Remove Qt code from Platform/
23         https://bugs.webkit.org/show_bug.cgi?id=122240
24
25         Reviewed by Andreas Kling.
26
27         * Platform/CoreIPC/Connection.h:
28         * Platform/Logging.cpp:
29         * Platform/Logging.h:
30         * Platform/Module.h:
31         * Platform/PlatformProcessIdentifier.h:
32         * Platform/SharedMemory.h:
33         * Platform/WorkQueue.h:
34         * Platform/qt/LoggingQt.cpp: Removed.
35         * Platform/qt/ModuleQt.cpp: Removed.
36         * Platform/qt/WorkQueueQt.cpp: Removed.
37
38 2013-10-02  Tim Horton  <timothy_horton@apple.com>
39
40         [mac] Stop using DrawingAreaImpl on PLATFORM(MAC) 
41         https://bugs.webkit.org/show_bug.cgi?id=121859
42         <rdar://problem/15069359>
43
44         Reviewed by Anders Carlsson.
45
46         The Mac port will now use tiled drawing for all WebKit2 views.
47
48         * Shared/DrawingAreaInfo.h:
49         Don't include DrawingAreaTypeImpl as a valid DrawingAreaType on Mac.
50
51         * UIProcess/API/mac/WKView.mm:
52         (-[WKView drawRect:]):
53         Remove our implementation of drawRect that paints from DrawingAreaImpl's backing store.
54
55         (-[WKView _shouldUseTiledDrawingArea]):
56         Removed. Always treated as if it were true, now.
57
58         (-[WKView _createDrawingAreaProxy]):
59         Always create a TiledCoreAnimationDrawingAreaProxy now.
60
61         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
62         (-[WKView wantsUpdateLayer]):
63         WKView always wants a layer, etc.
64
65         * UIProcess/BackingStore.h:
66         Remove Mac-specific BackingStore code, only used for DrawingAreaImpl on Mac.
67
68         * UIProcess/DrawingAreaProxy.h:
69         Remove an unneeded include.
70
71         * UIProcess/mac/BackingStoreMac.mm: Removed.
72         * WebKit2.xcodeproj/project.pbxproj:
73         Remove a bunch of files we don't need to build anymore.
74
75         * WebProcess/WebPage/DrawingArea.cpp:
76         (WebKit::DrawingArea::create):
77         Never create a DrawingAreaImpl on Mac.
78
79         * WebProcess/WebPage/DrawingAreaImpl.cpp:
80         (WebKit::DrawingAreaImpl::updatePreferences):
81         (WebKit::DrawingAreaImpl::resumePainting):
82         * WebProcess/WebPage/DrawingAreaImpl.h:
83         Remove Mac-specific DrawingAreaImpl code.
84
85         * WebProcess/WebPage/LayerTreeHost.cpp:
86         (WebKit::LayerTreeHost::create):
87         * WebProcess/WebPage/mac/LayerTreeHostMac.h: Removed.
88         * WebProcess/WebPage/mac/LayerTreeHostMac.mm: Removed.
89
90 2013-10-02  Daniel Bates  <dabates@apple.com>
91
92         Fix the Mac WebKit2 build following <http://trac.webkit.org/changeset/139241>
93         (https://bugs.webkit.org/show_bug.cgi?id=104197)
94
95         WebContextMac.mm fails to compile when building with network process disabled.
96
97         The constants WebKit2HTTPProxyDefaultsKey and WebKit2HTTPSProxyDefaultsKey,
98         defined in WebContextMac.mm, should only be defined when building with the
99         network process enabled as these constants are only referenced from
100         ENABLE(NETWORK_PROCESS)-guard code.
101
102         * UIProcess/mac/WebContextMac.mm:
103
104 2013-10-01  Sam Weinig  <sam@webkit.org>
105
106         CTTE: DOMWrapperWorlds should be passed around by reference
107         https://bugs.webkit.org/show_bug.cgi?id=122206
108
109         Reviewed by Andreas Kling.
110
111         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
112         (WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
113         (WebKit::InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame):
114         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
115         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
116         (WebKit::InjectedBundleScriptWorld::getOrCreate):
117         (WebKit::InjectedBundleScriptWorld::normalWorld):
118         (WebKit::InjectedBundleScriptWorld::coreWorld):
119         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
120         * WebProcess/Plugins/PluginView.cpp:
121         (WebKit::PluginView::windowScriptNPObject):
122         (WebKit::PluginView::pluginElementNPObject):
123         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
124         (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
125         (WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable):
126         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
127
128 2013-10-01  Mark Rowe  <mrowe@apple.com>
129
130         <http://webkit.org/b/122190> WebKit2 APIs returning CF and NS types should explicitly declare whether they return retained objects.
131
132         This make the APIs easier to use under ARC and can help out the static analyzer.
133
134         Reviewed by Anders Carlsson.
135
136         * Shared/API/c/cf/WKErrorCF.h:
137         * Shared/API/c/cf/WKStringCF.h:
138         * Shared/API/c/cf/WKURLCF.h:
139         * Shared/API/c/cg/WKImageCG.h:
140         * Shared/API/c/mac/WKURLRequestNS.h:
141         * Shared/API/c/mac/WKURLResponseNS.h:
142         * UIProcess/API/C/cg/WKIconDatabaseCG.h:
143
144 2013-10-01  Gabor Abraham  <abrhm@inf.u-szeged.hu>
145
146         [Qt][WK2] Fix build after r156688.
147         https://bugs.webkit.org/show_bug.cgi?id=122153
148
149         Reviewed by Allan Sandfeld Jensen.
150
151         * Shared/qt/ShareableBitmapQt.cpp:
152         (WebKit::ShareableBitmap::createGraphicsContext):
153         * UIProcess/API/qt/qquickwebview.cpp:
154         (QQuickWebViewPrivate::createDrawingAreaProxy):
155         * UIProcess/API/qt/qquickwebview_p_p.h:
156         * UIProcess/API/qt/raw/qrawwebview.cpp:
157         (QRawWebViewPrivate::createDrawingAreaProxy):
158         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
159         * UIProcess/qt/QtPageClient.cpp:
160         (WebKit::QtPageClient::createDrawingAreaProxy):
161         * UIProcess/qt/QtPageClient.h:
162         * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp:
163         (WebKit::convertQPixmapToShareableBitmap):
164
165 2013-09-30  Ryuan Choi  <ryuan.choi@samsung.com>
166
167         Build fix for EFL, Qt, Gtk port after r156688
168         https://bugs.webkit.org/show_bug.cgi?id=122139
169
170         Reviewed by Anders Carlsson.
171
172         Get rid of more uses of OwnPtr and PassOwnPtr.
173
174         * Shared/API/c/cairo/WKImageCairo.cpp:
175         (WKImageCreateFromCairoSurface):
176         * Shared/API/c/qt/WKImageQt.cpp:
177         (WKImageCreateFromQImage):
178         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
179         (WebKit::WebCoordinatedSurface::createGraphicsContext):
180         (WebKit::WebCoordinatedSurface::paintToSurface):
181         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
182         * Shared/cairo/ShareableBitmapCairo.cpp:
183         (WebKit::ShareableBitmap::createGraphicsContext):
184         * Shared/gtk/ArgumentCodersGtk.cpp:
185         (CoreIPC::encodeImage):
186         * UIProcess/API/gtk/PageClientImpl.cpp:
187         (WebKit::PageClientImpl::createDrawingAreaProxy):
188         * UIProcess/API/gtk/PageClientImpl.h:
189         * UIProcess/CoordinatedGraphics/WebView.cpp:
190         (WebKit::WebView::createDrawingAreaProxy):
191         * UIProcess/CoordinatedGraphics/WebView.h:
192         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
193         (WebKit::convertCairoSurfaceToShareableBitmap):
194
195 2013-09-30  Sam Weinig  <sam@webkit.org>
196
197         Remove support for DOMFileSystem
198         https://bugs.webkit.org/show_bug.cgi?id=122137
199
200         Reviewed by Anders Carlsson.
201
202         * Configurations/FeatureDefines.xcconfig:
203
204 2013-09-30  Anders Carlsson  <andersca@apple.com>
205
206         Fix build.
207
208         * NetworkProcess/mac/RemoteNetworkingContext.mm:
209
210 2013-09-30  Anders Carlsson  <andersca@apple.com>
211
212         Get rid of more uses of OwnPtr and PassOwnPtr
213         https://bugs.webkit.org/show_bug.cgi?id=122136
214
215         Reviewed by Antti Koivisto.
216
217         * NetworkProcess/AsynchronousNetworkLoaderClient.h:
218         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
219         (WebKit::NetworkBlobRegistry::registerBlobURL):
220         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
221         * NetworkProcess/NetworkResourceLoader.cpp:
222         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
223         * NetworkProcess/NetworkResourceLoader.h:
224         * NetworkProcess/SynchronousNetworkLoaderClient.h:
225         * NetworkProcess/mac/RemoteNetworkingContext.mm:
226         * Platform/CoreIPC/ArgumentDecoder.h:
227         * Platform/CoreIPC/ArgumentEncoder.h:
228         * Platform/CoreIPC/MessageDecoder.cpp:
229         (CoreIPC::MessageDecoder::setImportanceAssertion):
230         * Platform/CoreIPC/MessageDecoder.h:
231         * Platform/CoreIPC/mac/ConnectionMac.cpp:
232         (CoreIPC::Connection::receiveSourceEventHandler):
233         * Platform/CoreIPC/mac/ImportanceAssertion.h:
234         (CoreIPC::ImportanceAssertion::ImportanceAssertion):
235         * Platform/mac/LayerHostingContext.h:
236         * Platform/mac/LayerHostingContext.mm:
237         (WebKit::LayerHostingContext::createForPort):
238         (WebKit::LayerHostingContext::createForWindowServer):
239         * PluginProcess/PluginControllerProxy.cpp:
240         (WebKit::PluginControllerProxy::paint):
241         * PluginProcess/PluginControllerProxy.h:
242         * PluginProcess/WebProcessConnection.cpp:
243         (WebKit::WebProcessConnection::addPluginControllerProxy):
244         (WebKit::WebProcessConnection::removePluginControllerProxy):
245         (WebKit::WebProcessConnection::createPluginInternal):
246         * PluginProcess/WebProcessConnection.h:
247         * Shared/API/c/cg/WKImageCG.cpp:
248         (WKImageCreateFromCGImage):
249         * Shared/BlockingResponseMap.h:
250         (BlockingResponseMap::waitForResponse):
251         (BlockingResponseMap::didReceiveResponse):
252         * Shared/Downloads/Download.cpp:
253         * Shared/Downloads/Download.h:
254         * Shared/Downloads/DownloadManager.cpp:
255         (WebKit::DownloadManager::startDownload):
256         (WebKit::DownloadManager::convertHandleToDownload):
257         * Shared/FileAPI/BlobRegistrationData.cpp:
258         (WebKit::BlobRegistrationData::BlobRegistrationData):
259         (WebKit::BlobRegistrationData::releaseData):
260         (WebKit::BlobRegistrationData::decode):
261         * Shared/FileAPI/BlobRegistrationData.h:
262         * Shared/Plugins/NPObjectMessageReceiver.cpp:
263         * Shared/Plugins/NPObjectMessageReceiver.h:
264         * Shared/Plugins/NPRemoteObjectMap.cpp:
265         (WebKit::NPRemoteObjectMap::registerNPObject):
266         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
267         (WebKit::NetscapePluginModule::tryLoad):
268         * Shared/Plugins/Netscape/NetscapePluginModule.h:
269         * Shared/ShareableBitmap.h:
270         * Shared/WebURL.h:
271         (WebKit::WebURL::create):
272         (WebKit::WebURL::WebURL):
273         (WebKit::WebURL::parseURLIfNecessary):
274         * Shared/cg/ShareableBitmapCG.cpp:
275         (WebKit::ShareableBitmap::createGraphicsContext):
276         (WebKit::ShareableBitmap::makeCGImageCopy):
277         * Shared/mac/SecItemShim.cpp:
278         (WebKit::sendSecItemRequest):
279         (WebKit::webSecItemCopyMatching):
280         (WebKit::webSecItemAdd):
281         (WebKit::webSecItemUpdate):
282         (WebKit::webSecItemDelete):
283         (WebKit::SecItemShim::secItemResponse):
284         * UIProcess/API/mac/FindIndicatorWindow.h:
285         * UIProcess/API/mac/PageClientImpl.h:
286         * UIProcess/API/mac/PageClientImpl.mm:
287         (WebKit::PageClientImpl::createDrawingAreaProxy):
288         * UIProcess/API/mac/WKView.mm:
289         (-[WKView std::WebKit::]):
290         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
291         * UIProcess/API/mac/WKViewInternal.h:
292         * UIProcess/BackingStore.cpp:
293         * UIProcess/BackingStore.h:
294         * UIProcess/DrawingAreaProxyImpl.cpp:
295         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
296         * UIProcess/DrawingAreaProxyImpl.h:
297         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
298         * UIProcess/PageClient.h:
299         * UIProcess/WebPageProxy.h:
300         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
301         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
302         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
303         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
304         (WebKit::BlobRegistryProxy::registerBlobURL):
305         * WebProcess/FileAPI/BlobRegistryProxy.h:
306         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
307         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
308         (WKBundlePageBannerCreateBannerWithCALayer):
309         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
310         (WebKit::imageForRect):
311         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
312         (WebKit::NetscapePlugin::scheduleTimer):
313         (WebKit::NetscapePlugin::unscheduleTimer):
314         (WebKit::NetscapePlugin::snapshot):
315         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
316         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
317         * WebProcess/Plugins/PDF/PDFPlugin.mm:
318         (WebKit::PDFPlugin::snapshot):
319         * WebProcess/Plugins/PluginProxy.cpp:
320         (WebKit::PluginProxy::paint):
321         (WebKit::PluginProxy::update):
322         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
323         (WebKit::convertImageToBitmap):
324         * WebProcess/WebPage/DrawingArea.cpp:
325         (WebKit::DrawingArea::create):
326         * WebProcess/WebPage/DrawingArea.h:
327         * WebProcess/WebPage/DrawingAreaImpl.cpp:
328         (WebKit::DrawingAreaImpl::display):
329         * WebProcess/WebPage/DrawingAreaImpl.h:
330         * WebProcess/WebPage/FindController.cpp:
331         (WebKit::FindController::getFindIndicatorBitmapAndRect):
332         * WebProcess/WebPage/WebFrame.cpp:
333         (WebKit::WebFrame::createWithCoreMainFrame):
334         (WebKit::WebFrame::createSubframe):
335         (WebKit::WebFrame::create):
336         (WebKit::WebFrame::WebFrame):
337         * WebProcess/WebPage/WebFrame.h:
338         * WebProcess/WebPage/WebPage.cpp:
339         (WebKit::WebPage::scaledSnapshotWithOptions):
340         (WebKit::WebPage::drawRectToImage):
341         * WebProcess/WebPage/WebPage.h:
342         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
343         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
344         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
345         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
346         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
347         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
348         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
349         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
350
351 2013-09-27  Anders Carlsson  <andersca@apple.com>
352
353         Message sending functions should only accept rvalues
354         https://bugs.webkit.org/show_bug.cgi?id=122041
355
356         Reviewed by Andreas Kling.
357
358         In order to safely encode move-only types, make all send variants accept rvalues only, except
359         for the "send to all processes" ones. For them, copy the message before sending. This ensures that trying
360         to send a move-only type in a message will fail to compile.
361
362         * NetworkProcess/NetworkResourceLoader.h:
363         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
364         * Platform/CoreIPC/Connection.h:
365         (CoreIPC::Connection::send):
366         (CoreIPC::Connection::sendSync):
367         * Platform/CoreIPC/MessageSender.h:
368         (CoreIPC::MessageSender::sendSync):
369         * Shared/ChildProcessProxy.h:
370         (WebKit::ChildProcessProxy::send):
371         (WebKit::ChildProcessProxy::sendSync):
372         * UIProcess/WebContext.h:
373         (WebKit::WebContext::sendToNetworkingProcess):
374         (WebKit::WebContext::sendToNetworkingProcessRelaunchingIfNecessary):
375         (WebKit::WebContext::sendToAllProcesses):
376         (WebKit::WebContext::sendToAllProcessesRelaunchingThemIfNecessary):
377         (WebKit::WebContext::sendToOneProcess):
378         * UIProcess/WebPageGroup.h:
379         (WebKit::WebPageGroup::sendToAllProcessesInGroup):
380
381 2013-09-30  Benjamin Poulain  <benjamin@webkit.org>
382
383         Remove the code guarded by STYLE_SCOPED
384         https://bugs.webkit.org/show_bug.cgi?id=122123
385
386         Reviewed by Anders Carlsson.
387
388         * Configurations/FeatureDefines.xcconfig:
389
390 2013-09-30  Csaba Osztrogonác  <ossy@webkit.org>
391
392         NetworkResourceLoader.messages.in should be ENABLE(NETWORK_PROCESS) guarded
393         https://bugs.webkit.org/show_bug.cgi?id=122110
394
395         Reviewed by Darin Adler.
396
397         * NetworkProcess/NetworkResourceLoader.messages.in:
398
399 2013-09-30  Mark Rowe  <mrowe@apple.com>
400
401         Fix the build when building against an SDK.
402
403         Xcode helpfully prepends $(SDKROOT) to the paths in FRAMEWORK_SEARCH_PATHS when generating
404         the compiler command lines. It can't know to do this for the system framework search paths
405         we add manually via OTHER_CFLAGS though, so we need to prefix them with $(SDKROOT) ourself.
406
407         * Configurations/BaseTarget.xcconfig:
408
409 2013-09-30  Allan Sandfeld Jensen  <allan.jensen@digia.com>
410
411         [Qt] Fix force_static_libs_as_shared in WebKit2
412         https://bugs.webkit.org/show_bug.cgi?id=121961
413
414         Reviewed by Csaba Osztrogonác.
415
416         Get rid of the unused WebKit2QML library
417
418         * Target.pri:
419         * WebKit2.pro:
420         * WebKit2QML.pri: Removed.
421
422 2013-09-29  Mark Rowe  <mrowe@apple.com>
423
424         Fix the Lion build.
425
426         Ensure that C++ and Objective-C++ files build with the right compiler flags.
427
428         * Configurations/BaseTarget.xcconfig:
429
430 2013-09-29  Sam Weinig  <sam@webkit.org>
431
432         Fix the build.
433
434         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
435         (WebKit::NPRuntimeObjectMap::evaluate):
436
437 2013-09-28  Mark Rowe  <mrowe@apple.com>
438
439         Fix some failures with newer versions of clang.
440
441         Some CoreGraphics headers generate warnings under newer versions of clang. Since they're system headers the warnings would
442         usually be suppressed, but we're adding the frameworks to the non-system framework search path so they're no longer treated
443         as system headers. We address this by removing the system paths from FRAMEWORK_SEARCH_PATHS and using the -iframework compiler
444         flag in OTHER_CFLAGS to add the paths to the system framework search path. We have to set OTHER_CFLAGS at the target level
445         in order for it to coexist with the ASAN-related OTHER_CFLAGS that's set in DebugRelease.xcconfig.
446
447         Reviewed by Dan Bernstein.
448
449         * Configurations/BaseTarget.xcconfig:
450         * Configurations/DebugRelease.xcconfig:
451
452 2013-09-28  Mark Rowe  <mrowe@apple.com>
453
454         Take Xcode's advice and enable some extra warnings.
455
456         Reviewed by Sam Weinig.
457
458         * Configurations/Base.xcconfig:
459         * WebKit2.xcodeproj/project.pbxproj:
460
461 2013-09-28  Darin Adler  <darin@apple.com>
462
463         Add Frame::mainFrame and Frame::isMainFrame
464         https://bugs.webkit.org/show_bug.cgi?id=122064
465
466         Reviewed by Andreas Kling.
467
468         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
469         (WebKit::TiledCoreAnimationDrawingArea::shouldUseTiledBackingForFrameView):
470         Call isMainFrame.
471
472 2013-09-27  Anders Carlsson  <andersca@apple.com>
473
474         Message sending functions should only accept rvalues
475         https://bugs.webkit.org/show_bug.cgi?id=122041
476
477         Reviewed by Andreas Kling.
478
479         In order to safely encode move-only types, make all send variants accept rvalues only, except
480         for the "send to all processes" ones. For them, copy the message before sending. This ensures that trying
481         to send a move-only type in a message will fail to compile.
482
483         * NetworkProcess/NetworkResourceLoader.h:
484         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
485         * Platform/CoreIPC/Connection.h:
486         (CoreIPC::Connection::send):
487         (CoreIPC::Connection::sendSync):
488         * Platform/CoreIPC/MessageSender.h:
489         (CoreIPC::MessageSender::sendSync):
490         * Shared/ChildProcessProxy.h:
491         (WebKit::ChildProcessProxy::send):
492         (WebKit::ChildProcessProxy::sendSync):
493         * UIProcess/WebContext.h:
494         (WebKit::WebContext::sendToNetworkingProcess):
495         (WebKit::WebContext::sendToNetworkingProcessRelaunchingIfNecessary):
496         (WebKit::WebContext::sendToAllProcesses):
497         (WebKit::WebContext::sendToAllProcessesRelaunchingThemIfNecessary):
498         (WebKit::WebContext::sendToOneProcess):
499         * UIProcess/WebPageGroup.h:
500         (WebKit::WebPageGroup::sendToAllProcessesInGroup):
501
502 2013-09-28  Philippe Normand  <pnormand@igalia.com>
503
504         Unreviewed GTK build fix after r156560.
505
506         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
507         (WebKit::LayerTreeHostGtk::paintContents):
508         (WebKit::LayerTreeHostGtk::createPageOverlayLayer):
509         (WebKit::LayerTreeHostGtk::destroyPageOverlayLayer):
510         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
511
512 2013-09-28  Mark Rowe  <mrowe@apple.com>
513
514         WebKit2 fails to build with newer versions of clang.
515
516         Reviewed by Anders Carlsson.
517
518         * Shared/VisitedLinkTable.cpp: #if a function that's only used inside an ASSERT.
519         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: Remove an unused constant.
520         * UIProcess/mac/WKFullScreenWindowController.mm: Ditto.
521         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Ditto.
522         * WebProcess/WebPage/FindController.cpp: Ditto.
523         * WebProcess/WebPage/WebBackForwardListProxy.cpp: Remove two unused constants.
524
525 2013-09-27  Csaba Osztrogonác  <ossy@webkit.org>
526
527         CookieStorageShim should be PLATFORM(MAC) guarded
528         https://bugs.webkit.org/show_bug.cgi?id=121423
529
530         Reviewed by Darin Adler.
531
532         Original patch by Kwang Yul Seo <skyul@company100.com>.
533
534         * WebProcess/WebProcess.cpp:
535         (WebKit::WebProcess::initializeWebProcess):
536
537 2013-09-27  Enrica Casucci  <enrica@apple.com>
538
539         Upstream changes to Pasteboard implementation for iOS.
540         https://bugs.webkit.org/show_bug.cgi?id=121818
541
542         Reviewed by Benjamin Poulain.
543
544         * Shared/WebCoreArgumentCoders.cpp:
545         (CoreIPC::decodeSharedBuffer):
546         * Shared/WebCoreArgumentCoders.h:
547         * UIProcess/WebContext.h:
548         * UIProcess/WebContext.messages.in:
549         * UIProcess/mac/WebContextMac.mm:
550         (WebKit::WebContext::writeWebContentToPasteboard):
551         (WebKit::WebContext::writeImageToPasteboard):
552         (WebKit::WebContext::writeStringToPasteboard):
553         (WebKit::WebContext::readStringFromPasteboard):
554         (WebKit::WebContext::readURLFromPasteboard):
555         (WebKit::WebContext::readBufferFromPasteboard):
556         (WebKit::WebContext::getPasteboardItemsCount):
557         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
558         (WebKit::WebPlatformStrategies::writeToPasteboard):
559         (WebKit::WebPlatformStrategies::getPasteboardItemsCount):
560         (WebKit::WebPlatformStrategies::readBufferFromPasteboard):
561         (WebKit::WebPlatformStrategies::readURLFromPasteboard):
562         (WebKit::WebPlatformStrategies::readStringFromPasteboard):
563         (WebKit::WebPlatformStrategies::changeCount):
564         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
565
566 2013-09-27  Ralph Thomas  <ralpht@gmail.com>
567
568         [WK2][CoordinatedGraphics] fix build after r156560
569         https://bugs.webkit.org/show_bug.cgi?id=122028
570
571         Fixing build.
572
573         Reviewed by Anders Carlsson.
574
575         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
576         (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
577         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
578
579 2013-09-27  Anders Carlsson  <andersca@apple.com>
580
581         Use std::unique_ptr for GraphicsLayer creation
582         https://bugs.webkit.org/show_bug.cgi?id=122020
583
584         Reviewed by Antti Koivisto.
585
586         * UIProcess/mac/RemoteLayerTreeHost.h:
587         * UIProcess/mac/RemoteLayerTreeHost.mm:
588         (WebKit::RemoteLayerTreeHost::getOrCreateLayer):
589         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
590         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
591         (WebKit::LayerTreeHostMac::paintContents):
592         (WebKit::LayerTreeHostMac::createPageOverlayLayer):
593         (WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
594         * WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
595         * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
596         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
597         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
598         (WebKit::RemoteLayerTreeContext::createGraphicsLayer):
599         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
600         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
601         (WebKit::TiledCoreAnimationDrawingArea::paintContents):
602         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
603         (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
604
605 2013-09-27  Beth Dakin  <bdakin@apple.com>
606
607         ScrollbarPainterController should adopt the api to lock overlay scrollbar state
608         https://bugs.webkit.org/show_bug.cgi?id=121928
609
610         Reviewed by Sam Weinig.
611
612         This function no longer needs to be implemented by ScrollablArea subclasses.
613         * WebProcess/Plugins/PDF/PDFPlugin.h:
614         * WebProcess/Plugins/PDF/PDFPlugin.mm:
615
616 2013-09-27  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
617
618         Web Inspector: Make WebKitGTK+ port work with Eclipse chromedevtools plugin
619         https://bugs.webkit.org/show_bug.cgi?id=121121
620
621         Reviewed by Gustavo Noronha Silva.
622
623         The chromedevtools plugin (http://code.google.com/p/chromedevtools/) requires a specific
624         json format to connect to the webkit inspector.
625
626         The current format is missing some required fields that make the connection with the plugin
627         fail.
628
629         The format expected by the plugin is as follows:
630           {
631            "title": "Foo",
632            "url": "http://foo",
633            "devtoolsFrontendUrl": "/Main.html?ws=localhost:9222/devtools/page/1",
634            "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/1"
635           }
636
637         The current format is missing the entries for "devtoolsFrontendUrl" and
638         "webSocketDebuggerUrl".
639
640         The plugin also sends an HTTP GET request to http://host:port/json instead of
641         http://host:port/pagelist.json when retrieving the pages list.
642
643         This patch fixes the issues by adding support for the missing fields and accepting requests
644         for "/json" alongside "/pagelist.json".
645
646         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
647         (WebKit::WebInspectorServer::platformResourceForPath):
648         Also accept requests for "/json" alongside "pagelist.json".
649         (WebKit::WebInspectorServer::buildPageList):
650         Add fields required by chromedevtools plugin.
651
652 2013-09-26  Darin Adler  <darin@apple.com>
653
654         rename KURL to URL
655         https://bugs.webkit.org/show_bug.cgi?id=16214
656
657         Reviewed by Andreas Kling.
658
659         * many files: Renamed, using script.
660
661 2013-09-27  Peter Gal  <galpeter@inf.u-szeged.hu>
662
663         Remove unused method parameters from TupleCoder.
664         https://bugs.webkit.org/show_bug.cgi?id=122009
665
666         Reviewed by Anders Carlsson.
667
668         In case of TupleCoder<0, Elements...> the parameter
669         names for encoder, decoder and tuple are not used.
670         By removing the paramter names the unusued paramter
671         warning will disappear.
672
673         * Platform/CoreIPC/Arguments.h:
674
675 2013-09-06  Jer Noble  <jer.noble@apple.com>
676
677         [Mac] Implement the media controls in JavaScript.
678         https://bugs.webkit.org/show_bug.cgi?id=120895
679
680         Reviewed by Dean Jackson.
681
682         Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.
683
684         * Configurations/FeatureDefines.xcconfig:
685
686 2013-09-27  Darin Adler  <darin@apple.com>
687
688         Add empty MainFrame class
689         https://bugs.webkit.org/show_bug.cgi?id=121770
690
691         Reviewed by Andreas Kling.
692
693         * WebProcess/FullScreen/WebFullScreenManager.cpp:
694         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
695         * WebProcess/InjectedBundle/InjectedBundle.cpp:
696         * WebProcess/Plugins/PluginView.cpp:
697         * WebProcess/Storage/StorageAreaMap.cpp:
698         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
699         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
700         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
701         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
702         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
703         * WebProcess/WebPage/FindController.cpp:
704         * WebProcess/WebPage/PageOverlay.cpp:
705         * WebProcess/WebPage/WebInspector.cpp:
706         * WebProcess/WebPage/WebPage.cpp:
707         * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
708         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
709         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
710         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
711         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
712         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
713         * WebProcess/WebPage/mac/WebPageMac.mm:
714         Include MainFrame.h instead of Frame.h as needed.
715
716 2013-09-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
717
718         [Qt] Fix force_static_libs_as_shared in WebKit2
719         https://bugs.webkit.org/show_bug.cgi?id=121961
720
721         Reviewed by Csaba Osztrogonác.
722
723         Do not add strict ordering for webkit2qml. It is not needed and causes
724         Target.pri to be built out of order.
725
726         * WebKit2.pro:
727
728 2013-09-26  Anders Carlsson  <andersca@apple.com>
729
730         Remove Windows code
731         https://bugs.webkit.org/show_bug.cgi?id=121988
732
733         Reviewed by Antti Koivisto.
734
735         * Platform/CoreIPC/Connection.h:
736         * Platform/CoreIPC/win/ConnectionWin.cpp: Removed.
737         * Platform/SharedMemory.h:
738         * Platform/WorkQueue.h:
739         * Platform/win/SharedMemoryWin.cpp: Removed.
740         * Platform/win/WorkQueueWin.cpp: Removed.
741         * Shared/ChildProcess.cpp:
742         * Shared/ChildProcessProxy.cpp:
743         (WebKit::ChildProcessProxy::didFinishLaunching):
744         * UIProcess/Plugins/PluginInfoStore.cpp:
745         (WebKit::PluginInfoStore::loadPluginsIfNecessary):
746         * WebProcess/WebProcess.cpp:
747
748 2013-09-26  Anders Carlsson  <andersca@apple.com>
749
750         Stop using PassWeak
751         https://bugs.webkit.org/show_bug.cgi?id=121968
752
753         Reviewed by Sam Weinig.
754
755         Update for JavaScriptCore changes.
756
757         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
758         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
759
760 2013-09-25  Jer Noble  <jer.noble@apple.com>
761
762         [WK2] Crash at at com.apple.WebKit2: WebKit::VoidCallback::invalidate + 46
763         https://bugs.webkit.org/show_bug.cgi?id=121910
764
765         Reviewed by Darin Adler.
766
767         Store a copy of the VoidCallback passed to WKPage, and invalidate the callback
768         during dealloc. The VoidCallback class assumes that it will only ever be
769         invalidated or invoked once, so change the ASSERTs into an early return.
770
771         * UIProcess/GenericCallback.h:
772         (WebKit::VoidCallback::performCallback): Exit early if previously invalidated.
773         (WebKit::VoidCallback::invalidate): Ditto.
774         * UIProcess/mac/WKFullScreenWindowController.h:
775         * UIProcess/mac/WKFullScreenWindowController.mm:
776         (-[WKFullScreenWindowController dealloc]): Invalidate the repaint callback if present.
777         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto & create a new callback.
778         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Clear the callback.
779
780 2013-09-26  Tim Horton  <timothy_horton@apple.com>
781
782         Tiled drawing should not imply threaded scrolling
783         https://bugs.webkit.org/show_bug.cgi?id=121874
784         <rdar://problem/15071494>
785
786         Reviewed by Sam Weinig.
787
788         * Shared/DrawingAreaInfo.h:
789         We can have DrawingAreaTypeTiledCoreAnimation without threaded scrolling.
790
791         * Shared/WebPreferencesStore.h:
792         * UIProcess/API/C/WKPreferences.cpp:
793         (WKPreferencesSetThreadedScrollingEnabled):
794         (WKPreferencesGetThreadedScrollingEnabled):
795         * UIProcess/API/C/WKPreferencesPrivate.h:
796         Add a preference for threaded scrolling.
797
798         * UIProcess/API/mac/WKView.mm:
799         (-[WKView WebKit::]):
800         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
801         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
802         * WebProcess/WebPage/DrawingArea.cpp:
803         (WebKit::DrawingArea::create):
804         * WebProcess/WebPage/DrawingArea.h:
805         Make it so we can use TiledCoreAnimationDrawingArea without ENABLE(THREADED_SCROLLING).
806
807         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
808         (WebKit::WebChromeClient::shouldUseTiledBackingForFrame):
809         * WebProcess/WebCoreSupport/WebChromeClient.h:
810         Override shouldUseTiledBackingForFrame; ask the drawing area if we want a tiled backing for the given frame.
811
812         * WebProcess/WebPage/WebPage.cpp:
813         (WebKit::WebPage::WebPage):
814         (WebKit::WebPage::~WebPage):
815         * WebProcess/WebPage/WebPage.h:
816         Move attaching and detaching the scrolling tree into WebPage.
817         Store whether or not this page is going to use threaded scrolling once, as this
818         cannot change through the life of a page.
819
820         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
821         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
822         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
823         (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
824         Move attaching and detaching the scrolling tree into WebPage.
825
826         (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
827         (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
828         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
829         (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
830         Only do scrolling coordinator work if we have a scrolling coordinator.
831
832         (WebKit::TiledCoreAnimationDrawingArea::shouldUseTiledBackingForFrame):
833         TiledCoreAnimationDrawingArea always wants a tiled backing for the main frame.
834
835 2013-09-25  Minju Kim  <pmuarteo@gmail.com>
836
837         8 bytes memory leaks in WebProcessMainQt.cpp when proxy is initialized
838         https://bugs.webkit.org/show_bug.cgi?id=118515
839
840         Reviewed by Christophe Dumez.
841
842         * WebProcess/qt/WebProcessMainQt.cpp:
843         (WebKit::initializeProxy): Handled EnvHttpProxyFactory by using OwnPtr
844         to avoid memory leak when it isn't handled by NetworkProxyFactory
845
846 2013-09-25  Brady Eidson  <beidson@apple.com>
847
848         Enable the IndexedDB build on Mac, but leave the feature non-functional
849         https://bugs.webkit.org/show_bug.cgi?id=121918
850
851         Reviewed by Alexey Proskuryakov.
852
853         * Configurations/FeatureDefines.xcconfig:
854
855 2013-09-25  Commit Queue  <commit-queue@webkit.org>
856
857         Unreviewed, rolling out r156432.
858         http://trac.webkit.org/changeset/156432
859         https://bugs.webkit.org/show_bug.cgi?id=121932
860
861         some integer conversion things that need brady to fix
862         (Requested by thorton on #webkit).
863
864         * Configurations/FeatureDefines.xcconfig:
865
866 2013-09-25  Brady Eidson  <beidson@apple.com>
867
868         Enable the IndexedDB build on Mac, but leave the feature non-functional
869         https://bugs.webkit.org/show_bug.cgi?id=121918
870
871         Reviewed by Alexey Proskuryakov.
872
873         * Configurations/FeatureDefines.xcconfig:
874
875 2013-09-25  Brent Fulgham  <bfulgham@apple.com>
876
877         Refactor RuntimeEnabledFeatures as a Singleton.
878         https://bugs.webkit.org/show_bug.cgi?id=121883.
879
880         Reviewed by Jer Noble.
881
882         * WebProcess/InjectedBundle/InjectedBundle.cpp:
883         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Use
884         Singleton accessor.
885         (WebKit::InjectedBundle::setShadowDOMEnabled):
886         (WebKit::InjectedBundle::setCSSRegionsEnabled):
887         (WebKit::InjectedBundle::setCSSCompositingEnabled):
888         (WebKit::InjectedBundle::setSeamlessIFramesEnabled):
889         * WebProcess/WebPage/WebPage.cpp:
890         (WebKit::WebPage::updatePreferences): Ditto.
891         * WebProcess/qt/WebProcessQt.cpp:
892         (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
893
894 2013-09-25  Brady Eidson  <beidson@apple.com>
895
896         FeatureDefine.xcconfig cleanup (They should all be identical).
897         https://bugs.webkit.org/show_bug.cgi?id=121921
898
899         Reviewed by Mark Rowe.
900
901         * Configurations/FeatureDefines.xcconfig:
902
903 2013-09-25  Anders Carlsson  <andersca@apple.com>
904
905         Use tuples for encoding IPC messages
906         https://bugs.webkit.org/show_bug.cgi?id=121924
907
908         Reviewed by Andreas Kling.
909
910         Yet another step towards getting rid of the Arguments hierarchy.
911
912         * Platform/CoreIPC/Connection.h:
913         (CoreIPC::Connection::send):
914         (CoreIPC::Connection::sendSync):
915         * Platform/CoreIPC/HandleMessage.h:
916         (CoreIPC::handleMessage):
917         (CoreIPC::handleMessageVariadic):
918         (CoreIPC::handleMessageDelayed):
919         * Platform/CoreIPC/MessageSender.h:
920         (CoreIPC::MessageSender::send):
921         * Scripts/webkit2/messages.py:
922         (arguments_type_old):
923         (arguments_type):
924         (reply_type):
925         (decode_type):
926         (delayed_reply_type):
927         (message_to_struct_declaration):
928         * Scripts/webkit2/messages_unittest.py:
929         (LoadURL):
930         (std):
931         (TouchEvent):
932         (DidReceivePolicyDecision):
933         (Close):
934         (PreferencesDidChange):
935         (SendDoubleAndFloat):
936         (SendInts):
937         (CreatePlugin):
938         (RunJavaScriptAlert):
939         (GetPlugins):
940         (GetPluginProcessConnection):
941         (TestMultipleAttributes):
942         (TestParameterAttributes):
943         (TemplateTest):
944         (DidCreateWebProcessConnection):
945         (InterpretKeyEvent):
946         (DeprecatedOperation):
947         (ExperimentalOperation):
948         * Shared/ChildProcessProxy.h:
949         (WebKit::ChildProcessProxy::send):
950
951 2013-09-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
952
953         [Qt] Fix build with Qt 5.2 QtPosition module
954         https://bugs.webkit.org/show_bug.cgi?id=121089
955
956         Reviewed by Simon Hausmann.
957
958         QtLocation -> QtPositioning
959
960         * Target.pri:
961         * UIProcess/qt/WebGeolocationProviderQt.cpp:
962         * WebKit2.pri:
963
964 2013-09-24  Sam Weinig  <sam@webkit.org>
965
966         Remove erroneous reference to libWTF.a in the WebKit2 Xcode project file.
967
968         Rubber-stamped by Alexey Proskuryakov.
969
970         * WebKit2.xcodeproj/project.pbxproj:
971
972 2013-09-24  Sam Weinig  <sam@webkit.org>
973
974         Remove the Windows-specific rules from WebKit2's DerivedSources.make, Windows is not supported anymore
975         https://bugs.webkit.org/show_bug.cgi?id=121895
976
977         Reviewed by Alexey Proskuryakov.
978
979         * DerivedSources.make:
980         Remove Windows-specific rules, and, now that only the Mac is using this file, remove the
981         Mac checks.
982
983 2013-09-24  Anders Carlsson  <andersca@apple.com>
984
985         Only allow rvalues to be passed as synchronous message replies
986         https://bugs.webkit.org/show_bug.cgi?id=121870
987
988         Reviewed by Andreas Kling.
989
990         This lets us get rid of a nasty const cast and is more logical.
991
992         * Platform/CoreIPC/Connection.h:
993         (CoreIPC::Connection::sendSync):
994         * Platform/CoreIPC/MessageSender.h:
995         (CoreIPC::MessageSender::send):
996         (CoreIPC::MessageSender::sendSync):
997         * Shared/ChildProcessProxy.h:
998         (WebKit::ChildProcessProxy::sendSync):
999
1000 2013-09-24  Csaba Osztrogonác  <ossy@webkit.org>
1001
1002         Unreviewed buildfix.
1003
1004         * UIProcess/WebNetworkInfoManagerProxy.h:
1005
1006 2013-09-24  Alexey Proskuryakov  <ap@apple.com>
1007
1008         Fix Mac build now.
1009         
1010         * UIProcess/WebContext.messages.in:
1011
1012 2013-09-24  Csaba Osztrogonác  <ossy@webkit.org>
1013
1014         Unreviewed buildfix after r156350.
1015
1016         It seems that nested ifdefs don't work in messages.in files, so don't use them.
1017
1018         * UIProcess/WebContext.messages.in:
1019
1020 2013-09-24  Csaba Osztrogonác  <ossy@webkit.org>
1021
1022         Unreviewed buildfix after r156354 and r156360.
1023
1024         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
1025         (CoreIPC::Connection::processMessage):
1026         (CoreIPC::Connection::sendOutgoingMessage):
1027
1028 2013-09-24  Csaba Osztrogonác  <ossy@webkit.org>
1029
1030         Unreviewed buildfix after r156349.
1031
1032         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
1033         (CoreIPC::Connection::processMessage):
1034
1035 2013-09-24  Anders Carlsson  <andersca@apple.com>
1036
1037         Use std::unique_ptr for decoders as well
1038         https://bugs.webkit.org/show_bug.cgi?id=121868
1039
1040         Reviewed by Andreas Kling.
1041
1042         * Platform/CoreIPC/Connection.cpp:
1043         (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
1044         (CoreIPC::Connection::SyncMessageState::dispatchMessages):
1045         (CoreIPC::Connection::waitForMessage):
1046         (CoreIPC::Connection::sendSyncMessage):
1047         (CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
1048         (CoreIPC::Connection::waitForSyncReply):
1049         (CoreIPC::Connection::processIncomingSyncReply):
1050         (CoreIPC::Connection::processIncomingMessage):
1051         (CoreIPC::Connection::enqueueIncomingMessage):
1052         (CoreIPC::Connection::dispatchMessage):
1053         (CoreIPC::Connection::dispatchOneMessage):
1054         * Platform/CoreIPC/Connection.h:
1055         (CoreIPC::Connection::sendSync):
1056         (CoreIPC::Connection::waitForAndDispatchImmediately):
1057         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1058         (CoreIPC::createMessageDecoder):
1059         (CoreIPC::Connection::receiveSourceEventHandler):
1060         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1061         (WebKit::InjectedBundle::postSynchronousMessage):
1062
1063 2013-09-24  Anders Carlsson  <andersca@apple.com>
1064
1065         Move MessageEncoder and ArgumentEncoder to std::unique_ptr
1066         https://bugs.webkit.org/show_bug.cgi?id=121861
1067
1068         Reviewed by Andreas Kling.
1069
1070         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1071         (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
1072         * NetworkProcess/NetworkConnectionToWebProcess.h:
1073         * NetworkProcess/NetworkProcess.cpp:
1074         (WebKit::NetworkProcess::didReceiveSyncMessage):
1075         * NetworkProcess/NetworkProcess.h:
1076         * Platform/CoreIPC/Connection.cpp:
1077         (CoreIPC::Connection::dispatchWorkQueueMessageReceiverMessage):
1078         (CoreIPC::Connection::createSyncMessageEncoder):
1079         (CoreIPC::Connection::sendMessage):
1080         (CoreIPC::Connection::sendSyncReply):
1081         (CoreIPC::Connection::sendSyncMessage):
1082         (CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
1083         (CoreIPC::Connection::sendOutgoingMessages):
1084         (CoreIPC::Connection::dispatchSyncMessage):
1085         * Platform/CoreIPC/Connection.h:
1086         (CoreIPC::Connection::send):
1087         (CoreIPC::Connection::sendSync):
1088         * Platform/CoreIPC/HandleMessage.h:
1089         (CoreIPC::handleMessageDelayed):
1090         * Platform/CoreIPC/MessageReceiver.h:
1091         (CoreIPC::MessageReceiver::didReceiveSyncMessage):
1092         * Platform/CoreIPC/MessageReceiverMap.cpp:
1093         (CoreIPC::MessageReceiverMap::dispatchSyncMessage):
1094         * Platform/CoreIPC/MessageReceiverMap.h:
1095         * Platform/CoreIPC/MessageSender.cpp:
1096         (CoreIPC::MessageSender::sendMessage):
1097         * Platform/CoreIPC/MessageSender.h:
1098         (CoreIPC::MessageSender::send):
1099         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1100         (CoreIPC::Connection::open):
1101         (CoreIPC::Connection::sendOutgoingMessage):
1102         * PluginProcess/PluginControllerProxy.h:
1103         * PluginProcess/WebProcessConnection.cpp:
1104         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1105         * PluginProcess/WebProcessConnection.h:
1106         * Scripts/webkit2/messages.py:
1107         (message_to_struct_declaration):
1108         (generate_message_handler):
1109         * Scripts/webkit2/messages_unittest.py:
1110         * Shared/ChildProcessProxy.cpp:
1111         (WebKit::ChildProcessProxy::sendMessage):
1112         (WebKit::ChildProcessProxy::dispatchSyncMessage):
1113         (WebKit::ChildProcessProxy::didFinishLaunching):
1114         * Shared/ChildProcessProxy.h:
1115         (WebKit::ChildProcessProxy::send):
1116         * Shared/Plugins/NPObjectMessageReceiver.h:
1117         * Shared/Plugins/NPRemoteObjectMap.cpp:
1118         (WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
1119         * Shared/Plugins/NPRemoteObjectMap.h:
1120         * Shared/WebConnection.cpp:
1121         (WebKit::WebConnection::postMessage):
1122         * UIProcess/Downloads/DownloadProxy.h:
1123         * UIProcess/Network/NetworkProcessProxy.cpp:
1124         (WebKit::NetworkProcessProxy::didReceiveSyncMessage):
1125         * UIProcess/Network/NetworkProcessProxy.h:
1126         * UIProcess/Plugins/PluginProcessProxy.h:
1127         * UIProcess/Storage/StorageManager.h:
1128         * UIProcess/WebContext.cpp:
1129         (WebKit::WebContext::dispatchSyncMessage):
1130         (WebKit::WebContext::didReceiveSyncMessage):
1131         * UIProcess/WebContext.h:
1132         * UIProcess/WebFullScreenManagerProxy.h:
1133         * UIProcess/WebIconDatabase.h:
1134         * UIProcess/WebInspectorProxy.h:
1135         * UIProcess/WebPageProxy.h:
1136         * UIProcess/WebProcessProxy.cpp:
1137         (WebKit::WebProcessProxy::didReceiveSyncMessage):
1138         * UIProcess/WebProcessProxy.h:
1139         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1140         (WebKit::InjectedBundle::postMessage):
1141         (WebKit::InjectedBundle::postSynchronousMessage):
1142         * WebProcess/Network/NetworkProcessConnection.cpp:
1143         (WebKit::NetworkProcessConnection::didReceiveSyncMessage):
1144         * WebProcess/Network/NetworkProcessConnection.h:
1145         * WebProcess/Plugins/PluginProcessConnection.cpp:
1146         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
1147         * WebProcess/Plugins/PluginProcessConnection.h:
1148         * WebProcess/Plugins/PluginProxy.h:
1149         * WebProcess/WebPage/WebPage.cpp:
1150         (WebKit::WebPage::didReceiveSyncMessage):
1151         * WebProcess/WebPage/WebPage.h:
1152         * WebProcess/WebProcess.cpp:
1153         (WebKit::WebProcess::didReceiveSyncMessage):
1154         * WebProcess/WebProcess.h:
1155
1156 2013-09-24  Anders Carlsson  <andersca@apple.com>
1157
1158         Remove encoder create functions
1159         https://bugs.webkit.org/show_bug.cgi?id=121853
1160
1161         Reviewed by Sam Weinig.
1162
1163         * Platform/CoreIPC/ArgumentEncoder.cpp:
1164         * Platform/CoreIPC/ArgumentEncoder.h:
1165         * Platform/CoreIPC/Connection.cpp:
1166         (CoreIPC::Connection::dispatchWorkQueueMessageReceiverMessage):
1167         (CoreIPC::Connection::createSyncMessageEncoder):
1168         (CoreIPC::Connection::dispatchSyncMessage):
1169         * Platform/CoreIPC/Connection.h:
1170         (CoreIPC::Connection::send):
1171         * Platform/CoreIPC/MessageEncoder.cpp:
1172         (CoreIPC::MessageEncoder::setIsSyncMessage):
1173         * Platform/CoreIPC/MessageEncoder.h:
1174         * Platform/CoreIPC/MessageSender.h:
1175         (CoreIPC::MessageSender::send):
1176         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1177         (CoreIPC::Connection::open):
1178         * Shared/ChildProcessProxy.h:
1179         (WebKit::ChildProcessProxy::send):
1180         * Shared/WebConnection.cpp:
1181         (WebKit::WebConnection::postMessage):
1182         * UIProcess/WebContext.cpp:
1183         (WebKit::WebContext::createNewWebProcess):
1184         (WebKit::WebContext::postMessageToInjectedBundle):
1185         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1186         (WebKit::InjectedBundle::postMessage):
1187         * WebProcess/WebPage/EncoderAdapter.cpp:
1188         (WebKit::EncoderAdapter::EncoderAdapter):
1189         (WebKit::EncoderAdapter::dataReference):
1190         (WebKit::EncoderAdapter::encodeBytes):
1191         (WebKit::EncoderAdapter::encodeBool):
1192         (WebKit::EncoderAdapter::encodeUInt16):
1193         (WebKit::EncoderAdapter::encodeUInt32):
1194         (WebKit::EncoderAdapter::encodeUInt64):
1195         (WebKit::EncoderAdapter::encodeInt32):
1196         (WebKit::EncoderAdapter::encodeInt64):
1197         (WebKit::EncoderAdapter::encodeFloat):
1198         (WebKit::EncoderAdapter::encodeDouble):
1199         (WebKit::EncoderAdapter::encodeString):
1200         * WebProcess/WebPage/EncoderAdapter.h:
1201
1202 2013-09-24  Enrica Casucci  <enrica@apple.com>
1203
1204         Upstream changes to Pasteboard implementation for iOS.
1205         https://bugs.webkit.org/show_bug.cgi?id=121818
1206
1207         Reviewed by Darin Adler.
1208
1209         * Scripts/webkit2/messages.py:
1210         (struct_or_class):
1211         (headers_for_type):
1212         * Shared/WebCoreArgumentCoders.cpp:
1213         (CoreIPC::encodeSharedBuffer):
1214         (CoreIPC::decodeSharedBuffer):
1215         (CoreIPC::::encode):
1216         (CoreIPC::::decode):
1217         * Shared/WebCoreArgumentCoders.h:
1218         * UIProcess/WebContext.h:
1219         * UIProcess/WebContext.messages.in:
1220         * UIProcess/mac/WebContextMac.mm:
1221         (WebKit::WebContext::writeWebContentToPasteboard):
1222         (WebKit::WebContext::writeImageToPasteboard):
1223         (WebKit::WebContext::writeStringToPasteboard):
1224         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1225         (WebKit::WebPlatformStrategies::writeToPasteboard):
1226         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1227
1228 2013-09-24  Anders Carlsson  <andersca@apple.com>
1229
1230         Remove create functions from MessageDecoder and ArgumentDecoder
1231         https://bugs.webkit.org/show_bug.cgi?id=121850
1232
1233         Reviewed by Antti Koivisto.
1234
1235         * Platform/CoreIPC/ArgumentDecoder.cpp:
1236         (CoreIPC::ArgumentDecoder::ArgumentDecoder):
1237         * Platform/CoreIPC/ArgumentDecoder.h:
1238         * Platform/CoreIPC/MessageDecoder.cpp:
1239         (CoreIPC::MessageDecoder::MessageDecoder):
1240         * Platform/CoreIPC/MessageDecoder.h:
1241         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1242         (CoreIPC::createMessageDecoder):
1243         * WebProcess/WebPage/DecoderAdapter.cpp:
1244         (WebKit::DecoderAdapter::DecoderAdapter):
1245         (WebKit::DecoderAdapter::decodeBytes):
1246         (WebKit::DecoderAdapter::decodeBool):
1247         (WebKit::DecoderAdapter::decodeUInt16):
1248         (WebKit::DecoderAdapter::decodeUInt32):
1249         (WebKit::DecoderAdapter::decodeUInt64):
1250         (WebKit::DecoderAdapter::decodeInt32):
1251         (WebKit::DecoderAdapter::decodeInt64):
1252         (WebKit::DecoderAdapter::decodeFloat):
1253         (WebKit::DecoderAdapter::decodeDouble):
1254         (WebKit::DecoderAdapter::decodeString):
1255         * WebProcess/WebPage/DecoderAdapter.h:
1256         * WebProcess/WebProcess.cpp:
1257         (WebKit::WebProcess::postInjectedBundleMessage):
1258
1259 2013-09-24  Mark Rowe  <mrowe@apple.com>
1260
1261         <rdar://problem/14971518> WebKit should build against the Xcode default toolchain when targeting OS X 10.8
1262
1263         Reviewed by Dan Bernstein.
1264
1265         * Configurations/Base.xcconfig:
1266
1267 2013-09-24  Lorenzo Tilve  <ltilve@igalia.com>
1268
1269         [GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE
1270         https://bugs.webkit.org/show_bug.cgi?id=121782
1271
1272         Reviewed by Martin Robinson.
1273
1274         Disabled drag functions.
1275
1276         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1277         (webkit_web_view_base_class_init):
1278         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
1279
1280 2013-09-24  Anders Carlsson  <andersca@apple.com>
1281
1282         Begin adopting std::tuple for IPC decoding
1283         https://bugs.webkit.org/show_bug.cgi?id=121848
1284
1285         Reviewed by Sam Weinig.
1286
1287         This is the first step towards getting rid of the horrible Arguments class hierarchy.
1288
1289         * Platform/CoreIPC/Arguments.h:
1290         (CoreIPC::TupleCoder::encode):
1291         (CoreIPC::TupleCoder::decode):
1292         * Platform/CoreIPC/HandleMessage.h:
1293         (CoreIPC::callMemberFunction):
1294         (CoreIPC::handleMessage):
1295         (CoreIPC::handleMessageVariadic):
1296         (CoreIPC::handleMessageDelayed):
1297
1298 2013-09-24  ChangSeok Oh  <changseok.oh@collabora.com>
1299
1300         [EFL] Build failed at ProcessLauncherEfl.cpp
1301         https://bugs.webkit.org/show_bug.cgi?id=121826
1302
1303         Reviewed by Gyuyoung Kim.
1304
1305         Fixed a build failure with adding socket.h.
1306
1307         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1308
1309 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
1310
1311         use NOMINMAX instead of #define min min
1312         https://bugs.webkit.org/show_bug.cgi?id=73563
1313
1314         Reviewed by Brent Fulgham.
1315
1316         Use NOMINMAX instead of #define min/max as a cleaner
1317         way of ensuring that Windows system header files don't
1318         define min/max as macro in the first place.
1319
1320         * config.h:
1321
1322 2013-09-23  ChangSeok Oh  <changseok.oh@collabora.com>
1323
1324         [GTK][WK2] A plugin dirtyRect within iframe remains after moving to a different page.
1325         https://bugs.webkit.org/show_bug.cgi?id=121600
1326
1327         Reviewed by Gustavo Noronha Silva.
1328
1329         Nowhere to destroy NetscapePlugin::m_platformPluginWidget even after destroying
1330         an instance of NetscapePlugin. So the created GtkWidget remains visible.
1331
1332         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1333         (WebKit::NetscapePlugin::platformDestroy):
1334
1335 2013-09-23  Sam Weinig  <sam@webkit.org>
1336
1337         Add back the SharedWorkerStrategy to prevent crashing.
1338
1339         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1340         (WebKit::WebPlatformStrategies::createSharedWorkerStrategy):
1341         (WebKit::WebPlatformStrategies::isAvailable):
1342         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1343
1344 2013-09-23  Sam Weinig  <sam@webkit.org>
1345
1346         SharedWorkerProcess code is dead
1347         https://bugs.webkit.org/show_bug.cgi?id=121563
1348
1349         Reviewed by Alexey Proskuryakov.
1350
1351         Remove SharedWorkerProcess code.
1352
1353 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
1354
1355         Cleanup CMake files in WebKit2
1356         https://bugs.webkit.org/show_bug.cgi?id=121767
1357
1358         Reviewed by Gyuyoung Kim.
1359
1360         Sort files and unify style.
1361
1362         * CMakeLists.txt:
1363         * PlatformEfl.cmake:
1364         * PlatformGTK.cmake:
1365
1366 2013-09-21  Darin Adler  <darin@apple.com>
1367
1368         Add ExecState::uncheckedArgument and use where possible to shrink a bit
1369         https://bugs.webkit.org/show_bug.cgi?id=121750
1370
1371         Reviewed by Andreas Kling.
1372
1373         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1374         (WebKit::JSNPObject::callMethod): In a loop.
1375         (WebKit::JSNPObject::callObject): Ditto.
1376         (WebKit::JSNPObject::callConstructor): Ditto.
1377
1378 2013-09-18  Anders Carlsson  <andersca@apple.com>
1379
1380         Remove the ENABLE_PLUGIN_PROCESS #define
1381         https://bugs.webkit.org/show_bug.cgi?id=121569
1382
1383         Reviewed by Andreas Kling.
1384
1385         Fold the ENABLE_PLUGIN_PROCESS #define into the NETSCAPE_PLUGIN_API #define since 
1386         building plug-ins without the plug-in process is not supported.
1387
1388         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
1389         * PluginProcess/PluginControllerProxy.cpp:
1390         * PluginProcess/PluginControllerProxy.h:
1391         * PluginProcess/PluginControllerProxy.messages.in:
1392         * PluginProcess/PluginCreationParameters.cpp:
1393         * PluginProcess/PluginCreationParameters.h:
1394         * PluginProcess/PluginProcess.cpp:
1395         * PluginProcess/PluginProcess.h:
1396         * PluginProcess/PluginProcess.messages.in:
1397         * PluginProcess/WebProcessConnection.cpp:
1398         * PluginProcess/WebProcessConnection.h:
1399         * PluginProcess/WebProcessConnection.messages.in:
1400         * PluginProcess/mac/PluginControllerProxyMac.mm:
1401         * PluginProcess/mac/PluginProcessMac.mm:
1402         * Shared/Plugins/NPIdentifierData.cpp:
1403         * Shared/Plugins/NPIdentifierData.h:
1404         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1405         * Shared/Plugins/NPObjectMessageReceiver.h:
1406         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
1407         * Shared/Plugins/NPObjectProxy.cpp:
1408         * Shared/Plugins/NPObjectProxy.h:
1409         * Shared/Plugins/NPRemoteObjectMap.cpp:
1410         * Shared/Plugins/NPRemoteObjectMap.h:
1411         * Shared/Plugins/NPVariantData.cpp:
1412         * Shared/Plugins/NPVariantData.h:
1413         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1414         (WebKit::getMIMETypesFromPluginBundle):
1415         * Shared/Plugins/PluginProcessCreationParameters.cpp:
1416         * Shared/Plugins/PluginProcessCreationParameters.h:
1417         * UIProcess/Launcher/ProcessLauncher.cpp:
1418         (WebKit::ProcessLauncher::processTypeAsString):
1419         (WebKit::ProcessLauncher::getProcessTypeFromString):
1420         * UIProcess/Launcher/ProcessLauncher.h:
1421         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1422         (WebKit::addDYLDEnvironmentAdditions):
1423         (WebKit::serviceName):
1424         (WebKit::createProcess):
1425         * UIProcess/Plugins/PluginProcessManager.cpp:
1426         * UIProcess/Plugins/PluginProcessManager.h:
1427         * UIProcess/Plugins/PluginProcessProxy.cpp:
1428         * UIProcess/Plugins/PluginProcessProxy.h:
1429         * UIProcess/Plugins/PluginProcessProxy.messages.in:
1430         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1431         (WebKit::WebPluginSiteDataManager::~WebPluginSiteDataManager):
1432         (WebKit::WebPluginSiteDataManager::invalidate):
1433         (WebKit::WebPluginSiteDataManager::getSitesWithData):
1434         (WebKit::WebPluginSiteDataManager::clearSiteData):
1435         * UIProcess/Plugins/WebPluginSiteDataManager.h:
1436         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
1437         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1438         * UIProcess/WebContext.cpp:
1439         (WebKit::WebContext::setProcessModel):
1440         (WebKit::WebContext::shouldTerminate):
1441         (WebKit::WebContext::disconnectProcess):
1442         * UIProcess/WebProcessProxy.cpp:
1443         (WebKit::WebProcessProxy::getPluginProcessConnection):
1444         * UIProcess/WebProcessProxy.h:
1445         * UIProcess/WebProcessProxy.messages.in:
1446         * UIProcess/mac/WebContextMac.mm:
1447         (WebKit::updateProcessSuppressionStateOfGlobalChildProcesses):
1448         * WebKit2Prefix.h:
1449         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
1450         * WebProcess/Plugins/PluginProcessConnection.cpp:
1451         * WebProcess/Plugins/PluginProcessConnection.h:
1452         * WebProcess/Plugins/PluginProcessConnection.messages.in:
1453         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1454         * WebProcess/Plugins/PluginProcessConnectionManager.h:
1455         * WebProcess/Plugins/PluginProcessConnectionManager.messages.in:
1456         * WebProcess/Plugins/PluginProxy.cpp:
1457         * WebProcess/Plugins/PluginProxy.h:
1458         * WebProcess/Plugins/PluginProxy.messages.in:
1459         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1460         * WebProcess/WebPage/WebPage.cpp:
1461         * WebProcess/WebProcess.cpp:
1462         (WebKit::WebProcess::WebProcess):
1463         (WebKit::WebProcess::initializeConnection):
1464         * WebProcess/WebProcess.h:
1465         * WebProcess/WebProcess.messages.in:
1466
1467 2013-09-18  Sam Weinig  <sam@webkit.org>
1468
1469         Replace use of OwnArrayPtr<Foo> with std::unique_ptr<Foo[]> in WebKit and WebKit2
1470         https://bugs.webkit.org/show_bug.cgi?id=121568
1471
1472         Reviewed by Andreas Kling.
1473
1474         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
1475         (CoreIPC::Connection::processMessage):
1476         (CoreIPC::readBytesFromSocket):
1477         (CoreIPC::Connection::sendOutgoingMessage):
1478         * UIProcess/API/efl/EwkView.cpp:
1479         (EwkView::feedTouchEvent):
1480         (EwkView::feedTouchEvents):
1481         * UIProcess/API/efl/SnapshotImageGL.h:
1482         * UIProcess/API/efl/ewk_file_chooser_request.cpp:
1483         (ewk_file_chooser_request_files_choose):
1484         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1485         (WebKit::createArgsArray):
1486         (WebKit::ProcessLauncher::launchProcess):
1487         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1488         (WKBundlePageCopyContextMenuItems):
1489         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1490
1491 2013-09-18  Anders Carlsson  <andersca@apple.com>
1492
1493         RefPtrHashMap should work with move only types
1494         https://bugs.webkit.org/show_bug.cgi?id=121564
1495
1496         Reviewed by Andreas Kling.
1497
1498         * UIProcess/Storage/StorageManager.cpp:
1499         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
1500         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
1501         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1502         (WebKit::StorageNamespaceImpl::storageArea):
1503
1504 2013-09-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1505
1506         [GTK] WebKitScriptWorld not in API documentation
1507         https://bugs.webkit.org/show_bug.cgi?id=121539
1508
1509         Reviewed by Philippe Normand.
1510
1511         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add WebKitScriptWorld.
1512
1513 2013-09-17  Csaba Osztrogonác  <ossy@webkit.org>
1514
1515         Buildfix for !ENABLE(CUSTOM_PROTOCOLS) platforms
1516         https://bugs.webkit.org/show_bug.cgi?id=121417
1517
1518         Reviewed by Alexey Proskuryakov.
1519
1520         Original patch by Balazs Kelemen <kbalazs@webkit.org>.
1521
1522         * CMakeLists.txt: Add CustomProtocolManagerProxy.messages.in.
1523         * DerivedSources.pri: Add CustomProtocolManagerProxy.messages.in.
1524         * GNUmakefile.am: Add CustomProtocolManagerProxy.messages.in.
1525         * GNUmakefile.list.am: Add CustomProtocolManagerProxyMessages.h and CustomProtocolManagerProxyMessageReceiver.cpp.
1526         * NetworkProcess/NetworkProcess.cpp: Add the missing ENABLE(CUSTOM_PROTOCOLS) guard.
1527         (WebKit::NetworkProcess::NetworkProcess):
1528         * UIProcess/WebProcessProxy.cpp: Remove the unnecessary conditional include.
1529
1530 2013-09-17  Gustavo Noronha Silva  <gns@gnome.org>
1531
1532         [GTK] Test /webkit2/WebKitWebInspectorServer/test-open-debugging-session times out after r155714
1533         https://bugs.webkit.org/show_bug.cgi?id=121383
1534
1535         Reviewed by Carlos Garcia Campos.
1536
1537         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
1538         (openRemoteDebuggingSession): use the page contents' to check the remote debugging of the page
1539         has been successfuly opened, as the title is no longer the same after the switch to the new
1540         frontend.
1541
1542 2013-09-16  Enrica Casucci  <enrica@apple.com>
1543
1544         Remove unused function didSetSelectionTypesForPasteboard from EditorClient.
1545         https://bugs.webkit.org/show_bug.cgi?id=121464
1546
1547         Reviewed by Darin Adler.
1548
1549         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1550         * WebProcess/WebCoreSupport/WebEditorClient.h:
1551
1552 2013-09-17  Csaba Osztrogonác  <ossy@webkit.org>
1553
1554         Buildfix for !(ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)) platforms
1555         https://bugs.webkit.org/show_bug.cgi?id=121491
1556
1557         Reviewed by Darin Adler.
1558
1559         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1560         (WebKit::WebResourceLoadScheduler::scheduleLoad):
1561
1562 2013-09-17  Alberto Garcia  <berto@igalia.com>
1563
1564         [GTK] Unreviewed make distcheck fix.
1565
1566         * GNUmakefile.am: include WebProcess/Network/*.in in the tarball,
1567         it's needed for generating WebResourceLoaderMessage*.{cpp,h}.
1568
1569 2013-09-17  Csaba Osztrogonác  <ossy@webkit.org>
1570
1571         [GTK][EFL] Add ResourceError::internalError() after r138387
1572         https://bugs.webkit.org/show_bug.cgi?id=121433
1573
1574         Reviewed by Christophe Dumez.
1575
1576         Original patch by Balazs Kelemen <kbalazs@webkit.org>
1577         and Kwang Yul Seo <skyul@company100.net>
1578
1579         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
1580         (WebKit::internalError):
1581         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
1582         (WebKit::internalError):
1583
1584 2013-09-17  Gabor Abraham  <abrhm@inf.u-szeged.hu>
1585
1586         Fix Qt WK2 build after r155888
1587         https://bugs.webkit.org/show_bug.cgi?id=121471
1588
1589         Reviewed by Csaba Osztrogonác.
1590
1591         * UIProcess/API/qt/qquickwebview.cpp:
1592         (QQuickWebViewPrivate::createDrawingAreaProxy):
1593         * UIProcess/API/qt/qquickwebview_p_p.h:
1594         * UIProcess/API/qt/raw/qrawwebview.cpp:
1595         (QRawWebViewPrivate::createDrawingAreaProxy):
1596         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
1597         * UIProcess/qt/QtPageClient.cpp:
1598         (WebKit::QtPageClient::createDrawingAreaProxy):
1599         * UIProcess/qt/QtPageClient.h:
1600
1601 2013-09-17  Csaba Osztrogonác  <ossy@webkit.org>
1602
1603         [GTK][EFL] Add NetworkProcess support for ProcessLauncher
1604         https://bugs.webkit.org/show_bug.cgi?id=121434
1605
1606         Reviewed by Sam Weinig.
1607
1608         Original patch by Balazs Kelemen <kbalazs@webkit.org>
1609         and Kwang Yul Seo <skyul@company100.net>
1610
1611         * Shared/ProcessExecutablePath.h:
1612         * Shared/efl/ProcessExecutablePathEfl.cpp:
1613         (WebKit::executablePathOfNetworkProcess):
1614         * Shared/gtk/ProcessExecutablePathGtk.cpp:
1615         (WebKit::executablePathOfNetworkProcess):
1616         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1617         (WebKit::ProcessLauncher::launchProcess):
1618         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1619         (WebKit::ProcessLauncher::launchProcess):
1620
1621 2013-09-17  Csaba Osztrogonác  <ossy@webkit.org>
1622
1623         Buildfix for !USE(PROTECTION_SPACE_AUTH_CALLBACK) platforms
1624         https://bugs.webkit.org/show_bug.cgi?id=121431
1625
1626         Reviewed by Alexey Proskuryakov.
1627
1628         Mising guards added.
1629
1630         Original patch by Balazs Kelemen <kbalazs@webkit.org>
1631         and Kwang Yul Seo <skyul@company100.net>
1632
1633         * NetworkProcess/NetworkResourceLoader.messages.in:
1634         * WebProcess/Network/WebResourceLoader.cpp:
1635         * WebProcess/Network/WebResourceLoader.h:
1636         * WebProcess/Network/WebResourceLoader.messages.in:
1637
1638 2013-09-17  Csaba Osztrogonác  <ossy@webkit.org>
1639
1640         WebResourceLoader.messages.in should be ENABLE(NETWORK_PROCESS) guarded
1641         https://bugs.webkit.org/show_bug.cgi?id=121424
1642
1643         Reviewed by Alexey Proskuryakov.
1644
1645         Original patch by Balazs Kelemen <kbalazs@webkit.org>.
1646
1647         * CMakeLists.txt:
1648         * DerivedSources.pri:
1649         * GNUmakefile.am:
1650         * GNUmakefile.list.am:
1651         * WebProcess/Network/WebResourceLoader.messages.in: ENABLE(NETWORK_PROCESS) guard added.
1652
1653 2013-09-16  Manuel Rego Casasnovas  <rego@igalia.com>
1654
1655         Unreviewed, fixing the GTK WK2 debug build after r155911.
1656
1657         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: Add missing using
1658         namespace WebCore.
1659
1660 2013-09-16  Sergio Correia  <sergio.correia@openbossa.org>
1661
1662         Fix EFL build after r155888
1663         https://bugs.webkit.org/show_bug.cgi?id=121465
1664
1665         Reviewed by Gyuyoung Kim.
1666
1667         Update WebView to follow the changes in PageClient in r155888.
1668
1669         * UIProcess/CoordinatedGraphics/WebView.cpp:
1670         (WebKit::WebView::createDrawingAreaProxy): Use createOwned (addded in
1671         r155407) to return the DrawingAreaProxy from DrawingAreaProxyImpl.
1672         * UIProcess/CoordinatedGraphics/WebView.h: Update createDrawingAreaProxy()
1673         signature to match PageClient.h.
1674
1675 2013-09-16  Gustavo Noronha Silva  <gns@gnome.org>
1676
1677         [GTK] Make symbol export filter more strict, and disable for dev/test builds
1678         https://bugs.webkit.org/show_bug.cgi?id=120586
1679
1680         Reviewed by Martin Robinson.
1681
1682         * GNUmakefile.am: only use the version script if developer mode is disabled.
1683
1684 2013-09-16  Gustavo Noronha Silva  <gns@gnome.org>
1685
1686         Unreviewed build fix after 155905.
1687
1688         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
1689         (CoreIPC::Connection::sendOutgoingMessage): use OwnPtr instead of PassOwnPtr.
1690
1691 2013-09-16  Joseph Pecoraro  <pecoraro@apple.com>
1692
1693         Add RunLoop::isMain and use it in WebKit2
1694         https://bugs.webkit.org/show_bug.cgi?id=121459
1695
1696         Reviewed by Anders Carlsson.
1697
1698         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
1699         (getIconSurfaceSynchronously):
1700         (iconDataReadyForPageURLCallback):
1701         (webkit_favicon_database_get_favicon_uri):
1702         * UIProcess/API/mac/WKPrintingView.mm:
1703         (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
1704         (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]):
1705         (pageDidDrawToImage):
1706         (pageDidDrawToPDF):
1707         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
1708         (pageDidComputePageRects):
1709         (-[WKPrintingView _askPageToComputePageRects]):
1710         (prepareDataForPrintingOnSecondaryThread):
1711         (-[WKPrintingView knowsPageRange:]):
1712         (-[WKPrintingView _drawPreview:]):
1713         (-[WKPrintingView drawRect:]):
1714         (-[WKPrintingView _drawPageBorderWithSizeOnMainThread:]):
1715         (-[WKPrintingView drawPageBorderWithSize:]):
1716         * UIProcess/WebProcessProxy.cpp:
1717         (WebKit::globalPageMap):
1718
1719 2013-09-16  Anders Carlsson  <andersca@apple.com>
1720
1721         Replace more uses of PassOwnPtr with OwnPtr in WebKit2
1722         https://bugs.webkit.org/show_bug.cgi?id=121453
1723
1724         Reviewed by Sam Weinig.
1725
1726         * Platform/CoreIPC/Connection.cpp:
1727         (CoreIPC::Connection::SecondaryThreadPendingSyncReply::SecondaryThreadPendingSyncReply):
1728         (CoreIPC::Connection::createSyncMessageEncoder):
1729         (CoreIPC::Connection::sendMessage):
1730         (CoreIPC::Connection::sendSyncReply):
1731         (CoreIPC::Connection::waitForMessage):
1732         (CoreIPC::Connection::sendSyncMessage):
1733         (CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
1734         (CoreIPC::Connection::waitForSyncReply):
1735         (CoreIPC::Connection::processIncomingSyncReply):
1736         (CoreIPC::Connection::processIncomingMessage):
1737         (CoreIPC::Connection::enqueueIncomingMessage):
1738         (CoreIPC::Connection::dispatchMessage):
1739         * Platform/CoreIPC/Connection.h:
1740         (CoreIPC::Connection::PendingSyncReply::PendingSyncReply):
1741         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1742         (CoreIPC::Connection::sendOutgoingMessage):
1743
1744 2013-09-16  Zan Dobersek  <zdobersek@igalia.com>
1745
1746         Unreviewed, fixing the GTK WK2 build after r155888.
1747
1748         * UIProcess/API/gtk/PageClientImpl.cpp:
1749         (WebKit::PageClientImpl::createDrawingAreaProxy):
1750         * UIProcess/API/gtk/PageClientImpl.h:
1751
1752 2013-09-16  Anders Carlsson  <andersca@apple.com>
1753
1754         Remove some uses of PassOwnPtr in WebKit2
1755         https://bugs.webkit.org/show_bug.cgi?id=121443
1756
1757         Reviewed by Andreas Kling.
1758
1759         * Scripts/webkit2/messages.py:
1760         (message_to_struct_declaration):
1761         (generate_message_handler):
1762         * Scripts/webkit2/messages_unittest.py:
1763         * UIProcess/API/mac/FindIndicatorWindow.h:
1764         * UIProcess/API/mac/FindIndicatorWindow.mm:
1765         * UIProcess/API/mac/PageClientImpl.h:
1766         * UIProcess/API/mac/PageClientImpl.mm:
1767         (WebKit::PageClientImpl::createDrawingAreaProxy):
1768         * UIProcess/API/mac/WKView.mm:
1769         (-[WKView WebKit::]):
1770         (-[WKView _setFindIndicator:fadeOut:animate:]):
1771         * UIProcess/API/mac/WKViewInternal.h:
1772         * UIProcess/DrawingAreaProxyImpl.cpp:
1773         * UIProcess/DrawingAreaProxyImpl.h:
1774         * UIProcess/PageClient.h:
1775         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1776         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1777         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
1778         (PageOverlayClientImpl::PageOverlayClientImpl):
1779         (WKBundlePageOverlayCreate):
1780         * WebProcess/Plugins/PluginView.cpp:
1781         (WebKit::PluginView::createWebEvent):
1782         * WebProcess/Plugins/PluginView.h:
1783
1784 2013-09-16  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
1785
1786         Web Inspector: Do not try to parse incomplete HTTP requests
1787         https://bugs.webkit.org/show_bug.cgi?id=121123
1788
1789         Reviewed by Carlos Garcia Campos.
1790
1791         Update to incorporate additional review suggestions.
1792
1793         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
1794         (sendIncompleteRequest):
1795         Fix memory leaks, change test timeout from 2 seconds to 1 second,
1796         use "0" instead of "NULL" and use g_assert_no_error when checking
1797         for GError.
1798
1799 2013-09-16  Eunmi Lee  <eunmi15.lee@samsung.com>
1800
1801         [EFL][WK2] Implement pan and flick gesture.
1802         https://bugs.webkit.org/show_bug.cgi?id=107101
1803
1804         Reviewed by Gyuyoung Kim.
1805
1806         Implement pan gesture to scroll page by movement of point and stop
1807         scrolling smoothly using ease-in-out-quad algorithm after touched
1808         point is removed from the screen.
1809
1810         Use Ecore_Animator in order to process movement once per each framing
1811         time slot instead of processing all movement.
1812
1813         * PlatformEfl.cmake:
1814         * UIProcess/API/efl/EwkView.cpp:
1815         (EwkView::scrollBy):
1816         * UIProcess/API/efl/EwkView.h:
1817         * UIProcess/API/efl/GestureRecognizer.cpp:
1818         (WebKit::GestureHandler::view):
1819         (WebKit::GestureHandler::GestureHandler):
1820         (WebKit::GestureHandler::~GestureHandler):
1821         (WebKit::GestureHandler::reset):
1822         (WebKit::GestureHandler::panAnimatorCallback):
1823         (WebKit::GestureHandler::handlePanStarted):
1824         (WebKit::GestureHandler::handlePan):
1825         (WebKit::GestureHandler::handlePanFinished):
1826         (WebKit::GestureHandler::flickAnimatorCallback):
1827         (WebKit::GestureHandler::handleFlick):
1828         (WebKit::GestureRecognizer::noGesture):
1829         (WebKit::GestureRecognizer::reset):
1830         * UIProcess/efl/EasingCurves.cpp: Added.
1831         (WebKit::easeInOutQuad):
1832         * UIProcess/efl/EasingCurves.h: Added.
1833
1834 2013-09-16  Wojciech Bielawski  <w.bielawski@samsung.com>
1835
1836         [WKTR] WebKitTestRunner's eventSender.contextClick() returns objects without implemented click() method.
1837         https://bugs.webkit.org/show_bug.cgi?id=98410
1838
1839         Reviewed by Darin Adler.
1840
1841         Add API required to implement click() method for context menu entry, used by WebkitTestRunner::EventSender.
1842
1843         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1844         (WKBundlePageClickMenuItem):
1845         (WKBundlePageCopyContextMenuItemTitle):
1846         (WKBundlePageGetContextMenuItems):
1847         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1848
1849 2013-09-15  Gustavo Noronha Silva  <gns@gnome.org>
1850
1851         Unreviewed make distcheck fix.
1852
1853         * GNUmakefile.list.am:
1854
1855 2013-09-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1856
1857         [GTK] The web inspector is not rendered when docked in WebKit2 when AC is used
1858         https://bugs.webkit.org/show_bug.cgi?id=121381
1859
1860         Reviewed by Martin Robinson.
1861
1862         When accelerated compositing results are rendered we return early
1863         from webkitWebViewBaseDraw and other WebView children are not
1864         drawn. We need to chain up the draw signal handler, so that the
1865         GtkContainer propagates the draw to all its children.
1866
1867         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1868         (webkitWebViewBaseDraw):
1869
1870 2013-09-14  Dan Bernstein  <mitz@apple.com>
1871
1872         Remove non-Apple cruft from the installed WKBase.h
1873         https://bugs.webkit.org/show_bug.cgi?id=121370
1874
1875         Reviewed by Darin Adler.
1876
1877         * Configurations/WebKit2.xcconfig: Set INSTALLHDRS_SCRIPT_PHASE to YES.
1878         * WebKit2.xcodeproj/project.pbxproj: Added a script build phase that runs unifdef on
1879         the installed WKBase.h with __APPLE__ defined and various BUILDING_* and WTF_USE_* symbols
1880         undefined.
1881
1882 2013-09-14  Dan Bernstein  <mitz@apple.com>
1883
1884         Build fix after r155770.
1885
1886         * UIProcess/API/mac/WKViewPrivate.h: Added WKBase.h import.
1887
1888 2013-09-14  Dan Bernstein  <mitz@apple.com>
1889
1890         [mac] Public header WKBase.h imports a private header, WKBaseMac.h
1891         https://bugs.webkit.org/show_bug.cgi?id=121216
1892
1893         Reviewed by Darin Adler.
1894
1895         * Shared/API/c/WKBase.h: Moved definitions of enums and WK_EXPORT and WK_INLINE macros
1896         out of this files.
1897         * Shared/API/c/WKDeclarationSpecifiers.h: Copied from Source/WebKit2/Shared/API/c/WKBase.h.
1898         Contains definitions of WK_EXPORT and WK_INLINE.
1899         * Shared/API/c/WKSharedAPICast.h: Added #includes.
1900         * Shared/API/c/WKUserContentInjectedFrames.h: Copied from Source/WebKit2/Shared/API/c/WKBase.h.
1901         Contains enum definition.
1902         * Shared/API/c/WKUserScriptInjectionTime.h: Copied from Source/WebKit2/Shared/API/c/WKBase.h.
1903         Contains enum definition.
1904         * UIProcess/API/C/WKPageGroup.h: Added #includes.
1905         * UIProcess/API/mac/WKBrowsingContextController.h: Removed WKBase.h import from this public
1906         header, replacing it with WKDeclarationSpecifiers.h import.
1907         * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h: Added WKBase.h import.
1908         * UIProcess/API/mac/WKBrowsingContextGroup.h: Removed WKBase.h import from this public
1909         header, added necessary public imports.
1910         * UIProcess/API/mac/WKBrowsingContextGroupPrivate.h: Added WKBase.h import.
1911         * UIProcess/API/mac/WKBrowsingContextLoadDelegate.h: Removed WKBase.h import from public
1912         header.
1913         * UIProcess/API/mac/WKConnection.h: Ditto. Added WKDeclarationSpecifiers.h import.
1914         * UIProcess/API/mac/WKConnectionInternal.h: Added WKBase.h import.
1915         * UIProcess/API/mac/WKProcessGroup.h: Removed WKBase.h import from public header, added
1916         WKDeclarationSpecifiers.h import.
1917         * UIProcess/API/mac/WKProcessGroupPrivate.h: Added WKBase.h import.
1918         * UIProcess/API/mac/WKView.h: Removed WKBase.h import from public header, added
1919         WKDeclarationSpecifiers.h import.
1920         * WebKit2.xcodeproj/project.pbxproj: Added new public header files, made WKBase.h private.
1921         * WebProcess/InjectedBundle/API/mac/WKDOMNode.h: Removed WKBase.h import from public header,
1922         added WKDeclarationSpecifiers.h import.
1923         * WebProcess/InjectedBundle/API/mac/WKDOMNodePrivate.h: Added WKBase.h import.
1924         * WebProcess/InjectedBundle/API/mac/WKDOMRange.h: Removed WKBase.h import from public
1925         header, added WKDeclarationSpecifiers.h import.
1926         * WebProcess/InjectedBundle/API/mac/WKDOMRangePrivate.h: Added WKBase.h import.
1927         * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h: Removed WKBase.h import from public
1928         header, added WKDeclarationSpecifiers.h import.
1929         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h: Ditto.
1930         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerInternal.h:
1931         Added WKBase.h import.
1932
1933 2013-09-14  Alberto Garcia  <berto@igalia.com>
1934
1935         [GTK] WebKitGTK+ is linking against libxslt in too many places
1936         https://bugs.webkit.org/show_bug.cgi?id=121356
1937
1938         Reviewed by Martin Robinson.
1939
1940         Don't use LIBXSLT_CFLAGS when compiling libWebCoreGtk2, no source
1941         files use libxslt there.
1942
1943         * GNUmakefile.am:
1944
1945 2013-09-13  Ryuan Choi  <ryuan.choi@samsung.com>
1946
1947         Unreviewed build fix attempt for WK2 build.
1948
1949         * WebProcess/Plugins/PluginView.cpp: Changed ScriptState to ExecState.
1950         (WebKit::PluginView::performJavaScriptURLRequest):
1951
1952 2013-09-13  Anders Carlsson  <andersca@apple.com>
1953
1954         Use nullptr instead of 0 in calls to HashMap::add
1955         https://bugs.webkit.org/show_bug.cgi?id=121322
1956
1957         Reviewed by Sam Weinig.
1958
1959         * Platform/CoreIPC/Connection.cpp:
1960         (CoreIPC::Connection::SyncMessageState::getOrCreate):
1961         * UIProcess/Storage/StorageManager.cpp:
1962         (WebKit::StorageManager::createLocalStorageMap):
1963         (WebKit::StorageManager::createSessionStorageMap):
1964         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
1965         * UIProcess/WebProcessProxy.cpp:
1966         (WebKit::WebProcessProxy::addBackForwardItem):
1967         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1968         (WebKit::InjectedBundleNodeHandle::getOrCreate):
1969         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1970         (WebKit::InjectedBundleRangeHandle::getOrCreate):
1971         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1972         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
1973         * WebProcess/WebProcess.cpp:
1974         (WebKit::WebProcess::createWebPage):
1975         (WebKit::WebProcess::webPageGroup):
1976
1977 2013-09-13  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1978
1979         [GTK] Move to the new web inspector
1980         https://bugs.webkit.org/show_bug.cgi?id=120647
1981
1982         Reviewed by Carlos Garcia Campos.
1983
1984         * GNUmakefile.am: bundle the remote inspector page list HTML into libwebkit2gtk as a GResource.
1985         * UIProcess/API/gtk/tests/GNUmakefile.am: no need to set WEBKIT_INSPECTOR_PATH anymore.
1986         * UIProcess/API/gtk/tests/InspectorTestServer.cpp:
1987         (main): ditto.
1988         * UIProcess/API/gtk/tests/TestInspector.cpp:
1989         (beforeAll): ditto.
1990         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
1991         (testInspectorServerPageList): update paths to the internal resource ones.
1992         * UIProcess/InspectorServer/WebInspectorServer.h:
1993         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
1994         (WebKit::WebInspectorServer::platformResourceForPath): ditto.
1995         (WebKit::WebInspectorServer::buildPageList): ditto.
1996         * UIProcess/WebInspectorProxy.cpp:
1997         (WebKit::isMainInspectorPage): factor out checking for the inspector main resource, to make
1998         the code more readable.
1999         (WebKit::decidePolicyForNavigationAction): use SchemeRegistry to figure out whether the
2000         request is for a local resource instead of KURL::isLocalFile() to allow using schemes
2001         other than file:// for the inspector resources.
2002         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2003         (WebKit::WebInspectorProxy::inspectorPageURL): use the new internal resource URL; since it's now
2004         static we no longer need to generate and store the string.
2005         (WebKit::WebInspectorProxy::inspectorBaseURL): ditto.
2006         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
2007         (WebKit::WebInspector::localizedStringsURL): use the new internal resource URL.
2008         * UIProcess/gtk/WebContextGtk.cpp:
2009         (WebKit::WebContext::platformInitializeWebProcess): register resource as a local scheme.
2010
2011 2013-09-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2012
2013         Fix build with namespaced Qt.
2014
2015         Unreviewed build fix.
2016
2017         One forward declaration of QUrl was missing proper namespace macros.
2018
2019         * UIProcess/API/qt/qquickurlschemedelegate_p.h:
2020
2021 2013-09-12  Simon Fraser  <simon.fraser@apple.com>
2022
2023         Avoid extra scrollbar-related layouts for overlay scrollbars
2024         https://bugs.webkit.org/show_bug.cgi?id=121267
2025
2026         Reviewed by Beth Dakin.
2027         
2028         view->resize() will call setNeedsLayout() if necessary, and may already have
2029         done layout, so the extra setNeedsLayout() here was bad.
2030
2031         * WebProcess/WebPage/WebPage.cpp:
2032         (WebKit::WebPage::setSize):
2033
2034 2013-09-12  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
2035
2036         Web Inspector: Do not try to parse incomplete HTTP requests
2037         https://bugs.webkit.org/show_bug.cgi?id=121123
2038
2039         Reviewed by Darin Adler.
2040
2041         When working on a patch for bug #121121 I found an issue with the InspectorServer where it would try
2042         to parse an HTTP message before receiving the full message and thus fail connecting with the
2043         chromedevtools plugin.
2044
2045         What happens is that the WebSocketServerConnection receives buffers on
2046         WebSocketServerConnection::didReceiveSocketStreamData and calls
2047         WebSocketServerConnection::readHTTPMessage which then checks if we have a valid request by calling
2048         HTTPRequest::parseHTTPRequestFromBuffer. If the request is valid it tries to parse the message and
2049         clears the buffer, otherwise it continues adding data to the internal buffer until we have a valid
2050         request.
2051
2052         The problem is that currently HTTPRequest::parseHTTPRequestFromBuffer considers the request as valid
2053         before receiving the full message. To solve this we should make the method check if the request
2054         headers end with a blank line otherwise we consider the request as invalid (see also
2055         http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html).
2056
2057         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
2058         (sendIncompleteRequest):
2059         (beforeAll):
2060         Add GTK specific test to check if the inspector server replies to incomplete requests.
2061         * UIProcess/InspectorServer/HTTPRequest.cpp:
2062         (WebKit::HTTPRequest::parseHeaders):
2063         Do not consider request valid if headers didn't end with a blank line.
2064
2065 2013-09-12  Anders Carlsson  <andersca@apple.com>
2066
2067         SharedBuffer::createNSData should return a RetainPtr<NSData>
2068         https://bugs.webkit.org/show_bug.cgi?id=121237
2069
2070         Reviewed by Darin Adler.
2071
2072         Update for WebCore changes.
2073
2074         * UIProcess/API/mac/WKView.mm:
2075         (-[WKView writeSelectionToPasteboard:types:]):
2076         (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
2077         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
2078
2079 2013-09-12  Anders Carlsson  <andersca@apple.com>
2080
2081         SharedBuffer::createCFData should return RetainPtr<CFDataRef>
2082         https://bugs.webkit.org/show_bug.cgi?id=121230
2083
2084         Reviewed by Darin Adler.
2085
2086         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2087         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2088         * Shared/WebArchiveResource.cpp:
2089         (WebKit::WebArchiveResource::data):
2090
2091 2013-09-12  Zalan Bujtas  <zalan@apple.com>
2092
2093         REGRESSION: Inline PDF that are cached fail to appear in iframe.
2094         https://bugs.webkit.org/show_bug.cgi?id=75449
2095
2096         Reviewed by Darin Adler.
2097
2098         Make sure 'frame is from page cache' flag is set for subframes too.
2099
2100         WebFrameLoaderClient::m_frameCameFromPageCache == true forces plugins
2101         to be loaded manually. It ensures that the plugin raw data is fetched again
2102         while the containing frame is being restored from the page cache.
2103         (Plugins get destroyed when the frame goes to page cache.)
2104
2105         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2106         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
2107         This gets called only on the frame where the actual history navigation happens.
2108         (WebKit::WebFrameLoaderClient::didRestoreFromPageCache):
2109         This gets called for all the restored frames.
2110
2111 2013-09-11  Simon Fraser  <simon.fraser@apple.com>
2112
2113         Make sure that layout is up-to-date when moving a WKView into a window, to avoid !needsLayout() assertions in RenderView::paint()
2114         https://bugs.webkit.org/show_bug.cgi?id=121196
2115
2116         Reviewed by Tim Horton.
2117         
2118         When a WKView was moved into a window, it was possible for us to paint
2119         without ensuring that layout is up-to-date. Fix this by having
2120         WebPage::setIsInWindow() update layout if we are moving to a window.
2121
2122         * WebProcess/WebPage/WebPage.cpp:
2123         (WebKit::WebPage::setIsInWindow):
2124
2125 2013-09-11  Mario Sanchez Prada  <mario.prada@samsung.com>
2126
2127         [GTK] Remove Gail dependency from build system for GTK3
2128         https://bugs.webkit.org/show_bug.cgi?id=119673
2129
2130         Reviewed by Gustavo Noronha Silva.
2131
2132         * GNUmakefile.am: Removed GAIL_LIBS.
2133
2134 2013-09-11  Alberto Garcia  <berto@igalia.com>
2135
2136         [WK2] [GTK] LayerTreeHostGtk: don't set m_isValid to false if glContext() returns null
2137         https://bugs.webkit.org/show_bug.cgi?id=120892
2138
2139         Reviewed by Martin Robinson.
2140
2141         If the GL context cannot be created then m_isValid is set to false
2142         during the initialization of LayerTreeHostGtk.
2143
2144         This is not really necessary since the rest of the code already
2145         deals with that situation, so it doesn't have any effect other
2146         than breaking the assertion in invalidate().
2147
2148         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2149         (WebKit::LayerTreeHostGtk::initialize):
2150
2151 2013-09-11  Commit Queue  <commit-queue@webkit.org>
2152
2153         Unreviewed, rolling out r154899.
2154         http://trac.webkit.org/changeset/154899
2155         https://bugs.webkit.org/show_bug.cgi?id=121162
2156
2157         It didn't fix the problem and broke other unit tests
2158         (Requested by KaL on #webkit).
2159
2160         * UIProcess/API/gtk/tests/WebViewTest.cpp:
2161         (WebViewTest::resizeView):
2162
2163 2013-09-11  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2164
2165         WTF::OwnPtr should behave similarly with the rest of WTF smart pointers
2166         https://bugs.webkit.org/show_bug.cgi?id=120773
2167
2168         Reviewed by Anders Carlsson.
2169
2170         Before the change OwnPtr could take either the pointer type or the pointed-to type, which was bad
2171         for the following reasons:
2172         - It distinguished OwnPtr behaviour from other WTF smart pointer classes behaviour (so it was confusing for the Client).
2173         - It was potential error-prone as it actually modified the type given by the Client in opaque way.
2174
2175         * UIProcess/API/efl/ewk_database_manager.cpp:
2176         (getDatabaseOriginsCallback):
2177         * UIProcess/API/efl/ewk_storage_manager.cpp:
2178         (getStorageOriginsCallback):
2179
2180 2013-09-11  ChangSeok Oh  <changseok.oh@collabora.com>
2181
2182         Unreviewed build fix.
2183
2184         * GNUmakefile.list.am: Duplicated NetscapePluginModuleNone.cpp & NetscapePluginNone.cpp.
2185         They cause build breaks of multiple definitions when targeting wayland build.
2186
2187 2013-09-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2188
2189         Generate more HTML type checks and casting
2190         https://bugs.webkit.org/show_bug.cgi?id=121080
2191
2192         Reviewed by Andreas Kling.
2193
2194         Clean-up remained functions of HTML elements using auto-generated isFooElement(),
2195         and replace toFooElement() with ELEMENT_TYPE_CASTS() macro.
2196
2197         Besides this patch clean-up unnecessary checks which are being supported by
2198         auto-generated isFooElement().
2199
2200         * WebProcess/WebPage/WebFrame.cpp:
2201         (WebKit::WebFrame::containsAnyFormControls):
2202
2203 2013-09-10  Marcelo Morais  <m.morais@samsung.com>
2204
2205         [EFL] WebInspector: Move to new webinspector
2206         https://bugs.webkit.org/show_bug.cgi?id=119559
2207
2208         Reviewed by Gyuyoung Kim.
2209
2210         Loading the new Web Inspector page instead of the old inspector.
2211         Co-Author: Andre Loureiro <andre.vl@samsung.com>
2212
2213         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2214         (WebKit::WebInspectorProxy::inspectorPageURL):
2215
2216 2013-09-10  Sergio Villar Senin  <svillar@igalia.com>
2217
2218         [WK2][GTK] Frequent crashes when showing context menus in Debug builds
2219         https://bugs.webkit.org/show_bug.cgi?id=121099
2220
2221         Reviewed by Carlos Garcia Campos.
2222
2223         Disconnect signal handlers when destroying the context menu proxy
2224         object. This avoids use-after-free crashes when opening several
2225         context menus in a row.
2226
2227         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2228         (WebKit::WebContextMenuProxyGtk::append):
2229         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
2230         * UIProcess/gtk/WebContextMenuProxyGtk.h:
2231
2232 2013-09-10  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2233
2234         [Qt] make use of qtHaveModule() 
2235         https://bugs.webkit.org/show_bug.cgi?id=121090
2236
2237         Reviewed by Jocelyn Turcotte.
2238         Patch by Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2239
2240         Use qtHaveModule instead of our own haveQtModule.
2241
2242         * WebProcess.pro:
2243
2244 2013-09-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2245
2246         [GTK] /webkit2/WebKitWebView/default-menu fails when GtkSettings:gtk-show-input-method-menu is disabled
2247         https://bugs.webkit.org/show_bug.cgi?id=121088
2248
2249         Reviewed by Xan Lopez.
2250
2251         * UIProcess/API/gtk/tests/TestContextMenu.cpp: Always check
2252         Unicode submenu is present in default context menu for editable
2253         content.
2254
2255 2013-09-09  Dean Jackson  <dino@apple.com>
2256
2257         [WebGL] Allow multithreaded OpenGL contexts
2258         https://bugs.webkit.org/show_bug.cgi?id=121062
2259
2260         Reviewed by Simon Fraser.
2261
2262         Expose a new preference "multithreadedWebGLEnabled".
2263
2264         * Shared/WebPreferencesStore.h:
2265         * UIProcess/API/C/WKPreferences.cpp:
2266         (WKPreferencesSetMultithreadedWebGLEnabled):
2267         (WKPreferencesGetMultithreadedWebGLEnabled):
2268         * UIProcess/API/C/WKPreferencesPrivate.h:
2269         * WebProcess/WebPage/WebPage.cpp:
2270         (WebKit::WebPage::updatePreferences):
2271         * mac/WebKit2.order:
2272
2273 2013-09-09  Dean Jackson  <dino@apple.com>
2274
2275         Enable WebGL for OS X nightlies
2276         https://bugs.webkit.org/show_bug.cgi?id=121040
2277
2278         Reviewed by Beth Dakin.
2279
2280         * Shared/WebPreferencesStore.h: Set initial value to true.
2281
2282 2013-09-08  Anders Carlsson  <andersca@apple.com>
2283
2284         Begin moving off of TypeTraits.h
2285         https://bugs.webkit.org/show_bug.cgi?id=121006
2286
2287         Reviewed by Darin Adler.
2288
2289         Convert uses of WTF type traits to STL type traits.
2290
2291         * Platform/CoreIPC/ArgumentCoder.h:
2292         * Platform/CoreIPC/ArgumentCoders.h:
2293         * Platform/CoreIPC/ArgumentDecoder.h:
2294         * Platform/CoreIPC/ArgumentEncoder.h:
2295         * Platform/CoreIPC/Arguments.h:
2296         * Shared/API/c/WKSharedAPICast.h:
2297         (WebKit::toImpl):
2298
2299 2013-09-09  Gustavo Noronha Silva  <gns@gnome.org>
2300
2301         Unreviewed build fix.
2302
2303         * GNUmakefile.list.am: Typo - left-over \ from a copy/paste, most likely.
2304
2305 2013-09-09  Anton Obzhirov  <a.obzhirov@samsung.com>
2306
2307         [GTK] Cancel the current active WebKitAuthenticationRequest on load failed
2308         https://bugs.webkit.org/show_bug.cgi?id=120350
2309
2310         Reviewed by Carlos Garcia Campos.
2311
2312         The default dialog does not get closed and the authentication is not cancelled
2313         if loading fails or is stopped on a page which requires HTTP authentication.
2314
2315         This patch cancels the authentication request on load failed
2316         and adds new authentication cancelled signal in WebKitAuthenticationRequest
2317         to allow the application handling of authentication UI.
2318
2319         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
2320         (authenticationCancelled):
2321         (webkitAuthenticationDialogInitialize):
2322         (webkitAuthenticationDialogDispose):
2323         (webkitAuthenticationDialogNew):
2324         * UIProcess/API/gtk/WebKitAuthenticationDialog.h:
2325         * UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
2326         (webkit_authentication_request_class_init):
2327         (webkit_authentication_request_cancel):
2328         * UIProcess/API/gtk/WebKitWebView.cpp:
2329         (webkitWebViewAuthenticate):
2330         (webkitWebViewLoadFailed):
2331         (webkitWebViewHandleAuthenticationChallenge):
2332         (webkitWebViewCancelAuthenticationRequest):
2333         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2334         (testWebViewAuthenticationLoadCancelled):
2335         (beforeAll):
2336
2337 2013-09-09  Brian Holt  <brian.holt@samsung.com>
2338
2339         [GTK][WK2] Update ContextMenu Download API
2340         https://bugs.webkit.org/show_bug.cgi?id=120763
2341
2342         Reviewed by Carlos Garcia Campos.
2343
2344         Mark the new Download items in the Context Menu with the Since
2345         tag, and include a unit test for Context Menu audio.
2346
2347         * UIProcess/API/gtk/WebKitContextMenuActions.h:
2348         * UIProcess/API/gtk/tests/TestContextMenu.cpp:
2349         (testContextMenuDefaultMenu):
2350
2351 2013-09-08  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2352
2353         [wk2] REGRESSION (r154673): PDF scrolling moves very slowly
2354         https://bugs.webkit.org/show_bug.cgi?id=120542
2355
2356         Reviewed by Tim Horton.
2357
2358         Handle 'wheel' events in addition to 'mousewheel'. This fixes
2359         PDF scrolling.
2360
2361         * WebProcess/Plugins/PluginView.cpp:
2362         (WebKit::PluginView::handleEvent):
2363
2364 2013-09-08  Anders Carlsson  <andersca@apple.com>
2365
2366         Move WTF::notFound to Vector.h and delete NotFound.h
2367         https://bugs.webkit.org/show_bug.cgi?id=120990
2368
2369         Reviewed by Sam Weinig.
2370
2371         * Shared/EditorState.h:
2372
2373 2013-09-07  Anders Carlsson  <andersca@apple.com>
2374
2375         Get rid of PassOwnArrayPtr
2376         https://bugs.webkit.org/show_bug.cgi?id=120964
2377
2378         Reviewed by Andreas Kling.
2379
2380         Remove unneeded includes.
2381
2382         * Shared/ImmutableArray.h:
2383         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2384
2385 2013-09-06  Ryosuke Niwa  <rniwa@webkit.org>
2386
2387         Range::ownerDocument should return Document&
2388         https://bugs.webkit.org/show_bug.cgi?id=120908
2389
2390         Reviewed by Andreas Kling.
2391
2392         * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
2393         (-[WKDOMRange textRects]):
2394
2395 2013-09-05  Ryuan Choi  <ryuan.choi@samsung.com>
2396
2397         [CMAKE] Add c++0x into CXX_FLAGS as a default
2398         https://bugs.webkit.org/show_bug.cgi?id=120812
2399
2400         Unreviewed build fix for EFL ports.
2401
2402         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: Added constexpr for in-class initialization.
2403         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: Added space between strings.
2404         (EWK2UnitTest::EWK2UnitTestEnvironment::defaultTestPageUrl):
2405         (EWK2UnitTest::EWK2UnitTestEnvironment::defaultTheme):
2406         (EWK2UnitTest::EWK2UnitTestEnvironment::urlForResource):
2407
2408 2013-09-05  Alexey Proskuryakov  <ap@apple.com>
2409
2410         WKFullScreenWindowController extends lifetime of WKView, deleting it at a wrong time
2411         https://bugs.webkit.org/show_bug.cgi?id=120792
2412         <rdar://problem/14884666>
2413
2414         Reviewed by Jer Noble.
2415
2416         * UIProcess/API/mac/WKView.mm: (-[WKView fullScreenWindowController]):
2417         Use a newly minted initializer for the controller.
2418
2419         * UIProcess/mac/WKFullScreenWindowController.h: Removed unused web view accessors.
2420         Changed the class to take web view at initialization time.
2421
2422         * UIProcess/mac/WKFullScreenWindowController.mm:
2423         (-[WKFullScreenWindowController initWithWindow:webView:]): Initialize the controller
2424         inone step.
2425         (-[WKFullScreenWindowController dealloc]): WebView is now a raw pointer, no need
2426         to zero it.
2427         (-[WKFullScreenWindowController close]): Make sure to not leave a dangling WKView
2428         pointer (this method is indirectly but inevitably called when WKView is deallocated).
2429
2430 2013-09-05  Anders Carlsson  <andersca@apple.com>
2431
2432         Replace uses of CLANG_PRAGMA with #pragma
2433
2434         Rubber-stamped by Andreas Kling.
2435
2436         This file is only compiled by clang anyway.
2437
2438         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2439         (WebKit::InjectedBundle::load):
2440
2441 2013-09-05  Anders Carlsson  <andersca@apple.com>
2442
2443         GCAssertions.h should use STL type traits and static_assert
2444         https://bugs.webkit.org/show_bug.cgi?id=120785
2445
2446         Reviewed by Andreas Kling.
2447
2448         Update for JavaScriptCore changes.
2449
2450         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2451
2452 2013-09-05  Alberto Garcia  <berto@igalia.com>
2453
2454         [WK2] [GTK] Remove the test to disable AC under Wayland from WebKitWebViewGroup
2455         https://bugs.webkit.org/show_bug.cgi?id=120762
2456
2457         Reviewed by Gustavo Noronha Silva.
2458
2459         The code to disable AC under Wayland is not run if we're using
2460         WebKitTestRunner, so it would be better to move it to
2461         WebKitWebViewBase.
2462
2463         However it's not really necessary to do that, instead it's much
2464         simpler to disable accelerated compositing in all cases unless we
2465         know we can support it.
2466
2467         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2468         (webkitWebViewBaseUpdatePreferences):
2469         * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
2470         (webkitWebViewGroupAttachSettingsToPageGroup):
2471
2472 2013-09-04  Alberto Garcia  <berto@igalia.com>
2473
2474         [WK2][GTK] ASSERTION in WebKit::LayerTreeHostGtk::invalidate
2475         https://bugs.webkit.org/show_bug.cgi?id=117733
2476
2477         Reviewed by Martin Robinson.
2478
2479         If the GL context cannot be created then an invalid
2480         LayerTreeHostGtk object will be returned.
2481
2482         This patch disables accelerated compositing if the system doesn't
2483         support it.
2484
2485         * UIProcess/API/gtk/WebKitWebView.cpp:
2486         (webkitWebViewUpdateSettings):
2487         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2488         (webkitWebViewBaseUpdatePreferences):
2489         (webkitWebViewBaseCreateWebPage):
2490         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2491
2492 2013-09-04  Commit Queue  <commit-queue@webkit.org>
2493
2494         Unreviewed, rolling out r154989.
2495         http://trac.webkit.org/changeset/154989
2496         https://bugs.webkit.org/show_bug.cgi?id=120678
2497
2498         This patch might broke apps using webkitgtk not from the main
2499         thread (Requested by msanchez on #webkit).
2500
2501         * UIProcess/API/gtk/WebKitWebView.cpp:
2502         (webkitWebViewRunAsModal):
2503         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
2504         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
2505
2506 2013-09-04  Zan Dobersek  <zdobersek@igalia.com>
2507
2508         [GTK] Add support for the Wayland build target
2509         https://bugs.webkit.org/show_bug.cgi?id=120627
2510
2511         Reviewed by Gustavo Noronha Silva.
2512
2513         * GNUmakefile.list.am: Build X11-specific NetscapePluginModule and NetscapePlugin classes if building the X11 target,
2514         fall back to the generic, empty classes otherwise.
2515         * PluginProcess/unix/PluginProcessMainUnix.cpp:
2516         (WebKit::PluginProcessMainUnix): Guard the NetscapePluginModule::scanPlugin() invocation with PLUGIN_ARCHITECTURE(X11),
2517         it's at the moment specific to the X11 implementation of the Netscape plugins.
2518         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: Guard PluginProcessProxy::scanPlugin() with PLUGIN_ARCHITECTURE(X11),
2519         just like it's guarded in the PluginProcessProxy class declaration.
2520         * UIProcess/cairo/BackingStoreCairo.cpp: Additionally guard <gdk/gdkx.h> and WidgetBackingStoreGtkX11 inclusion and use
2521         with PLATFORM(X11), this code should only be built when building the X11 target.
2522         (WebKit::createBackingStoreForGTK):
2523         * UIProcess/gtk/WebPageProxyGtk.cpp: Guard the createPluginContainer() and windowedPluginGeometryDidChange() methods and their
2524         helper functions and objects with PLUGIN_ARCHITECTURE(X11), just like they're guarded in the WebPageProxy class declaration.
2525         * config.h: Only define PLUGIN_ARCHITECTURE_X11 to 1 if we're actually building the X11 target.
2526
2527 2013-09-03  Darin Adler  <darin@apple.com>
2528
2529         REGRESSION (r154967) window resize is very choppy
2530         https://bugs.webkit.org/show_bug.cgi?id=120653
2531
2532         Reviewed by Andreas Kling.
2533
2534         Andreas Kling spotted the bad change.
2535
2536         * Platform/CoreIPC/Connection.cpp:
2537         (CoreIPC::Connection::waitForMessage): Roll out this incorrect change.
2538         The code here is not the same as a call to take.
2539
2540 2013-09-03  Anton Obzhirov  <a.obzhirov@samsung.com>
2541
2542         [GTK] gdk threads deprecated functions calls should be refactored
2543         https://bugs.webkit.org/show_bug.cgi?id=120070
2544
2545         Reviewed by Mario Sanchez Prada.
2546
2547         Removed deprecated functions gdk_threads_leave()/gdk_threads_enter() functions since
2548         there is no more checks for threads lock in GTK 3.6.
2549
2550         * UIProcess/API/gtk/WebKitWebView.cpp:
2551         (webkitWebViewRunAsModal):
2552         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
2553         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
2554
2555 2013-09-03  Brian Holt  <brian.holt@samsung.com>
2556
2557         [GTK] [WK2] TestContextMenu default-menu fails
2558         https://bugs.webkit.org/show_bug.cgi?id=120459
2559
2560         Reviewed by Gustavo Noronha Silva.
2561
2562         Add context menu items for downloading media elements.
2563
2564         * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
2565         (webkitContextMenuActionGetActionTag):
2566         (webkitContextMenuActionGetForContextMenuItem):
2567         (webkitContextMenuActionGetLabel):
2568         * UIProcess/API/gtk/WebKitContextMenuActions.h:
2569         * UIProcess/API/gtk/tests/TestContextMenu.cpp:
2570
2571 2013-09-02  Darin Adler  <darin@apple.com>
2572
2573         Cut down on double hashing and code needlessly using hash table iterators
2574         https://bugs.webkit.org/show_bug.cgi?id=120611
2575
2576         Reviewed by Andreas Kling.
2577
2578         * Platform/CoreIPC/Connection.cpp:
2579         (CoreIPC::Connection::waitForMessage): Use take instead of find/remove.
2580
2581         * UIProcess/WebPreferences.cpp:
2582         (WebKit::WebPreferences::removePageGroup): Use the return value from remove
2583         instead of find/remove.
2584
2585         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2586         (WebKit::GeolocationPermissionRequestManager::cancelRequestForGeolocation):
2587         (WebKit::GeolocationPermissionRequestManager::didReceiveGeolocationPermissionDecision):
2588         Use take instead of find/remove.
2589
2590         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2591         (WebKit::NetscapePlugin::frameDidFinishLoading): Use take instead of find/remove.
2592         (WebKit::NetscapePlugin::frameDidFail): Use take instead of find/remove.
2593
2594         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2595         (WebKit::WebBackForwardListProxy::removeItem): Use take instead of find/remove.
2596
2597         * WebProcess/WebPage/WebPage.cpp:
2598         (WebKit::WebPage::didFinishCheckingText): Use take instead of get/remove so we
2599         hash only once.
2600         (WebKit::WebPage::didCancelCheckingText): Ditto.
2601         (WebKit::WebPage::stopExtendingIncrementalRenderingSuppression): Use the return
2602         value from remove instead of contains/remove so we hash only once.
2603
2604 2013-09-02  Darin Adler  <darin@apple.com>
2605
2606         [Mac] No need for HardAutorelease, which is same as CFBridgingRelease
2607         https://bugs.webkit.org/show_bug.cgi?id=120569
2608
2609         Reviewed by Andy Estes.
2610
2611         * Platform/mac/StringUtilities.mm:
2612         (WebKit::nsStringFromWebCoreString): Use CFBridgingRelease. Also
2613         changed condition to be a little cleaner and use a constant string for empty
2614         strings as well as null strings.
2615
2616         * UIProcess/API/mac/WKBrowsingContextController.mm:
2617         (autoreleased): Switched from autorelease to CFBridgingRelease for strings,
2618         which eliminates a type cast and makes this work under GC, although I don't
2619         think we should compile WebKit2 for GC.
2620
2621         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
2622         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
2623         Use CFBridgingRelease.
2624
2625 2013-09-02  Csaba Osztrogonác  <ossy@webkit.org>
2626
2627         REGRESSION(r154909): caused many crashes on Qt WK2, EFL WK2
2628         https://bugs.webkit.org/show_bug.cgi?id=120600
2629
2630         Reviewed by Andreas Kling.
2631
2632         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2633         (CoreIPC::::decode): keyTime should be double here too.
2634
2635 2013-09-01  Alexey Proskuryakov  <ap@apple.com>
2636
2637         [WK2][Mac] Drag and drop tests interfere with user's UI
2638         https://bugs.webkit.org/show_bug.cgi?id=120538
2639
2640         Reviewed by Dan Bernstein.
2641
2642         * UIProcess/API/mac/WKView.mm: (-[WKView _setDragImage:at:linkDrag:]): Make it possible
2643         to override drag initiation in subclasses. It is a bit unfortunate that this exposes
2644         a deprecated API that we call, but probably not unfortunate enough to invent a new
2645         scary looking name for the same function, and conditionally call that if implemented
2646         by subclass.
2647
2648 2013-08-31  Santosh Mahto  <santosh.ma@samsung.com>
2649
2650         warning: unused parameter point and area in EwkView.cpp:1390
2651         https://bugs.webkit.org/show_bug.cgi?id=120545
2652
2653         Reviewed by Darin Adler.
2654
2655         * UIProcess/API/efl/EwkView.cpp:
2656         (EwkView::didFindZoomableArea): Added UNUSED_PARAM.
2657
2658 2013-08-31  Jae Hyun Park  <jae.park@company100.net>
2659
2660         Remove unused variable in LayerTreeHost
2661         https://bugs.webkit.org/show_bug.cgi?id=118950
2662
2663         Reviewed by Anders Carlsson.
2664
2665         m_waitingForUIProcess has been renamed to m_isWaitingForRenderer as of
2666         r152183, and it is a private variable in CoordinatedLayerTreeHost. Thus,
2667         we don't need m_waitingForUIProcess in LayerTreeHost.
2668
2669         * WebProcess/WebPage/LayerTreeHost.h:
2670
2671 2013-08-30  Brian Holt  <brian.holt@samsung.com>
2672
2673         [GTK] [WK2] TestWebKitWebView snapshot fails
2674         https://bugs.webkit.org/show_bug.cgi?id=120404
2675
2676         Reviewed by Darin Adler.
2677
2678         Fixed the snapshot test failure caused by GTK no longer allowing
2679         widgets to resize.  Instead, resize the WebView by resizing the
2680         window and waiting for the event to complete asynchronously.
2681
2682         * UIProcess/API/gtk/tests/WebViewTest.cpp:
2683         (WebViewTest::resizeView):
2684
2685 2013-08-30  Csaba Osztrogonác  <ossy@webkit.org>
2686
2687         Add USE(PROTECTION_SPACE_AUTH_CALLBACK) guards to canAuthenticateAgainstProtectionSpace()
2688         https://bugs.webkit.org/show_bug.cgi?id=120351
2689
2690         Reviewed by Darin Adler.
2691
2692         * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
2693         * NetworkProcess/AsynchronousNetworkLoaderClient.h:
2694         * NetworkProcess/NetworkLoaderClient.h:
2695         * NetworkProcess/SynchronousNetworkLoaderClient.cpp:
2696         * NetworkProcess/SynchronousNetworkLoaderClient.h:
2697
2698 2013-08-30  Gabor Abraham  <abrhm@inf.u-szeged.hu>
2699
2700         Fix, remove unused parameter in UIProcess/WebColorPicker.cpp.
2701         https://bugs.webkit.org/show_bug.cgi?id=120525
2702
2703         Reviewed by Darin Adler.
2704
2705         * UIProcess/WebColorPicker.cpp:
2706         (WebKit::WebColorPicker::showColorPicker):
2707
2708 2013-08-30  Tamas Czene  <tczene@inf.u-szeged.hu>
2709
2710         Resolve unused parameter warning in WebPlatformStrategies.cpp
2711         https://bugs.webkit.org/show_bug.cgi?id=120515
2712
2713         Reviewed by Darin Adler.
2714
2715         * WebProcess/WebPage/TapHighlightController.cpp:
2716         (WebKit::TapHighlightController::drawRect):
2717
2718 2013-08-30  Tamas Czene  <tczene@inf.u-szeged.hu>
2719
2720         Resolve unused parameter warning in FindController.cpp
2721         https://bugs.webkit.org/show_bug.cgi?id=120516
2722
2723         Reviewed by Darin Adler.
2724
2725         * WebProcess/WebPage/FindController.cpp:
2726         (WebKit::FindController::drawRect):
2727
2728 2013-08-30  Tamas Czene  <tczene@inf.u-szeged.hu>
2729
2730         Resolve unused parameter warning in WKBundlePageOverlay.cpp
2731         https://bugs.webkit.org/show_bug.cgi?id=120521
2732
2733         Reviewed by Andreas Kling.
2734
2735         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2736         (WKBundlePageOverlayFractionFadedIn):
2737
2738 2013-08-30  Antti Koivisto  <antti@apple.com>
2739
2740         Remove code behind ENABLE(DIALOG_ELEMENT)
2741         https://bugs.webkit.org/show_bug.cgi?id=120467
2742
2743         Reviewed by Darin Adler.
2744
2745         * Configurations/FeatureDefines.xcconfig:
2746
2747 2013-08-29  Sam Weinig  <sam@webkit.org>
2748
2749         Add ENABLE gaurds for Promises
2750         https://bugs.webkit.org/show_bug.cgi?id=120488
2751
2752         Reviewed by Andreas Kling.
2753
2754         * Configurations/FeatureDefines.xcconfig:
2755
2756 2013-08-29  Zan Dobersek  <zdobersek@igalia.com>
2757
2758         [Automake] libWebCoreDOM.la could use a better name
2759         https://bugs.webkit.org/show_bug.cgi?id=120232
2760
2761         Reviewed by Martin Robinson.
2762
2763         * GNUmakefile.am: libWebCoreDOM has a new name - libGObjectDOMBindings.
2764
2765 2013-08-29  Joseph Pecoraro  <pecoraro@apple.com>
2766
2767         Web Inspector: Download Web Archive of Inspected Page
2768         https://bugs.webkit.org/show_bug.cgi?id=119774
2769
2770         Reviewed by Timothy Hatcher.
2771
2772         Update to support InspectorFrontendHost.save's new base64Encoded
2773         parameter. It means the incoming content is binary data, not a string.
2774
2775         * UIProcess/WebInspectorProxy.cpp:
2776         (WebKit::WebInspectorProxy::save):
2777         * UIProcess/WebInspectorProxy.h:
2778         * UIProcess/WebInspectorProxy.messages.in:
2779         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2780         (WebKit::WebInspectorProxy::platformSave):
2781         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2782         (WebKit::WebInspectorProxy::platformSave):
2783         * UIProcess/mac/WebInspectorProxyMac.mm:
2784         (WebKit::WebInspectorProxy::platformSave):
2785         * UIProcess/qt/WebInspectorProxyQt.cpp:
2786         (WebKit::WebInspectorProxy::platformSave):
2787         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2788         (WebKit::WebInspectorFrontendClient::save):
2789         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
2790         * WebProcess/WebPage/WebInspector.cpp:
2791         (WebKit::WebInspector::save):
2792         * WebProcess/WebPage/WebInspector.h:
2793
2794 2013-08-29  Brian Holt  <brian.holt@samsung.com>
2795
2796         [GTK] [WK2] TestWebKitWebView page-visibility fails
2797         https://bugs.webkit.org/show_bug.cgi?id=120406
2798
2799         Reviewed by Gustavo Noronha Silva.
2800
2801         Removed the webkit prefix for document visibility properties.
2802
2803         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2804         (testWebViewPageVisibility):
2805
2806 2013-08-28  Chris Curtis  <chris_curtis@apple.com>
2807
2808         https://bugs.webkit.org/show_bug.cgi?id=119548
2809         Refactoring Exception throws.
2810
2811         Reviewed by Geoffrey Garen.
2812         
2813         Moved setting an exception into the vm, These functions changed to use the new functionality.
2814
2815         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2816         (WebKit::JSNPObject::callMethod):
2817         (WebKit::JSNPObject::callObject):
2818         (WebKit::JSNPObject::callConstructor):
2819         (WebKit::JSNPObject::throwInvalidAccessError):
2820         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2821         (WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):
2822
2823 2013-08-28  Anders Carlsson  <andersca@apple.com>
2824
2825         Allow the Flash plug-in to open its preference pane
2826         https://bugs.webkit.org/show_bug.cgi?id=120431
2827         <rdar://problem/14857039>
2828
2829         Reviewed by Andreas Kling.
2830
2831         Forward the -[NSWorkspace openFile:] call to the UI process and allow opening
2832         the Flash preference pane (if Flash asks for it).
2833
2834         * PluginProcess/PluginProcess.h:
2835         * PluginProcess/mac/PluginProcessMac.mm:
2836         (WebKit::replacedNSWorkspace_openFile):
2837         (WebKit::initializeCocoaOverrides):
2838         (WebKit::PluginProcess::openFile):
2839         * UIProcess/Plugins/PluginProcessProxy.h:
2840         * UIProcess/Plugins/PluginProcessProxy.messages.in:
2841         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2842         (WebKit::PluginProcessProxy::openURL):
2843         (WebKit::shouldOpenFile):
2844         (WebKit::PluginProcessProxy::openFile):
2845
2846 2013-08-28  Tamas Czene  <tczene@inf.u-szeged.hu>
2847
2848         [wk2] Resolve unused parameters in WebPlatformStrategies.cpp
2849         https://bugs.webkit.org/show_bug.cgi?id=120410
2850
2851         Reviewed by Darin Adler.
2852
2853         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2854         (WebKit::WebPlatformStrategies::getPluginInfo):
2855         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
2856
2857 2013-08-28  Tamas Czene  <tczene@inf.u-szeged.hu>
2858
2859         [wk2] Resolve unused parameter warnings in the WebProcess.cpp
2860         https://bugs.webkit.org/show_bug.cgi?id=120412
2861
2862         Reviewed by Darin Adler.
2863
2864         * WebProcess/WebProcess.cpp:
2865         (WebKit::WebProcess::startMemorySampler):
2866
2867 2013-08-28  Darin Adler  <darin@apple.com>
2868
2869         Eliminate Pasteboard::generalPasteboard
2870         https://bugs.webkit.org/show_bug.cgi?id=120392
2871
2872         Reviewed by Anders Carlsson.
2873
2874         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2875         (WebKit::WebEditorClient::updateGlobalSelection):
2876         Use createForGlobalSelection instead of generalPasteboard and setSelectionMode.
2877
2878 2013-08-28  Ábrahám Gábor  <abrhm@inf.u-szeged.hu>
2879
2880         Fix unused variable warning.
2881         https://bugs.webkit.org/show_bug.cgi?id=120396
2882
2883         Reviewed by Allan Sandfeld Jensen.
2884
2885         Fix unused variable compiler warning in PageOverlay.h
2886
2887         * WebProcess/WebPage/PageOverlay.h:
2888         (WebKit::PageOverlay::Client::copyAccessibilityAttributeValue):
2889         (WebKit::PageOverlay::Client::copyAccessibilityAttributeNames):
2890
2891
2892 2013-08-28  Zan Dobersek  <zdobersek@igalia.com>
2893
2894         [GTK][WK2] Only set up a RedirectedXCompositeWindow if running under an X11 display
2895         https://bugs.webkit.org/show_bug.cgi?id=120321
2896
2897         Reviewed by Gustavo Noronha Silva.
2898
2899         Only set up the RedirectedXCompositeWindow member of the WebKitWebViewBasePrivate struct
2900         if we're running under an X11 display. This is now done in the webkitWebViewBaseConstructed
2901         function rather than the constructor, which is removed.
2902
2903         This allows for the UIProcess to run in a Wayland environment even when built with accelerated
2904         compositing enabled. Of course, at the moment there's no support yet for accelerated compositing
2905         under Wayland, so we fall back to rendering the backing store. No changes are introduced to
2906         the behavior under X11 - accelerated compositing will be used where possible, if supported.
2907
2908         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2909         (webkitWebViewBaseConstructed):
2910
2911 2013-08-28  Zan Dobersek  <zdobersek@igalia.com>
2912
2913         [GTK][WK2] Disable accelerated compositing under Wayland
2914         https://bugs.webkit.org/show_bug.cgi?id=120347
2915
2916         Reviewed by Martin Robinson.
2917
2918         Accelerated compositing is not yet supported under the Wayland display protocol,
2919         so it should be disabled. Since it is enabled by default and the GTK WK2 API does
2920         not provide any way to change that, it's enough to disable it when attaching the
2921         WebKitSettings object to the WebPageGroup if running under Wayland.
2922
2923         * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
2924         (webkitWebViewGroupAttachSettingsToPageGroup):
2925
2926 2013-08-28  Alexandre Abreu  <alexandre.abreu@canonical.com>
2927
2928         Add a 'isMainFrame' parameter to QWebNavigationRequest.
2929         https://bugs.webkit.org/show_bug.cgi?id=118860
2930
2931         Reviewed by Simon Hausmann.
2932
2933         * UIProcess/API/qt/qwebnavigationrequest.cpp:
2934         (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
2935         (QWebNavigationRequest::QWebNavigationRequest):
2936         (QWebNavigationRequest::navigationType):
2937         (QWebNavigationRequest::isMainFrame):
2938         * UIProcess/API/qt/qwebnavigationrequest_p.h:
2939         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
2940         * UIProcess/qt/QtWebPagePolicyClient.cpp:
2941         (WebKit::QtWebPagePolicyClient::decidePolicyForNavigationAction):
2942         * UIProcess/qt/QtWebPagePolicyClient.h:
2943
2944 2013-08-27  Luciano Wolf  <luciano.wolf@openbossa.org>
2945
2946         100% cpu usage for "transition: opacity" animation
2947         https://bugs.webkit.org/show_bug.cgi?id=120012
2948
2949         Reviewed by Noam Rosenthal.
2950
2951         Schedule animation timer after scheduling a layer flush. This way it
2952         won't overwrite animation timer with "0", thus avoiding 100% cpu usage.
2953
2954         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2955         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
2956
2957 2013-08-27  Csaba Osztrogonác  <ossy@webkit.org>
2958
2959         [WK2][Soup] Add WebFrameNetworkingContext::webFrameLoaderClient() after r154490
2960         https://bugs.webkit.org/show_bug.cgi?id=120353
2961
2962         Reviewed by Alexey Proskuryakov.
2963
2964         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2965         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2966         (WebKit::WebFrameNetworkingContext::webFrameLoaderClient):
2967         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
2968
2969 2013-08-26  Santosh Mahto  <santosh.ma@samsung.com>
2970
2971         Fixing compilation warning "unused parameter" in WebPageProxy.cpp
2972         https://bugs.webkit.org/show_bug.cgi?id=120205
2973
2974         Reviewed by Anders Carlsson.
2975
2976         * UIProcess/WebPageProxy.cpp:
2977         (WebKit::WebPageProxy::findPlugin):
2978         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
2979         Added UNUSED_PARAM to avoid warning.
2980
2981 2013-08-23  Andy Estes  <aestes@apple.com>
2982
2983         Fix issues found by the Clang Static Analyzer
2984         https://bugs.webkit.org/show_bug.cgi?id=120230
2985
2986         Reviewed by Darin Adler.
2987
2988         * UIProcess/API/mac/WKBrowsingContextController.mm:
2989         (autoreleased): Don't leak CFURLs when in Objective-C GC.
2990         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
2991         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
2992         Don't leak CFStrings when in Objective-C GC.
2993
2994 2013-08-26  Csaba Osztrogonác  <ossy@webkit.org>
2995
2996         [WK2] Buildfix for non Mac platforms
2997         https://bugs.webkit.org/show_bug.cgi?id=120294
2998
2999         Reviewed by Darin Adler.
3000
3001         * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
3002         (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
3003         * NetworkProcess/NetworkResourceLoader.h:
3004
3005 2013-08-26  Alexey Proskuryakov  <ap@apple.com>
3006
3007         [Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
3008         https://bugs.webkit.org/show_bug.cgi?id=113094
3009
3010         Reviewed by Darin Adler.
3011
3012         Return new pasteboard change count from all functions that change it.
3013
3014         * UIProcess/WebContext.h:
3015         * UIProcess/WebContext.messages.in:
3016         * UIProcess/mac/WebContextMac.mm:
3017         (WebKit::WebContext::pasteboardCopy):
3018         (WebKit::WebContext::addPasteboardTypes):
3019         (WebKit::WebContext::setPasteboardTypes):
3020         (WebKit::WebContext::setPasteboardPathnamesForType):
3021         (WebKit::WebContext::setPasteboardStringForType):
3022         (WebKit::WebContext::setPasteboardBufferForType):
3023         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3024         (WebKit::PDFPlugin::writeItemsToPasteboard):
3025         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3026         (WebKit::WebPlatformStrategies::copy):
3027         (WebKit::WebPlatformStrategies::changeCount):
3028         (WebKit::WebPlatformStrategies::addTypes):
3029         (WebKit::WebPlatformStrategies::setTypes):
3030         (WebKit::WebPlatformStrategies::setBufferForType):
3031         (WebKit::WebPlatformStrategies::setPathnamesForType):
3032         (WebKit::WebPlatformStrategies::setStringForType):
3033         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3034
3035 2013-08-26  Andreas Kling  <akling@apple.com>
3036
3037         Unreviewed build fix.
3038
3039         * WebProcess/WebPage/WebFrame.cpp:
3040         (WebKit::WebFrame::createWithCoreMainFrame):
3041         (WebKit::WebFrame::createSubframe):
3042
3043 2013-08-26  Pratik Solanki  <psolanki@apple.com>
3044
3045         PageGroup::groupSettings() should return a reference
3046         https://bugs.webkit.org/show_bug.cgi?id=120319
3047
3048         Reviewed by Andreas Kling.
3049
3050         PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
3051
3052         * WebProcess/Storage/StorageNamespaceImpl.cpp:
3053         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
3054
3055 2013-08-26  Andreas Kling  <akling@apple.com>
3056
3057         WebCore: Let Page create the main Frame.
3058         <https://webkit.org/b/119964>
3059
3060         Reviewed by Anders Carlsson.
3061
3062         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3063         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3064         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
3065
3066             This starts out with a null WebFrame* pointer now.
3067
3068         (WebKit::WebFrameLoaderClient::setWebFrame):
3069
3070             WebFrame hooks itself up through this as soon as it's constructed.
3071
3072         (WebKit::WebFrameLoaderClient::frameLoaderDestroyed):
3073
3074             Tweak an out-of-date comment. The ref() we're balancing out comes from
3075             WebFrame::create().
3076
3077         * WebProcess/WebPage/WebFrame.cpp:
3078         (WebKit::WebFrame::createWithCoreMainFrame):
3079
3080             Rewrote createMainFrame() as createWithCoreMainFrame(). The new method wraps
3081             an existing WebCore::Frame instead of creating a new one.
3082
3083         (WebKit::WebFrame::createSubframe):
3084
3085             Merged WebFrame::init() into here since the logic isn't shared with main
3086             Frame creation anymore.
3087
3088         (WebKit::WebFrame::create):
3089         (WebKit::WebFrame::WebFrame):
3090
3091             Call WebFrameLoaderClient::setWebFrame(this).
3092
3093         * WebProcess/WebPage/WebFrame.h:
3094
3095             WebFrame::m_frameLoaderClient is now an OwnPtr rather than an inline member.
3096             This way it can be created before the WebFrame.
3097
3098         * WebProcess/WebPage/WebPage.cpp:
3099         (WebKit::WebPage::WebPage):
3100
3101             Set up a WebFrameLoaderClient and pass it to the Page constructor along with
3102             the other PageClients.
3103
3104 2013-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3105
3106         [GTK] Add WebKit2 API for isolated worlds
3107         https://bugs.webkit.org/show_bug.cgi?id=103377
3108
3109         Reviewed by Anders Carlsson.
3110
3111         * GNUmakefile.list.am: Add new files to compilation.
3112         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
3113         * UIProcess/API/gtk/tests/TestWebExtensions.cpp:
3114         (testWebExtensionWindowObjectCleared):
3115         (scriptDialogCallback):
3116         (runJavaScriptInIsolatedWorldFinishedCallback):
3117         (testWebExtensionIsolatedWorld):
3118         (beforeAll):
3119         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
3120         (echoCallback):
3121         (windowObjectCleared):
3122         (getWebPage):
3123         (methodCallCallback):
3124         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
3125         (webkit_frame_get_javascript_context_for_script_world): New public
3126         method to tget the JavaScript execution context for a given script
3127         world.
3128         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
3129         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Added.
3130         (scriptWorlds): Global WebKitScriptWorld map.
3131         (_WebKitScriptWorldPrivate::~_WebKitScriptWorldPrivate):
3132         (webkitScriptWorldGet): Get the WebKitScriptWorld wrapping the
3133         given injected bundle script world.
3134         (webkitScriptWorldGetInjectedBundleScriptWorld): Get the injected
3135         bundle script world wrapped by the given WebKitScriptWorld.
3136         (webkitScriptWorldWindowObjectCleared): Emit
3137         WebKitScriptWorld::window-object-cleared signal.
3138         (webkitScriptWorldCreate): Create a new WebKitScriptWorld wrapping
3139         the given injected bundle script world.
3140         (createDefaultScriptWorld): Create the default WebKitScriptWorld
3141         wrapping the normal world.
3142         (webkit_script_world_get_default): Return the default WebKitScriptWorld.
3143         (webkit_script_world_new): Create a new isolated WebKitScriptWorld.
3144         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Added.
3145         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Added.
3146         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3147         (didClearWindowObjectForFrame): Call webkitScriptWorldWindowObjectCleared().
3148         (webkitWebPageCreate): Add implementation for callback
3149         didClearWindowObjectForFrame in injected bundle loader client.
3150         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
3151         Include WebKitScriptWorld.h.
3152
3153 2013-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3154
3155         [WebKit2] Offsets for WKBundlePageLoaderClient in APIClientTraits are wrong
3156         https://bugs.webkit.org/show_bug.cgi?id=120268
3157
3158         Reviewed by Anders Carlsson.
3159
3160         * Shared/APIClientTraits.cpp: Use always the first member of every
3161         version as the offset of the version.
3162
3163 2013-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3164
3165         [GTK] Add missing initializer for pluginLoadPolicy in WKPageLoaderClient
3166         https://bugs.webkit.org/show_bug.cgi?id=120289
3167
3168         Reviewed by Philippe Normand.
3169
3170         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
3171         (attachLoaderClientToView): Add initializer for pluginLoadPolicy
3172         and rename the comment of the previous one as
3173         pluginLoadPolicy_deprecatedForUseWithV2.
3174
3175 2013-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3176
3177         [GTK] webkitCredentialGetCredential returns a temporary in g_return_val_if_fail
3178         https://bugs.webkit.org/show_bug.cgi?id=120287
3179
3180         Reviewed by Philippe Normand.
3181
3182         * UIProcess/API/gtk/WebKitCredential.cpp:
3183         (webkitCredentialGetCredential): Use ASSERT() instead of
3184         g_return_val_if_fail() since this is a private function.
3185
3186 2013-08-25  Zan Dobersek  <zdobersek@igalia.com>
3187
3188         Unreviewed GTK build fix after r154565.
3189
3190         * UIProcess/API/gtk/tests/TestInspector.cpp: Include the Vector header.
3191         * UIProcess/API/gtk/tests/TestResources.cpp: Ditto.
3192
3193 2013-08-24  Darin Adler  <darin@apple.com>
3194
3195         Frame::tree should return a reference instead of a pointer
3196         https://bugs.webkit.org/show_bug.cgi?id=120259
3197
3198         Reviewed by Andreas Kling.
3199
3200         * WebProcess/Plugins/PluginView.cpp:
3201         (WebKit::PluginView::performJavaScriptURLRequest):
3202         * WebProcess/Storage/StorageAreaMap.cpp:
3203         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
3204         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
3205         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3206         (WebKit::WebFrameLoaderClient::createFrame):
3207         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3208         (WebKit::WebContextMenuClient::searchWithSpotlight):
3209         * WebProcess/WebPage/FindController.cpp:
3210         (WebKit::frameWithSelection):
3211         (WebKit::FindController::rectsForTextMatches):
3212         * WebProcess/WebPage/WebFrame.cpp:
3213         (WebKit::WebFrame::init):
3214         (WebKit::WebFrame::contentsAsString):
3215         (WebKit::WebFrame::name):
3216         (WebKit::WebFrame::childFrames):
3217         * WebProcess/WebPage/WebPage.cpp:
3218         (WebKit::WebPage::clearMainFrameName):
3219         (WebKit::WebPage::setDrawsBackground):
3220         (WebKit::WebPage::setDrawsTransparentBackground):
3221         (WebKit::WebPage::setWindowResizerSize):
3222         (WebKit::frameWithSelection):
3223         (WebKit::WebPage::unmarkAllMisspellings):
3224         (WebKit::WebPage::unmarkAllBadGrammar):
3225         (WebKit::pageContainsAnyHorizontalScrollbars):
3226         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3227         (WebKit::TiledCoreAnimationDrawingArea::forceRepaint):
3228         Use tree(). instead of tree()->.
3229
3230 2013-08-24  Commit Queue  <commit-queue@webkit.org>
3231
3232         Unreviewed, rolling out r154545.
3233         http://trac.webkit.org/changeset/154545
3234         https://bugs.webkit.org/show_bug.cgi?id=120252
3235
3236         Broke WebKit2 API tests (Requested by andersca on #webkit).
3237
3238         * GNUmakefile.list.am:
3239         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3240         * UIProcess/API/gtk/tests/TestWebExtensions.cpp:
3241         (beforeAll):
3242         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
3243         (methodCallCallback):
3244         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
3245         (webkit_frame_get_javascript_global_context):
3246         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
3247         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Removed.
3248         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Removed.
3249         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Removed.
3250         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3251         (webkitWebPageCreate):
3252         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
3253
3254 2013-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3255
3256         [GTK] Add WebKit2 API for isolated worlds
3257         https://bugs.webkit.org/show_bug.cgi?id=103377
3258
3259         Reviewed by Anders Carlsson.
3260
3261         * GNUmakefile.list.am: Add new files to compilation.
3262         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
3263         * UIProcess/API/gtk/tests/TestWebExtensions.cpp:
3264         (testWebExtensionWindowObjectCleared):
3265         (scriptDialogCallback):
3266         (runJavaScriptInIsolatedWorldFinishedCallback):
3267         (testWebExtensionIsolatedWorld):
3268         (beforeAll):
3269         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
3270         (echoCallback):
3271         (windowObjectCleared):
3272         (getWebPage):
3273         (methodCallCallback):
3274         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
3275         (webkit_frame_get_javascript_context_for_script_world): New public
3276         method to tget the JavaScript execution context for a given script
3277         world.
3278         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
3279         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Added.
3280         (scriptWorlds): Global WebKitScriptWorld map.
3281         (_WebKitScriptWorldPrivate::~_WebKitScriptWorldPrivate):
3282         (webkitScriptWorldGet): Get the WebKitScriptWorld wrapping the
3283         given injected bundle script world.
3284         (webkitScriptWorldGetInjectedBundleScriptWorld): Get the injected
3285         bundle script world wrapped by the given WebKitScriptWorld.
3286         (webkitScriptWorldWindowObjectCleared): Emit
3287         WebKitScriptWorld::window-object-cleared signal.
3288         (webkitScriptWorldCreate): Create a new WebKitScriptWorld wrapping
3289         the given injected bundle script world.
3290         (createDefaultScriptWorld): Create the default WebKitScriptWorld
3291         wrapping the normal world.
3292         (webkit_script_world_get_default): Return the default WebKitScriptWorld.
3293         (webkit_script_world_new): Create a new isolated WebKitScriptWorld.
3294         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Added.
3295         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Added.
3296         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3297         (didClearWindowObjectForFrame): Call webkitScriptWorldWindowObjectCleared().
3298         (webkitWebPageCreate): Add implementation for callback
3299         didClearWindowObjectForFrame in injected bundle loader client.
3300         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
3301         Include WebKitScriptWorld.h.
3302
3303 2013-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3304
3305         [GTK] Expose WebKitFrame in WebKit2GTK+ web extensions API
3306         https://bugs.webkit.org/show_bug.cgi?id=119743
3307
3308         Reviewed by Anders Carlsson.
3309
3310         * GNUmakefile.list.am: Add new files to compilation.
3311         * Shared/APIClientTraits.cpp: Update for new interface version.
3312         * Shared/APIClientTraits.h: Ditto.
3313         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add WebKitFrame
3314         section.
3315         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new public
3316         symbols.
3317         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
3318         webkit_frame_get_type.
3319         * UIProcess/API/gtk/tests/FrameTest.cpp: Added.
3320         (WebKitFrameTest::create):
3321         (WebKitFrameTest::webPageFromArgs):
3322         (WebKitFrameTest::testMainFrame):
3323         (WebKitFrameTest::testURI):
3324         (WebKitFrameTest::testJavaScriptContext):
3325         (WebKitFrameTest::runTest):
3326         (registerTests):
3327         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test files.
3328         * UIProcess/API/gtk/tests/TestFrame.cpp: Added.
3329         (webkitFrameTestRun):
3330         (testWebKitFrameMainFrame):
3331         (testWebKitFrameURI):
3332         (testWebKitFrameJavaScriptContext):
3333         (beforeAll):
3334         (afterAll):
3335         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add
3336         willDestroyFrame callback to the injected bundle loader client, to
3337         notify the client when a frame is about to be destroyed.
3338         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: Added.
3339         (webkit_frame_class_init):
3340         (webkitFrameCreate):
3341         (webkit_frame_is_main_frame):
3342         (webkit_frame_get_uri):
3343         (webkit_frame_get_javascript_global_context):
3344         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h: Added.
3345         * WebProcess/InjectedBundle/API/gtk/WebKitFramePrivate.h: Added.
3346         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3347         (webkitFrameGetOrCreate): Helper function to create a WebKitFrame
3348         wrapping the given WebFrame or returning the wrapper if it already
3349         exists.
3350         (willDestroyFrame): Remove the WebKitFrame wrapping the given
3351         WebFrame if it exists.
3352         (webkitWebPageCreate): Add willDestroyFrame implementation to
3353         injected bundle loader client.
3354         (webkit_web_page_get_main_frame): Return the main frame of the
3355         page.
3356         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
3357         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
3358         Include WebKitFrame.h.
3359         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3360         (WebKit::InjectedBundlePageLoaderClient::willDestroyFrame): New
3361         callback to be called when a frame is about to be destroyed.
3362         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3363         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3364         (WebKit::WebFrameLoaderClient::frameLoaderDestroyed): Call
3365         willDestroyFrame callback of injected bundle loader client.
3366         * WebProcess/qt/QtBuiltinBundlePage.cpp:
3367         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): Add
3368         willDestroyFrame callback.
3369
3370 2013-08-24  Antti Koivisto  <antti@apple.com>
3371
3372         Revert accidental change.
3373         
3374         Not reviewed.
3375
3376         * WebProcess/com.apple.WebProcess.sb.in:
3377
3378 2013-08-23  Beth Dakin  <bdakin@apple.com>
3379
3380         REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in 
3381         Adobe Reader
3382         https://bugs.webkit.org/show_bug.cgi?id=120240
3383         -and corresponding-
3384         <rdar://problem/14634453>
3385
3386         Reviewed by Anders Carlsson.
3387
3388         Hook up new WebSystemInterface API to find out if the current context is the PDF 
3389         context. 
3390
3391         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3392         (InitWebCoreSystemInterface):
3393
3394 2013-08-23  Alexey Proskuryakov  <ap@apple.com>
3395
3396         [WK2] Assertion failures when loading XSL stylesheets with NetworkProcess
3397         https://bugs.webkit.org/show_bug.cgi?id=120186
3398         <rdar://problem/14080273>
3399
3400         Reviewed by Brady Eidson.
3401
3402         Covered by many existing tests.
3403
3404         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3405         (WebKit::WebPlatformStrategies::loadResourceSynchronously): Pass frame ID and page ID.
3406         They are mostly needed for authentication, which is not supported with sync requests,
3407         but it will be supported some day.
3408
3409         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3410         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3411         (WebKit::WebFrameNetworkingContext::webFrameLoaderClient):
3412         Added a way to get frame loader client from WebKit NetworkingContext subclass.
3413
3414 2013-08-22  Carlos Garcia Campos  <cgarcia@igalia.com>
3415
3416         [GTK] Wrong interface version used in WebKitWebPage for loader client
3417         https://bugs.webkit.org/show_bug.cgi?id=120199
3418
3419         Reviewed by Gustavo Noronha Silva.
3420
3421         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3422         (webkitWebPageCreate): Use kWKBundlePageLoaderClientCurrentVersion
3423         instead of kWKBundlePageResourceLoadClientCurrentVersion in loader
3424         client initialization.
3425
3426 2013-08-22  Simon Cooper  <scooper@apple.com>
3427
3428         Need to disable FakeSYSVSHM when sandboxing is not enabled
3429         https://bugs.webkit.org/show_bug.cgi?id=120182
3430         <rdar://problem/14814461>
3431
3432         Reviewed by Alexey Proskuryakov.
3433
3434         When not in a sandbox do not enable the FakeSYSVSHIM. This
3435         allows LocalConnection to work when Flash Player is run in
3436         "Unsafe Mode".
3437
3438         * PluginProcess/mac/PluginProcessShim.mm:
3439         (WebKit::shim_disabled):
3440
3441 2013-08-22  Andy Estes  <aestes@apple.com>
3442
3443         <https://webkit.org/b/120180> Fix issues with OTHER_LDFLAGS in various .xcconfig files
3444
3445         Reviewed by David Kilzer.
3446
3447         Adding ld flags for ASAN overwrote the unexported symbol flags we were
3448         previously specifying. Since the unexported symbol ld flags are only
3449         needed for the framework target, move them to WebKit2.xcconfig where we
3450         can add them to OTHER_LDFLAGS along with the ASAN values inherited from
3451         DebugRelease.xcconfig (and other values).
3452
3453         * Configurations/Base.xcconfig: Removed the unexported symbol ld flags.
3454         * Configurations/WebKit2.xcconfig: ... and moved them here.
3455
3456 2013-08-21  Tim Horton  <timothy_horton@apple.com>
3457
3458         Another null-deref under WebDragClient::startDrag
3459         https://bugs.webkit.org/show_bug.cgi?id=120145
3460         <rdar://problem/14650652>
3461
3462         Reviewed by Simon Fraser.
3463
3464         convertImageToBitmap can legitimately return null, so don't dereference it.
3465
3466         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3467         (WebKit::WebDragClient::startDrag):
3468
3469 2013-08-21  Beth Dakin  <bdakin@apple.com>
3470
3471         <https://webkit.org/b/120140> Clients expect didFirstLayout-related calls to 
3472         happen before didLayout
3473
3474         Reviewed by Anders Carlsson.
3475
3476         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3477         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
3478
3479 2013-08-21  Alexey Proskuryakov  <ap@apple.com>
3480
3481         REGRESSION (r145458?): WebProcess doesn't respect UI process localization
3482         https://bugs.webkit.org/show_bug.cgi?id=120096
3483
3484         Reviewed by Darin Adler.
3485
3486         We used to get into a situation where CFBundle thought that we had no good localization,
3487         and used one passed as default. This is never the case with mixed localizations,
3488         so default is just ignored now.
3489
3490         I think that the previous behavior was a bit of a hack. As WebProcess is not localized,
3491         it's more honest to say that we want mixed localizations, and force the language
3492         to match UI process localization.
3493
3494         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h:
3495         (WebKit::ChildProcessMain): Don't set default localization, it's not taken into
3496         consideration unless all other attempts to compute bundle localization fail.
3497
3498         * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::createProcess): Pass
3499         UI process localization as -AppleLanguages argument, so that Core Foundation uses
3500         that instead of actual user languages. We want to match UI process localization.
3501
3502 2013-08-20  Gavin Barraclough  <barraclough@apple.com>
3503
3504         https://bugs.webkit.org/show_bug.cgi?id=120093
3505         Remove getOwnPropertyDescriptor trap
3506
3507         Reviewed by Geoff Garen.
3508
3509         All implementations of this method are now called via the method table, and equivalent in behaviour.
3510         Remove all duplicate implementations (and the method table trap), and add a single member function implementation on JSObject.
3511
3512         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3513         * WebProcess/Plugins/Netscape/JSNPObject.h:
3514             - remove getOwnPropertyDescriptor
3515
3516 2013-08-20  Pratik Solanki  <psolanki@apple.com>
3517
3518         <https://webkit.org/b/120029> Document::markers() should return a reference
3519
3520         Reviewed by Andreas Kling.
3521
3522         Document::m_markers is never NULL so return a reference from Document::markers(). Also mark
3523         m_markers as const and initialize it in member initialization.
3524
3525         * WebProcess/WebPage/FindController.cpp:
3526         (WebKit::FindController::rectsForTextMatches):
3527         * WebProcess/WebPage/WebPage.cpp:
3528         (WebKit::WebPage::unmarkAllMisspellings):
3529         (WebKit::WebPage::unmarkAllBadGrammar):
3530
3531 2013-08-20  Gavin Barraclough  <barraclough@apple.com>
3532
3533         https://bugs.webkit.org/show_bug.cgi?id=120053
3534         Remove custom getOwnPropertyDescriptor for JSNPObject
3535
3536         Reviewed by Oliver Hunt.
3537
3538         Think this is the last one!
3539
3540         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3541             - Remove custom getOwnPropertyDescriptor implementation.
3542
3543 2013-08-20  Anton Obzhirov  <a.obzhirov@samsung.com>
3544
3545         <https://webkit.org/b/119487> [Gtk] Cancel authentication on load failed
3546
3547         Reviewed by Martin Robinson.
3548
3549         Added callback to handle load-failed event in default authentication dialog.
3550         Authentication request gets cancelled and the dialog widget gets destroyed.
3551
3552         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
3553         (pageLoadFailed):
3554         (webkitAuthenticationDialogInitialize):
3555         (webkitAuthenticationDialogDispose):
3556         (webkit_authentication_dialog_class_init):
3557         (webkitAuthenticationDialogNew):
3558         * UIProcess/API/gtk/WebKitAuthenticationDialog.h:
3559         * UIProcess/API/gtk/WebKitWebView.cpp:
3560         (webkitWebViewAuthenticate):
3561
3562 2013-08-20  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3563
3564         [Qt][WK2] Doesn't build without Plugin-process
3565         https://bugs.webkit.org/show_bug.cgi?id=120060
3566
3567         Reviewed by Jocelyn Turcotte.
3568
3569         Disable netscape plugin api in WebKit2 when the plugin architecture is unsupported for WebKit2.
3570
3571         * Target.pri:
3572
3573 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
3574
3575         <https://webkit.org/b/120049> Delete code for Snow Leopard
3576
3577         Reviewed by Benjamin Poulain.
3578
3579         * NetworkProcess/mac/NetworkProcessMac.mm:
3580         (WebKit::overrideSystemProxies):
3581         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
3582         * WebKit2Prefix.h:
3583
3584 2013-08-19  Beth Dakin  <bdakin@apple.com>
3585
3586         <https://webkit.org/b/120027> AXObjectCache's 
3587         accessibilityEnhancedUserInterfaceEnabled should be initialized on process 
3588         creation
3589
3590         Reviewed by Sam Weinig.
3591
3592         Right now we only call AXObjectCache::setEnhancedAccessibility() when AppKit sends 
3593         us a notification indicating that the value has changed. We should not have to 
3594         rely on that to properly initialize this value. It should be done with the 
3595         WebProcessCreationParamters. 
3596
3597         * Shared/WebProcessCreationParameters.cpp:
3598         (WebKit::WebProcessCreationParameters::encode):
3599         (WebKit::WebProcessCreationParameters::decode):
3600         * Shared/WebProcessCreationParameters.h:
3601         * UIProcess/mac/WebContextMac.mm:
3602         (WebKit::WebContext::platformInitializeWebProcess):
3603         * WebProcess/mac/WebProcessMac.mm:
3604         (WebKit::WebProcess::platformInitializeWebProcess):
3605
3606 2013-08-19  Pratik Solanki  <psolanki@apple.com>
3607
3608         <https://webkit.org/b/119918> Frame::selection() should return a reference
3609
3610         Reviewed by Darin Adler.
3611
3612         m_selection is never NULL so return a reference from Frame::selection(). Also removed some
3613         unnecessary null checks and assert diff ts exposed as a result.
3614
3615         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3616         (WebKit::WebEditorClient::updateGlobalSelection):
3617         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
3618         (WebKit::collapseSelection):
3619         (WebKit::WebEditorClient::updateGlobalSelection):
3620         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3621         (WebKit::WebContextMenuClient::lookUpInDictionary):
3622         (WebKit::WebContextMenuClient::searchWithSpotlight):
3623         * WebProcess/WebPage/FindController.cpp:
3624         (WebKit::frameWithSelection):
3625         (WebKit::FindController::updateFindUIAfterPageScroll):
3626         (WebKit::FindController::getFindIndicatorBitmapAndRect):
3627         (WebKit::FindController::getImageForFindMatch):
3628         (WebKit::FindController::selectFindMatch):
3629         (WebKit::FindController::updateFindIndicator):
3630         (WebKit::FindController::drawRect):
3631         * WebProcess/WebPage/WebPage.cpp:
3632         (WebKit::WebPage::editorState):
3633         (WebKit::WebPage::scaledSnapshotWithOptions):
3634         (WebKit::WebPage::centerSelectionInVisibleArea):
3635         (WebKit::frameWithSelection):
3636         (WebKit::WebPage::clearSelection):
3637         (WebKit::WebPage::confirmComposition):
3638         (WebKit::WebPage::setComposition):
3639         (WebKit::WebPage::currentSelectionAsRange):
3640         * WebProcess/WebPage/mac/WebPageMac.mm:
3641         (WebKit::WebPage::setComposition):
3642         (WebKit::WebPage::insertText):
3643         (WebKit::WebPage::insertDictatedText):
3644         (WebKit::WebPage::getMarkedRange):
3645         (WebKit::WebPage::getSelectedRange):
3646         (WebKit::WebPage::getAttributedSubstringFromRange):
3647         (WebKit::WebPage::characterIndexForPoint):
3648         (WebKit::convertToRange):
3649         (WebKit::WebPage::performDictionaryLookupAtLocation):
3650         (WebKit::WebPage::readSelectionFromPasteboard):
3651         (WebKit::WebPage::getStringSelectionForPasteboard):
3652         (WebKit::WebPage::getDataSelectionForPasteboard):
3653
3654 2013-08-18  Darin Adler  <darin@apple.com>
3655
3656         <https://webkit.org/b/119989> Make use of Node::ownerDocument a compile time error
3657
3658         Reviewed by Sam Weinig.
3659
3660         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
3661         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): Use document instead of
3662         ownerDocument.
3663         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
3664         (WebKit::PDFPluginTextAnnotation::createAnnotationElement): Ditto.
3665
3666 2013-08-18  Dan Bernstein  <mitz@apple.com>
3667
3668         Fix clean engineering builds after r154251.
3669
3670         * WebKit2.xcodeproj/project.pbxproj: Removed references to the OfflineStorage XPC services
3671         from the “Copy XPC services for engineering builds” build phase.
3672
3673 2013-08-18  Gavin Barraclough  <barraclough@apple.com>
3674
3675         https://bugs.webkit.org/show_bug.cgi?id=119972
3676         Add attributes field to PropertySlot
3677
3678         Reviewed by Geoff Garen.
3679
3680         For all JSC types, this makes getOwnPropertyDescriptor redundant.
3681         There will be a bit more hacking required in WebCore to remove GOPD whilst maintaining current behaviour.
3682         (Current behaviour is in many ways broken, particularly in that GOPD & GOPS are inconsistent, but we should fix incrementally).
3683
3684         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3685         (WebKit::JSNPObject::getOwnPropertySlot):
3686         (WebKit::JSNPObject::getOwnPropertyDescriptor):
3687             - Pass attributes to PropertySlot::set* methods.
3688
3689 2013-08-16  Sam Weinig  <sam@webkit.org>
3690
3691         <https://webkit.org/b/119911> Remove the unused OfflineStorageProcess
3692
3693         Reviewed by Darin Adler.
3694
3695         * Configurations/OfflineStorageProcess.xcconfig: Removed.
3696         * Configurations/OfflineStorageService.Development.xcconfig: Removed.
3697         * Configurations/OfflineStorageService.xcconfig: Removed.
3698         * DerivedSources.make:
3699         * OfflineStorageProcess: Removed.
3700         * OfflineStorageProcess/EntryPoint: Removed.
3701         * OfflineStorageProcess/EntryPoint/mac: Removed.
3702         * OfflineStorageProcess/EntryPoint/mac/LegacyProcess: Removed.
3703         * OfflineStorageProcess/EntryPoint/mac/LegacyProcess/Info.plist: Removed.
3704         * OfflineStorageProcess/EntryPoint/mac/LegacyProcess/OfflineStorageProcessMain.mm: Removed.
3705         * OfflineStorageProcess/EntryPoint/mac/XPCService: Removed.
3706         * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService: Removed.
3707         * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development: Removed.
3708         * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development/Info.plist: Removed.
3709         * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService/Info.plist: Removed.
3710         * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageServiceEntryPoint.mm: Removed.
3711         * OfflineStorageProcess/OfflineStorageProcess.cpp: Removed.
3712         * OfflineStorageProcess/OfflineStorageProcess.h: Removed.
3713         * OfflineStorageProcess/OfflineStorageProcess.messages.in: Removed.
3714         * OfflineStorageProcess/mac: Removed.
3715         * OfflineStorageProcess/mac/OfflineStorageProcessMac.mm: Removed.
3716         * OfflineStorageProcess/mac/com.apple.WebKit.OfflineStorage.sb: Removed.
3717         * Scripts/webkit2/messages.py:
3718         * Shared/OfflineStorage: Removed.
3719         * Shared/OfflineStorage/OfflineStorageProcessCreationParameters.cpp: Removed.
3720         * Shared/OfflineStorage/OfflineStorageProcessCreationParameters.h: Removed.
3721         * WebKit2.xcodeproj/project.pbxproj:
3722         Remove.
3723
3724 2013-08-17  Darin Adler  <darin@apple.com>
3725
3726         <https://webkit.org/b/119941> Make Page::dragController return a reference
3727
3728         Reviewed by Andreas Kling.
3729
3730         * WebProcess/WebPage/WebPage.cpp:
3731         (WebKit::WebPage::performDragControllerAction):
3732         (WebKit::WebPage::dragEnded):
3733         Updated call sites.
3734
3735 2013-08-17  David Kilzer  <ddkilzer@apple.com>
3736
3737         WebKit2 fails to build with trunk clang: error: 'WebPluginSiteDataManagerh' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
3738         <http://webkit.org/b/119935>
3739         <rdar://problem/14764131>
3740
3741         Reviewed by Darin Adler.
3742
3743         * UIProcess/Plugins/WebPluginSiteDataManager.h: Fix typo
3744         introduced in r78647.
3745
3746 2013-08-16  Pratik Solanki  <psolanki@apple.com>
3747
3748         <https://webkit.org/b/119852> Frame::scriptController() should return a reference
3749
3750         Reviewed by Andreas Kling.
3751
3752         m_script is never NULL so we can just return a reference. Also remove some pointless null
3753         checks as a result of doing this.
3754
3755         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3756         (WebKit::NPRuntimeObjectMap::globalObject):
3757         * WebProcess/Plugins/PluginView.cpp:
3758         (WebKit::PluginView::performJavaScriptURLRequest):
3759         (WebKit::PluginView::windowScriptNPObject):
3760         (WebKit::PluginView::pluginElementNPObject):
3761         * WebProcess/WebPage/WebFrame.cpp:
3762         (WebKit::WebFrame::jsContext):
3763         (WebKit::WebFrame::jsContextForWorld):
3764         (WebKit::WebFrame::jsWrapperForWorld):
3765         * WebProcess/WebPage/WebInspector.cpp:
3766         (WebKit::WebInspector::didSave):
3767         (WebKit::WebInspector::didAppend):
3768         * WebProcess/WebPage/WebPage.cpp:
3769         (WebKit::WebPage::runJavaScriptInMainFrame):
3770
3771 2013-08-16  Brady Eidson  <beidson@apple.com>
3772
3773         (NetworkProcess)  Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously
3774         https://bugs.webkit.org/show_bug.cgi?id=119493
3775
3776         Reviewed by Alexey Proskuryakov.
3777
3778         This patch does the following:
3779           - Consolidates SchedulableLoader and NetworkResourceLoader into one class.
3780           - Removes SyncNetworkResourceLoader.
3781           - Adds a NetworkLoaderClient interface that customizes certain behaviors of the NetworkResourceLoader.
3782           - Implements a SynchronousNetworkLoaderClient and AsynchronousNetworkLoaderClient for the two different types of loads.
3783
3784         The AsynchronousNetworkLoaderClient results in messaging back progress to the WebProcess as the load progresses.
3785         The SynchronousNetworkLoaderClient accumulates the response, data, and error to be communicated back to the WebProcess
3786         only when the load is complete.
3787
3788         Update small swaths of code to reflect that NetworkResourceLoader is the One True Loader (tm):
3789         * NetworkProcess/HostRecord.cpp:
3790         (WebKit::HostRecord::scheduleResourceLoader):
3791         (WebKit::HostRecord::addLoaderInProgress):
3792         (WebKit::removeLoaderFromQueue):
3793         (WebKit::HostRecord::removeLoader):
3794         (WebKit::HostRecord::servePendingRequestsForQueue):
3795         (WebKit::HostRecord::limitsRequests):
3796         * NetworkProcess/HostRecord.h:
3797
3798         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3799         (WebKit::NetworkConnectionToWebProcess::didClose):
3800         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
3801         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
3802         * NetworkProcess/NetworkConnectionToWebProcess.h:
3803
3804         * NetworkProcess/NetworkProcess.cpp:
3805         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
3806         (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
3807         (WebKit::NetworkResourceLoadScheduler::removeLoader):
3808         (WebKit::NetworkResourceLoadScheduler::receivedRedirect):
3809         (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
3810         (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader):
3811         * NetworkProcess/NetworkResourceLoadScheduler.h:
3812
3813         Combine ScheduleableLoader and NetworkResourceLoader into NetworkResourceLoader:
3814         * NetworkProcess/NetworkResourceLoader.cpp:
3815         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
3816         (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
3817         (WebKit::NetworkResourceLoader::isSynchronous):
3818         (WebKit::NetworkResourceLoader::start):
3819         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
3820         (WebKit::NetworkResourceLoader::didReceiveBuffer):
3821         (WebKit::NetworkResourceLoader::didFinishLoading):
3822         (WebKit::NetworkResourceLoader::didFail):
3823         (WebKit::NetworkResourceLoader::willSendRequestAsync):
3824         (WebKit::NetworkResourceLoader::continueWillSendRequest):
3825         (WebKit::NetworkResourceLoader::didSendData):
3826         (WebKit::NetworkResourceLoader::shouldUseCredentialStorage):
3827         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
3828         (WebKit::NetworkResourceLoader::consumeSandboxExtensions):
3829         (WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
3830         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
3831         * NetworkProcess/NetworkResourceLoader.h:
3832         (WebKit::NetworkResourceLoader::create):
3833         (WebKit::NetworkResourceLoader::connectionToWebProcess):
3834         (WebKit::NetworkResourceLoader::priority):
3835         (WebKit::NetworkResourceLoader::request):
3836         (WebKit::NetworkResourceLoader::isLoadingMainResource):
3837         (WebKit::NetworkResourceLoader::setHostRecord):
3838         (WebKit::NetworkResourceLoader::hostRecord):
3839         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
3840
3841         Add an abstract NetworkLoaderClient to adapt a load to be either synchronous or asynchronous:
3842         * NetworkProcess/NetworkLoaderClient.h:
3843         (WebKit::NetworkLoaderClient::~NetworkLoaderClient):
3844         (WebKit::NetworkLoaderClient::isSynchronous):
3845         (WebKit::NetworkLoaderClient::NetworkLoaderClient):
3846
3847         The asynchronous loader client, primarily to message progress back to the WebProcess as it happens:
3848         * NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Added.
3849         (WebKit::AsynchronousNetworkLoaderClient::AsynchronousNetworkLoaderClient):
3850         (WebKit::AsynchronousNetworkLoaderClient::willSendRequest):
3851         (WebKit::AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
3852         (WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
3853         (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
3854         (WebKit::AsynchronousNetworkLoaderClient::didSendData):
3855         (WebKit::AsynchronousNetworkLoaderClient::didFinishLoading):
3856         (WebKit::AsynchronousNetworkLoaderClient::didFail):
3857         * NetworkProcess/AsynchronousNetworkLoaderClient.h:
3858         (WebKit::AsynchronousNetworkLoaderClient::create):
3859
3860         The synchronous loader client, primarily to accumulate results of the load to send back to the WebProcess all at once:
3861         * NetworkProcess/SynchronousNetworkLoaderClient.cpp: Added.
3862         (WebKit::SynchronousNetworkLoaderClient::SynchronousNetworkLoaderClient):
3863         (WebKit::SynchronousNetworkLoaderClient::~SynchronousNetworkLoaderClient):
3864         (WebKit::SynchronousNetworkLoaderClient::willSendRequest):
3865         (WebKit::SynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
3866         (WebKit::SynchronousNetworkLoaderClient::didReceiveResponse):
3867         (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
3868         (WebKit::SynchronousNetworkLoaderClient::didFinishLoading):
3869         (WebKit::SynchronousNetworkLoaderClient::didFail):
3870         (WebKit::SynchronousNetworkLoaderClient::sendDelayedReply):
3871         * NetworkProcess/SynchronousNetworkLoaderClient.h: Added.
3872         (WebKit::SynchronousNetworkLoaderClient::create):
3873
3874         * NetworkProcess/SchedulableLoader.cpp: Removed.
3875         * NetworkProcess/SchedulableLoader.h: Removed.
3876         * NetworkProcess/SyncNetworkResourceLoader.cpp: Removed.
3877         * NetworkProcess/SyncNetworkResourceLoader.h: Removed.
3878
3879         * WebKit2.xcodeproj/project.pbxproj:
3880
3881 2013-08-16  Gabor Rapcsanyi  <rgabor@webkit.org>
3882
3883         [Qt][ARM] Unreviewed buildfix after 154127.
3884
3885         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: Add missing header.
3886
3887 2013-08-15  Ryuan Choi  <ryuan.choi@samsung.com>
3888
3889         [EFL] Unreviewed build fix after r154142 and r154144.
3890
3891         * UIProcess/WebContext.cpp:
3892         (WebKit::WebContext::useTestingNetworkSession):
3893         Fixed build break when NETWORK_PROCESS is disabled after r154144.
3894
3895 2013-08-15  Chris Fleizach  <cfleizach@apple.com>
3896
3897         <https://webkit.org/b/119858> AX: Crash: com.apple.WebKit.WebContent at com.apple.WebKit2: WebKit::WebPage::accessibilityObjectForMainFramePlugin + 8
3898
3899         Reviewed by Tim Horton.
3900
3901         Ensure that the page is available before accessing it.
3902
3903         * WebProcess/WebPage/mac/WebPageMac.mm:
3904         (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
3905
3906 2013-08-15  Alexey Proskuryakov  <ap@apple.com>
3907
3908         [WK2] NetworkProcess should use a temporary storage session for test
3909         https://bugs.webkit.org/show_bug.cgi?id=119855
3910
3911         Reviewed by Darin Adler.
3912
3913         We used to have a bundle API for WebKitTestRunner to do this in injected bundle, but
3914         NetworkProcess has no injected bundle.
3915
3916         Added a WKContext API, sending the information to NetworkProcess with initialization
3917         parameters. Reworked WebProcess path to do the same for consistency - bundle API
3918         is better per se, but not when we also need to have another one.
3919
3920         * NetworkProcess/NetworkProcess.cpp:
3921         (WebKit::NetworkProcess::initializeNetworkProcess):
3922         * Shared/Network/NetworkProcessCreationParameters.cpp:
3923         (WebKit::NetworkProcessCreationParameters::encode):
3924         (WebKit::NetworkProcessCreationParameters::decode):
3925         * Shared/Network/NetworkProcessCreationParameters.h:
3926         * Shared/WebProcessCreationParameters.cpp:
3927         (WebKit::WebProcessCreationParameters::encode):
3928         (WebKit::WebProcessCreationParameters::decode):
3929         * Shared/WebProcessCreationParameters.h:
3930         * UIProcess/API/C/WKContext.cpp:
3931         (WKContextUseTestingNetworkSession):
3932         * UIProcess/API/C/WKContextPrivate.h:
3933         * UIProcess/WebContext.cpp:
3934         (WebKit::WebContext::WebContext):
3935         (WebKit::WebContext::ensureNetworkProcess):
3936         (WebKit::WebContext::createNewWebProcess):
3937         (WebKit::WebContext::useTestingNetworkSession):
3938         * UIProcess/WebContext.h:
3939         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3940         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3941         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3942         * WebProcess/InjectedBundle/InjectedBundle.h:
3943         * WebProcess/WebProcess.cpp:
3944         (WebKit::WebProcess::initializeWebProcess):
3945
3946 2013-08-15  Anders Carlsson  <andersca@apple.com>
3947
3948         <https://webkit.org/b/119859> Frame::loader() should return a reference
3949
3950         Reviewed by Andreas Kling.
3951
3952         * Shared/WebRenderLayer.cpp:
3953         (WebKit::WebRenderLayer::create):
3954         * Shared/WebRenderObject.cpp:
3955         (WebKit::WebRenderObject::create):
3956         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
3957         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
3958         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3959         (WKBundleFrameGetFrameLoadState):
3960         (WKBundleFrameClearOpener):
3961         (WKBundleFrameCallShouldCloseOnWebView):
3962         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3963         (WebKit::InjectedBundleNodeHandle::documentFrame):
3964         (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
3965         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
3966         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3967         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3968         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
3969         (WebKit::InjectedBundleDOMWindowExtension::frame):
3970         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
3971         (WebKit::InjectedBundleHitTestResult::frame):
3972         (WebKit::InjectedBundleHitTestResult::targetFrame):
3973         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3974         (WebKit::PDFPlugin::clickedLink):
3975         * WebProcess/Plugins/PluginView.cpp:
3976         (WebKit::webPage):
3977         (WebKit::PluginView::didFailToInitializePlugin):
3978         (WebKit::PluginView::performFrameLoadURLRequest):
3979         (WebKit::PluginView::userAgent):
3980         (WebKit::PluginView::loadURL):
3981         (WebKit::PluginView::cancelManualStreamLoad):
3982         (WebKit::PluginView::proxiesForURL):
3983         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3984         (WebKit::WebChromeClient::focusedElementChanged):
3985         (WebKit::WebChromeClient::focusedFrameChanged):
3986         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
3987         (WebKit::WebChromeClient::closeWindowSoon):
3988         (WebKit::WebChromeClient::runJavaScriptAlert):
3989         (WebKit::WebChromeClient::runJavaScriptConfirm):
3990         (WebKit::WebChromeClient::runJavaScriptPrompt):
3991         (WebKit::WebChromeClient::unavailablePluginButtonClicked):
3992         (WebKit::WebChromeClient::print):
3993         (WebKit::WebChromeClient::exceededDatabaseQuota):
3994         (WebKit::WebChromeClient::runOpenPanel):
3995         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3996         (WebKit::WebContextMenuClient::searchWithGoogle):
3997         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3998         (WebKit::WebEditorClient::textFieldDidBeginEditing):
3999         (WebKit::WebEditorClient::textFieldDidEndEditing):
4000         (WebKit::WebEditorClient::textDidChangeInTextField):
4001         (WebKit::WebEditorClient::textDidChangeInTextArea):
4002         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
4003         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
4004         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4005         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
4006         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
4007         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
4008         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
4009         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
4010         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
4011         (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
4012         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
4013         (WebKit::WebFrameLoaderClient::updateGlobalHistory):
4014         (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
4015         (WebKit::WebFrameLoaderClient::restoreViewState):
4016         (WebKit::WebFrameLoaderClient::createFrame):
4017         (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
4018         (WebKit::WebFrameLoaderClient::objectContentType):
4019         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
4020         (WebKit::WebPlatformStrategies::getPluginInfo):
4021         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
4022         (WebKit::WebFrameNetworkingContext::blockedError):
4023         * WebProcess/WebPage/WebFrame.cpp:
4024         (WebKit::WebFrame::didReceivePolicyDecision):
4025         (WebKit::WebFrame::startDownload):
4026         (WebKit::WebFrame::source):
4027         (WebKit::WebFrame::contentsAsString):
4028         (WebKit::WebFrame::url):
4029         (WebKit::WebFrame::parentFrame):
4030         (WebKit::WebFrame::childFrames):
4031         (WebKit::WebFrame::stopLoading):
4032         (WebKit::WebFrame::frameForContext):
4033         (WebKit::WebFrame::provisionalURL):
4034         (WebKit::WebFrame::suggestedFilenameForResourceWithURL):
4035         (WebKit::WebFrame::mimeTypeForResourceWithURL):
4036         (WebKit::WebFrameFilter::shouldIncludeSubframe):
4037         * WebProcess/WebPage/WebPage.cpp:
4038         (WebKit::WebPage::createPlugin):
4039         (WebKit::WebPage::close):
4040         (WebKit::WebPage::tryClose):
4041         (WebKit::WebPage::loadURLRequest):
4042         (WebKit::WebPage::loadDataImpl):
4043         (WebKit::WebPage::linkClicked):
4044         (WebKit::WebPage::stopLoadingFrame):
4045         (WebKit::WebPage::stopLoading):
4046         (WebKit::WebPage::reload):
4047         (WebKit::WebPage::tryRestoreScrollPosition):
4048         (WebKit::WebPage::getMainResourceDataOfFrame):
4049         (WebKit::resourceDataForFrame):
4050         (WebKit::shouldReuseCommittedSandboxExtension):
4051         (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
4052         (WebKit::WebPage::hasLocalDataForURL):
4053         (WebKit::WebPage::setCustomTextEncodingName):
4054         (WebKit::WebPage::canPluginHandleResponse):
4055         (WebKit::WebPage::canShowMIMEType):
4056         (WebKit::WebPage::didCommitLoad):
4057         * WebProcess/WebPage/mac/WebPageMac.mm:
4058         (WebKit::WebPage::platformHasLocalDataForURL):
4059         (WebKit::cachedResponseForURL):
4060         * WebProcess/WebProcess.cpp:
4061         (WebKit::WebProcess::downloadRequest):
4062
4063 2013-08-14  Filip Pizlo  <fpizlo@apple.com>
4064
4065         Typed arrays should be rewritten
4066         https://bugs.webkit.org/show_bug.cgi?id=119064
4067
4068         Reviewed by Oliver Hunt.
4069         
4070         You don't need to include JSUint8Array anymore if you just want to
4071         unwrap one; JSDOMBinding gives you all of the things you need.
4072
4073         * WebProcess/InjectedBundle/InjectedBundle.cpp:
4074
4075 2013-08-15  Eric Carlson  <eric.carlson@apple.com>
4076
4077         [Mac] Remove "legacy" media UI
4078         https://bugs.webkit.org/show_bug.cgi?id=119752
4079
4080         Reviewed by Jer Noble.
4081
4082         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
4083         (InitWebCoreSystemInterface): Remove MediaControllerThemeAvailable.
4084
4085 2013-08-14  Dean Jackson  <dino@apple.com>
4086
4087         <https://webkit.org/b/119827> Allow primary plug-in detection to run more than once if necessary
4088
4089         Reviewed by Tim Horton.
4090
4091         We occasionally see cases where the primary plug-in detection runs before the plugins have been added
4092         to the page, especially if they do so in response to a load event. Tweak the algorithm so that it can
4093         run an arbitrary number of times if it fails.
4094
4095         While here, also have the detection run if there has ever been a plugin in the page as opposed to any
4096         current views. We may have snapshotted a plugin by now and deleted its view.
4097
4098         * WebProcess/WebPage/WebPage.cpp:
4099         (WebKit::WebPage::WebPage): initialise new members.
4100         (WebKit::WebPage::addPluginView): Mark that we've seen a plugin.
4101         (WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset new members.
4102         (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Exit early if we've never
4103         seen a plugin, rather than if we don't have any active views. Also, if we didn't find anything set
4104         a timer to run again (maximum of two attempts at the moment).
4105         * WebProcess/WebPage/WebPage.h: New members - m_numberOfPrimarySnapshotDetectionAttempts
4106         and m_hasSeenPlugin.
4107
4108 2013-08-14  Dean Jackson  <dino@apple.com>
4109
4110         <https://webkit.org/b/119820> Add pluginView-related logging to WebPage
4111
4112         Reviewed by Tim Horton.
4113
4114         Add some more diagnostic output to help track down bugs.
4115
4116         * WebProcess/WebPage/WebPage.cpp:
4117         (WebKit::WebPage::addPluginView): More logging.
4118         (WebKit::WebPage::removePluginView): Ditto.
4119
4120 2013-08-14  Alexey Proskuryakov  <ap@apple.com>
4121
4122         [WK2] Sync messages with with non-default timeout sent from secondary threads always time out
4123         https://bugs.webkit.org/show_bug.cgi?id=119767
4124
4125         Fix by Justin Bur.
4126         Reviewed by Darin Adler.
4127
4128         * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
4129         The argument to wait() is absolute time, not a delta. This calculation matches one
4130         in Connection::waitForMessage().
4131
4132 2013-08-14  Tim Horton  <timothy_horton@apple.com>
4133
4134         REGRESSION (r153877): Plugin scanning slows creation of WebViews
4135         https://bugs.webkit.org/show_bug.cgi?id=119665
4136         <rdar://problem/14716549>
4137
4138         Reviewed by Darin Adler.
4139
4140         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
4141         (WebKit::WebPlatformStrategies::refreshPlugins):
4142         Don't repopulate the plugin cache in refreshPlugins, just invalidate it.
4143         It will be repopulated the next time something tries to use it.
4144
4145 2013-08-12  Dan Bernstein  <mitz@apple.com>
4146
4147         Fixed an off-by-(sizeof(char*) - 1) bug.
4148
4149         Reviewed by Sam Weinig.
4150
4151         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
4152         (WebKit::XPCServiceEventHandler): Allocate a sufficiently large buffer.
4153
4154 2013-08-12  Beth Dakin  <bdakin@apple.com>
4155
4156         Remove didNewFirstVisuallyNonEmptyLayout from WebKit2
4157         https://bugs.webkit.org/show_bug.cgi?id=119658
4158
4159         Reviewed by Darin Adler.
4160