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