0d670e54bdacd9a41d714bf32dbbe4fb7149c5d0
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-12-23  Tim Horton  <timothy_horton@apple.com>
2
3         REGRESSION (r160672): Random remote layers are getting shadows
4         https://bugs.webkit.org/show_bug.cgi?id=126126
5
6         Reviewed by Anders Carlsson.
7
8         In http://trac.webkit.org/changeset/160672, we unconditionally
9         check m_properties.customAppearance without regard for whether it
10         has ever been initialized. This would result in sending an uninitialized
11         custom appearance to the UI process, which could end up requesting a shadow.
12
13         * Shared/mac/RemoteLayerTreeTransaction.mm:
14         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
15         Initialize LayerProperties to the CoreAnimation defaults.
16
17         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
18         (PlatformCALayerRemote::PlatformCALayerRemote):
19         Remove wrongly-placed default initialization of contentsScale;
20         there's no reason to send it across the wire for every new layer
21         if it's left at the default.
22
23 2013-12-23  Anders Carlsson  <andersca@apple.com>
24
25         Use std::chrono::milliseconds for message wait timeouts in WebKit2
26         https://bugs.webkit.org/show_bug.cgi?id=126168
27
28         Reviewed by Sam Weinig.
29
30         * Platform/CoreIPC/Connection.cpp:
31         (CoreIPC::Connection::waitForMessage):
32         * Platform/CoreIPC/Connection.h:
33         (CoreIPC::Connection::waitForAndDispatchImmediately):
34         * UIProcess/API/mac/WKView.mm:
35         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
36         (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
37         * UIProcess/DrawingAreaProxy.cpp:
38         * UIProcess/DrawingAreaProxy.h:
39         (WebKit::DrawingAreaProxy::didUpdateBackingStoreStateTimeout):
40         (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate):
41         * UIProcess/WebPageProxy.cpp:
42         (WebKit::WebPageProxy::waitForDidUpdateViewState):
43         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
44         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
45         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
46
47 2013-12-23  Anders Carlsson  <andersca@apple.com>
48
49         Include <condition_variable>, not <thread>.
50
51         * Platform/CoreIPC/Connection.h:
52         * Shared/BlockingResponseMap.h:
53         * UIProcess/API/mac/WKPrintingView.h:
54
55 2013-12-23  Lucas Forschler  <lforschler@apple.com>
56
57         <rdar://problem/15682948> Update copyright strings
58
59         Reviewed by Dan Bernstein
60
61         * DatabaseProcess/EntryPoint/mac/LegacyProcess/Info.plist:
62         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development/Info.plist:
63         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist:
64         * Info.plist:
65         * NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist:
66         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist:
67         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
68         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
69         * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
70         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
71         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
72         * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
73         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
74         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
75         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
76
77 2013-12-23  Anders Carlsson  <andersca@apple.com>
78
79         Convert ThreadCondition in WebKit2 over to std::condition_variable
80         https://bugs.webkit.org/show_bug.cgi?id=126161
81
82         Reviewed by Sam Weinig.
83
84         * Platform/CoreIPC/Connection.cpp:
85         (CoreIPC::Connection::waitForMessage):
86         (CoreIPC::Connection::processIncomingMessage):
87         * Platform/CoreIPC/Connection.h:
88         * Shared/BlockingResponseMap.h:
89         (BlockingResponseMap::waitForResponse):
90         (BlockingResponseMap::didReceiveResponse):
91         (BlockingResponseMap::cancel):
92         * UIProcess/API/mac/WKPrintingView.h:
93         * UIProcess/API/mac/WKPrintingView.mm:
94         (pageDidDrawToPDF):
95         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
96         (prepareDataForPrintingOnSecondaryThread):
97         (-[WKPrintingView knowsPageRange:]):
98
99 2013-12-22  Martin Robinson  <mrobinson@igalia.com>
100
101         [GTK][CMake] libtool-compatible soversion calculation
102         https://bugs.webkit.org/show_bug.cgi?id=125511
103
104         Reviewed by Gustavo Noronha Silva.
105
106         * CMakeLists.txt: Use the POPULATE_LIBRARY_VERSION macro and the
107         library-specific version information.
108
109 2013-12-23  Gustavo Noronha Silva  <gns@gnome.org>
110
111         [GTK] [CMake] Generate pkg-config files
112         https://bugs.webkit.org/show_bug.cgi?id=125685
113
114         Reviewed by Martin Robinson.
115
116         * PlatformGTK.cmake: generate webkit2gtk.pc.
117
118 2013-12-23  Carlos Garcia Campos  <cgarcia@igalia.com>
119
120         [GTK] Build with network process unconditionally
121         https://bugs.webkit.org/show_bug.cgi?id=126128
122
123         Reviewed by Martin Robinson.
124
125         Build always with the network process enabled and decide whether
126         to use it or not using an environment variable. This makes a lot
127         easier to work on the network process and also to switch between
128         using it or not.
129
130         * GNUmakefile.am: Make sure we always include the WebKit2Prefix.h.
131         * UIProcess/API/gtk/WebKitWebContext.cpp:
132         (createDefaultWebContext): Use the network process when
133         WEBKIT_USE_NETWORK_PROCESS environment variable is present.
134         * WebKit2Prefix.h: Always enable network process for GTK port.
135
136 2013-12-23  Brian Holt  <brian.holt@samsung.com>
137
138         [WK2] Implement platform specific Resource Response for SOUP
139         https://bugs.webkit.org/show_bug.cgi?id=125422
140
141         Reviewed by Martin Robinson.
142
143         SOUP specific Resource Response implementation for the Network
144         Process.
145
146         * NetworkProcess/NetworkResourceLoader.cpp:
147         (WebKit::NetworkResourceLoader::continueWillSendRequest):
148         * WebProcess/Network/WebResourceLoader.cpp:
149         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
150
151 2013-12-22  Kwang Yul Seo  <skyul@company100.net>
152
153         [WK2][SOUP] WebContext::allowSpecificHTTPSCertificateForHost does not work correctly when m_usesNetworkProcess is false
154         https://bugs.webkit.org/show_bug.cgi?id=125564
155
156         Reviewed Carlos Garcia Campos.
157
158         WebContext::allowSpecificHTTPSCertificateForHost should send
159         AllowSpecificHTTPSCertificateForHost to the web process when
160         m_usesNetworkProcess is false. Also we shouldn't guard
161         WebProcess::allowSpecificHTTPSCertificateForHost with
162         !ENABLE(NETWORK_PROCESS) because we need this method when
163         m_usesNetworkProcess is false.
164
165         * UIProcess/WebContext.cpp:
166         (WebKit::WebContext::allowSpecificHTTPSCertificateForHost):
167         * WebProcess/WebProcess.h:
168         * WebProcess/WebProcess.messages.in:
169         * WebProcess/soup/WebProcessSoup.cpp:
170
171 2013-12-22  Martin Robinson  <mrobinson@igalia.com>
172
173         [GTK][CMake] Integrate GResource for inspector files (and others?)
174         https://bugs.webkit.org/show_bug.cgi?id=125569
175
176         Reviewed by Gustavo Noronha Silva.
177
178         * GNUmakefile.am: Use the newly added static WebKit2InspectorGResourceBundle.xml
179         instead of generating the same file each time.
180         * PlatformGTK.cmake: Add support for building the GResource bundles into WebKit2.
181         * UIProcess/API/gtk/WebKit2InspectorGResourceBundle.xml: Added.
182
183 2013-12-22  Csaba Osztrogonác  <ossy@webkit.org>
184
185         URTBF after r160971 to try to make EFL build again.
186
187         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
188         (WebKit::internalError):
189
190 2013-12-22  Carlos Garcia Campos  <cgarcia@igalia.com>
191
192         Unreviewed. Fix GTK+ build after r160971 and r160969.
193
194         * GNUmakefile.list.am:
195         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
196         (webkit_file_chooser_request_select_files):
197         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
198         (didReceiveWebViewMessageFromInjectedBundle):
199         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
200         (webkitURISchemeRequestCreate):
201         * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
202         * UIProcess/API/gtk/WebKitWebResource.cpp:
203         (webkit_web_resource_get_data):
204         * UIProcess/soup/WebSoupRequestManagerClient.h:
205         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
206         (WebKit::internalError):
207
208 2013-12-21  Ryuan Choi  <ryuan.choi@samsung.com>
209
210         Unreviewed build fix attempt on EFL port after r160971 and r160969
211
212         * CMakeLists.txt:
213         * UIProcess/soup/WebSoupRequestManagerClient.cpp:
214         (WebKit::WebSoupRequestManagerClient::didReceiveURIRequest):
215         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
216         (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequest):
217
218 2013-12-21  Sam Weinig  <sam@webkit.org>
219
220         [WK2] Rename WebError to API::Error
221         https://bugs.webkit.org/show_bug.cgi?id=126125
222
223         Reviewed by Anders Carlsson.
224
225         * Shared/API/c/WKError.cpp:
226         (WKErrorGetTypeID):
227         (WKErrorCopyWKErrorDomain):
228         * Shared/API/c/WKSharedAPICast.h:
229         (WebKit::toAPI):
230         * Shared/API/c/cf/WKErrorCF.cpp:
231         (WKErrorCreateWithCFError):
232         * Shared/APIError.cpp: Copied from Source/WebKit2/Shared/WebError.cpp.
233         (API::Error::webKitErrorDomain):
234         (API::Error::encode):
235         (API::Error::decode):
236         * Shared/APIError.h: Copied from Source/WebKit2/Shared/WebError.h.
237         (API::Error::create):
238         (API::Error::domain):
239         (API::Error::failingURL):
240         (API::Error::localizedDescription):
241         (API::Error::Error):
242         * Shared/Cocoa/WKNSError.h:
243         (WebKit::wrapper):
244         * Shared/Cocoa/WKNSError.mm:
245         (-[WKNSError _web_createTarget]):
246         * Shared/UserData.cpp:
247         (WebKit::UserData::encode):
248         (WebKit::UserData::decode):
249         * Shared/UserMessageCoders.h:
250         (WebKit::UserMessageEncoder::baseEncode):
251         (WebKit::UserMessageDecoder::baseDecode):
252         * Shared/WebError.cpp: Removed.
253         * Shared/WebError.h: Removed.
254         * UIProcess/AutoCorrectionCallback.h:
255         (WebKit::AutocorrectionDataCallback::invalidate):
256         * UIProcess/GenericCallback.h:
257         (WebKit::VoidCallback::invalidate):
258         (WebKit::GenericCallback::invalidate):
259         (WebKit::ComputedPagesCallback::invalidate):
260         (WebKit::ImageCallback::invalidate):
261         * UIProcess/WebPageProxy.cpp:
262         (WebKit::WebPageProxy::printFinishedCallback):
263         * UIProcess/WebPageProxy.h:
264         (WebKit::ValidateCommandCallback::invalidate):
265         (WebKit::GestureCallback::invalidate):
266         (WebKit::TouchesCallback::invalidate):
267         * WebKit2.xcodeproj/project.pbxproj:
268         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
269         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
270         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
271         (WebKit::blockedError):
272         (WebKit::cannotShowURLError):
273         (WebKit::interruptedForPolicyChangeError):
274         (WebKit::cannotShowMIMETypeError):
275         (WebKit::pluginWillHandleLoadError):
276         (WebKit::internalError):
277
278 2013-12-20  Sam Weinig  <sam@webkit.org>
279
280         [WK2] Rename WebURL to API::URL
281         https://bugs.webkit.org/show_bug.cgi?id=126100
282
283         Reviewed by Anders Carlsson.
284
285         * Shared/API/c/WKSharedAPICast.h:
286         (WebKit::toURLRef):
287         (WebKit::toCopiedURLAPI):
288         * Shared/API/c/WKURL.cpp:
289         (WKURLGetTypeID):
290         (WKURLCreateWithUTF8CString):
291         (WKURLCreateWithBaseURL):
292         * Shared/API/c/cf/WKURLCF.mm:
293         (WKURLCreateWithCFURL):
294         * Shared/APIURL.h: Copied from Source/WebKit2/Shared/WebURL.h.
295         (API::URL::create):
296         (API::URL::string):
297         (API::URL::host):
298         (API::URL::protocol):
299         (API::URL::path):
300         (API::URL::lastPathComponent):
301         (API::URL::encode):
302         (API::URL::decode):
303         (API::URL::URL):
304         * Shared/Cocoa/WKNSURL.h:
305         (WebKit::wrapper):
306         * Shared/Cocoa/WKNSURL.mm:
307         (-[WKNSURL _web_createTarget]):
308         * Shared/Plugins/Netscape/PluginInformation.cpp:
309         (WebKit::createPluginInformationDictionary):
310         * Shared/UserData.cpp:
311         (WebKit::UserData::encode):
312         (WebKit::UserData::decode):
313         * Shared/UserMessageCoders.h:
314         (WebKit::UserMessageEncoder::baseEncode):
315         (WebKit::UserMessageDecoder::baseDecode):
316         * Shared/WebArchiveResource.h:
317         * Shared/WebURL.h: Removed.
318         * UIProcess/WebFrameProxy.cpp:
319         (WebKit::WebFrameProxy::getResourceData):
320         * UIProcess/WebFrameProxy.h:
321         * UIProcess/WebIconDatabase.cpp:
322         (WebKit::WebIconDatabase::didChangeIconForPageURL):
323         (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
324         * UIProcess/WebIconDatabaseClient.cpp:
325         (WebKit::WebIconDatabaseClient::didChangeIconForPageURL):
326         (WebKit::WebIconDatabaseClient::iconDataReadyForPageURL):
327         * UIProcess/WebIconDatabaseClient.h:
328         * UIProcess/WebOpenPanelResultListenerProxy.cpp:
329         (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
330         * UIProcess/WebPageProxy.cpp:
331         (WebKit::WebPageProxy::getResourceDataFromFrame):
332         * UIProcess/WebPageProxy.h:
333         * WebKit2.xcodeproj/project.pbxproj:
334         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
335
336 2013-12-21  Carlos Garcia Campos  <cgarcia@igalia.com>
337
338         [GTK] Test /webkit2/WebKitWebResource/mime-type fails when run after /webkit2/WebKitWebView/resources
339         https://bugs.webkit.org/show_bug.cgi?id=126119
340
341         Reviewed by Martin Robinson.
342
343         The problem is that when the blank.ico resource is loaded from the
344         disk cache, the mime type is null, because the soup cache doesn't
345         cache sniffed mime types. This doesn't happen when a resource is
346         loaded form the memory cache, because the ResourceResponse is
347         cached, not only the headers. I think the disk cache should also
348         cache the sniffed content type, but that needs to be done in
349         soup. For now we can workaround the issue in the unit test by
350         making sure that resources that can be cached, also include the
351         Content-Type header, this way the mime type won't be sniffed and
352         it will be cached as a HTTP header in the disk cache.
353
354         * UIProcess/API/gtk/tests/TestResources.cpp:
355         (serverCallback): Add Content-Type header for resources that can
356         be cached.
357
358 2013-12-21  Carlos Garcia Campos  <cgarcia@igalia.com>
359
360         REGRESSION(r160909): [GTK] Tests /webkit2/WebKitWebView/default-menu and /webkit2/WebKitSettings/webkit-settings fail
361         https://bugs.webkit.org/show_bug.cgi?id=126117
362
363         Reviewed by Martin Robinson.
364
365         In r160909 the fullscreen setting default value was changed, but
366         the unit tests relaying on the default value were not updated
367         accordingly.
368
369         * UIProcess/API/gtk/tests/TestContextMenu.cpp:
370         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
371         (testWebKitSettings):
372
373 2013-12-20  Jaehun Lim  <ljaehun.lim@samsung.com>
374
375         Unreviewed build fix after r160939
376
377         Add ENABLE(CUSTOM_PROTOCOLS) guard.
378
379         * UIProcess/WebContext.cpp:
380
381 2013-12-20  Simon Fraser  <simon.fraser@apple.com>
382
383         Change "threaded scrolling" terminology to "asynchronous scrolling"
384         https://bugs.webkit.org/show_bug.cgi?id=126094
385
386         Reviewed by Tim Horton.
387         
388         Rename ENABLE_THREADED_SCROLLING to ENABLE_ASYNC_SCROLLING, and change
389         references to "main thread scrolling" to "synchronous scrolling".
390
391         * WebProcess/WebPage/EventDispatcher.cpp:
392         (WebKit::EventDispatcher::wheelEvent):
393         * WebProcess/WebPage/EventDispatcher.h:
394         * WebProcess/WebPage/WebPage.cpp:
395         (WebKit::WebPage::WebPage):
396         (WebKit::WebPage::~WebPage):
397         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
398         (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
399         (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
400         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
401         (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
402
403 2013-12-20  Ricky Mondello  <rmondello@apple.com>
404
405         Rename PlugInAutoStartProvider's ...EntriesAddedBeforeTime facility to ...EntriesAddedAfterTime
406         https://bugs.webkit.org/show_bug.cgi?id=126078
407
408         Reviewed by Anders Carlsson.
409
410         r160922 accidentally named a facility for filtering out data added after a certain time,
411         "...FilteringOutEntriesAddedBeforeTime", which was incorrect. This patch renames those instances
412         to "...FilteringOutEntriesAddedAfterTime".
413
414         * UIProcess/API/C/WKContext.cpp:
415         (WKContextSetPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime):
416         * UIProcess/API/C/WKContext.h:
417         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
418         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsFilteringOutEntriesAddedAfterTime):
419         * UIProcess/Plugins/PlugInAutoStartProvider.h:
420         * UIProcess/WebContext.cpp:
421         (WebKit::WebContext::setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime):
422         * UIProcess/WebContext.h:
423
424 2013-12-20  Sam Weinig  <sam@webkit.org>
425
426         [WK2] Add SPI for using a custom protocol handler
427         https://bugs.webkit.org/show_bug.cgi?id=126089
428
429         Reviewed by Anders Carlsson.
430
431         * UIProcess/API/C/mac/WKContextPrivateMac.h:
432         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
433         (WKContextRegisterSchemeForCustomProtocol):
434         (WKContextUnregisterSchemeForCustomProtocol):
435         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
436         (+[WKBrowsingContextController registerSchemeForCustomProtocol:]):
437         (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]):
438         * UIProcess/WebContext.cpp:
439         (WebKit::WebContext::globalURLSchemesWithCustomProtocolHandlers):
440         (WebKit::WebContext::registerGlobalURLSchemeAsHavingCustomProtocolHandlers):
441         (WebKit::WebContext::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers):
442         * UIProcess/WebContext.h:
443         * UIProcess/mac/WebContextMac.mm:
444         (WebKit::WebContext::platformInitializeWebProcess):
445         (WebKit::WebContext::platformInitializeNetworkProcess):
446         (WebKit::WebContext::registerNotificationObservers):
447         (WebKit::WebContext::unregisterNotificationObservers):
448
449 2013-12-20  Tim Horton  <timothy_horton@apple.com>
450
451         WebKit2 View Gestures: Implement smartMagnifyWithEvent: and make it work
452         https://bugs.webkit.org/show_bug.cgi?id=125752
453         <rdar://problem/15664245>
454
455         Reviewed by Anders Carlsson.
456
457         Implement "smart magnify", which is the double-tap-to-zoom gesture on OS X.
458
459         * UIProcess/API/mac/WKView.mm:
460         (-[WKView smartMagnifyWithEvent:]):
461         Forward smartMagnifyWithEvent to ViewGestureController.
462
463         * UIProcess/mac/ViewGestureController.cpp:
464         (WebKit::ViewGestureController::handleMagnificationGesture):
465         Drive-by repair a comment.
466
467         (WebKit::ViewGestureController::handleSmartMagnificationGesture):
468         Added. Immediately dispatch a message to the web process to retrieve
469         the rendered rect of the element under the gesture.
470
471         (WebKit::maximumRectangleComponentDelta):
472         Return the absolute maximum delta between corresponding components of two rects.
473
474         (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
475         Once the WebProcess has replied with the relevant geometry, use it to
476         determine our target rectangle (the element's rect, with some padding)
477         and target magnification (attempting to keep replaced elements
478         fully in-view, and otherwise zooming in as far as possible to fit the
479         element's width).
480
481         If this gesture occurs after the page is already magnified, and targets
482         a similar region to the previous smart magnification gesture, zoom out
483         instead of panning across the page.
484
485         Begin a transient zoom with the current magnification, and immediately
486         commit it at our target magnification and offset, so that the drawing
487         area will animate to the new parameters.
488
489         (WebKit::ViewGestureController::endActiveGesture):
490         * UIProcess/mac/ViewGestureController.h:
491         * UIProcess/mac/ViewGestureController.messages.in:
492         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
493         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
494         Hit-test the document to determine the node under the smart magnification
495         gesture, and return it to the UI process along with various other bits of data.
496
497         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
498         * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
499         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
500         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
501         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
502         (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
503         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
504         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
505         Instead of short-circuiting the animation if we didn't have to constrain
506         the origin, short-circuit if we're already *at* the right origin,
507         like the comment said. This prevents jarring jumps when double-tap-panning
508         between elements when zoomed all the way in.
509
510 2013-12-20  Ricky Mondello  <rmondello@apple.com>
511
512         Allow partial application of PlugInAutoStart tables based on timestamp
513         https://bugs.webkit.org/show_bug.cgi?id=125871
514
515         Reviewed by Anders Carlsson.
516
517         * UIProcess/API/C/WKContext.cpp:
518         (WKContextSetPlugInAutoStartOriginsFilteringOutEntriesAddedBeforeTime): New API.
519         * UIProcess/API/C/WKContext.h: New API.
520
521         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
522         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable): Call setAutoStartOriginsTableWithItemsPassingTest
523             with a predicate that lets all policies pass.
524         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsFilteringOutEntriesAddedBeforeTime): Call
525             setAutoStartOriginsTableWithItemsPassingTest with a predicate that lets policies created before a certain
526             time pass.
527         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest): Added. Contains most of the
528             contents of setAutoStartOriginsTable, with support for applying a predicate.
529         * UIProcess/Plugins/PlugInAutoStartProvider.h: Add public method,
530             `setAutoStartOriginsFilteringOutEntriesAddedBeforeTime`, and private method,
531             `setAutoStartOriginsTableWithItemsPassingTest`.
532
533         * UIProcess/WebContext.cpp:
534         (WebKit::WebContext::setPlugInAutoStartOriginsFilteringOutEntriesAddedBeforeTime): Pass through to the
535             PlugInAutoStartProvider.
536         * UIProcess/WebContext.h: Declare `setPlugInAutoStartOriginsFilteringOutEntriesAddedBeforeTime`.
537
538 2013-12-20  Enrique Ocaña González  <eocanha@igalia.com>
539
540         [GTK] WebKitWebViewBase's ClickCounter should be reset
541         https://bugs.webkit.org/show_bug.cgi?id=122551
542
543         Reviewed by Martin Robinson.
544
545         * UIProcess/API/gtk/PageClientImpl.cpp:
546         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
547         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
548         (webkitWebViewBaseResetClickCounter):
549         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
550
551 2013-12-20  Enrique Ocaña González  <eocanha@igalia.com>
552
553         [GTK] The fullscreen API should be enabled by default
554         https://bugs.webkit.org/show_bug.cgi?id=125993
555
556         Reviewed by Gustavo Noronha Silva.
557
558         Set the WebSettings property to TRUE
559
560         * UIProcess/API/gtk/WebKitSettings.cpp:
561         (webkit_settings_class_init):
562
563 2013-12-20  Carlos Garcia Campos  <cgarcia@igalia.com>
564
565         [GTK] Some unit tests using web extensions fail when run alone
566         https://bugs.webkit.org/show_bug.cgi?id=126002
567
568         Reviewed by Gustavo Noronha Silva.
569
570         The problem is that the page is created before the dbus connection
571         has been established, and we are connecting to web-page-created
572         signal once we have a valid dbus connection. We should connect to
573         the signal before connecting to dbus and queue any request to emit
574         a dbus signal until the connection is set. This also fixes the
575         WebExtensions tests when using the network process because a new
576         web process is launched for every test case.
577
578         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
579         (DelayedSignal::DelayedSignal): Helper struct to queue signal
580         emissions requested before the dbus connection has been
581         established.
582         (emitDocumentLoaded): Emit the dbus DocumentLoaded signal.
583         (documentLoadedCallback): Queue the signal emission if we still
584         don't have a connection or call emitDocumentLoaded otherwise.
585         (emitURIChanged): Emit the dbus URIChanged signal.
586         (uriChangedCallback): Queue the signal emission if we still don't
587         have a connection or call emitURIChanged otherwise.
588         (pageCreatedCallback): Pass the web extension as user data to
589         document-loaded and uri-changed callbacks.
590         (busAcquiredCallback): Set the connection as user data of the web
591         extension and process any delayed signal emission pending.
592         (webkit_web_extension_initialize): Connect to web-page-create
593         signal before connecting to dbus.
594
595 2013-12-19  Benjamin Poulain  <bpoulain@apple.com>
596
597         [WK2][iOS] Enable multiprocess by default
598         https://bugs.webkit.org/show_bug.cgi?id=126030
599
600         Reviewed by Anders Carlsson.
601
602         * UIProcess/API/Cocoa/WKProcessGroup.mm:
603         (-[WKProcessGroup initWithInjectedBundleURL:]):
604
605 2013-12-19  Andy Estes  <aestes@apple.com>
606
607         Remove WebFilterEvaluator wrappers from WebKitSystemInterface
608         https://bugs.webkit.org/show_bug.cgi?id=126028
609
610         Reviewed by Anders Carlsson.
611
612         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
613         (InitWebCoreSystemInterface): Don't INIT() removed function pointers.
614
615 2013-12-19  Benjamin Poulain  <bpoulain@apple.com>
616
617         Remove WKContentViewPrivate.h, WKContentView.h is private now
618         https://bugs.webkit.org/show_bug.cgi?id=125981
619
620         Reviewed by Dan Bernstein.
621
622         There is no need for a separate header, WKContentView has become an implementation
623         detail of WKView.
624
625         * UIProcess/API/ios/WKContentView.h:
626         * UIProcess/API/ios/WKContentViewInternal.h:
627         * UIProcess/API/ios/WKContentViewPrivate.h: Removed.
628         * UIProcess/API/ios/WKView.mm:
629
630 2013-12-19  Alexey Proskuryakov  <ap@apple.com>
631
632         REGRESSION (r160515): Frequent assertion failures on printing/print-close-crash.html
633         https://bugs.webkit.org/show_bug.cgi?id=126014
634
635         Rolled out r160515 while Chris is investigating. Added FIXME comments in other
636         places where we use this pattern.
637
638         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
639         (WebKit::WebChromeClient::runJavaScriptAlert):
640         (WebKit::WebChromeClient::runJavaScriptConfirm):
641         (WebKit::WebChromeClient::runJavaScriptPrompt):
642         (WebKit::WebChromeClient::print):
643         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
644         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
645
646 2013-12-19  Ricky Mondello  <rmondello@apple.com>
647
648         Add WebKit2 API for clearing the back-forward list
649         https://bugs.webkit.org/show_bug.cgi?id=126005
650
651         Reviewed by Anders Carlsson.
652
653         * UIProcess/API/C/WKBackForwardListRef.cpp:
654         (WKBackForwardListClear): Call through to the back-forward list's `clear()`.
655         * UIProcess/API/C/WKBackForwardListRef.h: Declare new API.
656
657 2013-12-19  Csaba Osztrogonác  <ossy@webkit.org>
658
659         One more URTBF to make GTK build happy after r160853.
660
661         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
662         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
663         (didReceiveWebViewMessageFromInjectedBundle):
664         * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
665         (webkitResponsePolicyDecisionCreate):
666         * UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
667
668 2013-12-19  Csaba Osztrogonác  <ossy@webkit.org>
669
670         URTBF for GTK after r160853.
671
672         * GNUmakefile.list.am:
673
674 2013-12-19  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
675
676         Unreviewed EFL build fix attempt after r160853
677
678         * CMakeLists.txt: Change WebURLResponse.cpp to APIURLResponse.cpp.
679
680 2013-12-17  Sam Weinig  <sam@webkit.org>
681
682         [WK2] Rename WebURLResponse to API::URLResponse
683         https://bugs.webkit.org/show_bug.cgi?id=125910
684
685         Reviewed by Andreas Kling.
686
687         * Shared/API/c/WKSharedAPICast.h:
688         (WebKit::toAPI):
689         * Shared/API/c/WKURLResponse.cpp:
690         (WKURLResponseGetTypeID):
691         * Shared/API/c/mac/WKURLResponseNS.mm:
692         (WKURLResponseCreateWithNSURLResponse):
693         * Shared/APIURLRequest.cpp:
694         * Shared/APIURLResponse.cpp: Copied from Source/WebKit2/Shared/WebURLResponse.cpp.
695         (API::URLResponse::URLResponse):
696         (API::URLResponse::encode):
697         (API::URLResponse::decode):
698         * Shared/APIURLResponse.h: Copied from Source/WebKit2/Shared/WebURLResponse.h.
699         (API::URLResponse::create):
700         * Shared/UserMessageCoders.h:
701         (WebKit::UserMessageEncoder::baseEncode):
702         (WebKit::UserMessageDecoder::baseDecode):
703         * Shared/WebURLResponse.cpp: Removed.
704         * Shared/WebURLResponse.h: Removed.
705         * UIProcess/WebDownloadClient.cpp:
706         (WebKit::WebDownloadClient::didReceiveResponse):
707         * UIProcess/WebPolicyClient.cpp:
708         (WebKit::WebPolicyClient::decidePolicyForResponse):
709         * WebKit2.xcodeproj/project.pbxproj:
710         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
711         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
712
713 2013-12-19  Nick Diego Yamane  <nick.yamane@openbossa.org>
714
715         [CoordinatedGraphics] Regressions in WebView's contentScaleFactor/contentPosition
716         https://bugs.webkit.org/show_bug.cgi?id=125943
717
718         Reviewed by Noam Rosenthal.
719
720         When WebView::pageDidRequestScroll is called it is scaling position requested
721         to scroll before store it as contentPosition, that is not necessary since WebView
722         already stores the requested contentScaleFactor so it's able to do that internally
723         when needed, what simplifies the API and improves the readability of webview's code.
724         This patch reverts changes from https://bugs.webkit.org/show_bug.cgi?id=118548, which
725         was causing some regressions in contentScaleFactor/contentPosition related stuff.
726         Besides that WebView::pageDidRequestScroll calls viewClient callback with the wrong
727         position (different from the position stored in WebView).
728
729         * UIProcess/API/efl/EwkView.cpp:
730         (EwkView::scrollBy):
731         * UIProcess/CoordinatedGraphics/WebView.cpp:
732         (WebKit::WebView::transformToScene):
733         (WebKit::WebView::updateViewportSize):
734         (WebKit::WebView::pageDidRequestScroll):
735         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
736         (WebKit::PageViewportControllerClientEfl::setViewportPosition):
737 2013-12-18  Tim Horton  <timothy_horton@apple.com>
738
739         WebKit2 View Gestures: Move WebProcess-side geometry collection into its own class
740         https://bugs.webkit.org/show_bug.cgi?id=125967
741
742         Reviewed by Anders Carlsson.
743
744         Move the messages dispatched by ViewGestureController that grab geometry
745         from the WebProcess out of the DrawingArea and into ViewGestureGeometryCollector.
746         This class will grow when smart magnification is implemented.
747
748         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
749         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
750         * WebProcess/WebPage/DrawingArea.h:
751         * WebProcess/WebPage/DrawingArea.messages.in:
752         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
753         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
754         Remove BeginTransientZoom() message.
755
756         * DerivedSources.make:
757         * UIProcess/DrawingAreaProxy.h:
758         
759         * UIProcess/mac/ViewGestureController.cpp:
760         (WebKit::ViewGestureController::didCollectGeometryForMagnificationGesture):
761         (WebKit::ViewGestureController::handleMagnificationGesture):
762         * UIProcess/mac/ViewGestureController.h:
763         * UIProcess/mac/ViewGestureController.messages.in:
764         Make use of ViewGestureGeometryCollector and rename didBeginTransientZoom to didCollectGeometryForMagnificationGesture.
765
766         * WebKit2.xcodeproj/project.pbxproj:
767         Add new files.
768         
769         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp: Added.
770         (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
771         (WebKit::ViewGestureGeometryCollector::~ViewGestureGeometryCollector):
772         (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
773         * WebProcess/WebPage/ViewGestureGeometryCollector.h: Added.
774         * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in: Added.
775         Move the code to collect the visible content rect and return it to the ViewGestureController into its own class.
776
777         * WebProcess/WebPage/WebPage.cpp:
778         (WebKit::WebPage::WebPage):
779         * WebProcess/WebPage/WebPage.h:
780         Move m_pageID to the top of WebPage's initialization list so that
781         it can be safely used from other members' constructors.
782
783         Add a ViewGestureGeometryCollector member and construct it.
784
785 2013-12-18  Gustavo Noronha Silva  <gns@gnome.org>
786
787         Unreviewed cmake build fix for GTK+.
788
789         * PlatformGTK.cmake: fix paths for files that were moved.
790
791 2013-12-18  Anders Carlsson  <andersca@apple.com>
792
793         MessageReceiverMap::addMessageReceiver should assert that destinationID is not zero
794         https://bugs.webkit.org/show_bug.cgi?id=125965
795
796         Reviewed by Tim Horton.
797
798         * Platform/CoreIPC/MessageReceiverMap.cpp:
799         (CoreIPC::MessageReceiverMap::addMessageReceiver):
800
801 2013-12-18  Anders Carlsson  <andersca@apple.com>
802
803         Deprecate some WKMutableDictionary functions
804         https://bugs.webkit.org/show_bug.cgi?id=125962
805
806         Reviewed by Tim Horton.
807
808         * Shared/API/c/WKDeprecatedFunctions.cpp:
809         (WKDictionaryIsMutable):
810         (WKDictionaryAddItem):
811         (WKDictionaryRemoveItem):
812         * Shared/API/c/WKMutableDictionary.cpp:
813         * Shared/API/c/WKMutableDictionary.h:
814
815 2013-12-18  Dan Bernstein  <mitz@apple.com>
816
817         [Cocoa] Allow the web process plug-in to intercept resource requests
818         https://bugs.webkit.org/show_bug.cgi?id=125959
819
820         Reviewed by Anders Carlsson.
821
822         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Declared new
823         delegate method.
824         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
825         (willSendRequestForFrame): Implemented this WKBundlePageResourceClient callback by calling
826         the load delegate.
827         (setUpResourceLoadClient): Added. Initializes the resource load client with the above
828         function.
829         (-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]): Added calls to initialize
830         and clear the resource load client.
831
832 2013-12-18  Yongjun Zhang  <yongjun_zhang@apple.com>
833
834         https://bugs.webkit.org/show_bug.cgi?id=125941
835         Add Obj C API for injected bundle PageGroup class.
836
837         Reviewed by Dan Bernstein.
838
839         Add Obj C API (WKWebProcessPlugInPageGroup) for injected bundle PageGroup class. And add APIs to
840         expose the main frame and page group from WKWebProcessPlugInBrowsingContextController.
841
842         * Shared/Cocoa/APIObject.mm:
843         (API::Object::newObject): Create wrapper object for InjectedPageGroup object.
844         * WebKit2.xcodeproj/project.pbxproj:
845         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h: Added.
846         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm: Added.
847         (-[WKWebProcessPlugInPageGroup identifier]):
848         (-[WKWebProcessPlugInPageGroup dealloc]):
849         (-[WKWebProcessPlugInPageGroup API::]):
850         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroupInternal.h: Added.
851         (WebKit::wrapper):
852         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h: Add API to expose the main frame and page group
853             for WKWebPocessPlugInBrowserContextController.
854         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
855         (-[WKWebProcessPlugInBrowserContextController mainFrame]):
856         (-[WKWebProcessPlugInBrowserContextController pageGroup]):
857
858 2013-12-18  Tim Horton  <timothy_horton@apple.com>
859
860         PDFPlugin: Never make a NSEventType = 0
861         https://bugs.webkit.org/show_bug.cgi?id=125955
862
863         Reviewed by Dan Bernstein.
864
865         * WebProcess/Plugins/PDF/PDFPlugin.mm:
866         (WebKit::getEventTypeFromWebEvent):
867         Make getEventTypeFromWebEvent return its NSEventType as an out arg, and
868         make the return value represent whether or not we set it.
869
870         (WebKit::PDFPlugin::nsEventForWebMouseEvent):
871         (WebKit::PDFPlugin::handleKeyboardEvent):
872         Make use of getEventTypeFromWebEvent.
873
874 2013-12-18  Anders Carlsson  <andersca@apple.com>
875
876         WKRemoteObjectRegistry should invoke invocations
877         https://bugs.webkit.org/show_bug.cgi?id=125945
878
879         Reviewed by Tim Horton.
880
881         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
882         (-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):
883
884 2013-12-18  Gavin Barraclough  <barraclough@apple.com>
885
886         Add layer hosting mode to ViewState
887         https://bugs.webkit.org/show_bug.cgi?id=125803
888
889         Reviewed by Anders Carlsson.
890
891         When the view state of the page is updated the layer mode may also
892         change. Currently this is passed by a separate message, remove this
893         and fold it into ViewState.
894         
895         Previously the setLayerHostingMode message would be passed to the
896         DrawingArea, which would inform the WebPage. Since the WebPage is
897         passed the SetVisibilityState messgae reverse this.
898
899         WebPageProxy had a policy of only updating the hosting mode when
900         visible - the value is sticky whilst the view is not visible. Make
901         this policy explicit in the PageClientImpl, rather then implicit
902         from the flow control.
903
904         * Shared/ViewState.h:
905             - Added ViewState::IsLayerWindowServerHosted.
906         * Shared/WebPageCreationParameters.cpp:
907         (WebKit::WebPageCreationParameters::encode):
908         (WebKit::WebPageCreationParameters::decode):
909         * Shared/WebPageCreationParameters.h:
910             - removed layerHostingMode.
911         * UIProcess/API/mac/PageClientImpl.h:
912         * UIProcess/API/mac/PageClientImpl.mm:
913         (WebKit::PageClientImpl::PageClientImpl):
914         (WebKit::PageClientImpl::isLayerWindowServerHosted):
915         (WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
916             - viewLayerHostingMode -> isLayerWindowServerHosted, added m_layerHostingMode.
917         * UIProcess/DrawingAreaProxy.h:
918             - removed layerHostingModeDidChange.
919         * UIProcess/PageClient.h:
920             - viewLayerHostingMode -> isLayerWindowServerHosted.
921         * UIProcess/WebPageProxy.cpp:
922         (WebKit::WebPageProxy::WebPageProxy):
923             - removed m_layerHostingMode.
924         (WebKit::WebPageProxy::updateViewState):
925             - added IsLayerWindowServerHosted.
926         (WebKit::WebPageProxy::viewStateDidChange):
927             - changes to ViewState::IsInWindow implies ViewState::IsLayerWindowServerHosted may change too.
928             - remove special handling (separate message) for LayerHostingMode.
929         (WebKit::WebPageProxy::initializeCreationParameters):
930             - removed m_layerHostingMode.
931         * UIProcess/WebPageProxy.h:
932             - removed m_layerHostingMode.
933         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
934         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
935             - removed layerHostingModeDidChange.
936         * WebProcess/WebPage/DrawingArea.h:
937         (WebKit::DrawingArea::setLayerHostingMode):
938         (WebKit::DrawingArea::didUpdate):
939             - setLayerHostingMode takes a LayerHostingMode.
940         * WebProcess/WebPage/DrawingArea.messages.in:
941             - SetLayerHostingMode is no longer a message.
942         * WebProcess/WebPage/WebPage.cpp:
943         (WebKit::WebPage::WebPage):
944             - removed m_layerHostingMode.
945         (WebKit::WebPage::setViewState):
946             - handle ViewState::IsLayerWindowServerHosted.
947         (WebKit::WebPage::setLayerHostingMode):
948             - moved from ~Mac.mm (matching other ViewState setters), calls to DrawingArea.
949         * WebProcess/WebPage/WebPage.h:
950         (WebKit::WebPage::layerHostingMode):
951             - layerHostingMode queries m_viewState, removed m_layerHostingMode.
952         * WebProcess/WebPage/ios/WebPageIOS.mm:
953             - removed setLayerHostingMode.
954         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
955         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
956         (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
957             - setLayerHostingMode takes a LayerHostingMode, WebPage now calls to DrawingArea.
958         * WebProcess/WebPage/mac/WebPageMac.mm:
959             - removed setLayerHostingMode.
960
961 2013-12-18  Gavin Barraclough  <barraclough@apple.com>
962
963         Fix page visibility api test, initialization in WebKit2
964         https://bugs.webkit.org/show_bug.cgi?id=125933
965
966         Reviewed by Anders Carlsson.
967
968         The API test for page visibility is broken, fix this. This revealed a recent regression in WebKit2
969         (introduced in https://bugs.webkit.org/show_bug.cgi?id=123379), caused by a typo removing a '!'.
970
971         * WebProcess/WebPage/WebPage.cpp:
972         (WebKit::WebPage::setVisibilityState):
973             - Fix regression, accidentally removed a '!'.
974
975 2013-12-18  Anders Carlsson  <andersca@apple.com>
976
977         Fix 32-bit build.
978
979         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
980         (WebKit::RemoteObjectRegistry::invokeMethod):
981
982 2013-12-18  Anders Carlsson  <andersca@apple.com>
983
984         Make WKObjectRegistry objects be per page
985         https://bugs.webkit.org/show_bug.cgi?id=125937
986
987         Reviewed by Andreas Kling.
988
989         Remove WKObjectRegistry from WKConnection. Also, add a C++ object that is in charge 
990         of actually sending and receiving messages.
991
992         * DerivedSources.make:
993         * Shared/API/Cocoa/RemoteObjectRegistry.h: Added.
994         * Shared/API/Cocoa/RemoteObjectRegistry.messages.in: Added.
995         * Shared/API/Cocoa/RemoteObjectRegistry.mm: Added.
996         (WebKit::RemoteObjectRegistry::RemoteObjectRegistry):
997         (WebKit::RemoteObjectRegistry::~RemoteObjectRegistry):
998         (WebKit::RemoteObjectRegistry::sendInvocation):
999         (WebKit::RemoteObjectRegistry::invokeMethod):
1000         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
1001         (-[WKRemoteObjectRegistry _initWithMessageSender:IPC::]):
1002         (-[WKRemoteObjectRegistry _invalidate]):
1003         (-[WKRemoteObjectRegistry _sendInvocation:interface:]):
1004         (-[WKRemoteObjectRegistry WebKit::]):
1005         (-[WKRemoteObjectRegistry _invokeMethod:]):
1006         * Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h:
1007         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1008         (-[WKBrowsingContextController dealloc]):
1009         (-[WKBrowsingContextController remoteObjectRegistry]):
1010         * UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h:
1011         * UIProcess/API/Cocoa/WKConnection.h:
1012         * UIProcess/API/Cocoa/WKConnection.mm:
1013         (didReceiveMessage):
1014         * WebKit2.xcodeproj/project.pbxproj:
1015         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1016         (-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]):
1017         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
1018
1019 2013-12-18  Conrad Shultz  <conrad_shultz@apple.com>
1020
1021         API to set a favicon
1022         https://bugs.webkit.org/show_bug.cgi?id=125892
1023
1024         Reviewed by Brian Weinstein.
1025
1026         * UIProcess/API/C/WKIconDatabase.cpp:
1027         (WKIconDatabaseSetIconDataForIconURL):
1028         Call WebIconDatabase::setIconDataForIconURL().
1029
1030         * UIProcess/API/C/WKIconDatabase.h:
1031         Declare WKIconDatabaseSetIconDataForIconURL().
1032
1033 2013-12-18  Anders Carlsson  <andersca@apple.com>
1034
1035         Fix Dictionary encoding
1036         https://bugs.webkit.org/show_bug.cgi?id=125930
1037
1038         Reviewed by Andreas Kling.
1039
1040         Encode the HashMap size as a 64-bit unsigned integer.
1041
1042         * Shared/UserData.cpp:
1043         (WebKit::UserData::encode):
1044
1045 2013-12-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1046
1047         Unreviewed. Fix make distcheck.
1048
1049         * GNUmakefile.list.am:
1050
1051 2013-12-17  Jae Hyun Park  <jae.park@company100.net>
1052
1053         [GTK] Build fix after r160737
1054
1055         Unreviewed.
1056
1057         Rename WebURLRequest to API::URLRequest
1058
1059         * GNUmakefile.list.am:
1060         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
1061         (didReceiveWebViewMessageFromInjectedBundle):
1062         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
1063         (webkitNavigationPolicyDecisionCreate):
1064         * UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h:
1065         * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
1066         (webkitResponsePolicyDecisionCreate):
1067         * UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
1068         * UIProcess/API/gtk/WebKitWebView.cpp:
1069         (webkit_web_view_load_request):
1070         * UIProcess/API/gtk/WebKitWindowProperties.cpp:
1071         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1072         (willSendRequestForFrame):
1073
1074 2013-12-17  Ryuan Choi  <ryuan.choi@samsung.com>
1075
1076         Unreviewed build fix on EFL port after r160737
1077
1078         Rename WebURLRequest to API::URLRequest
1079
1080         * CMakeLists.txt:
1081         * UIProcess/API/efl/ewk_url_request_private.h:
1082
1083 2013-12-17  Simon Fraser  <simon.fraser@apple.com>
1084
1085         Rename "canRubberBands" to "canRubberBand"
1086         https://bugs.webkit.org/show_bug.cgi?id=125897
1087
1088         Reviewed by Anders Carlsson.
1089
1090         Rename "canRubberBands" to "canRubberBand" in various places.
1091
1092         * WebProcess/WebPage/EventDispatcher.cpp:
1093         (WebKit::EventDispatcher::wheelEvent):
1094         * WebProcess/WebPage/EventDispatcher.h:
1095         * WebProcess/WebPage/EventDispatcher.messages.in:
1096
1097 2013-12-17  Tim Horton  <timothy_horton@apple.com>
1098
1099         WebKit2 View Gestures: Fix the shadow layer restore-from-overpinched animation
1100         https://bugs.webkit.org/show_bug.cgi?id=125884
1101
1102         Reviewed by Anders Carlsson.
1103
1104         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1105         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
1106         Set to-values on the right animations.
1107
1108         (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
1109         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
1110         We don't need to explicitly set the shadow path, because PlatformCALayer::setBounds does it for us now.
1111
1112 2013-12-17  Sam Weinig  <sam@webkit.org>
1113
1114         [WK2] Rename WebURLRequest to API::URLRequest
1115         https://bugs.webkit.org/show_bug.cgi?id=125886
1116
1117         Reviewed by Anders Carlsson.
1118
1119         * Shared/API/c/WKSharedAPICast.h:
1120         (WebKit::toAPI):
1121         * Shared/API/c/WKURLRequest.cpp:
1122         (WKURLRequestGetTypeID):
1123         (WKURLRequestCreateWithWKURL):
1124         (WKURLRequestSetDefaultTimeoutInterval):
1125         * Shared/API/c/mac/WKURLRequestNS.mm:
1126         (WKURLRequestCreateWithNSURLRequest):
1127         * Shared/APIString.h:
1128         * Shared/APIURLRequest.cpp: Copied from Source/WebKit2/Shared/WebURLRequest.cpp.
1129         (API::URLRequest::URLRequest):
1130         (API::URLRequest::defaultTimeoutInterval):
1131         (API::URLRequest::setDefaultTimeoutInterval):
1132         (API::URLRequest::encode):
1133         (API::URLRequest::decode):
1134         * Shared/APIURLRequest.h: Copied from Source/WebKit2/Shared/WebURLRequest.h.
1135         (API::URLRequest::create):
1136         * Shared/UserData.cpp:
1137         (WebKit::UserData::encode):
1138         (WebKit::UserData::decode):
1139         * Shared/UserMessageCoders.h:
1140         (WebKit::UserMessageEncoder::baseEncode):
1141         (WebKit::UserMessageDecoder::baseDecode):
1142         * Shared/WebURLRequest.cpp: Removed.
1143         * Shared/WebURLRequest.h: Removed.
1144         * UIProcess/API/C/WKContext.cpp:
1145         * UIProcess/API/C/WKDownload.cpp:
1146         (WKDownloadCopyRequest):
1147         * UIProcess/API/C/WKNavigationDataRef.cpp:
1148         (WKNavigationDataCopyOriginalRequest):
1149         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1150         (-[WKBrowsingContextController loadRequest:userData:]):
1151         * UIProcess/WebContext.cpp:
1152         (WebKit::WebContext::createNewWebProcess):
1153         * UIProcess/WebInspectorProxy.cpp:
1154         * UIProcess/WebPageProxy.cpp:
1155         (WebKit::WebPageProxy::loadURLRequest):
1156         * UIProcess/WebPageProxy.h:
1157         * UIProcess/WebPolicyClient.cpp:
1158         (WebKit::WebPolicyClient::decidePolicyForNavigationAction):
1159         (WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
1160         (WebKit::WebPolicyClient::decidePolicyForResponse):
1161         * UIProcess/WebUIClient.cpp:
1162         (WebKit::WebUIClient::createNewPage):
1163         * WebKit2.xcodeproj/project.pbxproj:
1164         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1165         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1166         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
1167         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
1168         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
1169         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
1170         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
1171         (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
1172
1173 2013-12-17  Brady Eidson  <beidson@apple.com>
1174
1175         DatabaseProcess: Pipe through object store IDs and transaction mode for "openTransaction"
1176         https://bugs.webkit.org/show_bug.cgi?id=125872
1177
1178         Reviewed by Alexey Proskuryakov.
1179
1180         Pipe through the objectStoreIDs and mode:
1181         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1182         (WebKit::DatabaseProcessIDBConnection::openTransaction):
1183         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1184         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1185
1186         Rework postTransactionOperation to take a pre-made AsyncTask to allow for different
1187         transaction operation function signatures:
1188         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1189         (WebKit::UniqueIDBDatabase::openTransaction): Pipe through the objectStoreIDs and mode:
1190         (WebKit::UniqueIDBDatabase::beginTransaction):
1191         (WebKit::UniqueIDBDatabase::commitTransaction):
1192         (WebKit::UniqueIDBDatabase::resetTransaction):
1193         (WebKit::UniqueIDBDatabase::rollbackTransaction):
1194         (WebKit::UniqueIDBDatabase::postTransactionOperation):
1195         (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
1196         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1197
1198         Pipe through the objectStoreIDs and mode:
1199         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1200         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1201         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
1202         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1203
1204         * Platform/Logging.h: Add an IDB logging channel.
1205
1206         * Shared/AsyncTask.h:
1207         (WebKit::createAsyncTask): Add a 3-argument variant.
1208
1209         * Shared/WebCrossThreadCopier.cpp:
1210         (WebCore::::copy): Add a Vector<int64_t> copier.
1211         * Shared/WebCrossThreadCopier.h:
1212
1213         Add logging throughout currently implemented methods:
1214         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1215         (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
1216         (WebKit::WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata):
1217         (WebKit::WebIDBServerConnection::openTransaction): Pipe through the objectStoreIDs and mode.
1218         (WebKit::WebIDBServerConnection::didOpenTransaction):
1219         (WebKit::WebIDBServerConnection::beginTransaction):
1220         (WebKit::WebIDBServerConnection::didBeginTransaction):
1221         (WebKit::WebIDBServerConnection::commitTransaction):
1222         (WebKit::WebIDBServerConnection::didCommitTransaction):
1223         (WebKit::WebIDBServerConnection::resetTransaction):
1224         (WebKit::WebIDBServerConnection::didResetTransaction):
1225         (WebKit::WebIDBServerConnection::rollbackTransaction):
1226         (WebKit::WebIDBServerConnection::didRollbackTransaction):
1227
1228 2013-12-17  Gavin Barraclough  <barraclough@apple.com>
1229
1230         Remove PageVisibilityStateUnloaded
1231         https://bugs.webkit.org/show_bug.cgi?id=125869
1232
1233         Reviewed by Anders Carlsson.
1234
1235         This is not currently supported by WebKit, remove this enum value.
1236         We can always add this back later if/when we add support for this state.
1237
1238         * Shared/API/c/WKPageVisibilityTypes.h:
1239         * Shared/API/c/WKSharedAPICast.h:
1240         (WebKit::toPageVisibilityState):
1241             - removed PageVisibilityStateUnloaded/kWKPageVisibilityStateUnloaded
1242
1243 2013-12-12  Martin Robinson  <mrobinson@igalia.com>
1244
1245         [GTK] [CMake] Build the plugin process against GTK+ 2
1246         https://bugs.webkit.org/show_bug.cgi?id=116374
1247
1248         Reviewed by Gustavo Noronha Silva.
1249
1250         * CMakeLists.txt: Use the new GENERATE_WEBKIT2_MESSAGE_SOURCES macro so we
1251         can share messaging file generation with the plugin process.
1252         * PlatformGTK.cmake: Add more files to the plugin process source list. Properly
1253         generate message sources, add the appropriate include paths, defines, and libraries
1254         for the plugin process.
1255
1256 2013-12-17  Anders Carlsson  <andersca@apple.com>
1257
1258         Back out r159982
1259         https://bugs.webkit.org/show_bug.cgi?id=125870
1260         <rdar://problem/15598485>
1261
1262         Reviewed by Dan Bernstein.
1263
1264         Looks like r159982 caused intermittent crashes. Back it out for now.
1265
1266         * UIProcess/WebContextUserMessageCoders.h:
1267         (WebKit::WebContextUserMessageEncoder::encode):
1268         (WebKit::WebContextUserMessageDecoder::decode):
1269         * UIProcess/WebPageGroup.cpp:
1270         * UIProcess/WebPageGroup.h:
1271         (WebKit::WebPageGroup::sendToAllProcessesInGroup):
1272         * UIProcess/WebPageProxy.cpp:
1273         (WebKit::WebPageProxy::initializeWebPage):
1274         * UIProcess/WebProcessProxy.cpp:
1275         (WebKit::WebProcessProxy::disconnect):
1276         * UIProcess/WebProcessProxy.h:
1277
1278 2013-12-17  Dan Bernstein  <mitz@apple.com>
1279
1280         Fixed an assertion failure seen running some mixed-content tests.
1281         https://bugs.webkit.org/show_bug.cgi?id=125862
1282
1283         Reviewed by Alexey Proskuryakov.
1284
1285         * UIProcess/PageLoadState.cpp:
1286         (WebKit::PageLoadState::didDisplayOrRunInsecureContent): Removed an assertion about the URL
1287         of the main frame when dealing with a notification that could have come from any frame.
1288
1289 2013-12-17  Dan Bernstein  <mitz@apple.com>
1290
1291         [Cocoa] Add properties related to the user agent string
1292         https://bugs.webkit.org/show_bug.cgi?id=125856
1293
1294         Reviewed by Anders Carlsson.
1295
1296         * UIProcess/API/Cocoa/WKBrowsingContextController.h: Declared new properties.
1297         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1298         (-[WKBrowsingContextController applicationNameForUserAgent]): Added accessor.
1299         (-[WKBrowsingContextController setApplicationNameForUserAgent:]): Ditto.
1300         (-[WKBrowsingContextController customUserAgent]): Ditto.
1301         (-[WKBrowsingContextController setCustomUserAgent:]): Ditto.
1302
1303 2013-12-16  Gavin Barraclough  <barraclough@apple.com>
1304
1305         Add layer hosting mode to ViewState
1306         https://bugs.webkit.org/show_bug.cgi?id=125803
1307
1308         Unreviewed - reverting last commit - might have broken tests. :-(
1309
1310         * Shared/ViewState.h:
1311         * Shared/WebPageCreationParameters.cpp:
1312         (WebKit::WebPageCreationParameters::encode):
1313         (WebKit::WebPageCreationParameters::decode):
1314         * Shared/WebPageCreationParameters.h:
1315         * UIProcess/API/mac/PageClientImpl.h:
1316         * UIProcess/API/mac/PageClientImpl.mm:
1317         (WebKit::PageClientImpl::PageClientImpl):
1318         (WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
1319         (WebKit::PageClientImpl::viewLayerHostingMode):
1320         * UIProcess/DrawingAreaProxy.h:
1321         (WebKit::DrawingAreaProxy::layerHostingModeDidChange):
1322         * UIProcess/PageClient.h:
1323         (WebKit::PageClient::viewLayerHostingMode):
1324         * UIProcess/WebPageProxy.cpp:
1325         (WebKit::WebPageProxy::WebPageProxy):
1326         (WebKit::WebPageProxy::updateViewState):
1327         (WebKit::WebPageProxy::viewStateDidChange):
1328         (WebKit::WebPageProxy::initializeCreationParameters):
1329         * UIProcess/WebPageProxy.h:
1330         (WebKit::WebPageProxy::layerHostingMode):
1331         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1332         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1333         (WebKit::TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange):
1334         * WebProcess/WebPage/DrawingArea.h:
1335         (WebKit::DrawingArea::resumePainting):
1336         (WebKit::DrawingArea::setLayerHostingMode):
1337         * WebProcess/WebPage/DrawingArea.messages.in:
1338         * WebProcess/WebPage/WebPage.cpp:
1339         (WebKit::WebPage::WebPage):
1340         (WebKit::WebPage::~WebPage):
1341         (WebKit::WebPage::scalePage):
1342         (WebKit::WebPage::setDeviceScaleFactor):
1343         (WebKit::WebPage::setActive):
1344         (WebKit::WebPage::setViewState):
1345         (WebKit::WebPage::setWindowIsVisible):
1346         (WebKit::WebPage::windowAndViewFramesChanged):
1347         * WebProcess/WebPage/WebPage.h:
1348         (WebKit::WebPage::layerHostingMode):
1349         * WebProcess/WebPage/ios/WebPageIOS.mm:
1350         (WebKit::WebPage::setLayerHostingMode):
1351         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1352         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1353         (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
1354         * WebProcess/WebPage/mac/WebPageMac.mm:
1355         (WebKit::WebPage::sendComplexTextInputToPlugin):
1356         (WebKit::WebPage::setLayerHostingMode):
1357
1358 2013-12-13  Gavin Barraclough  <barraclough@apple.com>
1359
1360         Add layer hosting mode to ViewState
1361         https://bugs.webkit.org/show_bug.cgi?id=125803
1362
1363         Reviewed by Anders Carlsson.
1364
1365         When the view state of the page is updated the layer mode may also
1366         change. Currently this is passed by a separate message, remove this
1367         and fold it into ViewState.
1368         
1369         Previously the setLayerHostingMode message would be passed to the
1370         DrawingArea, which would inform the WebPage. Since the WebPage is
1371         passed the SetVisibilityState messgae reverse this.
1372
1373         WebPageProxy had a policy of only updating the hosting mode when
1374         visible - the value is sticky whilst the view is not visible. Make
1375         this policy explicit in the PageClientImpl, rather then implicit
1376         from the flow control.
1377
1378         * Shared/ViewState.h:
1379             - Added ViewState::IsLayerWindowServerHosted.
1380         * Shared/WebPageCreationParameters.cpp:
1381         (WebKit::WebPageCreationParameters::encode):
1382         (WebKit::WebPageCreationParameters::decode):
1383         * Shared/WebPageCreationParameters.h:
1384             - removed layerHostingMode.
1385         * UIProcess/API/mac/PageClientImpl.h:
1386         * UIProcess/API/mac/PageClientImpl.mm:
1387         (WebKit::PageClientImpl::PageClientImpl):
1388         (WebKit::PageClientImpl::isLayerWindowServerHosted):
1389         (WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
1390             - viewLayerHostingMode -> isLayerWindowServerHosted, added m_layerHostingMode.
1391         * UIProcess/DrawingAreaProxy.h:
1392             - removed layerHostingModeDidChange.
1393         * UIProcess/PageClient.h:
1394             - viewLayerHostingMode -> isLayerWindowServerHosted.
1395         * UIProcess/WebPageProxy.cpp:
1396         (WebKit::WebPageProxy::WebPageProxy):
1397             - removed m_layerHostingMode.
1398         (WebKit::WebPageProxy::updateViewState):
1399             - added IsLayerWindowServerHosted.
1400         (WebKit::WebPageProxy::viewStateDidChange):
1401             - changes to ViewState::IsInWindow implies ViewState::IsLayerWindowServerHosted may change too.
1402             - remove special handling (separate message) for LayerHostingMode.
1403         (WebKit::WebPageProxy::initializeCreationParameters):
1404             - removed m_layerHostingMode.
1405         * UIProcess/WebPageProxy.h:
1406             - removed m_layerHostingMode.
1407         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1408         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1409             - removed layerHostingModeDidChange.
1410         * WebProcess/WebPage/DrawingArea.h:
1411         (WebKit::DrawingArea::setLayerHostingMode):
1412         (WebKit::DrawingArea::didUpdate):
1413             - setLayerHostingMode takes a LayerHostingMode.
1414         * WebProcess/WebPage/DrawingArea.messages.in:
1415             - SetLayerHostingMode is no longer a message.
1416         * WebProcess/WebPage/WebPage.cpp:
1417         (WebKit::WebPage::WebPage):
1418             - removed m_layerHostingMode.
1419         (WebKit::WebPage::setViewState):
1420             - handle ViewState::IsLayerWindowServerHosted.
1421         (WebKit::WebPage::setLayerHostingMode):
1422             - moved from ~Mac.mm (matching other ViewState setters), calls to DrawingArea.
1423         * WebProcess/WebPage/WebPage.h:
1424         (WebKit::WebPage::layerHostingMode):
1425             - layerHostingMode queries m_viewState, removed m_layerHostingMode.
1426         * WebProcess/WebPage/ios/WebPageIOS.mm:
1427             - removed setLayerHostingMode.
1428         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1429         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1430         (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
1431             - setLayerHostingMode takes a LayerHostingMode, WebPage now calls to DrawingArea.
1432         * WebProcess/WebPage/mac/WebPageMac.mm:
1433             - removed setLayerHostingMode.
1434
1435 2013-12-16  Sam Weinig  <sam@webkit.org>
1436
1437         [Cocoa] Remove unused contentAnchor SPI from WKView
1438         https://bugs.webkit.org/show_bug.cgi?id=125826
1439
1440         Reviewed by Tim Horton.
1441
1442         * UIProcess/API/Cocoa/WKViewPrivate.h:
1443         * UIProcess/API/mac/WKView.mm:
1444         (-[WKView setFrameSize:]):
1445         (-[WKView _setDrawingAreaSize:]):
1446         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
1447         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
1448
1449 2013-12-16  Tim Horton  <timothy_horton@apple.com>
1450
1451         WebKit2 View Gestures: Pinching beyond the extremes doesn't animate back to the min/max
1452         https://bugs.webkit.org/show_bug.cgi?id=125750
1453
1454         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1455         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
1456         Remove some accidentally included commented out code.
1457
1458 2013-12-16  Tim Horton  <timothy_horton@apple.com>
1459
1460         WebKit2 View Gestures: Pinching beyond the extremes doesn't animate back to the min/max
1461         https://bugs.webkit.org/show_bug.cgi?id=125750
1462
1463         Reviewed by Simon Fraser.
1464
1465         When you let go of a pinch where you exceeded the maximum or minimum scale,
1466         the view should animate back to the limit instead of snapping back.
1467
1468         * UIProcess/mac/ViewGestureController.cpp:
1469         (WebKit::ViewGestureController::endMagnificationGesture):
1470         Unscrolling the scaled origin here is wrong; we should send the same
1471         value for 'origin' for commitTransientZoom that we do for adjustTransientZoom.
1472         The drawing area can deal with transforming that however it needs to call scalePage().
1473
1474         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1475         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1476         (WebKit::TiledCoreAnimationDrawingArea::beginTransientZoom):
1477         Drive-by use WebPage::mainFrameView().
1478
1479         (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
1480         Update the shadow layer's bounds, position, and shadow path while zooming,
1481         instead of hiding it.
1482
1483         (WebKit::transientZoomSnapAnimationForKeyPath):
1484         Create a CABasicAnimation that stays applied to its target when it finishes,
1485         lasts for a quarter second, and uses the ease-in-ease-out timing function.
1486
1487         (WebKit::constrainZoomOriginForFrameView):
1488         When we land a transient zoom, there may be overhang areas (linen, in the case of Mac)
1489         visible. During the commit animation, we should move the RenderView layer appropriately
1490         so that the page covers the entire view and there are no overhang areas visible.
1491         Adapt some code from ScrollableArea to constrain the zoom origin to do so.
1492
1493         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
1494         Animate the RenderView layer's transform, and the shadow layer's bounds, position, and path.
1495         When they complete, apply the zoom via scalePage() and flush the layer tree (otherwise there
1496         can be a flash between removing the animations and the next flush with the new scale).
1497
1498         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
1499         Move the code to land the transient zoom (via scalePage) and to put the shadow back
1500         in the state WebCore left it out into its own function, so it can be called both from the
1501         animation completion callback and from the short-circuit in the case where we don't need to animate.
1502
1503 2013-12-16  Ryuan Choi  <ryuan.choi@samsung.com>
1504
1505         Unreviewed. Fix GTK+ build after r160653.
1506
1507         Renamed WebData to API::Data
1508
1509         * GNUmakefile.list.am: Added APIData.cpp and APIData.h
1510         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
1511         (webkitURISchemeRequestReadCallback):
1512         * UIProcess/API/gtk/WebKitWebResource.cpp:
1513         * UIProcess/API/gtk/WebKitWebView.cpp:
1514
1515 2013-12-16  Benjamin Poulain  <bpoulain@apple.com>
1516
1517         [WK2][iOS] WKView sends unscaled scroll position to WKContentView
1518         https://bugs.webkit.org/show_bug.cgi?id=125819
1519
1520         Reviewed by Anders Carlsson.
1521
1522         WKView was sending untransformed scroll coordinates to WKContentView. The scroll position
1523         seen by WebKit was wrong when the content is scaled.
1524
1525         * UIProcess/API/ios/WKView.mm:
1526         (-[WKView _didScroll]):
1527         (-[WKView scrollViewDidEndDragging:willDecelerate:]):
1528         (-[WKView scrollViewDidEndDecelerating:]):
1529         (-[WKView scrollViewDidScrollToTop:]):
1530
1531 2013-12-16  Brady Eidson  <beidson@apple.com>
1532
1533         DatabaseProcess: Plumb through messaging for the 4 basic transaction operations
1534         https://bugs.webkit.org/show_bug.cgi?id=125816
1535
1536         Reviewed by Alexey Proskuryakov.
1537
1538         The messaging begins and ends in the WebProcess:
1539         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1540         (WebKit::WebIDBServerConnection::beginTransaction):
1541         (WebKit::WebIDBServerConnection::didBeginTransaction):
1542         (WebKit::WebIDBServerConnection::commitTransaction):
1543         (WebKit::WebIDBServerConnection::didCommitTransaction):
1544         (WebKit::WebIDBServerConnection::resetTransaction):
1545         (WebKit::WebIDBServerConnection::didResetTransaction):
1546         (WebKit::WebIDBServerConnection::rollbackTransaction):
1547         (WebKit::WebIDBServerConnection::didRollbackTransaction):
1548         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1549         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
1550
1551         It travels from the WebProcess to the DatabaseProcess connection:
1552         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1553         (WebKit::DatabaseProcessIDBConnection::beginTransaction):
1554         (WebKit::DatabaseProcessIDBConnection::commitTransaction):
1555         (WebKit::DatabaseProcessIDBConnection::resetTransaction):
1556         (WebKit::DatabaseProcessIDBConnection::rollbackTransaction):
1557         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1558         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1559
1560         It travels from the connection to the appropriate UniqueIDBDatabase:
1561         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1562         (WebKit::UniqueIDBDatabase::openTransaction):
1563         (WebKit::UniqueIDBDatabase::beginTransaction):
1564         (WebKit::UniqueIDBDatabase::commitTransaction):
1565         (WebKit::UniqueIDBDatabase::resetTransaction):
1566         (WebKit::UniqueIDBDatabase::rollbackTransaction):
1567         (WebKit::UniqueIDBDatabase::postTransactionOperation):
1568         (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
1569         (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
1570         (WebKit::UniqueIDBDatabase::beginBackingStoreTransaction):
1571         (WebKit::UniqueIDBDatabase::commitBackingStoreTransaction):
1572         (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
1573         (WebKit::UniqueIDBDatabase::rollbackBackingStoreTransaction):
1574         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1575
1576         The UniqueIDBDatabase object performs the operation with the backing store:
1577         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1578         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1579         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
1580         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::beginTransaction):
1581         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::commitTransaction):
1582         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::resetTransaction):
1583         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
1584         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1585
1586         And the SQLite backing store calls the appropriate method on the SQLite transaction:
1587         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
1588         (WebKit::SQLiteIDBTransaction::begin): Stubbed for now.
1589         (WebKit::SQLiteIDBTransaction::commit): Ditto.
1590         (WebKit::SQLiteIDBTransaction::reset): Ditto.
1591         (WebKit::SQLiteIDBTransaction::rollback): Ditto.
1592         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
1593
1594 2013-12-16  Ryuan Choi  <ryuan.choi@samsung.com>
1595
1596         Unreviewed build fix on EFL port after r160653
1597
1598         Rename WebData to API::Data
1599
1600         * CMakeLists.txt: Added APIData.cpp to include list.
1601         * UIProcess/WebPageProxy.cpp:
1602         (WebKit::WebPageProxy::sessionStateData):
1603         (WebKit::WebPageProxy::restoreFromSessionStateData):
1604         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
1605         (WebKit::WebSoupRequestManagerProxy::didHandleURIRequest):
1606         (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequestData):
1607         (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequest):
1608         * UIProcess/soup/WebSoupRequestManagerProxy.h:
1609
1610 2013-12-16  Tim Horton  <timothy_horton@apple.com>
1611
1612         WKView.magnification should include magnification due to the active gesture
1613         https://bugs.webkit.org/show_bug.cgi?id=125813
1614
1615         Reviewed by Simon Fraser.
1616
1617         Make WKView.magnification respect active pinch-zoom gestures.
1618
1619         * UIProcess/API/mac/WKView.mm:
1620         (-[WKView magnification]):
1621         If we have a ViewGestureController, defer to it for the current magnification.
1622
1623         * UIProcess/mac/ViewGestureController.cpp:
1624         (WebKit::ViewGestureController::magnification):
1625         Return either the current pinch-zoom magnification, if we're in the middle of a gesture,
1626         or the pageScaleFactor, if we're not.
1627
1628         * UIProcess/mac/ViewGestureController.h:
1629
1630 2013-12-16  Benjamin Poulain  <bpoulain@apple.com>
1631
1632         [WK2] Remove the constraint that highlight rects must be smaller than the scrollview bounds
1633         https://bugs.webkit.org/show_bug.cgi?id=125812
1634
1635         Reviewed by Dan Bernstein.
1636
1637         Currently, _scrollView is never set on WKInteractionView and all highlight rects are discarded.
1638
1639         Eventually, the constraint rect should be computed from the useful area of ScrollView and the scale
1640         of the document. In the meantime, the constraint code is just causing troubles.
1641
1642         The issue is tracked by <rdar://problem/15673655>.
1643
1644         * UIProcess/API/ios/WKInteractionView.mm:
1645         (-[WKInteractionView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
1646
1647 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
1648
1649         Apply overhang shadow and linen to UI-side layers
1650         https://bugs.webkit.org/show_bug.cgi?id=125807
1651
1652         Reviewed by Tim Horton.
1653
1654         With UI-side compositing, we need to apply the overhang shadow and linen
1655         background to layers in the UI process. Achieve this by setting a "custom
1656         appearance" flag on layers that need a shadow or linen background, and
1657         migrating this flag to the UI process. Static functions on ScrollbarThemeMac
1658         are exposed to do the actual setting.
1659
1660         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1661         (WebKit::updateCustomAppearance): Use ScrollbarThemeMac to update the
1662         appearance.
1663         (WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
1664         * Shared/mac/RemoteLayerTreeTransaction.h:
1665         * Shared/mac/RemoteLayerTreeTransaction.mm:
1666         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1667         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1668         (WebKit::dumpChangedLayers):
1669         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1670         (PlatformCALayerRemote::setBounds): If the bounds change, also set the
1671         CustomAppearanceChanged bit so that the UI side updates the shadow bounds
1672         (done here because the UI side is not stateful).
1673         (PlatformCALayerRemote::requiresCustomAppearanceUpdateOnBoundsChange):
1674         (PlatformCALayerRemote::customAppearance):
1675         (PlatformCALayerRemote::updateCustomAppearance):
1676         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1677
1678 2013-12-16  Brady Eidson  <beidson@apple.com>
1679
1680         DatabaseProcess: Implement openTransaction()
1681         https://bugs.webkit.org/show_bug.cgi?id=125794
1682
1683         Reviewed by Darin Adler.
1684
1685         This patch hooks up all of the necessary infrastructure to open a uniquely
1686         identified transaction in the DatabaseProcess backing store.
1687
1688         The transaction itself is not yet functional.
1689
1690         Add openTransaction messaging to the WebProcess side:
1691         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1692         (WebKit::WebIDBServerConnection::isClosed):
1693         (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
1694         (WebKit::WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata):
1695         (WebKit::WebIDBServerConnection::openTransaction):
1696         (WebKit::WebIDBServerConnection::didOpenTransaction):
1697         (WebKit::WebIDBServerConnection::deleteObjectStore):
1698         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1699         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
1700
1701         Add openTransaction messaging to the DatabaseProcess side:
1702         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1703         (WebKit::DatabaseProcessIDBConnection::openTransaction):
1704         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1705         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1706
1707         Add a hashable identifier that represents a connection/transactionID pair:
1708         * DatabaseProcess/IndexedDB/IDBTransactionIdentifier.h: Added.
1709         (WebKit::IDBTransactionIdentifier::IDBTransactionIdentifier):
1710         (WebKit::IDBTransactionIdentifier::isolatedCopy):
1711         (WebKit::IDBTransactionIdentifier::isEmpty):
1712         (WebKit::IDBTransactionIdentifier::hash):
1713         (WebKit::IDBTransactionIdentifier::operator==):
1714         (WebKit::IDBTransactionIdentifier::isHashTableDeletedValue):
1715         (WebKit::IDBTransactionIdentifierHash::hash):
1716         (WebKit::IDBTransactionIdentifierHash::equal):
1717         (WebKit::IDBTransactionIdentifierHashTraits::isEmptyValue):
1718
1719         Allow that identifier to be cross-thread copied:
1720         * Shared/WebCrossThreadCopier.cpp:
1721         (WebCore::::copy):
1722         * Shared/WebCrossThreadCopier.h:
1723
1724         Ask the backing store to open this uniquely identified transaction:
1725         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1726         (WebKit::UniqueIDBDatabase::openTransaction):
1727         (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
1728         (WebKit::UniqueIDBDatabase::didOpenBackingStoreTransaction):
1729         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1730
1731         Add the backing store implementation for opening a transaction:
1732         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1733         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1734         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
1735         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
1736         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1737
1738         Object to represent the backing store transaction itself, to be used in future patches:
1739         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
1740         (WebKit::SQLiteIDBTransaction::SQLiteIDBTransaction):
1741         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
1742         (WebKit::SQLiteIDBTransaction::create):
1743         (WebKit::SQLiteIDBTransaction::identifier):
1744
1745         * WebKit2.xcodeproj/project.pbxproj:
1746
1747 2013-12-16  Anders Carlsson  <andersca@apple.com>
1748
1749         Fix crash when trying to load a null HTML string
1750         https://bugs.webkit.org/show_bug.cgi?id=125801
1751
1752         Reviewed by Dan Bernstein.
1753
1754         * WebProcess/WebPage/WebPage.cpp:
1755         (WebKit::WebPage::loadString):
1756         Check that the string is not null before calling is8Bit(). Also, Use the latin1 encoding for
1757         8-bit strings, since Latin 1 strings are not necessarily valid UTF-8 strings.
1758
1759 2013-12-16  Dan Bernstein  <mitz@apple.com>
1760
1761         [Cocoa] Expose whether the page contains only secure content
1762         https://bugs.webkit.org/show_bug.cgi?id=125758
1763
1764         Reviewed by Anders Carlsson.
1765
1766         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1767         (-[WKBrowsingContextController hasOnlySecureContent]): Added a getter that calls
1768         PageLoadState::hasOnlySecureContent.
1769         * UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h: Declared new property.
1770
1771         * UIProcess/PageLoadState.cpp:
1772         (WebKit::PageLoadState::commitChanges): Notify observers of hasOnlySecureContent() changes.
1773         (WebKit::PageLoadState::reset): Reset hasInsecureContent in the uncommitted state.
1774         (WebKit::PageLoadState::hasOnlySecureContent): Added. Returns true if there is no insecure
1775         content and the URL is an HTTPS URL.
1776         (WebKit::PageLoadState::didCommitLoad): Set hasInsecureContent to false in the uncommitted
1777         state.
1778         (WebKit::PageLoadState::didDisplayOrRunInsecureContent): Set hasInsecureContent to true in
1779         the uncommitted state.
1780         * UIProcess/PageLoadState.h:
1781         (WebKit::PageLoadState::Data::Data): Added hasInsecureContent member.
1782
1783         * UIProcess/WebPageProxy.cpp:
1784         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame): Call
1785         PageLoadState::didDisplayOrRunInsecureContent and commit the change before calling out to
1786         the client.
1787         (WebKit::WebPageProxy::didRunInsecureContentForFrame): Ditto.
1788
1789 2013-12-16  Benjamin Poulain  <bpoulain@apple.com>
1790
1791         [WK2] The NetworkProcess tries to load SecItemShim.dylib on iOS
1792         https://bugs.webkit.org/show_bug.cgi?id=125800
1793
1794         Reviewed by Dan Bernstein.
1795
1796         Give the NetworkService its own Info.plist configured without the Shim.
1797
1798         * Configurations/NetworkService.xcconfig:
1799         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist.
1800         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist: Renamed from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist.
1801         * WebKit2.xcodeproj/project.pbxproj:
1802
1803 2013-12-16  Brady Eidson  <beidson@apple.com>
1804
1805         DatabaseProcess: Fix a few bugs with opening an IDB connection
1806         https://bugs.webkit.org/show_bug.cgi?id=125798
1807
1808         Reviewed by Alexey Proskuryakov.
1809
1810         Database metadata always needs a non-zero database identifier, unique at runtime.
1811
1812         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1813         (WebKit::generateDatabaseId):
1814         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
1815
1816 2013-12-16  Anders Carlsson  <andersca@apple.com>
1817
1818         UserData should encode and decode API::Data objects
1819         https://bugs.webkit.org/show_bug.cgi?id=125799
1820
1821         Reviewed by Beth Dakin.
1822
1823         * Shared/APIData.cpp: Added.
1824         (API::Data::encode):
1825         (API::Data::decode):
1826         * Shared/APIData.h:
1827         * Shared/UserData.cpp:
1828         (WebKit::UserData::encode):
1829         (WebKit::UserData::decode):
1830         * WebKit2.xcodeproj/project.pbxproj:
1831
1832 2013-12-16  Anders Carlsson  <andersca@apple.com>
1833
1834         Rename WebData to API::Data
1835         https://bugs.webkit.org/show_bug.cgi?id=125797
1836
1837         Reviewed by Beth Dakin.
1838
1839         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1840         (-[WKRemoteObjectEncoder encodeBytes:length:forKey:]):
1841         (-[WKRemoteObjectDecoder decodeBytesForKey:returnedLength:]):
1842         * Shared/API/c/WKData.cpp:
1843         (WKDataGetTypeID):
1844         (WKDataCreate):
1845         * Shared/API/c/WKSharedAPICast.h:
1846         * Shared/API/c/mac/WKWebArchive.cpp:
1847         (WKWebArchiveCopyData):
1848         * Shared/API/c/mac/WKWebArchiveResource.cpp:
1849         (WKWebArchiveResourceCopyData):
1850         * Shared/APIData.h: Renamed from Source/WebKit2/Shared/WebData.h.
1851         (API::Data::createWithoutCopying):
1852         (API::Data::create):
1853         (API::Data::~Data):
1854         (API::Data::bytes):
1855         (API::Data::size):
1856         (API::Data::dataReference):
1857         (API::Data::Data):
1858         (API::Data::fastFreeBytes):
1859         * Shared/Cocoa/WKNSData.h:
1860         (WebKit::wrapper):
1861         * Shared/Cocoa/WKNSData.mm:
1862         (-[WKNSData dealloc]):
1863         * Shared/UserMessageCoders.h:
1864         (WebKit::UserMessageEncoder::baseEncode):
1865         (WebKit::UserMessageDecoder::baseDecode):
1866         * Shared/WebArchive.cpp:
1867         (WebKit::WebArchive::create):
1868         (WebKit::WebArchive::WebArchive):
1869         (WebKit::WebArchive::data):
1870         * Shared/WebArchive.h:
1871         * Shared/WebArchiveResource.cpp:
1872         (WebKit::WebArchiveResource::create):
1873         (WebKit::WebArchiveResource::WebArchiveResource):
1874         (WebKit::WebArchiveResource::data):
1875         * Shared/WebArchiveResource.h:
1876         * UIProcess/API/C/WKPage.cpp:
1877         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1878         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
1879         * UIProcess/API/mac/WKPrintingView.mm:
1880         (pageDidDrawToPDF):
1881         * UIProcess/Downloads/DownloadProxy.cpp:
1882         (WebKit::createData):
1883         (WebKit::DownloadProxy::didFail):
1884         (WebKit::DownloadProxy::didCancel):
1885         * UIProcess/Downloads/DownloadProxy.h:
1886         (WebKit::DownloadProxy::resumeData):
1887         * UIProcess/WebPageProxy.cpp:
1888         (WebKit::WebPageProxy::loadData):
1889         (WebKit::WebPageProxy::loadWebArchiveData):
1890         (WebKit::WebPageProxy::dataCallback):
1891         (WebKit::WebPageProxy::saveDataToFileInDownloadsFolder):
1892         (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
1893         * UIProcess/WebPageProxy.h:
1894         * UIProcess/WebUIClient.cpp:
1895         (WebKit::WebUIClient::saveDataToFileInDownloadsFolder):
1896         * UIProcess/WebUIClient.h:
1897         * UIProcess/cf/WebPageProxyCF.cpp:
1898         (WebKit::WebPageProxy::sessionStateData):
1899         (WebKit::WebPageProxy::restoreFromSessionStateData):
1900         * WebKit2.xcodeproj/project.pbxproj:
1901         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1902         (WKBundleCreateWKDataFromUInt8Array):
1903         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1904         (WebKit::InjectedBundle::createWebDataFromUint8Array):
1905         * WebProcess/InjectedBundle/InjectedBundle.h:
1906         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
1907         (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
1908         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1909         (WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
1910         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1911         * WebProcess/WebPage/WebPage.cpp:
1912         (WebKit::WebPage::loadDataImpl):
1913
1914 2013-12-16  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1915
1916         Fix build warning in files including DrawingAreaProxy.h
1917         https://bugs.webkit.org/show_bug.cgi?id=125778
1918
1919         Reviewed by Anders Carlsson.
1920
1921         Remove unused parameters from method declaration.
1922
1923         * UIProcess/DrawingAreaProxy.h:
1924         (WebKit::DrawingAreaProxy::adjustTransientZoom):
1925         (WebKit::DrawingAreaProxy::commitTransientZoom):
1926
1927 2013-12-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1928
1929         Unreviewed. Fix GTK+ build after r160549.
1930
1931         * GNUmakefile.am: Fix the include paths to make sure we include
1932         the WebKit2 config.h file when building libWebKit2Platform.
1933
1934 2013-12-16  Sergio Villar Senin  <svillar@igalia.com>
1935
1936         [GTK] can't build from trunk: WebKitCookieManager: 'WebString' was not declared in this scope
1937         https://bugs.webkit.org/show_bug.cgi?id=125759
1938
1939         Reviewed by Carlos Garcia Campos.
1940
1941         Renamed WebString to API::String after r160608.
1942
1943         * UIProcess/API/gtk/WebKitCookieManager.cpp:
1944         (webkitCookieManagerGetDomainsWithCookiesCallback):
1945         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
1946         (webkit_file_chooser_request_get_mime_types):
1947         (webkit_file_chooser_request_get_mime_types_filter):
1948         (webkit_file_chooser_request_get_selected_files):
1949         * UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
1950         (webkit_form_submission_request_get_text_fields):
1951         * UIProcess/API/gtk/WebKitWebContext.cpp:
1952         (webkit_web_context_set_web_extensions_directory):
1953         (webkit_web_context_prefetch_dns):
1954         * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
1955         (toAPIArray):
1956         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
1957         (webkitWebExtensionDidReceiveMessage):
1958
1959 2013-12-15  Tim Horton  <timothy_horton@apple.com>
1960
1961         WebKit2 View Gestures: Can't pinch in past the maximum scale
1962         https://bugs.webkit.org/show_bug.cgi?id=125749
1963
1964         Reviewed by Anders Carlsson.
1965
1966         Pinching in past the maximum scale should result in the zoom resisting, but continuing.
1967
1968         * UIProcess/mac/ViewGestureController.cpp:
1969         (WebKit::resistanceForDelta):
1970         Clean up the logic and apply resistance to pinching in past the maximum.
1971
1972         (WebKit::ViewGestureController::handleMagnificationGesture):
1973         (WebKit::ViewGestureController::endMagnificationGesture):
1974         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1975         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
1976
1977 2013-12-15  Dan Bernstein  <mitz@apple.com>
1978
1979         [Cocoa] Expose the certificate chain for the main frame
1980         https://bugs.webkit.org/show_bug.cgi?id=125760
1981
1982         Reviewed by Sam Weinig.
1983
1984         * UIProcess/API/Cocoa/WKBrowsingContextController.h: Declared certificateChain property.
1985         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1986         (-[WKBrowsingContextController certificateChain]): Added this getter, which calls through
1987         to WebFrameProxy::certificateInfo.
1988
1989 2013-12-15  Andy Estes  <aestes@apple.com>
1990
1991         [iOS] Upstream changes to FeatureDefines.xcconfig
1992         https://bugs.webkit.org/show_bug.cgi?id=125742
1993
1994         Reviewed by Dan Bernstein.
1995
1996         * Configurations/FeatureDefines.xcconfig:
1997
1998 2013-12-15  Dan Bernstein  <mitz@apple.com>
1999
2000         Build fix for 32-bit clients.
2001
2002         * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h:
2003
2004 2013-12-15  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2005
2006         Unreviewed EFL build fix after r160608.
2007
2008         * UIProcess/WebGrammarDetail.cpp:
2009         (WebKit::WebGrammarDetail::WebGrammarDetail):
2010         (WebKit::WebGrammarDetail::guesses):
2011         * UIProcess/WebTextCheckerClient.cpp:
2012         (WebKit::WebTextCheckerClient::guessesForWord):
2013
2014 2013-12-14  Yongjun Zhang  <yongjun_zhang@apple.com>
2015
2016         Add page load delegate for WebProcessPlugInBrowsingContextController.
2017         https://bugs.webkit.org/show_bug.cgi?id=125697
2018
2019         Add page load delegate for WebProcessPlugInBrowsingContextController so that a
2020         WebProcess injected bundle can listen to page load events.
2021
2022         Reviewed by Sam Weinig.
2023
2024         * WebKit2.xcodeproj/project.pbxproj:
2025         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Added.
2026         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
2027         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2028         (didStartProvisionalLoadForFrame):
2029         (didFinishLoadForFrame):
2030         (globalObjectIsAvailableForFrame):
2031         (setUpPageLoaderClient):
2032         (-[WKWebProcessPlugInBrowserContextController loadDelegate]):
2033         (-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]):
2034
2035 2013-12-14  Dan Bernstein  <mitz@apple.com>
2036
2037         [iOS] Implement NetworkProcess::allowSpecificHTTPSCertificateForHost
2038         https://bugs.webkit.org/show_bug.cgi?id=125744
2039
2040         Reviewed by Sam Weinig.
2041
2042         * NetworkProcess/ios/NetworkProcessIOS.mm:
2043         (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost): Implemented by calling
2044         +[NSURLRequest setAllowsSpecificHTTPSCertificate:forHost:].
2045
2046 2013-12-13  Sam Weinig  <sam@webkit.org>
2047
2048         [WK2] Rename WebString to API::String
2049         https://bugs.webkit.org/show_bug.cgi?id=125726
2050
2051         Reviewed by Anders Carlsson.
2052
2053         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2054         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
2055         * Shared/API/c/WKPluginInformation.cpp:
2056         * Shared/API/c/WKSharedAPICast.h:
2057         * Shared/API/c/WKString.cpp:
2058         * Shared/API/c/cf/WKStringCF.mm:
2059         * Shared/APIArray.cpp:
2060         * Shared/APIArray.h:
2061         * Shared/APIString.h: Copied from Source/WebKit2/Shared/WebString.h.
2062         * Shared/Cocoa/WKNSString.h:
2063         * Shared/Cocoa/WKNSString.mm:
2064         * Shared/ImmutableDictionary.cpp:
2065         * Shared/Plugins/Netscape/PluginInformation.cpp:
2066         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
2067         * Shared/UserData.cpp:
2068         * Shared/UserMessageCoders.h:
2069         * Shared/WebArchiveResource.h:
2070         * Shared/WebOpenPanelParameters.cpp:
2071         * Shared/WebRenderLayer.cpp:
2072         * Shared/WebRenderObject.cpp:
2073         * Shared/WebString.h: Removed.
2074         * UIProcess/API/C/WKCredential.cpp:
2075         * UIProcess/API/C/WKDatabaseManager.cpp:
2076         * UIProcess/API/C/WKPage.cpp:
2077         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2078         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
2079         * UIProcess/APINavigationData.h:
2080         * UIProcess/Authentication/WebCredential.h:
2081         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2082         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
2083         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
2084         * UIProcess/WebContext.cpp:
2085         * UIProcess/WebDatabaseManagerProxy.cpp:
2086         * UIProcess/WebFormClient.cpp:
2087         * UIProcess/WebLoaderClient.cpp:
2088         * UIProcess/WebPageGroup.cpp:
2089         * UIProcess/WebUIClient.cpp:
2090         * WebKit2.xcodeproj/project.pbxproj:
2091         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2092         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2093         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
2094         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
2095         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2096         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
2097
2098 2013-12-14  Andy Estes  <aestes@apple.com>
2099
2100         Unify FeatureDefines.xcconfig
2101         https://bugs.webkit.org/show_bug.cgi?id=125741
2102
2103         Rubber-stamped by Dan Bernstein.
2104
2105         * Configurations/FeatureDefines.xcconfig: Remove a space in
2106         FEATURE_DEFINES and fix a typo in ENABLE_CSS3_TEXT_DECORATION.
2107
2108 2013-12-14  Dan Bernstein  <mitz@apple.com>
2109
2110         iOS build fix.
2111
2112         * UIProcess/API/Cocoa/WKBrowsingContextController.h: Declared
2113         observedRenderingProgressEvents as nonatomic.
2114
2115 2013-12-14  Dan Bernstein  <mitz@apple.com>
2116
2117         [Cocoa] Expose WebContext::allowSpecificHTTPSCertificateForHost
2118         https://bugs.webkit.org/show_bug.cgi?id=125738
2119
2120         Reviewed by Mark Rowe.
2121
2122         * UIProcess/API/Cocoa/WKProcessGroup.mm:
2123         (-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]): Added. Calls through to
2124         WebContext::allowSpecificHTTPSCertificateForHost.
2125         * UIProcess/API/Cocoa/WKProcessGroupPrivate.h: Declared new method.
2126
2127 2013-12-14  Dan Bernstein  <mitz@apple.com>
2128
2129         [Cocoa] Expose some layout milestones
2130         https://bugs.webkit.org/show_bug.cgi?id=125721
2131
2132         Reviewed by Sam Weinig.
2133
2134         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
2135         (WKRenderingProgressEvents): Declared new enum.
2136         (@interface WKBrowsingContextController): Declared new observedRenderingProgressEvents
2137         property.
2138         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2139         (layoutMilestones): Added helper to translate rendering progress events into layout
2140         milestones.
2141         (-[WKBrowsingContextController setObservedRenderingProgressEvents:]): Added this setter.
2142         Sets the ivar and calls WebPageProxy::listenForLayoutMilestones.
2143         (renderingProgressEvents): Added helper to translate layout milestones into rendering
2144         progress events.
2145         (didLayout): Implemented this WKPageLoaderClient callback by calling the load delegate.
2146         (setUpPageLoaderClient): Set the above callback in the client structure.
2147         * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h: Declared new delegate method.
2148
2149 2013-12-14  Dan Bernstein  <mitz@apple.com>
2150
2151         Clarify Owners’ role
2152         https://bugs.webkit.org/show_bug.cgi?id=125739
2153
2154         Reviewed by Anders Carlsson.
2155
2156         * Owners: Clarify that a patch authored by an Owner does not have to be reviewed by one, as
2157         decided during the 2013 WebKit Contributors Meeting.
2158
2159 2013-12-13  Benjamin Poulain  <bpoulain@apple.com>
2160
2161         [WK2] Fix the build and enable the NetworkProcess by default on iOS
2162         https://bugs.webkit.org/show_bug.cgi?id=125723
2163
2164         Reviewed by Sam Weinig.
2165
2166         * Configurations/WebKit2.xcconfig:
2167         Fix the list of excluded file to get the processes building.
2168
2169         * NetworkProcess/ios/NetworkProcessIOS.mm:
2170         (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHosAt):
2171         Update PlatformCertificateInfo->CertificateInfo match the new name after r159647.
2172
2173         * UIProcess/API/Cocoa/WKProcessGroup.mm:
2174         (-[WKProcessGroup initWithInjectedBundleURL:]):
2175         Enable the NetworkProcess by default.
2176
2177         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
2178         (WebKit::shouldUseXPC):
2179         Use the right macro.
2180
2181         * WebKit2Prefix.h:
2182         Eanble the flags NETWORK_PROCESS and CUSTOM_PROTOCOLS.
2183
2184 2013-12-13  Dan Bernstein  <mitz@apple.com>
2185
2186         Demoted ActivityAssertion.h to a project header.
2187
2188         Rubber-stamped by Sam Weinig.
2189
2190         * WebKit2.xcodeproj/project.pbxproj:
2191
2192 2013-12-13  Sam Weinig  <sam@webkit.org>
2193
2194         [WK2] Start removing calls to String::characters()
2195         https://bugs.webkit.org/show_bug.cgi?id=125699
2196
2197         Reviewed by Anders Carlsson.
2198
2199         * Shared/mac/WebCoreArgumentCodersMac.mm:
2200         (CoreIPC::::decodePlatformData):
2201         * UIProcess/Plugins/PluginInfoStore.cpp:
2202         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
2203         (WebKit::PluginInfoStore::findPlugin):
2204         * UIProcess/Plugins/PluginInfoStore.h:
2205         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2206         (WebKit::PluginInfoStore::pluginsDirectories):
2207         (WebKit::PluginInfoStore::pluginPathsInDirectory):
2208         * UIProcess/cf/WebPreferencesCF.cpp:
2209         (WebKit::makeKey):
2210         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2211         (WebKit::InjectedBundle::load):
2212         * WebProcess/WebPage/WebPage.cpp:
2213         (WebKit::WebPage::loadStringImpl):
2214         (WebKit::WebPage::loadHTMLString):
2215         (WebKit::WebPage::loadAlternateHTMLString):
2216         (WebKit::WebPage::loadPlainTextString):
2217         (WebKit::WebPage::loadWebArchiveData):
2218         * WebProcess/WebPage/WebPage.h:
2219
2220 2013-12-13  Enrica Casucci  <enrica@apple.com>
2221
2222         WK2: Add support for inline candidates on iOS.
2223         https://bugs.webkit.org/show_bug.cgi?id=125667
2224
2225         Reviewed by Benjamin Poulain.
2226
2227         The state required to support inline candidates is cached in the UI process.
2228         Asynchronous messages are used to set and confirm the composition.
2229
2230         * Shared/EditorState.cpp:
2231         (WebKit::EditorState::encode):
2232         (WebKit::EditorState::decode):
2233         * Shared/EditorState.h:
2234         * UIProcess/API/ios/WKInteractionView.mm:
2235         (-[WKInteractionView textFirstRect]):
2236         (-[WKInteractionView textLastRect]):
2237         (-[WKInteractionView hasMarkedText]):
2238         (-[WKInteractionView markedText]):
2239         (-[WKInteractionView setMarkedText:selectedRange:]):
2240         (-[WKInteractionView unmarkText]):
2241         (-[WKInteractionView _selectionChanged]):
2242         * UIProcess/WebPageProxy.cpp:
2243         (WebKit::WebPageProxy::editorStateChanged):
2244         * UIProcess/WebPageProxy.h:
2245         * UIProcess/WebPageProxy.messages.in:
2246         * UIProcess/ios/WebPageProxyIOS.mm:
2247         (WebKit::WebPageProxy::setComposition):
2248         (WebKit::WebPageProxy::confirmComposition):
2249         (WebKit::WebPageProxy::notifyRevealedSelection):
2250         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
2251         (WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame):
2252         * WebProcess/WebPage/WebPage.cpp:
2253         (WebKit::WebPage::editorState):
2254         * WebProcess/WebPage/WebPage.h:
2255         * WebProcess/WebPage/WebPage.messages.in:
2256         * WebProcess/WebPage/ios/WebPageIOS.mm:
2257         (WebKit::WebPage::setComposition):
2258         (WebKit::WebPage::confirmComposition):
2259
2260 2013-12-13  Anders Carlsson  <andersca@apple.com>
2261
2262         Fix the build.
2263
2264         Work around a problem in Functional.h by making the DatabaseProcess destructor public.
2265
2266         * DatabaseProcess/DatabaseProcess.h:
2267
2268 2013-12-13  Tim Horton  <timothy_horton@apple.com>
2269
2270         [wk2] Handle pinch-to-zoom gesture
2271         https://bugs.webkit.org/show_bug.cgi?id=125604
2272
2273         Reviewed by Sam Weinig.
2274
2275         * UIProcess/API/mac/WKView.mm:
2276         (-[WKView magnifyWithEvent:]):
2277         (-[WKView endGestureWithEvent:]):
2278         Forward the event up the chain if we're not going to handle it.
2279
2280 2013-12-12  Anders Carlsson  <andersca@apple.com>
2281
2282         Put classes in the IPC directory in the IPC namespace
2283         https://bugs.webkit.org/show_bug.cgi?id=125665
2284
2285         Reviewed by Sam Weinig.
2286
2287         Also add a hack to config.h that lets us use CoreIPC and IPC interchangeably.
2288         
2289         * Platform/IPC/DataReference.cpp:
2290         * Platform/IPC/DataReference.h:
2291         * Platform/IPC/MessageSender.cpp:
2292         * Platform/IPC/MessageSender.h:
2293         * Platform/IPC/StringReference.cpp:
2294         * Platform/IPC/StringReference.h:
2295         * config.h:
2296
2297 2013-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>
2298
2299         [GTK] Add a unit tests to WebKit2 to test node names
2300         https://bugs.webkit.org/show_bug.cgi?id=125686
2301
2302         Reviewed by Gustavo Noronha Silva.
2303
2304         * UIProcess/API/gtk/tests/DOMNodeTest.cpp:
2305         (WebKitDOMNodeTest::testTagNames):
2306         (WebKitDOMNodeTest::runTest):
2307         (registerTests):
2308         * UIProcess/API/gtk/tests/TestDOMNode.cpp:
2309         (testWebKitDOMNodeTagNames):
2310         (beforeAll):
2311
2312 2013-12-13  Zan Dobersek  <zdobersek@igalia.com>
2313
2314         Unreviewed. Further GTK WK2 build fixes after r160504.
2315
2316         * UIProcess/API/gtk/WebKitWebView.cpp:
2317         (webkit_web_view_get_snapshot):
2318         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2319         (didInitiateLoadForResource):
2320         (willSendRequestForFrame):
2321         (didReceiveResponseForResource):
2322         (didReceiveContentLengthForResource):
2323         (didFinishLoadForResource):
2324         (didFailLoadForResource):
2325         (webkitWebPageDidReceiveMessage):
2326
2327 2013-12-13  Zan Dobersek  <zdobersek@igalia.com>
2328
2329         Unreviewed GTK build fix after r160509.
2330
2331         * GNUmakefile.list.am: MessageSender.(cpp|h) files were moved to Platform/IPC.
2332
2333 2013-12-13  Dániel Bátyai  <Batyai.Daniel@stud.u-szeged.hu>
2334
2335         GTK buildfix after r160504.
2336
2337         Reviewed by Csaba Osztrogonác.
2338
2339         * UIProcess/API/gtk/WebKitWebContext.cpp:
2340         (webkit_web_context_prefetch_dns):
2341
2342 2013-12-12  Yongjun Zhang  <yongjun_zhang@apple.com>
2343
2344         Need ObjC APIs for some InjectedBundle classes.
2345         https://bugs.webkit.org/show_bug.cgi?id=125600
2346
2347         Add ObjC API classes for WebFrame, InjectedBundleScriptWorld, InjectedBundleHitTestResult and InjectedBundleNodeHandle.
2348
2349         Reviewed by Dan Bernstein.
2350
2351         * Shared/Cocoa/APIObject.mm: creates API wrapper for WebFrame, InjectedBundleScriptWorld, InjectedBundleHitTestResult
2352              and InjectedBundleNodeHandle.
2353         (API::Object::newObject):
2354         * WebKit2.xcodeproj/project.pbxproj:
2355         * WebProcess/InjectedBundle/API/Cocoa: Added.
2356         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h: Added.
2357         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm: Added.
2358         (-[WKWebProcessPlugInFrame dealloc]):
2359         (-[WKWebProcessPlugInFrame jsContextForWorld:]): returns the JSContextRef for a ScriptWorld in frame.
2360         (-[WKWebProcessPlugInFrame hitTest:]): returns hitTestResult (with API type) from a hitTest.
2361         (-[WKWebProcessPlugInFrame jsWrapperForNodeHandle:inWorld:]):
2362         (-[WKWebProcessPlugInFrame API::]):
2363         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrameInternal.h: Added.
2364         (WebKit::wrapper):
2365         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h: Added.
2366         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm: Added.
2367         (-[WKWebProcessPlugInHitTestResult dealloc]):
2368         (-[WKWebProcessPlugInHitTestResult nodeHandle]):
2369         (-[WKWebProcessPlugInHitTestResult API::]):
2370         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResultInternal.h: Added.
2371         (WebKit::wrapper):
2372         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Added.
2373         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm: Added.
2374         (-[WKWebProcessPlugInNodeHandle dealloc]):
2375         (-[WKWebProcessPlugInNodeHandle API::]):
2376         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandleInternal.h: Added.
2377         (WebKit::wrapper):
2378         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h: Added.
2379         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm: Added.
2380         (+[WKWebProcessPlugInScriptWorld world]): returns a new isolated world.
2381         (+[WKWebProcessPlugInScriptWorld normalWorld]): returns the mainThread normal world. 
2382         (-[WKWebProcessPlugInScriptWorld dealloc]):
2383         (-[WKWebProcessPlugInScriptWorld API::]):
2384         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorldInternal.h: Added.
2385         (WebKit::wrapper):
2386
2387 2013-12-12  Benjamin Poulain  <bpoulain@apple.com>
2388
2389         Fix unsafe memory load/store from the argument encoder/decoder affecting ARM
2390         https://bugs.webkit.org/show_bug.cgi?id=125674
2391
2392         Reviewed by Darin Adler.
2393
2394         Depending on the CPU and CPU config, load and store may have to be aligned.
2395         The argument buffer has no particular alignment which can cause problems.
2396
2397         In this case, on ARMv7, strd and ldrd can have alignment restriction on 16 bytes.
2398         The code encoding double and 64 bits integers was causing bugs.
2399
2400         To avoid problems, the encoders/decoders are modified to just use memcpy. The compiler optimizes
2401         it away for the right instructions (clang uses two ldr/str in the case of 64bits values on ARMv7).
2402
2403         * Platform/CoreIPC/ArgumentDecoder.cpp:
2404         (CoreIPC::decodeValueFromBuffer):
2405         (CoreIPC::ArgumentDecoder::decode):
2406         * Platform/CoreIPC/ArgumentEncoder.cpp:
2407         (CoreIPC::copyValueToBuffer):
2408         (CoreIPC::ArgumentEncoder::encode):
2409
2410 2013-12-12  Tim Horton  <timothy_horton@apple.com>
2411
2412         Build fix for 32-bit.
2413
2414         There was no reason for these to be CGFloat.
2415
2416         * UIProcess/mac/ViewGestureController.cpp:
2417
2418 2013-12-12  Tim Horton  <timothy_horton@apple.com>
2419
2420         [wk2] Handle pinch-to-zoom gesture
2421         https://bugs.webkit.org/show_bug.cgi?id=125604
2422
2423         Reviewed by Simon Fraser.
2424
2425         Add the concept of a "transient" zoom to DrawingArea, which is a zoom
2426         that affects the content, but does not cause repaint, as would be used
2427         for a live pinch-zoom gesture.
2428
2429         Add ViewGestureController, which currently only handles magnification 
2430         gestures, and keeps track of the current gesture's scale and origin, and
2431         forwards relevant events on to the DrawingArea via the transient zoom mechanism.
2432
2433         * DerivedSources.make:
2434         Add ViewGestureController to the list of message receivers.
2435
2436         * UIProcess/API/Cocoa/WKViewPrivate.h:
2437         Add shouldHandleMagnificationGesture property, which controls whether WKView will
2438         attempt to handle magnifyWithEvent:.
2439
2440         * UIProcess/API/mac/WKView.mm:
2441         (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
2442         Fix a typo.
2443
2444         (-[WKView _ensureGestureController]):
2445         Create our ViewGestureController if it doesn't already exist.
2446
2447         (-[WKView setAllowsMagnification:]):
2448         (-[WKView allowsMagnification]):
2449         SPI to enable/disable handling the magnification gesture.
2450
2451         (-[WKView setMagnification:centeredAtPoint:]):
2452         (-[WKView setMagnification:]):
2453         (-[WKView magnification]):
2454         Adjust or retrieve the current page scale.
2455         The variant of setMagnification that does not take an origin uses the view's center.
2456
2457         (-[WKView magnifyWithEvent:]):
2458         (-[WKView endGestureWithEvent:]):
2459         Forward gesture methods to ViewGestureController.
2460
2461         * UIProcess/mac/ViewGestureController.cpp: Added.
2462         (WebKit::ViewGestureController::create):
2463         (WebKit::ViewGestureController::ViewGestureController):
2464         (WebKit::ViewGestureController::~ViewGestureController):
2465         (WebKit::resistanceForDelta):
2466         Compute a resistance factor, which makes it feel "hard" to zoom out past
2467         scale=1, and accelerates scaling out before you hit scale=1.
2468
2469         (WebKit::ViewGestureController::scaledMagnificationOrigin):
2470         Compute the origin of the magnification gesture with the transient zoom unapplied.
2471
2472         (WebKit::ViewGestureController::handleMagnificationGesture):
2473         The first magnification gesture will send a message to the WebProcess
2474         to retrieve the visible content rect. Subsequent gestures will
2475         hand the new magnification and origin to the DrawingArea to apply.
2476
2477         (WebKit::ViewGestureController::didBeginTransientZoom):
2478         Callback from the WebProcess, with the current visible content rect.
2479         Subsequent magnification gestures will forward the scale and origin to the DrawingArea.
2480         
2481         (WebKit::ViewGestureController::endMagnificationGesture):
2482         Commit the current transient scale as the actual page scale, which will cause
2483         a repaint and bring in all the tiles.
2484
2485         (WebKit::ViewGestureController::endActiveGesture):
2486         If we have an active gesture, call its end function.
2487
2488         * UIProcess/mac/ViewGestureController.h: Added.
2489         * UIProcess/mac/ViewGestureController.messages.in: Added.
2490
2491         * WebKit2.xcodeproj/project.pbxproj:
2492         Add new files.
2493
2494         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2495         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2496         (WebKit::TiledCoreAnimationDrawingArea::beginTransientZoom):
2497         Call back to ViewGestureController with the visibleContentRect.
2498
2499         (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
2500         Scale and translate the RenderView's PlatformCALayer.
2501         Reaching into the layer tree like this is scary, we should consider
2502         teaching RenderLayerCompositor about transient zoom.
2503         Hide the content shadow layer for now.
2504
2505         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
2506         Clear our custom transform on the RenderView's layer, and
2507         change the actual page scale, causing a repaint.
2508         Un-hide the shadow layer.
2509
2510         * UIProcess/DrawingAreaProxy.h:
2511         (WebKit::DrawingAreaProxy::beginTransientZoom):
2512         (WebKit::DrawingAreaProxy::adjustTransientZoom):
2513         (WebKit::DrawingAreaProxy::commitTransientZoom):
2514         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2515         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2516         (WebKit::TiledCoreAnimationDrawingAreaProxy::beginTransientZoom):
2517         (WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom):
2518         (WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom):
2519         * WebProcess/WebPage/DrawingArea.h:
2520         (WebKit::DrawingArea::beginTransientZoom):
2521         (WebKit::DrawingArea::adjustTransientZoom):
2522         (WebKit::DrawingArea::commitTransientZoom):
2523         * WebProcess/WebPage/DrawingArea.messages.in:
2524         Generic plumbing for {begin, adjust, end}TransientZoom.
2525
2526 2013-12-12  Brady Eidson  <beidson@apple.com>
2527
2528         DatabaseProcess IndexedDB: Establish a metadata backing store on disk
2529         https://bugs.webkit.org/show_bug.cgi?id=125258
2530
2531         Reviewed by Alexey Proskuryakov, Anders Carlsson, and Tim Horton.
2532
2533         The DatabaseProcess already has an "Indexed Database path".
2534         Each SecurityOrigin with indexed databases will have a subdirectory under the path.
2535         Each indexed database will have a subdirectory under its SecurityOrigin's path.
2536         Inside that directory will exist (1) metadata database, and 0-N ObjectStore databases.
2537
2538         This patch establishes the directory structure and the (1) metadata database.
2539
2540         * DatabaseProcess/DatabaseProcess.cpp:
2541         (WebKit::DatabaseProcess::initializeDatabaseProcess): Asynchronously ensure the indexed database directory exists.
2542         (WebKit::DatabaseProcess::ensureIndexedDatabaseRelativePathExists): Allow anyone to make necessary directories relative to
2543           the indexed database directory.
2544         (WebKit::DatabaseProcess::ensurePathExists):
2545         (WebKit::DatabaseProcess::absoluteIndexedDatabasePathFromDatabaseRelativePath): Instead of exposing the indexed database directory, 
2546           give DatabaseProcess a method to allow others to compute a path relative to the indexed database directory.
2547         (WebKit::DatabaseProcess::postDatabaseTask):
2548         (WebKit::DatabaseProcess::performNextDatabaseTask):
2549         * DatabaseProcess/DatabaseProcess.h:
2550         (WebKit::DatabaseProcess::queue):
2551
2552         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
2553         (WebKit::DatabaseProcessIDBConnection::getOrEstablishIDBDatabaseMetadata):
2554
2555         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2556         (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
2557         (WebKit::UniqueIDBDatabase::filenameForDatabaseName):
2558         (WebKit::UniqueIDBDatabase::databaseFilenameIdentifier):
2559         (WebKit::UniqueIDBDatabase::canShareDatabases):
2560         (WebKit::UniqueIDBDatabase::shutdown): Method to cleanly shutdown a database, emptying its task and request queues.
2561         (WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
2562         (WebKit::UniqueIDBDatabase::openBackingStoreAndReadMetadata): To be run on the database work queue, establishes a backing store
2563           and extracts metadata from it.
2564         (WebKit::UniqueIDBDatabase::didOpenBackingStoreAndReadMetadata): Callback once metadata from the backing store is ready for use.
2565         (WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
2566         (WebKit::UniqueIDBDatabase::postMainThreadTask): Add a main thread task for this database.
2567         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
2568         (WebKit::UniqueIDBDatabase::postDatabaseTask): Add a database queue task for this database.
2569         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
2570         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2571
2572         Add a virtual backing store interface:
2573         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
2574         (WebKit::UniqueIDBDatabaseBackingStore::~UniqueIDBDatabaseBackingStore):
2575
2576         Add a SQLite implementation of that interface:
2577         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp: Added.
2578         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::UniqueIDBDatabaseBackingStoreSQLite):
2579         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
2580         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
2581         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::openSQLiteDatabaseAtPath):
2582         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
2583         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
2584
2585         Add a general purpose asynchronous task that does cross thread copying:
2586         * Shared/AsyncTask.h: Added.
2587         (WebKit::AsyncTask::~AsyncTask):
2588         (WebKit::AsyncTask::AsyncTask):
2589         (WebKit::createAsyncTask):
2590
2591         Add more isolated copiers and introduce WebKit CrossThreadCopier specializations:
2592         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.cpp:
2593         (WebKit::UniqueIDBDatabaseIdentifier::isolatedCopy):
2594         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.h:
2595
2596         * Shared/SecurityOriginData.cpp:
2597         (WebKit::SecurityOriginData::isolatedCopy):
2598         * Shared/SecurityOriginData.h:
2599
2600         * Shared/WebCrossThreadCopier.cpp:
2601         (WebCore::::copy):
2602         * Shared/WebCrossThreadCopier.h:
2603
2604         * WebKit2.xcodeproj/project.pbxproj:
2605
2606 2013-12-12  Chris Fleizach  <cfleizach@apple.com>
2607
2608         AX: HANG: virginamerica.com: Pressing the print button on the boarding pass page locks up VoiceOver and Safari.
2609         https://bugs.webkit.org/show_bug.cgi?id=125603
2610
2611         Reviewed by Anders Carlsson.
2612
2613         Allow the print dialog to spin its run loop while accessibility is enabled so that VoiceOver does not hang on the WebProcess.
2614
2615         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2616         (WebKit::WebChromeClient::print):
2617
2618 2013-12-12  Jaehun Lim  <ljaehun.lim@samsung.com>
2619
2620         Unreviewed CMake build fix after r160509
2621
2622         * CMakeLists.txt: Apply MessageSender's changes
2623
2624 2013-12-12  Dan Bernstein  <mitz@apple.com>
2625
2626         [Cocoa] Let the load delegate know when the Web process crashes
2627         https://bugs.webkit.org/show_bug.cgi?id=125660
2628
2629         Reviewed by Sam Weinig.
2630
2631         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2632         (processDidCrash):  Implemented this WKPageLoaderClient callback by calling the load
2633         delegate.
2634         (setUpPageLoaderClient): Set the above callback in the client structure
2635         * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h: Declare new delegate method.
2636
2637 2013-12-12  Anders Carlsson  <andersca@apple.com>
2638
2639         Move MessageSender to Platform/IPC.
2640
2641         Rubber-stamped by Andreas Kling.
2642
2643         * Platform/IPC/MessageSender.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/MessageSender.cpp.
2644         * Platform/IPC/MessageSender.h: Renamed from Source/WebKit2/Platform/CoreIPC/MessageSender.h.
2645         * WebKit2.xcodeproj/project.pbxproj:
2646
2647 2013-12-12  Anders Carlsson  <andersca@apple.com>
2648
2649         WebPageProxy should be a MessageSender
2650         https://bugs.webkit.org/show_bug.cgi?id=125654
2651
2652         Reviewed by Sam Weinig.
2653
2654         * Platform/CoreIPC/MessageSender.cpp:
2655         (CoreIPC::MessageSender::sendMessage):
2656         * Platform/CoreIPC/MessageSender.h:
2657         (CoreIPC::MessageSender::send):
2658         * Shared/ChildProcessProxy.h:
2659         * Shared/WebConnection.cpp:
2660         (WebKit::WebConnection::postMessage):
2661         * UIProcess/WebPageProxy.cpp:
2662         (WebKit::WebPageProxy::initializeWebPage):
2663         (WebKit::WebPageProxy::sendMessage):
2664         (WebKit::WebPageProxy::messageSenderConnection):
2665         (WebKit::WebPageProxy::messageSenderDestinationID):
2666         * UIProcess/WebPageProxy.h:
2667
2668 2013-12-12  Anders Carlsson  <andersca@apple.com>
2669
2670         Clean up dictionary handling a little
2671         https://bugs.webkit.org/show_bug.cgi?id=125644
2672
2673         Reviewed by Dan Bernstein.
2674
2675         Add a WKDictionaryCreate function as a first step towards eliminating WKMutableDictionaryRef,
2676         (in the same way we've eliminated WKMutableArrayRef). Also, rename adopt to create and make it take a Map by value
2677         so we can use std::move where appropriate.
2678
2679         * Shared/API/c/WKDictionary.cpp:
2680         (WKDictionaryCreate):
2681         * Shared/API/c/WKDictionary.h:
2682         * Shared/Cocoa/WKNSDictionary.mm:
2683         (-[WKNSDictionary copyWithZone:]):
2684         * Shared/ImmutableDictionary.cpp:
2685         (WebKit::ImmutableDictionary::create):
2686         (WebKit::ImmutableDictionary::ImmutableDictionary):
2687         * Shared/ImmutableDictionary.h:
2688         * Shared/MutableDictionary.cpp:
2689         (WebKit::MutableDictionary::MutableDictionary):
2690         * Shared/Plugins/Netscape/PluginInformation.cpp:
2691         (WebKit::createPluginInformationDictionary):
2692         * Shared/UserData.cpp:
2693         (WebKit::UserData::transform):
2694         (WebKit::UserData::decode):
2695         * Shared/UserMessageCoders.h:
2696         (WebKit::UserMessageDecoder::baseDecode):
2697         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
2698         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
2699         * UIProcess/WebContext.cpp:
2700         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
2701         * UIProcess/WebDatabaseManagerProxy.cpp:
2702         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
2703         * UIProcess/WebFormClient.cpp:
2704         (WebKit::WebFormClient::willSubmitForm):
2705         * UIProcess/WebUIClient.cpp:
2706         (WebKit::WebUIClient::createNewPage):
2707         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
2708         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
2709         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
2710
2711 2013-12-12  Dan Bernstein  <mitz@apple.com>
2712
2713         [Cocoa] Navigation action information for policy decisions is missing the original request
2714         https://bugs.webkit.org/show_bug.cgi?id=125612
2715
2716         Reviewed by Anders Carlsson.
2717
2718         * Platform/CoreIPC/HandleMessage.h:
2719         (CoreIPC::callMemberFunction): Added template with additional message parameter.
2720         * UIProcess/API/C/WKPagePolicyClientInternal.h: Added. Defines a new version of the client
2721         interface with a new version of the policy decision callback.
2722         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2723         (setUpPagePolicyClient): Use the new internal version of the client. Pass the original
2724         request in the action information dictionary under a new key.
2725         * UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h: Declared new action information
2726         key.
2727         * UIProcess/WebPageProxy.cpp:
2728         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Added originalRequest parameter,
2729         which is passed to the policy client.
2730         * UIProcess/WebPageProxy.h:
2731         * UIProcess/WebPageProxy.messages.in: Added originalRequest parameter in
2732         DecidePolicyForNavigationAction.
2733         * UIProcess/WebPolicyClient.cpp:
2734         (WebKit::WebPolicyClient::decidePolicyForNavigationAction): Pass the original request to
2735         the client.
2736         * UIProcess/WebPolicyClient.h:
2737         * WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
2738         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2739         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Send the original
2740         request from the navigation action to the UI process.
2741
2742 2013-12-12  Zan Dobersek  <zdobersek@igalia.com>
2743
2744         [Autotools] Prepend the WebCore layer archives' names with 'lib'
2745         https://bugs.webkit.org/show_bug.cgi?id=125627
2746
2747         Reviewed by Martin Robinson.
2748
2749         * GNUmakefile.am: Libtool can complain about the WebCore layer archives not being prepended with 'lib'
2750         when they are used during linking, so the prefix is now added to avoid such issues.
2751
2752 2013-12-12  Csaba Osztrogonác  <ossy@webkit.org>
2753
2754         Move CertificateInfo to WebCore
2755         https://bugs.webkit.org/show_bug.cgi?id=124720
2756
2757         Reviewed by Darin Adler.
2758
2759         Based on the patch by Kwang Yul Seo <skyul@company100.net>
2760
2761         * GNUmakefile.list.am:
2762         * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
2763         * NetworkProcess/NetworkProcess.h:
2764         * NetworkProcess/NetworkProcess.messages.in:
2765         * NetworkProcess/NetworkResourceLoader.cpp:
2766         * NetworkProcess/mac/NetworkProcessMac.mm:
2767         * PlatformEfl.cmake:
2768         * PlatformGTK.cmake:
2769         * Shared/API/c/mac/WKCertificateInfoMac.mm:
2770         * Shared/Authentication/AuthenticationManager.h:
2771         * Shared/Authentication/AuthenticationManager.messages.in:
2772         * Shared/Authentication/mac/AuthenticationManager.mac.mm:
2773         * Shared/UserMessageCoders.h:
2774         (WebKit::UserMessageDecoder::baseDecode):
2775         * Shared/WebCertificateInfo.h:
2776         (WebKit::WebCertificateInfo::create):
2777         (WebKit::WebCertificateInfo::certificateInfo):
2778         * Shared/WebCoreArgumentCoders.cpp:
2779         * Shared/WebCoreArgumentCoders.h:
2780         * Shared/mac/WebCoreArgumentCodersMac.mm:
2781         (CoreIPC::ArgumentCoder<CertificateInfo>::encode):
2782         (CoreIPC::ArgumentCoder<CertificateInfo>::decode):
2783         * Shared/soup/CertificateInfo.cpp: Removed.
2784         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2785         (CoreIPC::ArgumentCoder<CertificateInfo>::encode):
2786         (CoreIPC::ArgumentCoder<CertificateInfo>::decode):
2787         * UIProcess/API/gtk/WebKitCertificateInfoPrivate.h:
2788         * UIProcess/API/gtk/WebKitWebView.cpp:
2789         (webkit_web_view_get_tls_info):
2790         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
2791         (WebKit::AuthenticationChallengeProxy::useCredential):
2792         * UIProcess/WebFrameProxy.cpp:
2793         (WebKit::WebFrameProxy::didCommitLoad):
2794         * UIProcess/WebFrameProxy.h:
2795         * UIProcess/WebPageProxy.cpp:
2796         (WebKit::WebPageProxy::didCommitLoadForFrame):
2797         * UIProcess/WebPageProxy.h:
2798         * UIProcess/WebPageProxy.messages.in:
2799         * WebKit2.xcodeproj/project.pbxproj:
2800         * WebProcess/Network/WebResourceLoader.cpp:
2801         * WebProcess/Network/WebResourceLoader.h:
2802         * WebProcess/Network/WebResourceLoader.messages.in:
2803         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2804         * WebProcess/WebProcess.h:
2805         * WebProcess/WebProcess.messages.in:
2806         * WebProcess/soup/WebProcessSoup.cpp:
2807         (WebKit::WebProcess::allowSpecificHTTPSCertificateForHost):
2808
2809 2013-12-12  Zan Dobersek  <zdobersek@igalia.com>
2810
2811         Use of ar T option not supported by older binutils
2812         https://bugs.webkit.org/show_bug.cgi?id=118732
2813
2814         Reviewed by Gustavo Noronha Silva.
2815
2816         * GNUmakefile.am: To support non-thin archives when generating the WebCoreLayerGtk2 archive,
2817         switch to using the AR_FLAGS variable (which can be overridden) for providing the ar flags for the
2818         new archive. Non-thin archives also pose the problem as their members are only noted by the basename
2819         of the member's object file, and not the full path to it. To work around that, all the object files
2820         under the build directory are listed by their relative paths. The members of various archives then have
2821         the basenames of their paths grepped against that list, with the found path correlating to the member
2822         finally added as the new member of the WebCoreLayerGtk2 archive.
2823
2824 2013-12-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2825
2826         [GTK] WebProcess tests are failing with newer glib
2827         https://bugs.webkit.org/show_bug.cgi?id=125621
2828
2829         Reviewed by Martin Robinson.
2830
2831         Newer versions of glib unset the DISPLAY env variable in
2832         g_test_dbus_up(). The WebProcess needs the DISPLAY variable to
2833         work, and it's important to keep its value when running the tests
2834         under Xvfb.
2835
2836         * UIProcess/API/gtk/tests/WebProcessTestRunner.cpp:
2837         (WebProcessTestRunner::WebProcessTestRunner): Restore the DISPLAY
2838         env variable after calling g_test_dbus_up().
2839
2840 2013-12-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2841
2842         [GTK] Make sure unit tests don't use GVFS and dconf
2843         https://bugs.webkit.org/show_bug.cgi?id=125620
2844
2845         Reviewed by Martin Robinson.
2846
2847         They should use the local vfs and the gsettings memory backend.
2848
2849         * UIProcess/API/gtk/tests/TestMain.cpp:
2850         (main):
2851
2852 2013-12-11  KyungTae Kim  <ktf.kim@samsung.com>
2853
2854         [WK2] Build fix after r160464
2855         https://bugs.webkit.org/show_bug.cgi?id=125615
2856
2857         Reviewed by Gyuyoung Kim.
2858
2859         Modify the 2nd parameter for calling WebContext::addMessageReceiver from "this" to "*this"
2860         because the parameter type is modified from CoreIPC::MessageReceiver* to CoreIPC::MessageReceiver&
2861
2862         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
2863         (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
2864         * UIProcess/WebBatteryManagerProxy.cpp:
2865         (WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy):
2866         * UIProcess/WebNetworkInfoManagerProxy.cpp:
2867         (WebKit::WebNetworkInfoManagerProxy::WebNetworkInfoManagerProxy):
2868         * UIProcess/WebVibrationProxy.cpp:
2869         (WebKit::WebVibrationProxy::WebVibrationProxy):
2870         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
2871         (WebKit::WebSoupRequestManagerProxy::WebSoupRequestManagerProxy):
2872         * WebProcess/Battery/WebBatteryManager.cpp:
2873         (WebKit::WebBatteryManager::WebBatteryManager):
2874         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
2875         (WebKit::WebNetworkInfoManager::WebNetworkInfoManager):
2876         * WebProcess/soup/WebSoupRequestManager.cpp:
2877         (WebKit::WebSoupRequestManager::WebSoupRequestManager):
2878
2879 2013-12-11  Anders Carlsson  <andersca@apple.com>
2880
2881         MessageReceiverMap should take MessageReceiver objects by reference
2882         https://bugs.webkit.org/show_bug.cgi?id=125605
2883
2884         Reviewed by Tim Horton.
2885
2886         * Platform/CoreIPC/MessageReceiverMap.cpp:
2887         (CoreIPC::MessageReceiverMap::addMessageReceiver):
2888         * Platform/CoreIPC/MessageReceiverMap.h:
2889         * Shared/Authentication/AuthenticationManager.cpp:
2890         (WebKit::AuthenticationManager::AuthenticationManager):
2891         * Shared/ChildProcess.cpp:
2892         (WebKit::ChildProcess::addMessageReceiver):
2893         * Shared/ChildProcess.h:
2894         * Shared/ChildProcessProxy.cpp:
2895         (WebKit::ChildProcessProxy::addMessageReceiver):
2896         * Shared/ChildProcessProxy.h:
2897         * UIProcess/Downloads/DownloadProxyMap.cpp:
2898         (WebKit::DownloadProxyMap::createDownloadProxy):
2899         * UIProcess/DrawingAreaProxy.cpp:
2900         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
2901         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
2902         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
2903         * UIProcess/WebApplicationCacheManagerProxy.cpp:
2904         (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy):
2905         * UIProcess/WebConnectionToWebProcess.cpp:
2906         (WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess):
2907         * UIProcess/WebContext.cpp:
2908         (WebKit::WebContext::WebContext):
2909         (WebKit::WebContext::addMessageReceiver):
2910         * UIProcess/WebContext.h:
2911         * UIProcess/WebCookieManagerProxy.cpp:
2912         (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
2913         * UIProcess/WebDatabaseManagerProxy.cpp:
2914         (WebKit::WebDatabaseManagerProxy::WebDatabaseManagerProxy):
2915         * UIProcess/WebFullScreenManagerProxy.cpp:
2916         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
2917         * UIProcess/WebGeolocationManagerProxy.cpp:
2918         (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
2919         * UIProcess/WebIconDatabase.cpp:
2920         (WebKit::WebIconDatabase::WebIconDatabase):
2921         * UIProcess/WebInspectorProxy.cpp:
2922         (WebKit::WebInspectorProxy::WebInspectorProxy):
2923         * UIProcess/WebMediaCacheManagerProxy.cpp:
2924         (WebKit::WebMediaCacheManagerProxy::WebMediaCacheManagerProxy):
2925         * UIProcess/WebOriginDataManagerProxy.cpp:
2926         (WebKit::WebOriginDataManagerProxy::WebOriginDataManagerProxy):
2927         * UIProcess/WebPageProxy.cpp:
2928         (WebKit::WebPageProxy::WebPageProxy):
2929         (WebKit::WebPageProxy::reattachToWebProcess):
2930         * UIProcess/WebResourceCacheManagerProxy.cpp:
2931         (WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy):
2932         * UIProcess/mac/RemoteLayerTreeHost.mm:
2933         (WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost):
2934         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
2935         (WebKit::WebApplicationCacheManager::WebApplicationCacheManager):
2936         * WebProcess/Cookies/WebCookieManager.cpp:
2937         (WebKit::WebCookieManager::WebCookieManager):
2938         * WebProcess/Geolocation/WebGeolocationManager.cpp:
2939         (WebKit::WebGeolocationManager::WebGeolocationManager):
2940         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
2941         (WebKit::WebIconDatabaseProxy::WebIconDatabaseProxy):
2942         * WebProcess/MediaCache/WebMediaCacheManager.cpp:
2943         (WebKit::WebMediaCacheManager::WebMediaCacheManager):
2944         * WebProcess/Notifications/WebNotificationManager.cpp:
2945         (WebKit::WebNotificationManager::WebNotificationManager):
2946         * WebProcess/OriginData/WebOriginDataManager.cpp:
2947         (WebKit::WebOriginDataManager::WebOriginDataManager):
2948         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2949         (WebKit::WebResourceCacheManager::WebResourceCacheManager):
2950         * WebProcess/Storage/StorageAreaMap.cpp:
2951         (WebKit::StorageAreaMap::StorageAreaMap):
2952         * WebProcess/WebConnectionToUIProcess.cpp:
2953         (WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
2954         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2955         (WebKit::WebDatabaseManager::WebDatabaseManager):
2956         * WebProcess/WebPage/WebPage.cpp:
2957         (WebKit::WebPage::WebPage):
2958
2959 2013-12-11  Joseph Pecoraro  <pecoraro@apple.com>
2960
2961         Web Inspector: Push More Inspector Required Classes Down into JavaScriptCore
2962         https://bugs.webkit.org/show_bug.cgi?id=125324
2963
2964         Reviewed by Timothy Hatcher.
2965
2966         * WebProcess/Plugins/PluginView.cpp:
2967         (WebKit::PluginView::performJavaScriptURLRequest):
2968         * WebProcess/WebPage/WebInspector.cpp:
2969         * WebProcess/WebPage/WebInspector.h:
2970         * WebProcess/WebPage/WebPage.cpp:
2971
2972 2013-12-11  Anders Carlsson  <andersca@apple.com>
2973
2974         Remove platform specific gunk from WebURLRequest and WebURLResponse
2975         https://bugs.webkit.org/show_bug.cgi?id=125589
2976
2977         Reviewed by Andreas Kling.
2978
2979         * Shared/API/c/WKURLRequest.cpp:
2980         (WKURLRequestCopyURL):
2981         * Shared/API/c/mac/WKURLRequestNS.mm:
2982         (WKURLRequestCopyNSURLRequest):
2983         * Shared/API/c/mac/WKURLResponseNS.mm:
2984         (WKURLResponseCopyNSURLResponse):
2985         * Shared/WebURLRequest.cpp:
2986         * Shared/WebURLRequest.h:
2987         * Shared/WebURLResponse.h:
2988         * Shared/mac/WebURLRequestMac.mm: Removed.
2989         * Shared/mac/WebURLResponseMac.mm: Removed.
2990         * UIProcess/WebInspectorProxy.cpp:
2991         (WebKit::isMainInspectorPage):
2992         * WebKit2.xcodeproj/project.pbxproj:
2993
2994 2013-12-11  José Dapena Paz  <jdapena@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
2995
2996         [GTK][WK2] Add the WebKitBatteryProvider class
2997         https://bugs.webkit.org/show_bug.cgi?id=115720
2998
2999         Reviewed by Martin Robinson.
3000
3001         This patch adds the WebKitBatteryProvider class which sets up a BatteryProviderUPower instance,
3002         controlling the provider's activity when instrumented to do so by the WebBatteryManagerProxy
3003         and relaying the battery status updates from the battery provider to the battery manager.
3004
3005         * GNUmakefile.list.am: Add the build targets for the new source files.
3006         * UIProcess/API/gtk/WebKitBatteryProvider.cpp: Added.
3007         (toBatteryProvider): A helper inline method that casts the client info to the battery provider instance.
3008         (startUpdatingCallback): Relays the instruction to the WebKitBattery instance.
3009         (stopUpdatingCallback): Ditto.
3010         (WebKitBatteryProvider::create):
3011         (WebKitBatteryProvider::WebKitBatteryProvider): Set up a WKBatteryProvider and set it to the passed-in battery manager.
3012         (WebKitBatteryProvider::~WebKitBatteryProvider): Force the BatteryProviderUPower to stop updating.
3013         (WebKitBatteryProvider::startUpdating): Relays the instruction to the BatteryProviderUPower instance.
3014         (WebKitBatteryProvider::stopUpdating): Ditto.
3015         (WebKitBatteryProvider::notifyBatteryStatusUnavailable): Update the battery manager with the new status that
3016         has the default values that are to be used when the implementation cannot determine the battery status (as per
3017         the Battery Status API specification).
3018         (WebKitBatteryProvider::notifyBatteryStatusUpdated): Update the battery status.
3019         * UIProcess/API/gtk/WebKitBatteryProvider.h: Added.
3020         (WebKitBatteryProvider): Define the WebKitBatteryProvider reference-counted interface that also inherits from the
3021         BatteryProviderUPowerClient interface.
3022         * UIProcess/API/gtk/WebKitWebContext.cpp:
3023         (_WebKitWebContextPrivate): Add a WebKitBatteryProvider member variable to the struct.
3024         (createDefaultWebContext): Create a new battery provider when initializing the default web context.
3025
3026 2013-12-11  José Dapena Paz  <jdapena@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
3027
3028         [GTK] Add a UPower-based BatteryProvider
3029         https://bugs.webkit.org/show_bug.cgi?id=115719
3030
3031         Reviewed by Martin Robinson.
3032
3033         * GNUmakefile.am: Link the libwebkit2gtk library against the upower-glib library.
3034
3035 2013-12-11  Gustavo Noronha Silva  <gns@gnome.org>
3036
3037         [GTK] Support right-side attachment of the inspector
3038         https://bugs.webkit.org/show_bug.cgi?id=124126
3039
3040         Reviewed by Carlos Garcia Campos.
3041
3042         * UIProcess/API/C/gtk/WKInspectorClientGtk.h: add changed attached width callback.
3043         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3044         (webkitWebViewBaseAddWebInspector): take attachment side parameter into account when adding the
3045         inspector view.
3046         (webkitWebViewBaseContainerRemove): renamed inspectorViewHeight to inspectorViewSize.
3047         (resizeWebKitWebViewBaseFromAllocation): take attachment side into account when allocating the
3048         sizes for the inspector view and the inspected view.
3049         (webkitWebViewBaseSetInspectorViewSize): renamed from webkitWebViewBaseSetInspectorViewHeight.
3050         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
3051         * UIProcess/gtk/WebInspectorClientGtk.cpp:
3052         (WebKit::WebInspectorClientGtk::didChangeAttachedWidth): notify client that view width has changed.
3053         * UIProcess/gtk/WebInspectorClientGtk.h:
3054         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3055         (WebKit::WebInspectorProxy::platformAttach): use attachment side for setting the default size
3056         for the inspector view.
3057         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): use the new generic SetInspectorViewSize.
3058         (WebKit::WebInspectorProxy::platformSetAttachedWindowWidth): allow setting the inspector view width.
3059
3060 2013-12-11  Brendan Long  <b.long@cablelabs.com>
3061
3062         [GTK] Add "enable-mediasource" property to WebKitWebSettings
3063         https://bugs.webkit.org/show_bug.cgi?id=125566
3064
3065         Reviewed by Philippe Normand.
3066
3067         * UIProcess/API/gtk/WebKitSettings.cpp:
3068         (webKitSettingsSetProperty):
3069         (webKitSettingsGetProperty):
3070         (webkit_settings_class_init):
3071         (webkit_settings_get_enable_mediasource):
3072         (webkit_settings_set_enable_mediasource):
3073         * UIProcess/API/gtk/WebKitSettings.h:
3074         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3075         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
3076         (testWebKitSettings):
3077
3078 2013-12-11  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3079
3080         [EFL] Fix build with CONTEXT_MENUS flag set OFF
3081         https:///bugs.webkit.org/show_bug.cgi?id=125572
3082
3083         Reviewed by Gyuyoung Kim.
3084
3085         Fix EFL build by adding necessary guard, also UNUSED_PARAM macros where added.
3086
3087         * Shared/API/c/WKContextMenuItem.cpp: Added UNUSED_PARAM macros.
3088         (WKContextMenuItemCreateAsAction):
3089         (WKContextMenuItemCreateAsCheckableAction):
3090         (WKContextMenuItemCreateAsSubmenu):
3091         (WKContextMenuItemGetTag):
3092         (WKContextMenuItemGetType):
3093         (WKContextMenuItemCopyTitle):
3094         (WKContextMenuItemGetEnabled):
3095         (WKContextMenuItemGetChecked):
3096         (WKContextMenuCopySubmenuItems):
3097         (WKContextMenuItemGetUserData):
3098         (WKContextMenuItemSetUserData):
3099         * UIProcess/API/C/WKPage.cpp: Ditto.
3100         (WKPageSetPageContextMenuClient):
3101         (WKPageSelectContextMenuItem):
3102         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: Ditto.
3103         (WKBundlePageSetContextMenuClient):
3104         (WKBundlePageClickMenuItem):
3105         (WKBundlePageCopyContextMenuItems):
3106         (WKBundlePageCopyContextMenuAtPointInWindow)
3107         * UIProcess/efl/WebViewEfl.cpp: Guard createContextMenuProxy method.
3108         * UIProcess/efl/WebViewEfl.h: Ditto.
3109
3110 2013-12-11  Kwang Yul Seo  <skyul@company100.net>
3111
3112         [WK2][Soup] Implement NetworkProcess::allowSpecificHTTPSCertificateForHost
3113         https://bugs.webkit.org/show_bug.cgi?id=125557
3114
3115         Reviewed by Carlos Garcia Campos.
3116
3117         Do what WebProcess::allowSpecificHTTPSCertificateForHost does.
3118
3119         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3120         (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
3121
3122 2013-12-10  Mark Rowe  <mrowe@apple.com>
3123
3124         <http://webkit.org/b/125556> WebKit doesn't deal with longer bundle versions correctly
3125         <rdar://problem/15634192>
3126
3127         Reviewed by Dan Bernstein.
3128
3129         * UIProcess/mac/WebPageProxyMac.mm:
3130         (WebKit::userVisibleWebKitVersionString): Strip as many leading digits as is necessary to
3131         bring the major component of the version down to 3 digits.
3132
3133 2013-12-10  Ryuan Choi  <ryuan.choi@samsung.com>
3134
3135         Unreviewed GTK build fix attempt after r160395 (second)
3136
3137         * GNUmakefile.list.am:
3138         Added new files for UserData, APIFrameHandle, APIGeometry and APIPageHandle.
3139
3140 2013-12-10  Ryuan Choi  <ryuan.choi@samsung.com>
3141
3142         Unreviewed GTK build fix attempt after r160395
3143
3144         Renamed WebUInt64 to API::UInt64, WebDouble to API::Double, WebBoolean
3145         to API::Boolean.
3146
3147         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
3148         (didReceiveWebViewMessageFromInjectedBundle):
3149         * UIProcess/API/gtk/WebKitWebView.cpp:
3150         (webkit_web_view_get_snapshot):
3151         * UIProcess/API/gtk/WebKitWindowProperties.cpp: Included APINumber.h instead of WebNumber.h
3152         (webkitWindowPropertiesUpdateFromWebWindowFeatures):
3153         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3154         (didInitiateLoadForResource):
3155         (willSendRequestForFrame):
3156         (didReceiveResponseForResource):
3157         (didReceiveContentLengthForResource):
3158         (didFinishLoadForResource):
3159         (didFailLoadForResource):
3160         (webkitWebPageDidReceiveMessage):
3161
3162 2013-12-10  Dan Bernstein  <mitz@apple.com>
3163
3164         All observable PageLoadState properties should change in an atomic fashion, with properly nested change notifications
3165         https://bugs.webkit.org/show_bug.cgi?id=125431
3166
3167         Reviewed by Anders Carlsson.
3168
3169         Made PageLoadState maintain two copies of its state data members, one representing the
3170         committed state and one possibly containing uncommitted changes. When changes are committed,
3171         change notifications are sent and the uncommitted state is copied into the committed state.
3172         Changes can be committed explicitly at any time, but are also committed when the last
3173         outstanding transaction ends. Transactions are RAII objects vended by the PageLoadState.
3174         Mutating the PageLoadState requires holding a Transaction, which is enforced by making all
3175         the mutating member functions take a Transaction::Token. Passing a Token also marks the
3176         PageLoadState as possibly having uncommitted changes.
3177
3178         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3179         Added PageLoadStateObserver::{will,did}ChangeActiveURL overrides that call
3180         -{will,did}ChangeValueForKey:.
3181
3182         * UIProcess/PageLoadState.cpp:
3183         Moved constant from the middle of the file to the beginning and reworded comment.
3184         (WebKit::PageLoadState::PageLoadState): Added initializers for new member variables, removed
3185         initialization of members that are not part of Data, which initializes them in its
3186         constructor.
3187         (WebKit::PageLoadState::endTransaction): Added. Calles when a Transaction is destructed.
3188         Decrements the outstanding transaction count, and if it is zero, commits changes.
3189         (WebKit::PageLoadState::commitChanges): Added. Checks for differences in observable
3190         properties between the committed state and the uncommitted state, then makes appropriate
3191         willChange Observer callbacks, then copies the uncommitted state into the committed state,
3192         then makes appropriate didChange Observer callbacks in reverse order. Also added active URL
3193         to the set of observable properties.
3194         (WebKit::PageLoadState::reset): Changed to take a transaction token, act on
3195         m_uncommittedState, and not make observer callbacks.
3196         (WebKit::PageLoadState::isLoading): Changed to access m_committedState.
3197         (WebKit::PageLoadState::activeURL): Changed to call a static function factored out of this.
3198         (WebKit::PageLoadState::estimatedProgress): Ditto.
3199         (WebKit::PageLoadState::pendingAPIRequestURL): Changed to access m_committedState.
3200         (WebKit::PageLoadState::setPendingAPIRequestURL): Changed to take a transaction token, act
3201         on m_uncommittedState, and not make observer callbacks.
3202         (WebKit::PageLoadState::clearPendingAPIRequestURL): Ditto.
3203         (WebKit::PageLoadState::didStartProvisionalLoad): Ditto.
3204         (WebKit::PageLoadState::didReceiveServerRedirectForProvisionalLoad): Ditto.
3205         (WebKit::PageLoadState::didFailProvisionalLoad): Ditto.
3206         (WebKit::PageLoadState::didCommitLoad): Ditto.
3207         (WebKit::PageLoadState::didFinishLoad): Ditto.
3208         (WebKit::PageLoadState::didFailLoad): Ditto.
3209         (WebKit::PageLoadState::didSameDocumentNavigation): Ditto.
3210         (WebKit::PageLoadState::setUnreachableURL): Ditto.
3211         (WebKit::PageLoadState::title): Changed to access m_committedState.
3212         (WebKit::PageLoadState::setTitle): Changed to take a transaction token, act on
3213         m_uncommittedState, and not make observer callbacks.
3214         (WebKit::PageLoadState::didStartProgress): Ditto.
3215         (WebKit::PageLoadState::didChangeProgress): Ditto.
3216         (WebKit::PageLoadState::didFinishProgress): Ditto.
3217         * UIProcess/PageLoadState.h:
3218         (WebKit::PageLoadState::Transaction::Transaction): Added. Calls
3219         PageLoadState::beginTransaction.
3220         (WebKit::PageLoadState::Transaction::~Transaction): Added. Calls
3221         PageLoadState::endTransaction.
3222         (WebKit::PageLoadState::Transaction::Token::Token): Added. Sets m_mayHaveUncommittedChanges.
3223         (WebKit::PageLoadState::transaction): Added. Returns a Transaction for this PageLoadState.
3224         (WebKit::PageLoadState::provisionalURL): Changed to access m_committedState.
3225         (WebKit::PageLoadState::url): Ditto.
3226         (WebKit::PageLoadState::unreachableURL): Ditto.
3227         (WebKit::PageLoadState::beginTransaction): Added. Increments the outstanding transaction
3228         count.
3229         (WebKit::PageLoadState::Data::Data): Added. Moved internal state members into this struct
3230         and made its constructor initialize state and estimatedProgress.
3231
3232         * UIProcess/WebPageProxy.cpp:
3233         (WebKit::WebPageProxy::loadURL): Changed to create a PageLoadState::Transaction and pass it
3234         along.
3235         (WebKit::WebPageProxy::loadURLRequest): Ditto.
3236         (WebKit::WebPageProxy::loadAlternateHTMLString): Ditto.
3237         (WebKit::WebPageProxy::reload): Ditto.
3238         (WebKit::WebPageProxy::goForward): Ditto.
3239         (WebKit::WebPageProxy::goBack): Ditto.
3240         (WebKit::WebPageProxy::goToBackForwardItem): Ditto.
3241         (WebKit::WebPageProxy::receivedPolicyDecision): Ditto.
3242         (WebKit::WebPageProxy::didStartProgress): Ditto. Also added a call to
3243         PageLoadState::commitChanges before calling the client, so that the client sees the updated
3244         state.
3245         (WebKit::WebPageProxy::didChangeProgress): Ditto.
3246         (WebKit::WebPageProxy::didFinishProgress): Ditto.
3247         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Ditto.
3248         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): Ditto.
3249         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): Ditto.
3250         (WebKit::WebPageProxy::didCommitLoadForFrame): Ditto.
3251         (WebKit::WebPageProxy::didFinishLoadForFrame): Ditto.
3252         (WebKit::WebPageProxy::didFailLoadForFrame): Ditto.
3253         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.
3254         (WebKit::WebPageProxy::didReceiveTitleForFrame): Ditto.
3255         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Changed to create a
3256         PageLoadState::Transaction and pass it along.
3257         (WebKit::WebPageProxy::processDidCrash): Ditto. This addressed a FIXME about the client not
3258         seeing the state prior to the crash, because now the changes cuased by reset() aren’t
3259         committed until after the client callback.
3260
3261         * UIProcess/cf/WebPageProxyCF.cpp:
3262         (WebKit::WebPageProxy::restoreFromSessionStateData): Changed to create a
3263         PageLoadState::Transaction and pass it along.
3264
3265 2013-12-10  Ryuan Choi  <ryuan.choi@samsung.com>
3266
3267         Unreviewed EFL build fix attempt
3268
3269         * CMakeLists.txt: Added APIGeometry.cpp to source lists.
3270
3271 2013-12-10  Anders Carlsson  <andersca@apple.com>
3272
3273         Move number and geometry classes into the API namespace
3274         https://bugs.webkit.org/show_bug.cgi?id=125549
3275
3276         Reviewed by Geoffrey Garen.
3277
3278         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3279         (-[WKRemoteObjectEncoder encodeBool:forKey:]):
3280         (-[WKRemoteObjectEncoder encodeInt64:forKey:]):
3281         (-[WKRemoteObjectEncoder encodeDouble:forKey:]):
3282         (-[WKRemoteObjectDecoder decodeBoolForKey:]):
3283         (-[WKRemoteObjectDecoder decodeInt64ForKey:]):
3284         (-[WKRemoteObjectDecoder decodeDoubleForKey:]):
3285         * Shared/API/c/WKGeometry.cpp:
3286         (WKSizeGetTypeID):
3287         (WKPointGetTypeID):
3288         (WKRectGetTypeID):
3289         (WKPointCreate):
3290         (WKSizeCreate):
3291         (WKRectCreate):
3292         * Shared/API/c/WKNumber.cpp:
3293         (WKBooleanGetTypeID):
3294         (WKBooleanCreate):
3295         (WKDoubleGetTypeID):
3296         (WKDoubleCreate):
3297         (WKUInt64GetTypeID):
3298         (WKUInt64Create):
3299         * Shared/API/c/WKSharedAPICast.h:
3300         * Shared/APIGeometry.cpp:
3301         (API::Point::encode):
3302         (API::Point::decode):
3303         (API::Size::encode):
3304         (API::Size::decode):
3305         (API::Rect::encode):
3306         (API::Rect::decode):
3307         * Shared/APIGeometry.h:
3308         (API::Size::create):
3309         (API::Size::Size):
3310         (API::Point::create):
3311         (API::Point::Point):
3312         (API::Rect::create):
3313         (API::Rect::Rect):
3314         * Shared/APINumber.h:
3315         (API::Number::create):
3316         (API::Number::decode):
3317         (API::Number::Number):
3318         * Shared/APIObject.h:
3319         * Shared/Plugins/Netscape/PluginInformation.cpp:
3320         (WebKit::getPluginModuleInformation):
3321         (WebKit::createPluginInformationDictionary):
3322         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
3323         (WebKit::getPlatformPluginModuleInformation):
3324         * Shared/UserData.cpp:
3325         (WebKit::UserData::encode):
3326         (WebKit::UserData::decode):
3327         * Shared/UserMessageCoders.h:
3328         (WebKit::UserMessageEncoder::baseEncode):
3329         (WebKit::UserMessageDecoder::baseDecode):
3330         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
3331         (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
3332         (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
3333         * UIProcess/Notifications/WebNotificationProvider.cpp:
3334         (WebKit::WebNotificationProvider::clearNotifications):
3335         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
3336         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
3337         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable):
3338         * UIProcess/StatisticsRequest.cpp:
3339         (WebKit::addToDictionaryFromHashMap):
3340         * UIProcess/WebDatabaseManagerProxy.cpp:
3341         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
3342         * UIProcess/WebPageProxy.cpp:
3343         (WebKit::WebPageProxy::didFindStringMatches):
3344         * UIProcess/WebUIClient.cpp:
3345         (WebKit::WebUIClient::createNewPage):
3346         * WebProcess/WebPage/WebPage.cpp:
3347         (WebKit::WebPage::trackedRepaintRects):
3348         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
3349         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
3350
3351 2013-12-10  Anders Carlsson  <andersca@apple.com>
3352
3353         Add encode and decode functions to WebNumber
3354         https://bugs.webkit.org/show_bug.cgi?id=125547
3355
3356         Reviewed by Beth Dakin.
3357
3358         * Shared/APINumber.h:
3359         (WebKit::WebNumber::encode):
3360         (WebKit::WebNumber::decode):
3361         * Shared/UserData.cpp:
3362         (WebKit::UserData::encode):
3363         (WebKit::UserData::decode):
3364
3365 2013-12-10  Nick Diego Yamane  <nick.yamane@openbossa.org>
3366
3367         [EFL] One more WK2 build fix
3368         https://bugs.webkit.org/show_bug.cgi?id=125544
3369
3370         API::TypedObject has been renamed to API::ObjectImpl
3371
3372         Reviewed by Tim Horton.
3373
3374         * Shared/WebBatteryStatus.h:
3375         * Shared/WebNetworkInfo.h:
3376         * UIProcess/CoordinatedGraphics/WebView.h:
3377         * UIProcess/WebBatteryManagerProxy.h:
3378         * UIProcess/WebNetworkInfoManagerProxy.h:
3379         * UIProcess/WebTextChecker.h:
3380         * UIProcess/WebVibrationProxy.h:
3381         * UIProcess/WebViewportAttributes.h:
3382         * UIProcess/efl/WebPopupItemEfl.h:
3383         * UIProcess/soup/WebSoupRequestManagerProxy.h:
3384
3385 2013-12-10  Anders Carlsson  <andersca@apple.com>
3386
3387         Rename WebNumber.h to APINumber.h
3388         https://bugs.webkit.org/show_bug.cgi?id=125545
3389
3390         Reviewed by Beth Dakin.
3391
3392         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3393         * Shared/API/c/WKNumber.cpp:
3394         * Shared/API/c/WKSharedAPICast.h:
3395         * Shared/APINumber.h: Renamed from Source/WebKit2/Shared/WebNumber.h.
3396         * Shared/Plugins/Netscape/PluginInformation.cpp:
3397         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
3398         * Shared/UserData.cpp:
3399         * Shared/UserMessageCoders.h:
3400         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3401         * UIProcess/Notifications/WebNotificationProvider.cpp:
3402         * UIProcess/WebUIClient.cpp:
3403         * WebKit2.xcodeproj/project.pbxproj:
3404
3405 2013-12-10  Anders Carlsson  <andersca@apple.com>
3406
3407         UserData should handle geometry types
3408         https://bugs.webkit.org/show_bug.cgi?id=125542
3409
3410         Reviewed by Andreas Kling.
3411
3412         Rename WebGeometry.h to APIGeometry.h in preparation for moving the classes into the API namespace.
3413         Add encode/decode functions to geometry classes. Use them in UserData::encode and UserData::decode.
3414
3415         * Shared/API/c/WKGeometry.cpp:
3416         * Shared/APIGeometry.cpp: Added.
3417         * Shared/APIGeometry.h: Renamed from Source/WebKit2/Shared/WebGeometry.h.
3418         (WebKit::UserData::encode):
3419         (WebKit::UserData::decode):
3420         * Shared/UserMessageCoders.h:
3421         * WebKit2.xcodeproj/project.pbxproj:
3422         * WebProcess/WebPage/WebPage.cpp:
3423
3424 2013-12-10  Beth Dakin  <bdakin@apple.com>
3425
3426         https://bugs.webkit.org/show_bug.cgi?id=125533
3427         BackgroundExtendsBeyondPage setting should be switchable per WKView
3428         -and corresponding-
3429         <rdar://problem/15571310>
3430
3431         Reviewed by Anders Carlsson.
3432
3433         This patch removes the WKPreferences API and adds WKPage API in its place. To 
3434         ensure that the setting sticks after a crash, it is also now a creation parameter.
3435
3436         * Shared/WebPageCreationParameters.cpp:
3437         (WebKit::WebPageCreationParameters::encode):
3438         (WebKit::WebPageCreationParameters::decode):
3439         * Shared/WebPageCreationParameters.h:
3440         * UIProcess/API/C/WKPage.cpp:
3441         (WKPageSetBackgroundExtendsBeyondPage):
3442         (WKPageBackgroundExtendsBeyondPage):
3443         * UIProcess/API/C/WKPage.h:
3444         * UIProcess/API/C/WKPreferences.cpp:
3445         * UIProcess/API/C/WKPreferencesPrivate.h:
3446         * UIProcess/WebPageProxy.cpp:
3447         (WebKit::WebPageProxy::WebPageProxy):
3448         (WebKit::WebPageProxy::setBackgroundExtendsBeyondPage):
3449         (WebKit::WebPageProxy::backgroundExtendsBeyondPage):
3450         (WebKit::WebPageProxy::initializeCreationParameters):
3451         * UIProcess/WebPageProxy.h:
3452         * WebProcess/WebPage/WebPage.cpp:
3453         (WebKit::WebPage::WebPage):
3454         (WebKit::WebPage::setBackgroundExtendsBeyondPage):
3455         (WebKit::WebPage::updatePreferences):
3456         * WebProcess/WebPage/WebPage.h:
3457         * WebProcess/WebPage/WebPage.messages.in:
3458
3459 2013-12-10  Anders Carlsson  <andersca@apple.com>
3460
3461         Rename API::TypedObject to API::ObjectImpl
3462         https://bugs.webkit.org/show_bug.cgi?id=125539
3463
3464         Reviewed by Tim Horton.
3465
3466         All API::Objects are by definition typed, so ObjectImpl makes more sense as a name.
3467
3468         * Shared/APIArray.h:
3469         * Shared/APIFrameHandle.h:
3470         * Shared/APIObject.h:
3471         (API::ObjectImpl::~ObjectImpl):
3472         (API::ObjectImpl::ObjectImpl):
3473         * Shared/APIPageHandle.h:
3474         * Shared/ImmutableDictionary.h:
3475         * Shared/WebArchive.h:
3476         * Shared/WebArchiveResource.h:
3477         * Shared/WebBackForwardListItem.h:
3478         * Shared/WebCertificateInfo.h:
3479         * Shared/WebConnection.h:
3480         * Shared/WebContextMenuItem.h:
3481         * Shared/WebData.h:
3482         * Shared/WebError.h:
3483         * Shared/WebGeolocationPosition.h:
3484         * Shared/WebGeometry.h:
3485         * Shared/WebHitTestResult.h:
3486         * Shared/WebImage.h:
3487         * Shared/WebNumber.h:
3488         * Shared/WebOpenPanelParameters.h:
3489         * Shared/WebRenderLayer.h:
3490         * Shared/WebRenderObject.h:
3491         * Shared/WebSecurityOrigin.h:
3492         * Shared/WebSerializedScriptValue.h:
3493         * Shared/WebString.h:
3494         * Shared/WebURL.h:
3495         * Shared/WebURLRequest.h:
3496         * Shared/WebURLResponse.h:
3497         * Shared/WebUserContentURLPattern.h:
3498         * Shared/mac/ObjCObjectGraph.h:
3499         * UIProcess/APINavigationData.h:
3500         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
3501         * UIProcess/Authentication/AuthenticationDecisionListener.h:
3502         * UIProcess/Authentication/WebCredential.h:
3503         * UIProcess/Authentication/WebProtectionSpace.h:
3504         * UIProcess/Downloads/DownloadProxy.h:
3505         * UIProcess/GeolocationPermissionRequestProxy.h:
3506         * UIProcess/Notifications/NotificationPermissionRequest.h:
3507         * UIProcess/Notifications/WebNotification.h:
3508         * UIProcess/Notifications/WebNotificationManagerProxy.h:
3509         * UIProcess/Plugins/WebPluginSiteDataManager.h:
3510         * UIProcess/WebApplicationCacheManagerProxy.h:
3511         * UIProcess/WebBackForwardList.h:
3512         * UIProcess/WebColorPickerResultListenerProxy.h:
3513         * UIProcess/WebContext.h:
3514         * UIProcess/WebCookieManagerProxy.h:
3515         * UIProcess/WebDatabaseManagerProxy.h:
3516         * UIProcess/WebEditCommandProxy.h:
3517         * UIProcess/WebFrameProxy.h:
3518         * UIProcess/WebGeolocationManagerProxy.h:
3519         * UIProcess/WebGrammarDetail.h:
3520         * UIProcess/WebIconDatabase.h:
3521         * UIProcess/WebInspectorProxy.h:
3522         * UIProcess/WebKeyValueStorageManager.h:
3523         * UIProcess/WebMediaCacheManagerProxy.h:
3524         * UIProcess/WebOpenPanelResultListenerProxy.h:
3525         * UIProcess/WebOriginDataManagerProxy.h:
3526         * UIProcess/WebPageGroup.h:
3527         * UIProcess/WebPageProxy.h:
3528         * UIProcess/WebPreferences.h:
3529         * UIProcess/WebResourceCacheManagerProxy.h:
3530         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3531         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
3532         * WebProcess/InjectedBundle/InjectedBundle.h:
3533         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
3534         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
3535         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
3536         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
3537         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
3538         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
3539         * WebProcess/WebPage/PageBanner.h:
3540         * WebProcess/WebPage/PageOverlay.h:
3541         * WebProcess/WebPage/WebFrame.h:
3542         * WebProcess/WebPage/WebInspector.h:
3543         * WebProcess/WebPage/WebPage.h:
3544         * WebProcess/WebPage/WebPageGroupProxy.h:
3545
3546 2013-12-10  Nick Diego Yamane  <nick.yamane@openbossa.org>
3547
3548         [EFL] Fix WK2 build after r160341
3549         https://bugs.webkit.org/show_bug.cgi?id=125529
3550
3551         Reviewed by Anders Carlsson.
3552
3553         * CMakeLists.txt: Added new files UserData.cpp, APIFrameHandle.cpp and APIPageHandle.cpp.
3554
3555 2013-12-10  Anders Carlsson  <andersca@apple.com>
3556
3557         Add more API object types to UserData
3558         https://bugs.webkit.org/show_bug.cgi?id=125532
3559
3560         Reviewed by Beth Dakin.
3561
3562         * Shared/UserData.cpp:
3563         (WebKit::UserData::transform):
3564         Handle dictionaries.
3565
3566         (WebKit::UserData::encode):
3567         (WebKit::UserData::decode):
3568         Handle more API::Objects.
3569
3570 2013-12-10  Anders Carlsson  <andersca@apple.com>
3571
3572         More UserData work
3573         https://bugs.webkit.org/show_bug.cgi?id=125524
3574
3575         Reviewed by Dan Bernstein.
3576
3577         * Shared/APIObject.h:
3578         * Shared/UserData.cpp:
3579         (WebKit::UserData::transform):
3580         New helper function that takes an API::Object and returns a new API::Object with all "sub-objects" (arrays etc)
3581         transformed by calling the transformer.
3582
3583         * Shared/UserData.h:
3584         (WebKit::UserData::object):
3585         New getter.
3586
3587         * UIProcess/WebProcessProxy.cpp:
3588         (WebKit::WebProcessProxy::apiObjectByConvertingToHandles):
3589         Helper function that creates a new API::Object graph by converting WebFrameProxy objects to FrameHandles.
3590
3591         * WebProcess/WebProcess.cpp:
3592         (WebKit::WebProcess::apiObjectByConvertingFromHandles):
3593         Helper function that creates a new API::Object graph by converting FrameHandles to WebFrame objects.
3594
3595 2013-12-10  Alberto Garcia  <berto@igalia.com>
3596
3597         [WK2] [SOUP] Allow running the network process with an arbitrary prefix command
3598         https://bugs.webkit.org/show_bug.cgi?id=125520
3599
3600         Reviewed by Carlos Garcia Campos.
3601
3602         Launch the network process using NETWORK_PROCESS_CMD_PREFIX as a
3603         prefix. Useful for debugging the web process with gdb, valgrind,
3604         etc.
3605
3606         * UIProcess/Network/soup/NetworkProcessProxySoup.cpp:
3607         (WebKit::NetworkProcessProxy::platformGetLaunchOptions):
3608
3609 2013-12-10  Kwang Yul Seo  <skyul@company100.net>
3610
3611         Allow us to use network process with a single process model
3612         https://bugs.webkit.org/show_bug.cgi?id=125507
3613
3614         Reviewed by Brady Eidson.
3615
3616         Currently, WebContext::sendToNetworkingProcess and
3617         WebContext::sendToNetworkingProcessRelaunchingIfNecessary assume that
3618         network process is not used when the given process model is
3619         ProcessModelSharedSecondaryProcess. This is not consistent with
3620         WebContext::networkingProcessConnection which returns the networking
3621         process connection for ProcessModelSharedSecondaryProcess.
3622
3623         * UIProcess/WebContext.h:
3624         (WebKit::WebContext::sendToNetworkingProcess):
3625         (WebKit::WebContext::sendToNetworkingProcessRelaunchingIfNecessary):
3626
3627 2013-12-10  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3628
3629         Unreviewed EFL build fix
3630
3631         * CMakeLists.txt: Remove UIProcess/DrawingAreaProxy.cpp.
3632         * PlatformGTK.cmake: Add the file above.
3633
3634 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
3635
3636         [GTK] [CMake] Add support for building the WebKit injected bundle
3637         https://bugs.webkit.org/show_bug.cgi?id=116373
3638
3639         Reviewed by Gustavo Noronha Silva.
3640
3641         * PlatformGTK.cmake: Add support for building the InjectedBundle and link the WebKit2
3642         shared library against the GObject DOM bindings.
3643         * WebProcess/gtk/WebGtkExtensionManager.h: Properly export symbols used by the InjectedBundle.
3644
3645 2013-12-10  Kwang Yul Seo  <skyul@company100.net>
3646
3647         [WK2][SOUP] WebContext::setIgnoreTLSErrors should send SetIgnoreTLSErrors to the network process when network process is enabled
3648         https://bugs.webkit.org/show_bug.cgi?id=125505
3649
3650         Reviewed by Carlos Garcia Campos.
3651
3652         This is a follow-up patch for r160355.
3653
3654         * UIProcess/gtk/WebContextGtk.cpp:
3655         (WebKit::WebContext::setIgnoreTLSErrors):
3656
3657 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
3658
3659         Try to fix the EFL build
3660
3661         * CMakeLists.txt: Remove DrawingAreaImpl.cpp from the global list.
3662         * PlatformGTK.cmake: Move it to the GTK+ specific list.
3663
3664 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
3665
3666         Various fixes for the CMake GTK+ build
3667
3668         Reviewed by Gustavo Noronha.
3669
3670         * CMakeLists.txt: Update the source lists.
3671         * PlatformGTK.cmake: Ditto.
3672
3673 2013-12-10  Alberto Garcia  <berto@igalia.com>
3674
3675         [WK2] [GTK] Enable the network process in the WebContext
3676         https://bugs.webkit.org/show_bug.cgi?id=125494
3677
3678         Reviewed by Carlos Garcia Campos.
3679
3680         This should be initialized using the setUsesNetworkProcess() API.
3681
3682         * UIProcess/API/gtk/WebKitWebContext.cpp:
3683         (createDefaultWebContext):
3684         * UIProcess/gtk/WebContextGtk.cpp:
3685         (WebKit::WebContext::platformInitializeWebProcess):
3686
3687 2013-12-10  Brian Holt  <brian.holt@samsung.com>
3688
3689         [WK2][SOUP] initialise the Network Process with ignoreTLSErrors
3690         https://bugs.webkit.org/show_bug.cgi?id=125490
3691
3692         ResourceHandleSoup in the Network Process and is not initialised with
3693         a policy on ignoring TLS errors.  This simply requires that the
3694         appropriate message is created for the Network Process and the
3695         parameter created for initialisation.
3696
3697         Reviewed by Gustavo Noronha Silva.
3698
3699         * NetworkProcess/NetworkProcess.h:
3700         * NetworkProcess/NetworkProcess.messages.in:
3701         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3702         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
3703         (WebKit::NetworkProcess::setIgnoreTLSErrors):
3704         * Shared/Network/NetworkProcessCreationParameters.cpp:
3705         (WebKit::NetworkProcessCreationParameters::encode):
3706         (WebKit::NetworkProcessCreationParameters::decode):
3707         * Shared/Network/NetworkProcessCreationParameters.h:
3708         * UIProcess/gtk/WebContextGtk.cpp:
3709         (WebKit::WebContext::platformInitializeWebProcess):
3710         * UIProcess/soup/WebContextSoup.cpp:
3711         (WebKit::WebContext::platformInitializeNetworkProcess):
3712
3713 2013-12-09  Anders Carlsson  <andersca@apple.com>
3714
3715         Begin working on a UserData class intended to replace UserMessageCoders
3716         https://bugs.webkit.org/show_bug.cgi?id=125471
3717
3718         Reviewed by Sam Weinig.
3719
3720         * Shared/APIFrameHandle.cpp: Added.
3721         * Shared/APIFrameHandle.h: Added.
3722         Add a new API::FrameHandle class that represents a frame.
3723
3724         * Shared/APIObject.h:
3725         * Shared/APIPageHandle.cpp: Added.
3726         * Shared/APIPageHandle.h: Added.
3727         Add a new API::PageHandle class that represents a page.
3728
3729         * Shared/UserData.cpp: Added.
3730         (WebKit::UserData::UserData):
3731         (WebKit::UserData::~UserData):
3732         (WebKit::UserData::encode):
3733         (WebKit::UserData::decode):
3734         * Shared/UserData.h: Added.
3735         Add a UserData class that can be encoded and decoded. This will be used for sending data
3736          between the web process and UI process without doing any of the Page -> BundlePage etc conversions.
3737         * WebKit2.xcodeproj/project.pbxproj:
3738
3739 2013-12-09  Ryuan Choi  <ryuan.choi@samsung.com>
3740
3741         [EFL][WK2] LayoutTests are broken after r160301
3742         https://bugs.webkit.org/show_bug.cgi?id=125447
3743
3744         Reviewed by Darin Adler.
3745
3746         r160301 moved FullScreenManagerProxyClient logic to WebViewEfl, child class
3747         of CoordinatedGraphics::WebView, because implementations are EFL specific.
3748         However, CoordinatedGraphics::WebView creates WebPageProxy in constructor and
3749         WebPageProxy requires FullScreenManagerProxyClient in constructor.
3750         So, All WK2/Efl based applications got crashed
3751
3752         This patch adds virtual methods for FullScreenManagerProxyClient to CoordinatedGraphics::WebView
3753         so that WebPageProxy can get FullScreenManagerProxyClient instance without
3754         pure viertual methods.
3755
3756         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
3757         (WKViewExitFullScreen):
3758         * UIProcess/CoordinatedGraphics/WebView.cpp:
3759         (WebKit::WebView::fullScreenManagerProxyClient):
3760         (WebKit::WebView::requestExitFullScreen):
3761         renamed from exitFullScreen not to conflict with methods of FullScreenManagerProxyClient.
3762         * UIProcess/CoordinatedGraphics/WebView.h:
3763         * UIProcess/efl/WebViewEfl.cpp:
3764         * UIProcess/efl/WebViewEfl.h:
3765
3766 2013-12-09  Sergio Villar Senin  <svillar@igalia.com>
3767
3768         [WK2] Add UNIX_DOMAIN_SOCKETS specific bits for supporting NetworkProcess
3769         https://bugs.webkit.org/show_bug.cgi?id=110093
3770
3771         Reviewed by Martin Robinson.
3772
3773         Original patch by Balazs Kelemen <kbalazs@webkit.org>.
3774
3775         Adds the UNIX specific bits to support connections to the
3776         NetworkProcess. Since the process of creating the pair of sockets
3777         is exactly the same as in the PluginProcess, I've decided to
3778         refactor it in ConnectionUnix::createPlatformConnection(). This
3779         can be reused later to create a cross-platform solution and remove
3780         all the ifdefs (see bug 110978).
3781
3782         * NetworkProcess/NetworkProcess.cpp:
3783         (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
3784         * Platform/CoreIPC/Connection.h:
3785         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
3786         (CoreIPC::Connection::createPlatformConnection):
3787         * PluginProcess/PluginProcess.cpp:
3788         (WebKit::PluginProcess::createWebProcessConnection):
3789         * UIProcess/Network/NetworkProcessProxy.cpp:
3790         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
3791         (WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
3792         * WebProcess/WebProcess.cpp:
3793         (WebKit::WebProcess::ensureNetworkProcessConnection):
3794
3795 2013-12-09  Kwang Yul Seo  <skyul@company100.net>
3796
3797         [WK2][Soup] Support cache model in NetworkProcess
3798         https://bugs.webkit.org/show_bug.cgi?id=118343
3799
3800         Reviewed by Carlos Garcia Campos.
3801
3802         Original patch by Kwang Yul Seo <skyul@company100.net> and Csaba Osztrogonác <ossy@webkit.org>.
3803
3804         Copied cache model code from WebProcess.
3805         NetworkProcess is configured not to use the WebCore memory cache.
3806
3807         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3808         (WebKit::getCacheDiskFreeSize):
3809         (WebKit::getMemorySize):
3810         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
3811         Initialize soup cache.
3812         (WebKit::NetworkProcess::platformSetCacheModel):
3813         Copied code from WebProcess::platformSetCacheModel but removed
3814         WebCore memory cache initialization because NetworkProcess does not use
3815         the WebCore memory cache.
3816         (WebKit::NetworkProcess::clearCacheForAllOrigins):
3817         Copied code from WebProcess::clearCacheForAllOrigins.
3818         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
3819         Copied initialization code from WebProcessMainGtk.cpp.
3820         (WebKit::NetworkProcessMain):
3821         * WebProcess/soup/WebProcessSoup.cpp:
3822         (WebKit::WebProcess::platformSetCacheModel):
3823         Don't set the disk cache if NetworkProcess is used.
3824         (WebKit::WebProcess::platformClearResourceCaches):
3825         Don't clear the non-existing disk cache. (if NetworkProcess is used)
3826         (WebKit::WebProcess::platformInitializeWebProcess):
3827         Don't initialize the disk cache if NetworkProcess is used.
3828
3829 2013-12-09  Gustavo Noronha Silva  <gns@gnome.org>
3830
3831         [GTK] run-webkit-tests may DOS the system, specially in debug builds
3832         https://bugs.webkit.org/show_bug.cgi?id=125436
3833
3834         Reviewed by Martin Robinson.
3835
3836         * GNUmakefile.am: use -no-fast-install for WebKitWebProcess and WebKitPluginProcess so
3837         they do not need to be relinked the first time they are executed in-tree.
3838
3839 2013-12-09  Zan Dobersek  <zdobersek@igalia.com>
3840
3841         [GTK][WK2] Move WebFullScreenManagerProxyGtk logic to PageClientImpl
3842         https://bugs.webkit.org/show_bug.cgi?id=125440
3843
3844         Reviewed by Martin Robinson.
3845
3846         Make PageClientImpl a WebFullScreenManagerProxyClient. This brings the GTK port in line
3847         with changes in r160296 and fixes the WK2 build for that port.
3848
3849         * GNUmakefile.list.am:
3850         * UIProcess/API/gtk/PageClientImpl.cpp:
3851         (WebKit::PageClientImpl::fullScreenManagerProxyClient):
3852         (WebKit::PageClientImpl::closeFullScreenManager):
3853         (WebKit::PageClientImpl::isFullScreen):
3854         (WebKit::PageClientImpl::enterFullScreen):
3855         (WebKit::PageClientImpl::exitFullScreen):
3856         (WebKit::PageClientImpl::beganEnterFullScreen):
3857         (WebKit::PageClientImpl::beganExitFullScreen):
3858         * UIProcess/API/gtk/PageClientImpl.h:
3859         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3860         (webkitWebViewBaseCreateWebPage):
3861         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
3862
3863 2013-12-09  Brian Holt  <brian.holt@samsung.com>
3864
3865         [WK2][Gtk] Add support for ENABLE_NETWORK_PROCESS to the build system
3866         https://bugs.webkit.org/show_bug.cgi?id=118231
3867
3868         Reviewed by Martin Robinson.
3869
3870         Original patch by Kwang Yul Seo  <skyul@company100.net>.
3871
3872         Add source files to the build system and build NetworkProcess executable.
3873
3874         * GNUmakefile.am:
3875         * GNUmakefile.list.am:
3876         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
3877         * UIProcess/gtk/WebContextGtk.cpp:
3878         (WebKit::WebContext::platformInitializeWebProcess):
3879
3880 2013-12-08  Ryuan Choi  <ryuan.choi@samsung.com>
3881
3882         [EFL][WK2] Move FullScreenManager logic to WebViewEfl
3883         https://bugs.webkit.org/show_bug.cgi?id=125438
3884
3885         Reviewed by Gyuyoung Kim.
3886
3887         This patch fixed build break on EFL port Since r160296.
3888
3889         * PlatformEfl.cmake: Removed WebFullScreenManagerProxyEfl.cpp.
3890         * UIProcess/WebFullScreenManagerProxy.cpp: Removed EFL specific code.
3891         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
3892         * UIProcess/WebFullScreenManagerProxy.h: Ditto.
3893         * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp: Removed file and moved logic to WebViewEfl.
3894         * UIProcess/efl/WebViewEfl.cpp:
3895         (WebKit::WebViewEfl::WebViewEfl):
3896         (WebKit::WebViewEfl::setEwkView): Removed call to setWebView().
3897         (WebKit::WebViewEfl::fullScreenManagerProxyClient):
3898         (WebKit::WebViewEfl::isFullScreen):
3899         (WebKit::WebViewEfl::enterFullScreen):
3900         (WebKit::WebViewEfl::exitFullScreen):
3901         * UIProcess/efl/WebViewEfl.h:
3902
3903 2013-12-08  Sam Weinig  <sam@webkit.org>
3904
3905         Remove WebContext::sharedProcessContext()
3906         https://bugs.webkit.org/show_bug.cgi?id=125437
3907
3908         Reviewed by Dan Bernstein.
3909
3910         * UIProcess/API/ios/WKGeolocationProviderIOS.mm:
3911         * UIProcess/WebContext.cpp:
3912         * UIProcess/WebContext.h:
3913
3914 2013-12-08  Sam Weinig  <sam@webkit.org>
3915
3916         Fix the iOS build.
3917
3918         * UIProcess/API/ios/PageClientImplIOS.h:
3919         * UIProcess/API/ios/PageClientImplIOS.mm:
3920         * UIProcess/ios/WebFullScreenManagerProxyIOS.mm: Removed.
3921
3922 2013-12-08  Sam Weinig  <sam@webkit.org>
3923
3924         [Cocoa] Remove knowledge of the WKView from the WebFullScreenManagerProxy by adding a proper client
3925         https://bugs.webkit.org/show_bug.cgi?id=125427
3926
3927         Reviewed by Dan Bernstein.
3928
3929         * UIProcess/API/mac/PageClientImpl.h:
3930         * UIProcess/API/mac/PageClientImpl.mm:
3931         (WebKit::PageClientImpl::fullScreenManagerProxyClient):
3932         (WebKit::PageClientImpl::closeFullScreenManager):
3933         (WebKit::PageClientImpl::isFullScreen):
3934         (WebKit::PageClientImpl::enterFullScreen):
3935         (WebKit::PageClientImpl::exitFullScreen):
3936         (WebKit::PageClientImpl::beganEnterFullScreen):
3937         (WebKit::PageClientImpl::beganExitFullScreen):
3938         Implement the new client.
3939
3940         * UIProcess/API/mac/WKView.mm:
3941         Remove call to setWebView() and do some cleanup.
3942
3943         * UIProcess/API/mac/WKViewInternal.h:
3944         Convert to property syntax and re-arrange.
3945
3946         * UIProcess/PageClient.h:
3947         Expose access to the new client.
3948
3949         * UIProcess/WebFullScreenManagerProxy.cpp:
3950         (WebKit::WebFullScreenManagerProxy::create):
3951         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
3952         (WebKit::WebFullScreenManagerProxy::invalidate):
3953         (WebKit::WebFullScreenManagerProxy::close):
3954         (WebKit::WebFullScreenManagerProxy::isFullScreen):
3955         (WebKit::WebFullScreenManagerProxy::enterFullScreen):
3956         (WebKit::WebFullScreenManagerProxy::exitFullScreen):
3957         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
3958         (WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
3959         * UIProcess/WebFullScreenManagerProxy.h:
3960         Use the new client.
3961
3962         * UIProcess/WebPageProxy.cpp:
3963         Pass the new client.
3964
3965         * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
3966         Removed. Now goes through the client.
3967
3968         * WebKit2.xcodeproj/project.pbxproj:
3969         Remove WebFullScreenManagerProxyMac.mm.
3970
3971 2013-12-07  Sam Weinig  <sam@webkit.org>
3972
3973         [Cocoa] Remove webProcessPlugInInitialize: from the WKWebProcessPlugIn protocol
3974         https://bugs.webkit.org/show_bug.cgi?id=125405
3975
3976         Reviewed by Dan Bernstein.
3977
3978         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
3979         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
3980         (WebKit::InjectedBundle::load):
3981
3982 2013-12-08  Brian Holt  <brian.holt@samsung.com>
3983
3984         [WK2] Guard include of SecItemShim.h with ENABLE(SEC_ITEM_SHIM)
3985         https://bugs.webkit.org/show_bug.cgi?id=125415
3986
3987         Reviewed by Gustavo Noronha Silva.
3988
3989         * NetworkProcess/NetworkProcess.cpp:
3990         * UIProcess/Network/NetworkProcessProxy.cpp:
3991
3992 2013-12-07  Sam Weinig  <sam@webkit.org>
3993
3994         [Cocoa] Make WKWebProcessPlugInController work with WKObject wrapping
3995         https://bugs.webkit.org/show_bug.cgi?id=125404
3996
3997         Reviewed by Dan Bernstein.
3998
3999         * Shared/Cocoa/APIObject.mm:
4000         (API::Object::newObject):
4001         * Shared/mac/ObjCObjectGraphCoders.mm:
4002         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
4003         (-[WKWebProcessPlugInController dealloc]):
4004         (didCreatePage):
4005         (willDestroyPage):
4006         (-[WKWebProcessPlugInController _setPrincipalClassInstance:]):
4007         (-[WKWebProcessPlugInController API::]):
4008         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:
4009         (WebKit::wrapper):
4010         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInPrivate.h:
4011         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
4012         (WebKit::InjectedBundle::load):
4013
4014 2013-12-07  Dan Bernstein  <mitz@apple.com>
4015
4016         [Cocoa] WebData has a generic wrapper
4017         https://bugs.webkit.org/show_bug.cgi?id=125402
4018
4019         Reviewed by Sam Weinig.
4020
4021         Added WKNSData, an NSData subclass that conforms to WKObject and wraps a WebData.
4022
4023         * Shared/Cocoa/APIObject.mm:
4024         (API::Object::newObject): Allocate a WKNSData if the API::Object is data.
4025         * Shared/Cocoa/WKNSData.h: Added.
4026         (WebKit::wrapper): Added. Returns a WebData’s wrapper as an NSData.
4027         * Shared/Cocoa/WKNSData.mm: Added.
4028         (-[WKNSData dealloc]): Calls the WebData destructor.
4029         (-[WKNSData length]): Added.
4030         (-[WKNSData bytes]): Added.
4031         (-[WKNSData copyWithZone:]): Retains self.
4032         (-[WKNSData _apiObject]): Returns the wrapped WebData.
4033         * WebKit2.xcodeproj/project.pbxproj: Added references to new files.
4034
4035 2013-12-07  Sam Weinig  <sam@webkit.org>
4036
4037         [Cocoa] Make WKWebProcessPlugInBrowserContextController work with WKObject wrapping
4038         https://bugs.webkit.org/show_bug.cgi?id=125403
4039
4040         Reviewed by Dan Bernstein.
4041
4042         * Shared/Cocoa/APIObject.mm:
4043         (API::Object::newObject):
4044         * Shared/mac/ObjCObjectGraphCoders.mm:
4045         (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
4046         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
4047         (didCreatePage):
4048         (willDestroyPage):
4049         (setUpBundleClient):
4050         (-[WKWebProcessPlugInController _initWithPrincipalClassInstance:bundle:]):
4051         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
4052         (-[WKWebProcessPlugInBrowserContextController dealloc]):
4053         (-[WKWebProcessPlugInBrowserContextController mainFrameDocument]):
4054         (-[WKWebProcessPlugInBrowserContextController selectedRange]):
4055         (-[WKWebProcessPlugInBrowserContextController API::]):
4056         (-[WKWebProcessPlugInBrowserContextController _bundlePageRef]):
4057         (-[WKWebProcessPlugInBrowserContextController handle]):
4058         (+[WKWebProcessPlugInBrowserContextController lookUpBrowsingContextFromHandle:]):
4059         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerInternal.h:
4060         (WebKit::wrapper):
4061         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:
4062         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
4063         (WebKit::InjectedBundle::load):
4064
4065 2013-12-07  Gustavo Noronha Silva  <gns@gnome.org>