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