e63e04996b0647c25772a304e806588d1fbd9fac
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         Unreviewed. Fix the GTK+ build after r163037.
4
5         * UIProcess/API/gtk/WebKitWebView.cpp:
6         (webkit_web_view_load_uri):
7         (webkit_web_view_load_request):
8
9 2014-01-29  Csaba Osztrogonác  <ossy@webkit.org>
10
11         Remove ENABLE(JAVASCRIPT_DEBUGGER) leftovers
12         https://bugs.webkit.org/show_bug.cgi?id=127845
13
14         Reviewed by Joseph Pecoraro.
15
16         * Configurations/FeatureDefines.xcconfig:
17
18 2014-01-29  Dan Bernstein  <mitz@apple.com>
19
20         Moved linking against common frameworks and a library from the .xcconfig file into the target.
21
22         Reviewed by Tim Horton.
23
24         * Configurations/WebKit2.xcconfig:
25         * WebKit2.xcodeproj/project.pbxproj:
26
27 2014-01-29  Anders Carlsson  <andersca@apple.com>
28
29         Fix 32-bit build.
30
31         * UIProcess/Cocoa/NavigationState.h:
32         * UIProcess/Cocoa/NavigationState.mm:
33
34 2014-01-29  Anders Carlsson  <andersca@apple.com>
35
36         Add a NavigationState object to keep track of the navigations for a given page
37         https://bugs.webkit.org/show_bug.cgi?id=127884
38
39         Reviewed by Sam Weinig.
40
41         * UIProcess/API/Cocoa/WKNavigation.mm:
42         (-[WKNavigation request]):
43         (-[WKNavigation setRequest:]):
44         * UIProcess/API/Cocoa/WKNavigationInternal.h:
45         * UIProcess/API/Cocoa/WKWebView.mm:
46         (-[WKWebView initWithFrame:configuration:]):
47         (-[WKWebView loadRequest:]):
48         * UIProcess/Cocoa/NavigationState.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigation.mm.
49         * UIProcess/Cocoa/NavigationState.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigation.mm.
50         (WebKit::NavigationState::NavigationState):
51         (WebKit::NavigationState::~NavigationState):
52         (WebKit::NavigationState::createLoadRequestNavigation):
53         * UIProcess/WebPageProxy.cpp:
54         (WebKit::WebPageProxy::loadRequest):
55         * UIProcess/WebPageProxy.h:
56         * WebKit2.xcodeproj/project.pbxproj:
57
58 2014-01-29  Gavin Barraclough  <barraclough@apple.com>
59
60         Add IsVisibleOrOccluded to ViewState
61         https://bugs.webkit.org/show_bug.cgi?id=127875
62
63         Reviewed by Anders Carlsson.
64
65         When the WKView associated with a plugin becomes occluded
66         we tell the plugin it is no longer visible. This is a problem
67         if the plugin is being occluded by its own fullscreen window.
68
69         Instead, consider plugins to be visible any time they are in
70         a visible window – i.e. when they are visible or occluded.
71
72         * UIProcess/API/mac/PageClientImpl.h:
73         * UIProcess/API/mac/PageClientImpl.mm:
74         (WebKit::PageClientImpl::isViewVisibleOrOccluded):
75         * UIProcess/PageClient.h:
76         (WebKit::PageClient::isViewVisibleOrOccluded):
77             - added isViewVisibleOrOccluded.
78         * UIProcess/WebPageProxy.cpp:
79         (WebKit::WebPageProxy::updateViewState):
80             - update IsVisibleOrOccluded.
81         (WebKit::WebPageProxy::viewStateDidChange):
82             - when updating IsVisible also update IsVisibleOrOccluded.
83         * WebProcess/Plugins/PluginView.cpp:
84         (WebKit::PluginView::platformViewStateDidChange):
85             - use isVisibleOrOccluded to determine plugin visibility.
86         * WebProcess/WebPage/WebPage.h:
87         (WebKit::WebPage::isVisibleOrOccluded):
88             - accessor.
89
90 2014-01-29  Anders Carlsson  <andersca@apple.com>
91
92         Pass navigation IDs along to LoadRequest and Reload
93         https://bugs.webkit.org/show_bug.cgi?id=127883
94
95         Reviewed by Sam Weinig.
96
97         * UIProcess/WebPageProxy.cpp:
98         (WebKit::WebPageProxy::WebPageProxy):
99         (WebKit::WebPageProxy::loadRequest):
100         (WebKit::WebPageProxy::loadFile):
101         (WebKit::WebPageProxy::reload):
102         (WebKit::WebPageProxy::generateNavigationID):
103         * UIProcess/WebPageProxy.h:
104         * WebProcess/WebPage/WebDocumentLoader.cpp:
105         (WebKit::WebDocumentLoader::setNavigationID):
106         * WebProcess/WebPage/WebPage.cpp:
107         (WebKit::WebPage::WebPage):
108         (WebKit::WebPage::loadRequest):
109         (WebKit::WebPage::reload):
110         (WebKit::WebPage::createDocumentLoader):
111         * WebProcess/WebPage/WebPage.h:
112         * WebProcess/WebPage/WebPage.messages.in:
113
114 2014-01-29  Anders Carlsson  <andersca@apple.com>
115
116         -[WKWebView loadRequest:] should return a WKNavigation
117         https://bugs.webkit.org/show_bug.cgi?id=127873
118
119         Reviewed by Dan Bernstein.
120
121         For now this just returns a dummy navigation.
122
123         * UIProcess/API/Cocoa/WKNavigation.h:
124         * UIProcess/API/Cocoa/WKNavigation.mm:
125         (-[WKNavigation initWithRequest:]):
126         (-[WKNavigation request]):
127         * UIProcess/API/Cocoa/WKNavigationInternal.h: Added.
128         * UIProcess/API/Cocoa/WKWebView.h:
129         * UIProcess/API/Cocoa/WKWebView.mm:
130         (-[WKWebView loadRequest:]):
131         * WebKit2.xcodeproj/project.pbxproj:
132
133 2014-01-29  Anders Carlsson  <andersca@apple.com>
134
135         
136
137         * UIProcess/API/C/WKPage.cpp:
138         (WKPageLoadURL):
139         Don't use the resource request constructor that takes a String.
140
141 2014-01-29  Brady Eidson  <beidson@apple.com>
142
143         IDB: Fully implement IDBKeyData encoding/decoding
144         https://bugs.webkit.org/show_bug.cgi?id=127863
145
146         Rubberstamped by Alexey Proskuryakov.
147
148         Handle invalid buffers, and pass IDBKeyData decoding along:
149         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
150         (WebKit::deserializeIDBKeyPath):
151         (WebKit::serializeIDBKeyData):
152         (WebKit::deserializeIDBKeyData):
153         * DatabaseProcess/IndexedDB/IDBSerialization.h:
154
155         Implement decodeBool and decodeDouble:
156         * Shared/cf/KeyedDecoder.cpp:
157         (WebKit::KeyedDecoder::decodeBool):
158         (WebKit::KeyedDecoder::decodeDouble):
159         * Shared/cf/KeyedDecoder.h:
160
161 2014-01-29  Tim Horton  <timothy_horton@apple.com>
162
163         WebKit2 View Gestures (Swipe): Update rubberBandsAt{Left,Right} when WebKit swipe is enabled
164         https://bugs.webkit.org/show_bug.cgi?id=127855
165         <rdar://problem/15933878>
166
167         Reviewed by Anders Carlsson.
168
169         * UIProcess/API/mac/WKView.mm:
170         (-[WKView setAllowsBackForwardNavigationGestures:]):
171         Enable implicit control of rubberbanding when using WebKit2's swipe implementation.
172
173         * UIProcess/WebPageProxy.cpp:
174         (WebKit::WebPageProxy::WebPageProxy):
175         (WebKit::WebPageProxy::sendWheelEvent):
176         * UIProcess/WebPageProxy.h:
177         (WebKit::WebPageProxy::setShouldUseImplicitRubberBandControl):
178         (WebKit::WebPageProxy::shouldUseImplicitRubberBandControl):
179         Rename away from "legacy" name, since we're using it on purpose now.
180
181         * UIProcess/mac/WebPageProxyMac.mm:
182         (WebKit::expectsLegacyImplicitRubberBandControl):
183         (WebKit::WebPageProxy::platformInitialize):
184         Since NSVersionOfLinkTimeLibrary doesn't work for applications that
185         don't link directly against the library (like Safari), let's explicitly
186         check if Safari is expecting the legacy behavior, otherwise using
187         the linked version of WebKit2, but using the new behavior if we can't
188         determine the linked version of WebKit2 and are not Safari.
189
190 2014-01-29  Anders Carlsson  <andersca@apple.com>
191
192         Make WKWebView limp along on OS X
193         https://bugs.webkit.org/show_bug.cgi?id=127857
194
195         Reviewed by Tim Horton.
196
197         On Mac, create a WKView and add it as a subview of the WKWebVew so we'll actually get something
198         on screen when creating a WKWebView.
199
200         * UIProcess/API/Cocoa/WKWebView.mm:
201         (-[WKWebView initWithFrame:configuration:]):
202         Create a WKView.
203
204         (-[WKWebView resizeSubviewsWithOldSize:]):
205         Resize the WKView.
206
207         * UIProcess/API/mac/WKView.mm:
208         (-[WKView initWithFrame:configuration:]):
209         Add new initializer.
210
211         * UIProcess/API/mac/WKViewInternal.h:
212         Use a class extension for internal methods and add the new initializer.
213
214 2014-01-29  Brady Eidson  <beidson@apple.com>
215
216         IDB: Opening an existing database is broken
217         https://bugs.webkit.org/show_bug.cgi?id=127851
218
219         Reviewed by Tim Hatcher.
220
221         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
222         (WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata): Save the request to get metadata
223           to the set before posting the task to the thread.
224         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
225         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata): Actually save the retrieved
226           object store metadata to the database metadata.
227
228 2014-01-29  Anders Carlsson  <andersca@apple.com>
229
230         Consolidate page loading functions
231         https://bugs.webkit.org/show_bug.cgi?id=127847
232
233         Reviewed by Tim Horton.
234
235         Get rid of the loadURL functions (and the LoadURL message), rename
236         loadURLRequest to loadRequest and change it to take a ResourceRequest instead
237         of an API::URLRequest.
238
239         * UIProcess/API/C/WKPage.cpp:
240         (WKPageLoadURL):
241         (WKPageLoadURLWithUserData):
242         (WKPageLoadURLRequest):
243         (WKPageLoadURLRequestWithUserData):
244         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
245         (-[WKBrowsingContextController loadRequest:userData:]):
246         * UIProcess/API/Cocoa/WKWebView.mm:
247         (-[WKWebView loadRequest:]):
248         * UIProcess/WebInspectorProxy.cpp:
249         (WebKit::decidePolicyForNavigationAction):
250         (WebKit::WebInspectorProxy::createInspectorPage):
251         * UIProcess/WebPageProxy.cpp:
252         (WebKit::WebPageProxy::loadRequest):
253         (WebKit::WebPageProxy::loadFile):
254         * UIProcess/WebPageProxy.h:
255         * UIProcess/cf/WebPageProxyCF.cpp:
256         (WebKit::WebPageProxy::restoreFromSessionStateData):
257         * WebProcess/WebPage/WebPage.cpp:
258         (WebKit::WebPage::loadRequest):
259         * WebProcess/WebPage/WebPage.h:
260         * WebProcess/WebPage/WebPage.messages.in:
261
262 2014-01-29  Martin Robinson  <mrobinson@igalia.com>
263
264         [GTK] [CMake] Fix the build after r162835
265         https://bugs.webkit.org/show_bug.cgi?id=127753
266
267         Reviewed by Gustavo Noronha Silva.
268
269         * CMakeLists.txt: Add support for using the prefix header (GCC / clang only for now)
270         when WebKit2_USE_PREFIX_HEADER is set to true.
271         * PlatformGTK.cmake: Set WebKit2_USE_PREFIX_HEADER support and no longer process some message.in files.
272         * WebKit2Prefix.h: Add support for the CMake GTK+ build.
273
274 2014-01-29  Csaba Osztrogonác  <ossy@webkit.org>
275
276         Remove ENABLE(JAVASCRIPT_DEBUGGER) guards
277         https://bugs.webkit.org/show_bug.cgi?id=127840
278
279         Reviewed by Mark Lam.
280
281         * WebProcess/WebPage/WebInspector.cpp:
282         (WebKit::WebInspector::startJavaScriptDebugging):
283         (WebKit::WebInspector::stopJavaScriptDebugging):
284         (WebKit::WebInspector::setJavaScriptProfilingEnabled):
285         (WebKit::WebInspector::startJavaScriptProfiling):
286         (WebKit::WebInspector::stopJavaScriptProfiling):
287
288 2014-01-29  Brady Eidson  <beidson@apple.com>
289
290         IDB: Serialize IDBKeyDatas to disk, not IDBKeys
291         https://bugs.webkit.org/show_bug.cgi?id=127829
292
293         Reviewed by Tim Horton.
294
295         Serialize IDBKeyDatas, not IDBKeys.
296
297         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
298         (WebKit::deserializeIDBKeyPath):
299         (WebKit::serializeIDBKeyData):
300         * DatabaseProcess/IndexedDB/IDBSerialization.h:
301
302         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
303         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
304         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
305         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
306         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
307
308 2014-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
309
310         Unreviewed. Fix GTK+ build after r162981.
311
312         * GNUmakefile.list.am: Add WebProcess/WebPage/WebDocumentLoader to
313         the compilation.
314
315 2014-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
316
317         Unreviewed. Actually fix the GTK+ build after r162967.
318
319         * UIProcess/API/gtk/WebKitWebView.cpp:
320         (webkit_web_view_can_go_back):
321         (webkit_web_view_can_go_forward):
322
323 2014-01-28  Zan Dobersek  <zdobersek@igalia.com>
324
325         Unreviewed followup to r163006. That change incorrectly modified
326         webkit_web_view_go_forward when webkit_web_view_can_go_forward needed fixing.
327
328         * UIProcess/API/gtk/WebKitWebView.cpp:
329         (webkit_web_view_go_forward):
330         (webkit_web_view_can_go_forward):
331
332 2014-01-28  Zan Dobersek  <zdobersek@igalia.com>
333
334         Unreviewed GTK build fix after r162967.
335
336         * UIProcess/API/gtk/WebKitWebView.cpp:
337         (webkit_web_view_can_go_back):
338         (webkit_web_view_go_forward):
339
340 2014-01-28  Tim Horton  <timothy_horton@apple.com>
341
342         Crashes in ViewGestureController::wheelEventWasNotHandledByWebCore
343         https://bugs.webkit.org/show_bug.cgi?id=127828
344         <rdar://problem/15932902>
345
346         Reviewed by Dan Bernstein.
347
348         * UIProcess/API/mac/WKView.mm:
349         (-[WKView _wheelEventWasNotHandledByWebCore:]):
350         Null check. ViewGestureController only needs unhandled wheel events after it has been created.
351
352 2014-01-28  Tim Horton  <timothy_horton@apple.com>
353
354         Fix the Mountain Lion build if you have private headers.
355
356         * UIProcess/mac/ViewGestureController.mm:
357         (WebKit::ViewGestureController::beginSwipeGesture):
358
359 2014-01-28  Ian Henderson  <ianh@apple.com>
360
361         [iOS] UI process crashes whenever web process crashes
362         https://bugs.webkit.org/show_bug.cgi?id=127826
363
364         Reviewed by Tim Horton.
365
366         * UIProcess/API/ios/WKContentView.mm:
367         (-[WKContentView _updateFixedPositionRect]): Null-check the drawing
368         area before calling size() on it.
369
370 2014-01-28  Ian Henderson  <ianh@apple.com>
371
372         WKRemoteObjectCoder should support more argument types
373         https://bugs.webkit.org/show_bug.cgi?id=127824
374
375         Reviewed by Anders Carlsson.
376
377         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
378         (encodeInvocation): Support encoding char values.
379         (decodeInvocationArguments): Support decoding char values.
380
381 2014-01-28  Ryuan Choi  <ryuan.choi@samsung.com>
382
383         Unreviewed build fix on the cmake based port after r162981
384
385         One more build fix.
386
387         * CMakeLists.txt: Added WebDocumentLoader.cpp
388
389 2014-01-28  Ryuan Choi  <ryuan.choi@samsung.com>
390
391         Unreviewed build fix on the EFL build after r162984
392
393         r162984 added wheelEventWasNotHandledByWebCore which is guarded to PLATFORM(MAC).
394
395         * UIProcess/WebPageProxy.cpp:
396         (WebKit::WebPageProxy::didReceiveEvent):
397
398 2014-01-28  Anders Carlsson  <andersca@apple.com>
399
400         Fix a thinko.
401
402         * UIProcess/WebPageProxy.cpp:
403         (WebKit::WebPageProxy::goBack):
404         Remove early return if isValid() is true.
405
406 2014-01-28  Anders Carlsson  <andersca@apple.com>
407
408         WebPage should be in charge of creating document loaders
409         https://bugs.webkit.org/show_bug.cgi?id=127818
410
411         Reviewed by Dan Bernstein.
412
413         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
414         (WebKit::WebFrameLoaderClient::createDocumentLoader):
415         * WebProcess/WebPage/WebPage.cpp:
416         (WebKit::WebPage::createDocumentLoader):
417         * WebProcess/WebPage/WebPage.h:
418
419 2014-01-28  Carlos Alberto Lopez Perez  <clopez@igalia.com>
420
421         Unreviewed GTK build fix after r162951.
422         https://bugs.webkit.org/show_bug.cgi?id=127815
423
424         * GNUmakefile.list.am: Adding missing build targets.
425
426 2014-01-28  Tim Horton  <timothy_horton@apple.com>
427
428         WebKit2 View Gestures (Swipe): Give WebCore the first crack at scroll events if it needs it
429         https://bugs.webkit.org/show_bug.cgi?id=127396
430
431         Reviewed by Anders Carlsson.
432
433         * UIProcess/API/ios/PageClientImplIOS.h:
434         * UIProcess/API/ios/PageClientImplIOS.mm:
435         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
436         * UIProcess/API/mac/PageClientImpl.h:
437         * UIProcess/API/mac/PageClientImpl.mm:
438         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
439         * UIProcess/API/mac/WKView.mm:
440         (-[WKView _wheelEventWasNotHandledByWebCore:]):
441         * UIProcess/API/mac/WKViewInternal.h:
442         * UIProcess/PageClient.h:
443         * UIProcess/WebPageProxy.cpp:
444         (WebKit::WebPageProxy::didReceiveEvent):
445         In addition to informing the page client about un-handled wheel events,
446         inform the ViewGestureController, in a roundabout way.
447
448         * UIProcess/mac/ViewGestureController.h:
449         Add and use SwipeDirection enum instead of 'bool willSwipeLeft'.
450
451         * UIProcess/mac/ViewGestureController.mm:
452         (WebKit::ViewGestureController::ViewGestureController):
453         (WebKit::ViewGestureController::handleScrollWheelEvent):
454         If we get a Begin scroll wheel event, any previously deferred
455         swipes are invalid.
456
457         If the page has subframes or wheel handlers, defer starting the
458         swipe until we get a wheelEventWasNotHandledByWebCore back from the WebProcess.
459
460         (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
461         Start the swipe if the WebProcess didn't eat the event.
462
463         (WebKit::ViewGestureController::trackSwipeGesture):
464         (WebKit::ViewGestureController::beginSwipeGesture):
465         (WebKit::ViewGestureController::handleSwipeGesture):
466         Use SwipeDirection.
467
468 2014-01-28  Anders Carlsson  <andersca@apple.com>
469
470         Fix build.
471
472         * WebProcess/WebPage/WebFrame.cpp:
473
474 2014-01-28  Anders Carlsson  <andersca@apple.com>
475
476         Add WebDocumentLoader, a WebCore::DocumentLoader subclass
477         https://bugs.webkit.org/show_bug.cgi?id=127817
478
479         Reviewed by Tim Horton.
480
481         We need a place to store navigation IDs, and since they are per document loader, putting them
482         in a DocumentLoader subclass seems like a good idea.
483
484         * WebKit2.xcodeproj/project.pbxproj:
485         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
486         (WebKit::WebFrameLoaderClient::createDocumentLoader):
487         * WebProcess/WebPage/WebDocumentLoader.cpp: Added.
488         (WebKit::WebDocumentLoader::WebDocumentLoader):
489         (WebKit::WebDocumentLoader::setNavigationID):
490         * WebProcess/WebPage/WebDocumentLoader.h: Added.
491         (WebKit::WebDocumentLoader::create):
492         (WebKit::WebDocumentLoader::navigationID):
493
494 2014-01-28  Anders Carlsson  <andersca@apple.com>
495
496         Simplify WebFrame::isMainFrame
497         https://bugs.webkit.org/show_bug.cgi?id=127812
498
499         Reviewed by Sam Weinig.
500
501         * WebProcess/WebPage/WebFrame.cpp:
502         (WebKit::WebFrame::isMainFrame):
503
504 2014-01-28  Andy Estes  <aestes@apple.com>
505
506         [iOS] Set INSTALL_PATH_ACTUAL when building WebKit2 for the iOS Simulator
507         https://bugs.webkit.org/show_bug.cgi?id=127811
508
509         Reviewed by Dan Bernstein.
510
511         * Configurations/WebKit2.xcconfig:
512
513 2014-01-28  Jinwoo Song  <jinwoo7.song@samsung.com>
514
515         Unreviewed EFL WebKit2 build fix.
516
517         * CMakeLists.txt: Added Shared/NavigationActionData.cpp
518
519 2014-01-28  Anders Carlsson  <andersca@apple.com>
520
521         Remove WebPageProxy::canGoBack and WebPageProxy::canGoForward
522         https://bugs.webkit.org/show_bug.cgi?id=127803
523
524         Reviewed by Andreas Kling.
525
526         * UIProcess/API/C/WKPage.cpp:
527         (WKPageCanGoForward):
528         (WKPageCanGoBack):
529         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
530         (-[WKBrowsingContextController canGoForward]):
531         (-[WKBrowsingContextController canGoBack]):
532         * UIProcess/WebPageProxy.cpp:
533         (WebKit::WebPageProxy::goForward):
534         (WebKit::WebPageProxy::goBack):
535         (WebKit::WebPageProxy::sendWheelEvent):
536         * UIProcess/WebPageProxy.h:
537
538 2014-01-28  Anders Carlsson  <andersca@apple.com>
539
540         API::PolicyClient::decidePolicyForNavigationAction should take a NavigationActionData object
541         https://bugs.webkit.org/show_bug.cgi?id=127798
542
543         Reviewed by Tim Horton.
544
545         * UIProcess/API/APIPolicyClient.h:
546         (API::PolicyClient::decidePolicyForNavigationAction):
547         * UIProcess/API/C/WKPage.cpp:
548         (WKPageSetPagePolicyClient):
549         * UIProcess/WebPageProxy.cpp:
550         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
551
552 2014-01-28  Anders Carlsson  <andersca@apple.com>
553
554         Add an empty WKNavigation class
555         https://bugs.webkit.org/show_bug.cgi?id=127796
556
557         Reviewed by Tim Horton.
558
559         * UIProcess/API/Cocoa/WKNavigation.h: Added.
560         * UIProcess/API/Cocoa/WKNavigation.mm: Added.
561         * WebKit2.xcodeproj/project.pbxproj:
562
563 2014-01-28  Anders Carlsson  <andersca@apple.com>
564
565         Add a NavigationActionData object for easy storage of navigation action data
566         https://bugs.webkit.org/show_bug.cgi?id=127787
567
568         Reviewed by Tim Horton.
569
570         * Scripts/webkit2/messages.py:
571         (struct_or_class):
572         * Shared/NavigationActionData.cpp: Added.
573         (WebKit::NavigationActionData::NavigationActionData):
574         (WebKit::NavigationActionData::encode):
575         (WebKit::NavigationActionData::decode):
576         * Shared/NavigationActionData.h: Added.
577         * UIProcess/WebPageProxy.cpp:
578         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
579         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
580         * UIProcess/WebPageProxy.h:
581         * UIProcess/WebPageProxy.messages.in:
582         * WebKit2.xcodeproj/project.pbxproj:
583         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
584         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
585         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
586
587 2014-01-28  Tim Horton  <timothy_horton@apple.com>
588
589         Fix the Mountain Lion build.
590
591         * UIProcess/mac/ViewGestureController.mm:
592         (WebKit::ViewGestureController::beginSwipeGesture):
593         (WebKit::ViewGestureController::removeSwipeSnapshot):
594         * UIProcess/mac/ViewSnapshotStore.mm:
595         (WebKit::ViewSnapshotStore::recordSnapshot):
596
597 2014-01-28  Tim Horton  <timothy_horton@apple.com>
598
599         Fix the iOS build.
600
601         * UIProcess/WebPageProxy.cpp:
602         (WebKit::WebPageProxy::recordNavigationSnapshot):
603         * UIProcess/mac/ViewSnapshotStore.h:
604         * UIProcess/mac/ViewSnapshotStore.mm:
605
606 2014-01-28  Brady Eidson  <beidson@apple.com>
607
608         Remove unneeded “WebCore::” prefixing in two .cpp files.
609
610         Rubberstamped by Alexey Proskuryakov.
611
612         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
613         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
614
615 2014-01-28  Tim Horton  <timothy_horton@apple.com>
616
617         WebKit2 View Gestures (Swipe): Snapshots should be purgeable
618         https://bugs.webkit.org/show_bug.cgi?id=127390
619         <rdar://problem/15876775>
620
621         Reviewed by Anders Carlsson.
622
623         Make snapshots be purgeable, and implement a straightforward
624         (if perhaps expensive, for now) cache eviction strategy to limit the
625         number of snapshots to 20.
626
627         * UIProcess/mac/ViewGestureController.mm:
628         (WebKit::ViewGestureController::beginSwipeGesture):
629         When beginning a gesture, attempt to make the retrieved snapshot
630         non-volatile. If it was purged while volatile, we won't use it, but if it
631         is still valid, we'll go ahead and use it as the swipe layer's contents.
632
633         (WebKit::ViewGestureController::removeSwipeSnapshot):
634         When removing the swipe snapshot, make it volatile once again.
635
636         * UIProcess/mac/ViewSnapshotStore.h:
637         Store a creation time along with the image.
638         Store and return IOSurfaces instead of CGImages.
639         Store snapshots and render tree sizes separately, so that we can
640         throw away snapshots but keep the render tree sizes indefinitely.
641
642         * UIProcess/mac/ViewSnapshotStore.mm:
643         (WebKit::ViewSnapshotStore::pruneSnapshots):
644         Cap the number of snapshots we'll ever have live at 20.
645         Enforce this cap by first trying to remove snapshots farthest
646         from the current back-forward list's current item, falling back
647         to removing the least recently created snapshot if there are no
648         snapshots owned by the current back-forward list.
649
650         (WebKit::createIOSurfaceFromImage):
651         Build an IOSurface from the CGImage snapshot we took, for ease of
652         use of its purgeability API.
653
654         (WebKit::ViewSnapshotStore::recordSnapshot):
655         Bail from taking the snapshot if the image is empty; this can happen
656         if the view is out of the window when the snapshot is taken.
657
658         Mark snapshots as purgeable as soon as they go into the cache.
659
660         (WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize):
661         Return the target render tree size even if there is no snapshot image.
662         Take care not to look up an empty UUID.
663
664 2014-01-27  Alexey Proskuryakov  <ap@apple.com>
665
666         Expose SQL database creation and modification times
667         https://bugs.webkit.org/show_bug.cgi?id=127728
668
669         Reviewed by Brady Eidson.
670
671         * Shared/WebCoreArgumentCoders.cpp:
672         (IPC::ArgumentCoder<DatabaseDetails>::encode):
673         (IPC::ArgumentCoder<DatabaseDetails>::decode):
674         Encode and decode new DatabaseDetails member variables.
675
676         * UIProcess/API/C/WKDatabaseManager.cpp:
677         (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
678         (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
679         * UIProcess/API/C/WKDatabaseManager.h:
680         Added new keys for database details.
681
682         * UIProcess/WebDatabaseManagerProxy.cpp:
683         (WebKit::WebDatabaseManagerProxy::databaseDetailsCreationTimeKey):
684         (WebKit::WebDatabaseManagerProxy::databaseDetailsModificationTimeKey):
685         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
686         * UIProcess/WebDatabaseManagerProxy.h:
687         Set the new keys if times are valid.
688
689 2014-01-28  Tim Horton  <timothy_horton@apple.com>
690
691         WebKit2 View Gestures (Swipe): Use CGSCaptureWindowsContentsToRect for now
692         https://bugs.webkit.org/show_bug.cgi?id=127768
693         <rdar://problem/15923662>
694
695         Reviewed by Simon Fraser.
696
697         * UIProcess/API/mac/WKView.mm:
698         (-[WKView _takeViewSnapshot]):
699         Until <rdar://problem/15709646> is resolved, we'll use
700         CGSCaptureWindowsContentsToRect instead of CGWindowListCreateImage.
701
702 2014-01-28  Mark Rowe  <mrowe@apple.com>
703
704         <https://webkit.org/b/127767> Disable some deprecation warnings to fix the build.
705
706         Reviewed by Ryosuke Niwa.
707
708         * UIProcess/API/mac/WKView.mm:
709         (-[WKView _updateWindowAndViewFrames]):
710         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
711
712 2014-01-28  Adrian Perez de Castro  <aperez@igalia.com>
713
714         [GTK] Add API to allow setting the process model in WebKitWebContext
715         https://bugs.webkit.org/show_bug.cgi?id=125463
716
717         Reviewed by Carlos Garcia Campos.
718
719         Implements accessors in WebKitWebContext for the process model.
720         The default behavior is unchanged, and a single web process is
721         used. Using WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW
722         as the process model will make use one web process for each
723         WebKitWebView. This also enables the network process. Setting
724         the process model must be done as early as possible, before the
725         very first web process is spawned.
726
727         * UIProcess/API/gtk/WebKitWebContext.cpp:
728         Add accessors in the API to get/set the process model.
729         (webkit_web_context_set_process_model):
730         (webkit_web_context_get_process_model):
731         * UIProcess/API/gtk/WebKitWebContext.h:
732         Define the WebKitProcessModel enum.
733         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
734         Add new public API bits to the documentation.
735
736 2014-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
737
738         [GTK] Make webkit_uri_scheme_request_get_web_view() work with CustomProtocols
739         https://bugs.webkit.org/show_bug.cgi?id=127614
740
741         Reviewed by Gustavo Noronha Silva.
742
743         * NetworkProcess/RemoteNetworkingContext.h: Remove
744         initiatingPageID() method.
745         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp: Ditto.
746         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
747         (WebKit::CustomProtocolManagerImpl::send): Create the request with
748         the ResourceRequest constructor that receives a SoupRequest.
749         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
750         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData): Encode initiatingPageID.
751         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): Decode initiatingPageID.
752         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
753         (webkitURISchemeRequestCreate): Remove initiatingPageID parameter
754         and get it from the given ResourceRequest.
755         * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
756         * UIProcess/API/gtk/WebKitWebContext.cpp:
757         (webkitWebContextStartLoadingCustomProtocol): Update to
758         webkitURISchemeRequestCreate API change.
759         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
760         (willSendRequestForFrame): Set the initiatingPageID to the ResourceRequest.
761         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
762         (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
763         Remove initiatingPageID() method.
764         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
765         * WebProcess/soup/WebSoupRequestManager.cpp:
766         (WebKit::WebSoupRequestManager::send): Get the initiatingPageID
767         from the SoupRequest using the ResourceRequest API.
768
769 2014-01-27  Roger Fong  <roger_fong@apple.com>
770
771         WebGLLoadPolicy::WebGLAsk is an unnecessary value.
772         https://bugs.webkit.org/show_bug.cgi?id=127755
773
774         Reviewed by Anders Carlsson.
775
776         * UIProcess/API/C/WKAPICast.h:
777         (WebKit::toWebGLLoadPolicy):
778         * UIProcess/API/C/WKPageLoaderClient.h:
779
780 2014-01-27  Brady Eidson  <beidson@apple.com>
781
782         IDB: Cursor support - Messaging, IPC, Threading plumbing
783         https://bugs.webkit.org/show_bug.cgi?id=127736
784
785         Reviewed by Sam Weinig.
786
787         Pipe three cursor-related calls to the DatabaseProcess, and handle messages
788         from the database process when it is done handling them:
789         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
790         (WebKit::WebIDBServerConnection::didOpenCursor):
791         (WebKit::WebIDBServerConnection::didAdvanceCursor):
792         (WebKit::WebIDBServerConnection::didIterateCursor):
793         (WebKit::WebIDBServerConnection::openCursor):
794         (WebKit::WebIDBServerConnection::cursorAdvance):
795         (WebKit::WebIDBServerConnection::cursorIterate):
796         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
797         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
798
799         Pipe the calls through to the appropriate UniqueIDBDatabase:
800         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
801         (WebKit::DatabaseProcessIDBConnection::openCursor):
802         (WebKit::DatabaseProcessIDBConnection::cursorAdvance):
803         (WebKit::DatabaseProcessIDBConnection::cursorIterate):
804         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
805         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
806
807         Pass the calls to the backing store thread, then message back to the WebProcess
808         when the requests are complete.
809         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
810         (WebKit::UniqueIDBDatabase::openCursor):
811         (WebKit::UniqueIDBDatabase::cursorAdvance):
812         (WebKit::UniqueIDBDatabase::cursorIterate):
813         (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
814         (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore):
815         (WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
816         (WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore):
817         (WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
818         (WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore):
819         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
820
821         * Shared/WebCrossThreadCopier.cpp:
822         (WebCore::Vector<char>>::copy):
823         * Shared/WebCrossThreadCopier.h:
824
825 2014-01-27  Joseph Pecoraro  <pecoraro@apple.com>
826
827         WebKit2: Enable -Wimplicit-fallthrough and add FALLTHROUGH annotation where needed
828         https://bugs.webkit.org/show_bug.cgi?id=127665
829
830         Reviewed by Anders Carlsson.
831
832         * Shared/UserData.cpp:
833         (WebKit::UserData::encode):
834         These look like they should not have fallen through!
835
836         * Configurations/Base.xcconfig:
837         * Shared/mac/ObjCObjectGraphCoders.mm:
838         (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode):
839
840 2014-01-27  Andy Estes  <aestes@apple.com>
841
842         [WebKit2] Add SPI to disable the WebCore memory cache
843         https://bugs.webkit.org/show_bug.cgi?id=127747
844
845         Reviewed by Tim Horton.
846
847         * Shared/WebProcessCreationParameters.cpp:
848         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
849         Initialized memoryCacheDisabled to false.
850         (WebKit::WebProcessCreationParameters::encode):
851         Encoded memoryCacheDisabled.
852         (WebKit::WebProcessCreationParameters::decode):
853         Decoded memoryCacheDisabled.
854         * Shared/WebProcessCreationParameters.h:
855         * UIProcess/API/C/WKContext.cpp:
856         (WKContextSetMemoryCacheDisabled):
857         Called WebContext::setMemoryCacheDisabled().
858         * UIProcess/API/C/WKContextPrivate.h: Declared new SPI.
859         * UIProcess/WebContext.cpp:
860         (WebKit::WebContext::WebContext): Initialized m_memoryCacheDisabled to false.
861         (WebKit::WebContext::createNewWebProcess):
862         Set WebProcessCreationParameters::memoryCacheDisabled to m_memoryCacheDisabled.
863         (WebKit::WebContext::setMemoryCacheDisabled): Set m_memoryCacheDisabled
864         and sent new value to all existing processes.
865         * UIProcess/WebContext.h:
866         * WebProcess/WebProcess.cpp:
867         (WebKit::WebProcess::initializeWebProcess):
868         Called WebProcess::setMemoryCacheDisabled().
869         (WebKit::WebProcess::setMemoryCacheDisabled):
870         Called MemoryCache::setDisabled() if the disabled state changed.
871         * WebProcess/WebProcess.h:
872         * WebProcess/WebProcess.messages.in:
873
874 2014-01-27  Anders Carlsson  <andersca@apple.com>
875
876         Add -[WKWebView loadRequest:] API
877         https://bugs.webkit.org/show_bug.cgi?id=127727
878
879         Reviewed by Dan Bernstein.
880
881         * UIProcess/API/Cocoa/WKWebView.h:
882         * UIProcess/API/Cocoa/WKWebView.mm:
883         (-[WKWebView initWithFrame:configuration:]):
884         (-[WKWebView loadRequest:]):
885
886 2014-01-27  Brady Eidson  <beidson@apple.com>
887
888         IDB: Rename "IDBTransactionIdentifier" to be more general purpose (take 2)
889         https://bugs.webkit.org/show_bug.cgi?id=127717
890
891         Reviewed by Tim Horton.
892
893         Update all related variable names since the type no longer contains the relevant info.
894
895         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
896         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
897         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
898         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
899         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
900         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
901         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
902         * Shared/WebCrossThreadCopier.cpp:
903
904 2014-01-27  Anders Carlsson  <andersca@apple.com>
905
906         Copy relevant code from the iOS version of WKView to WKWebView
907         https://bugs.webkit.org/show_bug.cgi?id=127721
908
909         Reviewed by Dan Bernstein.
910
911         * UIProcess/API/Cocoa/WKWebView.mm:
912         (-[WKWebView initWithFrame:configuration:]):
913         (-[WKWebView setFrame:]):
914         (-[WKWebView setBounds:]):
915         (-[WKWebView scrollView]):
916         (-[WKWebView browsingContextController]):
917         (-[WKWebView contentView:contentsSizeDidChange:]):
918         (-[WKWebView contentViewDidCommitLoadForMainFrame:]):
919         (-[WKWebView contentViewDidReceiveMobileDocType:]):
920         (-[WKWebView contentView:didChangeViewportArgumentsSize:initialScale:minimumScale:maximumScale:allowsUserScaling:]):
921         (-[WKWebView viewportHandlerDidChangeScales:]):
922         (-[WKWebView viewportHandler:didChangeViewportSize:]):
923         (-[WKWebView viewForZoomingInScrollView:]):
924         (-[WKWebView scrollViewWillBeginZooming:withView:]):
925         (-[WKWebView _didFinishScroll]):
926         (-[WKWebView scrollViewDidEndDragging:willDecelerate:]):
927         (-[WKWebView scrollViewDidEndDecelerating:]):
928         (-[WKWebView scrollViewDidScrollToTop:]):
929         (-[WKWebView scrollViewDidScroll:]):
930         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
931         (-[WKWebView _frameOrBoundsChanged]):
932         (-[WKWebView _setDocumentScale:]):
933
934 2014-01-27  Tim Horton  <timothy_horton@apple.com>
935
936         Revert the parts of r162629 that add a new pluginLoadPolicy and the context menu item.
937
938         We're leaving the parts that make us use PDFPlugin instead of showing the blocked
939         plugin indicator intact, though.
940
941         * UIProcess/API/APILoaderClient.h:
942         (API::LoaderClient::pluginLoadPolicy):
943         * UIProcess/API/C/WKPage.cpp:
944         (WKPageSetPageLoaderClient):
945         * UIProcess/API/C/WKPageLoaderClient.h:
946         * UIProcess/WebPageProxy.cpp:
947         (WebKit::WebPageProxy::findPlugin):
948         * UIProcess/WebPageProxy.h:
949         * UIProcess/WebPageProxy.messages.in:
950         * WebProcess/Plugins/PDF/PDFPlugin.h:
951         * WebProcess/Plugins/PDF/PDFPlugin.mm:
952         (WebKit::PDFPlugin::PDFPlugin):
953         (WebKit::PDFPlugin::handleContextMenuEvent):
954         * WebProcess/WebPage/WebPage.cpp:
955         (WebKit::WebPage::createPlugin):
956         (WebKit::WebPage::canPluginHandleResponse):
957
958 2014-01-27  Anders Carlsson  <andersca@apple.com>
959
960         Add a WKContentView initializer that takes a WKWebViewConfiguration
961         https://bugs.webkit.org/show_bug.cgi?id=127718
962
963         Reviewed by Tim Horton.
964
965         This initializer will be used by WKWebView.
966
967         * UIProcess/API/ios/WKContentView.h:
968         * UIProcess/API/ios/WKContentView.mm:
969         (-[WKContentView initWithFrame:configuration:]):
970
971 2014-01-27  Andy Estes  <aestes@apple.com>
972
973         Scrub WebKit API headers of WTF macros
974         https://bugs.webkit.org/show_bug.cgi?id=127706
975
976         Reviewed by David Kilzer.
977
978         * Configurations/FeatureDefines.xcconfig: Added ENABLE_INSPECTOR.
979
980 2014-01-27  Tim Horton  <timothy_horton@apple.com>
981
982         Crashes in RemoteScrollingCoordinatorProxy::rootScrollingNodeID
983
984         Reviewed by Simon Fraser.
985
986         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
987         (WebKit::RemoteScrollingCoordinatorProxy::rootScrollingNodeID):
988         Null-check the root scrolling node, in case something scrolls before
989         we've made the first remote layer/scrolling tree commit.
990
991 2014-01-27  Brady Eidson  <beidson@apple.com>
992
993         IDB: Rename "IDBTransactionIdentifier" to be more general purpose
994         https://bugs.webkit.org/show_bug.cgi?id=127717
995
996         Reviewed by Tim Horton.
997
998         Global rename of IDBTransactionIdentifier to IDBIdentifier.
999
1000         * DatabaseProcess/IndexedDB/IDBIdentifier.h: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/IDBTransactionIdentifier.h.
1001
1002         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1003
1004         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1005         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1006
1007         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
1008         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
1009
1010         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1011         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1012         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1013
1014         * Shared/WebCrossThreadCopier.cpp:
1015         * Shared/WebCrossThreadCopier.h:
1016
1017         * WebKit2.xcodeproj/project.pbxproj:
1018
1019 2014-01-27  Anders Carlsson  <andersca@apple.com>
1020
1021         Move underlying C++ objects to class extensions
1022         https://bugs.webkit.org/show_bug.cgi?id=127716
1023
1024         Reviewed by Tim Horton.
1025
1026         This allows us to get at the internals without calling any Obj-C methods.
1027
1028         * UIProcess/API/Cocoa/WKProcessClass.mm:
1029         * UIProcess/API/Cocoa/WKProcessClassInternal.h:
1030         * UIProcess/API/ios/WKContentView.mm:
1031         * UIProcess/API/ios/WKContentViewInternal.h:
1032
1033 2014-01-27  Anders Carlsson  <andersca@apple.com>
1034
1035         Implement the _injectedBundleURL property
1036         https://bugs.webkit.org/show_bug.cgi?id=127714
1037
1038         Reviewed by Tim Horton.
1039
1040         Properties declared in class categories need to be implemented. Do this
1041         for the _injectedBundleURL property.
1042
1043         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
1044         (-[WKProcessClassConfiguration _injectedBundleURL]):
1045         (-[WKProcessClassConfiguration _setInjectedBundleURL:]):
1046
1047 2014-01-27  Brady Eidson  <beidson@apple.com>
1048
1049         IDB: LevelDB backing store shouldn't know about IDBCursor or IDBCallbacks
1050         https://bugs.webkit.org/show_bug.cgi?id=127708
1051
1052         Reviewed by Tim Horton.
1053
1054         Update to new callback signatures:
1055         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1056         (WebKit::WebIDBServerConnection::cursorAdvance):
1057         (WebKit::WebIDBServerConnection::cursorIterate):
1058         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1059
1060 2014-01-27  Anders Carlsson  <andersca@apple.com>
1061
1062         Tweak the WKWebView and WKWebViewConfiguration headers
1063         https://bugs.webkit.org/show_bug.cgi?id=127705
1064
1065         Reviewed by Dan Bernstein.
1066
1067         Add WK_API_CLASS to WKWebView and make WKWebView.h and WKWebViewConfiguration.h public.
1068
1069         * UIProcess/API/Cocoa/WKWebView.h:
1070         * WebKit2.xcodeproj/project.pbxproj:
1071
1072 2014-01-27  Brady Eidson  <beidson@apple.com>
1073
1074         IDB: Remove unused concept of "cursor prefetch"
1075         https://bugs.webkit.org/show_bug.cgi?id=127700
1076
1077         Reviewed by Tim Horton.
1078
1079         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1080         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1081
1082 2014-01-27  Tim Horton  <timothy_horton@apple.com>
1083
1084         Fix the build on case-sensitive filesystems
1085
1086         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
1087
1088 2014-01-27  Brady Eidson  <beidson@apple.com>
1089
1090         IDB: Refactor out the last of the operation callbacks that are called by the LevelDB backing store
1091         https://bugs.webkit.org/show_bug.cgi?id=127592
1092
1093         Reviewed by Tim Horton.
1094
1095         Update the WebIDBServerConnection to the new callback signatures:
1096         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1097         (WebKit::WebIDBServerConnection::openCursor):
1098         (WebKit::WebIDBServerConnection::count):
1099         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1100
1101 2014-01-27  Tim Horton  <timothy_horton@apple.com>
1102
1103         WebKit2 View Gestures: Fluid back-forward swipe
1104         https://bugs.webkit.org/show_bug.cgi?id=127363
1105
1106         Reviewed by Anders Carlsson.
1107
1108         Add support for a "back-forward swipe", which allows fluid swiping between
1109         items in the back-forward list. Currently disabled by default.
1110
1111         * Shared/WebPreferencesStore.h:
1112         * UIProcess/API/C/WKPreferences.cpp:
1113         (WKPreferencesSetViewGestureDebuggingEnabled):
1114         (WKPreferencesGetViewGestureDebuggingEnabled):
1115         * UIProcess/API/C/WKPreferencesPrivate.h:
1116         Add a ViewGestureDebuggingEnabled preference, which currently causes snapshots to be blurred.
1117         Additional view gesture debugging features could come in the future.
1118
1119         * UIProcess/API/Cocoa/WKViewPrivate.h:
1120         * UIProcess/API/mac/WKView.mm:
1121         (-[WKView _ensureGestureController]):
1122         (-[WKView scrollWheel:]):
1123         If back-forward navigation gestures are enabled, intercept scrollWheel events
1124         on the WKView and let the ViewGestureController take the first crack at them.
1125
1126         (-[WKView setAllowsBackForwardNavigationGestures:]):
1127         (-[WKView allowsBackForwardNavigationGestures]):
1128         * UIProcess/API/mac/WKViewInternal.h:
1129         Add allowsBackForwardNavigationGesture property, which enables the gesture.
1130
1131         * UIProcess/mac/ViewGestureController.h:
1132         Add swipe-related methods, which will be described below.
1133
1134         Add an enum for the swipe transition style. Currently only Overlap is accessible,
1135         but in the future one could see having API to choose the style.
1136         'Overlap' has the outgoing page swipe out to the right (when swiping right)
1137         or the incoming page swipe in from the right (when swiping left).
1138         'Push' has the pages push each other along in sync, as if all the pages in the
1139         back-forward list were oriented from left to right.
1140
1141         * UIProcess/mac/ViewGestureController.messages.in:
1142         * UIProcess/mac/ViewGestureController.mm: Renamed from Source/WebKit2/UIProcess/mac/ViewGestureController.cpp.
1143         Use some CAFilter SPI to blur the snapshot if ViewGestureDebuggingEnabled is on.
1144
1145         (WebKit::ViewGestureController::ViewGestureController):
1146         (WebKit::ViewGestureController::~ViewGestureController):
1147         (WebKit::ViewGestureController::endMagnificationGesture):
1148         Move m_activeGestureType clearing to each end* function instead of one global place,
1149         so that each gesture can handle when it ends separately.
1150
1151         (WebKit::ViewGestureController::handleScrollWheelEvent):
1152         If we receive a scroll wheel event which is appropriate for starting a
1153         fluid swipe, in a direction where the main frame is pinned to the appropriate
1154         edge of the view, start tracking a swipe.
1155
1156         This should eventually have some hysterisis to avoid stealing scrolls that
1157         venture into the wrong direction, but for now it starts tracking immediately.
1158
1159         Forward events from the tracking loop to {begin, handle, end}SwipeGesture.
1160
1161         (WebKit::ViewGestureController::beginSwipeGesture):
1162         Create a layer with the destination page's snapshot, and set it up.
1163
1164         (WebKit::ViewGestureController::handleSwipeGesture):
1165         Appropriately adjust the position of the root layer and snapshot layer,
1166         given the transition style and swipe direction.
1167
1168         (WebKit::ViewGestureController::endSwipeGesture):
1169         When the gesture ends, do the navigation, and tell the WebProcess to
1170         inform us when the render tree hits half the size it was when the
1171         snapshot was taken (when that happens, we will remove the snapshot
1172         and the gesture will be truly complete). Also, start a watchdog timer
1173         in case the render tree never hits that size, after which we will
1174         also remove the snapshot.
1175
1176         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
1177         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
1178         (WebKit::ViewGestureController::removeSwipeSnapshot):
1179         Tear down the swipe snapshot layer, and mark our current gesture as complete.
1180
1181         (WebKit::ViewGestureController::endActiveGesture):
1182         Simplify endActiveGesture; it only has work to do for a pinch-zoom gesture,
1183         as those are the only gestures where the user is directly in control of when they end.
1184
1185         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
1186         (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
1187         (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
1188         (WebKit::ViewGestureGeometryCollector::renderTreeSizeNotificationTimerFired):
1189         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
1190         (WebKit::ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold):
1191         * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
1192         ViewGestureController pushes a render-tree size threshold to the WebProcess;
1193         ViewGestureGeometryCollector (whose name is now more unfortunate than before)
1194         monitors render-tree size changes and informs ViewGestureController when
1195         it reaches that threshold via the 'DidHitRenderTreeSizeThreshold' message.
1196
1197         * UIProcess/API/Cocoa/WKViewPrivate.h:
1198         * UIProcess/API/ios/PageClientImplIOS.h:
1199         * UIProcess/API/ios/PageClientImplIOS.mm:
1200         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
1201         * UIProcess/API/mac/PageClientImpl.h:
1202         * UIProcess/API/mac/PageClientImpl.mm:
1203         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
1204         * UIProcess/API/mac/WKView.mm:
1205         (-[WKView _acceleratedCompositingModeRootLayer]):
1206         * UIProcess/API/mac/WKViewInternal.h:
1207         * UIProcess/PageClient.h:
1208         * UIProcess/WebPageProxy.h:
1209         * UIProcess/mac/WebPageProxyMac.mm:
1210         (WebKit::WebPageProxy::acceleratedCompositingRootLayer):
1211         Add a getter for the accelerated compositing root layer.
1212
1213         * UIProcess/mac/ViewSnapshotStore.mm:
1214         (WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize):
1215         Don't extract the CGImageRef from a RetainPtr just to put it back in one.
1216
1217 2014-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1218
1219         [GTK] Implement custom URI schemes with CustomProtocols
1220         https://bugs.webkit.org/show_bug.cgi?id=127091
1221
1222         Reviewed by Gustavo Noronha Silva.
1223
1224         The old classes are no longer built for GTK+ and should be removed once
1225         other ports using soup backend switch to custom protocols implementation.
1226
1227         * GNUmakefile.am: Remove include path.
1228         * GNUmakefile.list.am: Remove files from compilation.
1229         * PlatformGTK.cmake: Ditto.
1230         * UIProcess/API/gtk/WebKitPrivate.h:
1231         * UIProcess/API/gtk/WebKitRequestManagerClient.cpp:
1232         (startLoading):
1233         (stopLoading):
1234         (attachRequestManagerClientToContext):
1235         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
1236         (webkitURISchemeRequestCreate):
1237         (webkit_uri_scheme_request_get_web_view):
1238         (webkitURISchemeRequestReadCallback):
1239         (webkit_uri_scheme_request_finish):
1240         (webkit_uri_scheme_request_finish_error):
1241         * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
1242         * UIProcess/API/gtk/WebKitWebContext.cpp:
1243         (createDefaultWebContext):
1244         (webkit_web_context_register_uri_scheme):
1245         (webkitWebContextGetRequestManager):
1246         (webkitWebContextStartLoadingCustomProtocol):
1247         (webkitWebContextStopLoadingCustomProtocol):
1248         (webkitWebContextDidFinishLoadingCustomProtocol):
1249         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
1250         * UIProcess/gtk/WebContextGtk.cpp:
1251         (WebKit::WebContext::platformInitializeWebProcess):
1252         * WebKit2Prefix.h: Enable CustomProtocols unconditionally for the
1253         GTK+ port.
1254
1255 2014-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1256
1257         [SOUP] WebProcess sometimes crashes when a download is cancelled
1258         https://bugs.webkit.org/show_bug.cgi?id=127650
1259
1260         Reviewed by Martin Robinson.
1261
1262         The problem is that when the download is cancelled, the download
1263         manager removes the download from the map and it's deleted. The
1264         Download destructor calls platformInvalidate() that cancels the
1265         resource handle if there's still one. We set to nullptr the
1266         ResourceHandle when the download is cancelled to avoid cancelling
1267         it twice, but it's done after calling Download::didCancel(). It
1268         should be done before, because at that moment, when the download
1269         is deleted, the resource handle pointer is still valid.
1270
1271         * Shared/Downloads/soup/DownloadSoup.cpp:
1272         (WebKit::Download::cancel):
1273
1274 2014-01-25  Sam Weinig  <sam@webkit.org>
1275
1276         Remove unused support for DRAGGABLE_REGION
1277         https://bugs.webkit.org/show_bug.cgi?id=127642
1278
1279         Reviewed by Simon Fraser.
1280
1281         * Configurations/FeatureDefines.xcconfig:
1282
1283 2014-01-25  Anders Carlsson  <andersca@apple.com>
1284
1285         Remove an unused FrameLoaderClient function
1286         https://bugs.webkit.org/show_bug.cgi?id=127628
1287
1288         Reviewed by Andreas Kling.
1289
1290         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1291         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1292
1293 2014-01-25  Anders Carlsson  <andersca@apple.com>
1294
1295         Remove atomicIncrement/atomicDecrement
1296         https://bugs.webkit.org/show_bug.cgi?id=127625
1297
1298         Reviewed by Andreas Kling.
1299
1300         Replace atomicIncrement/atomicDecrement with std::atomic.
1301
1302         * Platform/IPC/Connection.cpp:
1303         (IPC::Connection::createSyncMessageEncoder):
1304         * Shared/mac/SecItemShim.cpp:
1305         (WebKit::generateSecItemRequestID):
1306         * UIProcess/StatisticsRequest.cpp:
1307         (WebKit::StatisticsRequest::addOutstandingRequest):
1308
1309 2014-01-25  Anders Carlsson  <andersca@apple.com>
1310
1311         Modernize HashTable threading code
1312         https://bugs.webkit.org/show_bug.cgi?id=127621
1313
1314         Reviewed by Darin Adler.
1315
1316         Explicitly include headers that used to be brought in by HashTable.h
1317
1318         * Shared/BlockingResponseMap.h:
1319
1320 2014-01-25  Zan Dobersek  <zdobersek@igalia.com>
1321
1322         [GTK] Remove null check for WebPopupMenuProxy::Client in WebPopupMenuProxyGtk::showPopupMenu
1323         https://bugs.webkit.org/show_bug.cgi?id=107036
1324
1325         Reviewed by Andreas Kling.
1326
1327         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
1328         (WebKit::WebPopupMenuProxyGtk::showPopupMenu): Don't perform an early return
1329         if the client is not available - it always should be. The client is set to null
1330         only when the proxy is invalidated. This happens immediately after this function
1331         returns, either with the popup being forced to close or being closed by the user
1332         with possibly an item being chosen. Rather than the early return, use an ASSERT.
1333
1334 2014-01-24  Tim Horton  <timothy_horton@apple.com>
1335
1336         WebKit2 View Gestures (Smart Zoom): Can't double-tap zoom-out on the body
1337         https://bugs.webkit.org/show_bug.cgi?id=127602
1338
1339         Reviewed by Anders Carlsson.
1340
1341         * UIProcess/mac/ViewGestureController.h:
1342         * UIProcess/mac/ViewGestureController.mm:
1343         (WebKit::ViewGestureController::ViewGestureController):
1344         (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
1345         Use an explicit boolean instead of the emptiness of the renderRect() to determine
1346         whether or not the user has already smart-zoomed. renderRect() can be 0x0
1347         if our hit-test hits the body element.
1348
1349 2014-01-24  Jinwoo Song  <jinwoo7.song@samsung.com>
1350
1351         Fix EFL WebKit2 build.
1352
1353         * WebProcess/WebPage/efl/WebPageEfl.cpp:
1354         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1355
1356 2014-01-24  Anders Carlsson  <andersca@apple.com>
1357
1358         Fix GTK+ WebKit2 build.
1359
1360         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1361         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1362
1363 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
1364
1365         Start using the RemoteScrollingCoordinatorProxy on iOS
1366         https://bugs.webkit.org/show_bug.cgi?id=127598
1367
1368         Reviewed by Tim Horton.
1369
1370         Add a scrollPositionChangedViaDelegatedScrolling() function to
1371         ScrollingTree, allowing the ScrollingTree to be informed about
1372         external sources of scrolling.
1373         
1374         Call it from -[WKContentView didScrollTo:] for the root node.
1375
1376         * UIProcess/API/ios/WKContentView.mm:
1377         (-[WKContentView didScrollTo:]):
1378         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1379         (WebKit::RemoteScrollingCoordinatorProxy::rootScrollingNodeID):
1380         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChangedViaDelegatedScrolling):
1381         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1382
1383 2014-01-24  Anders Carlsson  <andersca@apple.com>
1384
1385         Try to fix the GTK+ build.
1386
1387         * GNUmakefile.list.am:
1388
1389 2014-01-24  Anders Carlsson  <andersca@apple.com>
1390
1391         Remove back/forward list related functions from Page
1392         https://bugs.webkit.org/show_bug.cgi?id=127596
1393
1394         Reviewed by Andreas Kling.
1395
1396         * WebProcess/WebPage/mac/WebPageMac.mm:
1397         (WebKit::WebPage::performNonEditingBehaviorForSelector):
1398
1399 2014-01-24  Jinwoo Song  <jinwoo7.song@samsung.com>
1400
1401         Unreviewed build fix attemp on the EFL after r162728.
1402
1403         * CMakeLists.txt: Removed WebLoaderClient.cpp
1404
1405 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
1406
1407         Prepare scrolling tree to handle > 1 scrolling node
1408         https://bugs.webkit.org/show_bug.cgi?id=127590
1409
1410         Reviewed by Tim Horton.
1411         
1412         Clean up the code path called after the ScrollingTree has scrolled a node,
1413         to prepare for multiple scrolling nodes.
1414         
1415         Change "updateMainFrameScrollPosition" terminology to "updateScrollPositionAfterAsyncScroll",
1416         and pass along the ScrollingNodeID that scrolled.
1417
1418         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
1419         (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
1420         * UIProcess/Scrolling/RemoteScrollingTree.h:
1421         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
1422         (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
1423
1424 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
1425
1426         #ifdef out handleWheelEventPhase for iOS
1427         https://bugs.webkit.org/show_bug.cgi?id=127583
1428
1429         Reviewed by Tim Horton.
1430
1431         handleWheelEventPhase() doesn't make any sense for iOS, which
1432         has no wheel events.
1433
1434         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
1435         * UIProcess/Scrolling/RemoteScrollingTree.h:
1436
1437 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
1438
1439         Push a custom fixed position rect down to the WebProcess in iOS WK2
1440         https://bugs.webkit.org/show_bug.cgi?id=127573
1441
1442         Reviewed by Tim Horton.
1443         
1444         Make it possible for WKContentView to specify a custom rect
1445         used to layout fixed position elements on iOS.
1446         
1447         This is computed in WKContentView, and pushed down
1448         through the RemoteLayerTreeDrawingArea, and eventually
1449         pushed onto FrameView.
1450
1451         * UIProcess/API/ios/WKContentView.mm:
1452         (-[WKContentView fixedPositionRectFromExposedRect:scale:]):
1453         (-[WKContentView _updateFixedPositionRect]):
1454         (-[WKContentView didFinishScrollTo:]):
1455         (-[WKContentView didZoomToScale:]):
1456         * UIProcess/DrawingAreaProxy.cpp:
1457         (WebKit::DrawingAreaProxy::setCustomFixedPositionRect):
1458         * UIProcess/DrawingAreaProxy.h:
1459         * WebProcess/WebPage/DrawingArea.h:
1460         * WebProcess/WebPage/DrawingArea.messages.in:
1461         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1462         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1463         (WebKit::RemoteLayerTreeDrawingArea::setCustomFixedPositionRect):
1464
1465 2014-01-24  Anders Carlsson  <andersca@apple.com>
1466
1467         Get rid of WebLoaderClient
1468         https://bugs.webkit.org/show_bug.cgi?id=127587
1469
1470         Reviewed by Andreas Kling.
1471
1472         Move WebLoaderClient into WKPage.cpp.
1473
1474         * UIProcess/API/C/WKPage.cpp:
1475         (WKPageSetPageLoaderClient):
1476         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1477         (-[WKBrowsingContextController setLoadDelegate:]):
1478         * UIProcess/WebLoaderClient.cpp: Removed.
1479         * UIProcess/WebLoaderClient.h: Removed.
1480         * UIProcess/WebPageProxy.h:
1481         * WebKit2.xcodeproj/project.pbxproj:
1482
1483 2014-01-24  Brady Eidson  <beidson@apple.com>
1484
1485         IDB: Support createIndex/deleteIndex
1486         <rdar://problem/15779642> and https://bugs.webkit.org/show_bug.cgi?id=127585
1487
1488         Reviewed by Tim Horton.
1489
1490         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1491         (WebKit::UniqueIDBDatabase::createIndex):
1492         (WebKit::UniqueIDBDatabase::deleteIndex):
1493         (WebKit::UniqueIDBDatabase::createIndexInBackingStore):
1494         (WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
1495
1496         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1497         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1498         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore): Also drop all associated indexes.
1499         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
1500         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
1501         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1502
1503 2014-01-24  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1504
1505         [GTK] youtube HTML5 videos in fullscreen, after <Esc>, can't go fullscreen again
1506         https://bugs.webkit.org/show_bug.cgi?id=127064
1507
1508         When pressing <Esc> or <f> at full screen, the WebView shall emit the
1509         event webkitfullscreenchange, but wk2gtk does not emit it. This is
1510         because the WebView manages directly the exit of the full screen.
1511
1512         With this patch the WebView calls requestExitFullScreen to the full
1513         screen manager, instead of managing directly the exit of the full
1514         screen, and the event webkitfullscreenchange will be dispatched
1515         correctly.
1516
1517         Reviewed by Martin Robinson.
1518
1519         No tests are included because there is a bug in WKTR that prevents the
1520         execution of a test for this patch. See
1521         https://bugs.webkit.org/show_bug.cgi?id=127348
1522
1523         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1524         (webkitWebViewBaseKeyPressEvent): Call
1525         webkitWebViewBaseRequestExitFullScreen.
1526         (webkitWebViewBaseRequestExitFullScreen): Added.
1527         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Ditto.
1528
1529 2014-01-24  Tim Horton  <timothy_horton@apple.com>
1530
1531         iOS build fix after r162710.
1532
1533         This is why these sorts of comments are bad.
1534
1535         * UIProcess/WebPageProxy.cpp:
1536
1537 2014-01-24  Anders Carlsson  <andersca@apple.com>
1538
1539         Use a side table to map WebPageProxy objects to WKBrowsingContextController objects
1540         https://bugs.webkit.org/show_bug.cgi?id=127577
1541
1542         Reviewed by Tim Horton.
1543
1544         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1545         (browsingContextControllerMap):
1546         (-[WKBrowsingContextController dealloc]):
1547         (-[WKBrowsingContextController _initWithPageRef:]):
1548         (+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
1549         * UIProcess/API/Cocoa/WKBrowsingContextControllerInternal.h:
1550         * UIProcess/WebPageProxy.h:
1551
1552 2014-01-24  Tim Horton  <timothy_horton@apple.com>
1553
1554         iOS build fix after r162710.
1555
1556         * UIProcess/API/ios/PageClientImplIOS.h:
1557         * UIProcess/API/ios/PageClientImplIOS.mm:
1558         (WebKit::PageClientImpl::takeViewSnapshot):
1559
1560 2014-01-24  Enrique Ocaña González  <eocanha@igalia.com>
1561
1562         [GTK] Put cache files in XDG_CACHE_HOME
1563         https://bugs.webkit.org/show_bug.cgi?id=123458
1564
1565         Reviewed by Martin Robinson.
1566
1567         * UIProcess/gtk/WebContextGtk.cpp:
1568         (WebKit::WebContext::platformDefaultIconDatabasePath):
1569
1570 2014-01-24  Tim Horton  <timothy_horton@apple.com>
1571
1572         WebKit2 View Gestures (Swipe): Add a simple cache of view snapshots
1573         https://bugs.webkit.org/show_bug.cgi?id=127438
1574
1575         Reviewed by Sam Weinig.
1576
1577         Add a cache of bitmap snapshots of the WKView, taken via OS X's window server
1578         snapshotting mechanism. For now, we store all snapshots; refinements to the
1579         caching strategy (or really having one at all) will come in future patches.
1580
1581         Snapshots are stored in a side map, with a UUID that allows references
1582         to be stored inside WebBackForwardListItem (and serialized along with
1583         the back-forward list when it is copied).
1584
1585         * Shared/WebBackForwardListItem.h:
1586         (WebKit::WebBackForwardListItem::setSnapshotUUID):
1587         (WebKit::WebBackForwardListItem::snapshotUUID):
1588         * UIProcess/cf/WebBackForwardListCF.cpp:
1589         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
1590         (WebKit::extractBackForwardListEntriesFromArray):
1591         Store and serialize a UUID along with each back-forward list item which
1592         identifies that item's view snapshot in the ViewSnapshotStore.
1593
1594         * UIProcess/cf/WebPageProxyCF.cpp:
1595         Bump the session state data version, as we changed the WebBackForwardList format.
1596
1597         * UIProcess/API/Cocoa/WKViewPrivate.h:
1598         * UIProcess/API/mac/PageClientImpl.h:
1599         * UIProcess/API/mac/PageClientImpl.mm:
1600         (WebKit::PageClientImpl::takeViewSnapshot):
1601
1602         * UIProcess/API/mac/WKView.mm:
1603         (-[WKView _takeViewSnapshot]):
1604         Add _takeViewSnapshot IPI, which is used by ViewSnapshotStore via the PageClient
1605         to take a snapshot of the view.
1606
1607         (-[WKView saveBackForwardSnapshotForCurrentItem]):
1608         Add saveBackForwardSnapshotForCurrentItem SPI, which clients could potentially
1609         use when they know they're about to manipulate the view hierarchy in such a way
1610         that they want the current back-forward item's snapshot to be up to date.
1611
1612         * UIProcess/API/mac/WKViewInternal.h:
1613         * UIProcess/PageClient.h:
1614         * UIProcess/WebPageProxy.cpp:
1615         (WebKit::WebPageProxy::WebPageProxy):
1616         (WebKit::WebPageProxy::recordNavigationSnapshot):
1617         (WebKit::WebPageProxy::goForward):
1618         (WebKit::WebPageProxy::goBack):
1619         (WebKit::WebPageProxy::goToBackForwardItem):
1620         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
1621         Update the current back-forward item's snapshot immediately before navigating.
1622
1623         * UIProcess/WebPageProxy.h:
1624         (WebKit::WebPageProxy::shouldRecordNavigationSnapshots):
1625         (WebKit::WebPageProxy::setShouldRecordNavigationSnapshots):
1626         Expose the ability to enable taking view snapshots on every navigation.
1627         This is off by default, so we won't be taking any snapshots yet.
1628
1629         * UIProcess/mac/ViewSnapshotStore.h: Added.
1630         (WebKit::ViewSnapshotStore::disableSnapshotting):
1631         (WebKit::ViewSnapshotStore::enableSnapshotting):
1632         * UIProcess/mac/ViewSnapshotStore.mm: Added.
1633         (WebKit::ViewSnapshotStore::ViewSnapshotStore):
1634         (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
1635         (WebKit::ViewSnapshotStore::shared):
1636         (WebKit::ViewSnapshotStore::recordSnapshot):
1637         (WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize):
1638         * UIProcess/mac/WebPageProxyMac.mm:
1639         (WebKit::WebPageProxy::takeViewSnapshot):
1640         * WebKit2.xcodeproj/project.pbxproj:
1641
1642 2014-01-24  Brady Eidson  <beidson@apple.com>
1643
1644         IDB: support createIndex/deleteIndex messaging
1645         https://bugs.webkit.org/show_bug.cgi?id=127546
1646
1647         Reviewed by Tim Horton.
1648
1649         Message create/delete requests over to the DatabaseProcess, and listen to its replies:
1650         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1651         (WebKit::WebIDBServerConnection::createIndex):
1652         (WebKit::WebIDBServerConnection::didCreateIndex):
1653         (WebKit::WebIDBServerConnection::deleteIndex):
1654         (WebKit::WebIDBServerConnection::didDeleteIndex):
1655         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1656         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
1657
1658         Pass create/delete requests to the appropriate unique IDB database:
1659         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1660         (WebKit::DatabaseProcessIDBConnection::createIndex):
1661         (WebKit::DatabaseProcessIDBConnection::deleteIndex):
1662         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1663         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1664
1665         Message the create/delete request to the database thread for the backing store to handle:
1666         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1667         (WebKit::UniqueIDBDatabase::didCreateIndex):
1668         (WebKit::UniqueIDBDatabase::didDeleteIndex):
1669         (WebKit::UniqueIDBDatabase::createIndex):
1670         (WebKit::UniqueIDBDatabase::deleteIndex):
1671         (WebKit::UniqueIDBDatabase::createIndexInBackingStore):
1672         (WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
1673         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1674
1675         * Scripts/webkit2/messages.py:
1676         (struct_or_class):
1677
1678 2014-01-24  Csaba Osztrogonác  <ossy@webkit.org>
1679
1680         [EFL][WK2] Debug buildfix
1681         https://bugs.webkit.org/show_bug.cgi?id=127496
1682
1683         Reviewed by Gyuyoung Kim.
1684
1685         * Shared/SessionTracker.cpp:
1686
1687 2014-01-23  Brady Eidson  <beidson@apple.com>
1688
1689         IDB: Support IDBObjectStore.clear()
1690         https://bugs.webkit.org/show_bug.cgi?id=127541
1691
1692         Reviewed by Anders Carlsson.
1693
1694         Make the WebProcess call out to the DatabaseProcess with a clear request, and handle the
1695         response from the DatabaseProcess:
1696         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1697         (WebKit::WebIDBServerConnection::clearObjectStore):
1698         (WebKit::WebIDBServerConnection::didClearObjectStore):
1699         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1700         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
1701
1702         Pass the clear request to the appropriate UniqueIDBDatabase:
1703         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1704         (WebKit::DatabaseProcessIDBConnection::clearObjectStore):
1705         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1706         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1707
1708         Pass the clear request to the backing store:
1709         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1710         (WebKit::UniqueIDBDatabase::didClearObjectStore):
1711         (WebKit::UniqueIDBDatabase::clearObjectStore):
1712         (WebKit::UniqueIDBDatabase::clearObjectStoreInBackingStore):
1713         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1714
1715         Actually drop the records in the database:
1716         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1717         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1718         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
1719         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1720
1721 2014-01-23  Anders Carlsson  <andersca@apple.com>
1722
1723         Fix crash when opening the inspector
1724         https://bugs.webkit.org/show_bug.cgi?id=127542
1725         <rdar://problem/15899544>
1726
1727         Reviewed by Joseph Pecoraro.
1728
1729         Create default clients so we won't crash if they're never set.
1730
1731         * UIProcess/WebPageProxy.cpp:
1732         (WebKit::WebPageProxy::WebPageProxy):
1733
1734 2014-01-23  Ryuan Choi  <ryuan.choi@samsung.com>
1735
1736         Unreviewed build fix attemp on the EFL and GTK build after r162678
1737
1738         * CMakeLists.txt: Removed WebPolicyClient.cpp
1739         * GNUmakefile.list.am: Removed WebPolicyClient.cpp and WebPolicyClient.h
1740
1741 2014-01-23  Yongjun Zhang  <yongjun_zhang@apple.com>
1742
1743         Support NSInteger argument type for encoding/decoding invocations.
1744         https://bugs.webkit.org/show_bug.cgi?id=127522
1745
1746         Reviewed by Dan Bernstein.
1747
1748         Add support for NSInteger argument type ('q') for remote invocations.
1749
1750         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1751         (encodeInvocation):
1752         (decodeInvocationArguments):
1753
1754 2014-01-23  Brady Eidson  <beidson@apple.com>
1755
1756         IDB: Implement SQLite backing store 'get' support
1757         https://bugs.webkit.org/show_bug.cgi?id=127502
1758
1759         Reviewed by Tim Horton.
1760
1761         This makes get of a single IDBKey work, and lays the groundwork for getting an IDBKeyRange.
1762
1763         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1764         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
1765         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1766
1767         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1768         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Add custom collation
1769           to the Records table.
1770         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata): Install the custom collator.
1771         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
1772         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
1773         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::collate): Collation function to be filled in later.
1774         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1775
1776 2014-01-23  Jon Honeycutt  <jhoneycutt@apple.com>
1777
1778         Assertion failure in WebCore::PseudoElement::didRecalcStyle()
1779         <https://bugs.webkit.org/show_bug.cgi?id=126761>
1780         <rdar://problem/15793540>
1781
1782         Reviewed by Andy Estes.
1783
1784         * WebProcess/WebPage/ios/WebPageIOS.mm:
1785         (WebKit::WebPage::getPositionInformation):
1786         Check isRenderImage() rather than isImage() before casting to
1787         RenderImage.
1788
1789 2014-01-23  Anders Carlsson  <andersca@apple.com>
1790
1791         Move policy client into WKPage.cpp and get rid of WebPolicyClient files
1792         https://bugs.webkit.org/show_bug.cgi?id=127536
1793
1794         Reviewed by Tim Horton.
1795
1796         * UIProcess/API/C/WKPage.cpp:
1797         (WKPageSetPagePolicyClient):
1798         * UIProcess/WebPolicyClient.cpp: Removed.
1799         * UIProcess/WebPolicyClient.h: Removed.
1800         * WebKit2.xcodeproj/project.pbxproj:
1801
1802 2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
1803
1804         Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
1805         https://bugs.webkit.org/show_bug.cgi?id=127409
1806
1807         Reviewed by Geoffrey Garen.
1808
1809         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
1810         (WebKit::WebInspectorFrontendClient::closeWindow):
1811         * WebProcess/WebPage/WebInspector.cpp:
1812         (WebKit::WebInspector::remoteFrontendDisconnected):
1813         Include InspectorDisconnectReason.
1814
1815 2014-01-23  Anders Carlsson  <andersca@apple.com>
1816
1817         Only WKPage should know about WebPolicyClient
1818         https://bugs.webkit.org/show_bug.cgi?id=127535
1819
1820         Reviewed by Andreas Kling.
1821
1822         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1823         (setUpPagePolicyClient):
1824         (-[WKBrowsingContextController setPolicyDelegate:]):
1825         * UIProcess/WebInspectorProxy.cpp:
1826         (WebKit::WebInspectorProxy::createInspectorPage):
1827
1828 2014-01-23  Anders Carlsson  <andersca@apple.com>
1829
1830         Simplify API::LoaderClient management
1831         https://bugs.webkit.org/show_bug.cgi?id=127531
1832
1833         Reviewed by Tim Horton.
1834
1835         Add default implementations to API::LoaderClient and change WebPageProxy::setLoaderClient to
1836         always create a policy client, even if the loader client set is null. That way we don't have to null
1837         check the loader client everywhere.
1838
1839         * UIProcess/API/APILoaderClient.h:
1840         (API::LoaderClient::didStartProvisionalLoadForFrame):
1841         (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
1842         (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
1843         (API::LoaderClient::didCommitLoadForFrame):
1844         (API::LoaderClient::didFinishDocumentLoadForFrame):
1845         (API::LoaderClient::didFinishLoadForFrame):
1846         (API::LoaderClient::didFailLoadWithErrorForFrame):
1847         (API::LoaderClient::didSameDocumentNavigationForFrame):
1848         (API::LoaderClient::didReceiveTitleForFrame):
1849         (API::LoaderClient::didFirstLayoutForFrame):
1850         (API::LoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
1851         (API::LoaderClient::didRemoveFrameFromHierarchy):
1852         (API::LoaderClient::didDisplayInsecureContentForFrame):
1853         (API::LoaderClient::didRunInsecureContentForFrame):
1854         (API::LoaderClient::didDetectXSSForFrame):
1855         (API::LoaderClient::didLayout):
1856         (API::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
1857         (API::LoaderClient::didReceiveAuthenticationChallengeInFrame):
1858         (API::LoaderClient::didStartProgress):
1859         (API::LoaderClient::didChangeProgress):
1860         (API::LoaderClient::didFinishProgress):
1861         (API::LoaderClient::processDidBecomeUnresponsive):
1862         (API::LoaderClient::interactionOccurredWhileProcessUnresponsive):
1863         (API::LoaderClient::processDidBecomeResponsive):
1864         (API::LoaderClient::processDidCrash):
1865         (API::LoaderClient::didChangeBackForwardList):
1866         (API::LoaderClient::willGoToBackForwardListItem):
1867         (API::LoaderClient::pluginLoadPolicy):
1868         (API::LoaderClient::didFailToInitializePlugin):
1869         (API::LoaderClient::didBlockInsecurePluginVersion):
1870         (API::LoaderClient::webGLLoadPolicy):
1871         * UIProcess/WebPageProxy.cpp:
1872         (WebKit::WebPageProxy::setLoaderClient):
1873         (WebKit::WebPageProxy::didChangeBackForwardList):
1874         (WebKit::WebPageProxy::willGoToBackForwardListItem):
1875         (WebKit::WebPageProxy::findPlugin):
1876         (WebKit::WebPageProxy::didStartProgress):
1877         (WebKit::WebPageProxy::didChangeProgress):
1878         (WebKit::WebPageProxy::didFinishProgress):
1879         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
1880         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
1881         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
1882         (WebKit::WebPageProxy::didCommitLoadForFrame):
1883         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
1884         (WebKit::WebPageProxy::didFinishLoadForFrame):
1885         (WebKit::WebPageProxy::didFailLoadForFrame):
1886         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
1887         (WebKit::WebPageProxy::didReceiveTitleForFrame):
1888         (WebKit::WebPageProxy::didFirstLayoutForFrame):
1889         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
1890         (WebKit::WebPageProxy::didLayout):
1891         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
1892         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
1893         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
1894         (WebKit::WebPageProxy::didDetectXSSForFrame):
1895         (WebKit::WebPageProxy::webGLPolicyForURL):
1896         (WebKit::WebPageProxy::processDidBecomeUnresponsive):
1897         (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
1898         (WebKit::WebPageProxy::processDidBecomeResponsive):
1899         (WebKit::WebPageProxy::processDidCrash):
1900         (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
1901         (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
1902         (WebKit::WebPageProxy::didFailToInitializePlugin):
1903         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
1904
1905 2014-01-23  Anders Carlsson  <andersca@apple.com>
1906
1907         Simplify API::PolicyClient management
1908         https://bugs.webkit.org/show_bug.cgi?id=127529
1909
1910         Reviewed by Tim Horton.
1911
1912         Add default implementations to API::PolicyClient and change WebPageProxy::setPolicyClient to
1913         always create a policy client, even if the policy object set is null. That way we don't have to null
1914         check the policy client everywhere.
1915
1916         * UIProcess/API/APIPolicyClient.h:
1917         (API::PolicyClient::decidePolicyForNavigationAction):
1918         (API::PolicyClient::decidePolicyForNewWindowAction):
1919         (API::PolicyClient::decidePolicyForResponse):
1920         (API::PolicyClient::unableToImplementPolicy):
1921         * UIProcess/WebPageProxy.cpp:
1922         (WebKit::WebPageProxy::setPolicyClient):
1923         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1924         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1925         (WebKit::WebPageProxy::decidePolicyForResponse):
1926         (WebKit::WebPageProxy::unableToImplementPolicy):
1927
1928 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
1929
1930         Fix GTK.
1931
1932         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1933         (webkitWebPageDidReceiveMessage):
1934
1935 2014-01-23  Anders Carlsson  <andersca@apple.com>
1936
1937         Add an APILoaderClient base class
1938         https://bugs.webkit.org/show_bug.cgi?id=127527
1939
1940         Reviewed by Tim Horton.
1941
1942         * UIProcess/API/APILoaderClient.h: Added.
1943         (API::LoaderClient::~LoaderClient):
1944         * UIProcess/API/C/WKPage.cpp:
1945         (WKPageSetPageLoaderClient):
1946         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1947         (setUpPageLoaderClient):
1948         (-[WKBrowsingContextController setLoadDelegate:]):
1949         (+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
1950         * UIProcess/WebLoaderClient.cpp:
1951         (WebKit::WebLoaderClient::WebLoaderClient):
1952         * UIProcess/WebLoaderClient.h:
1953         * UIProcess/WebPageProxy.cpp:
1954         (WebKit::WebPageProxy::setLoaderClient):
1955         (WebKit::WebPageProxy::close):
1956         (WebKit::WebPageProxy::didChangeBackForwardList):
1957         (WebKit::WebPageProxy::willGoToBackForwardListItem):
1958         (WebKit::WebPageProxy::findPlugin):
1959         (WebKit::WebPageProxy::didStartProgress):
1960         (WebKit::WebPageProxy::didChangeProgress):
1961         (WebKit::WebPageProxy::didFinishProgress):
1962         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
1963         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
1964         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
1965         (WebKit::WebPageProxy::didCommitLoadForFrame):
1966         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
1967         (WebKit::WebPageProxy::didFinishLoadForFrame):
1968         (WebKit::WebPageProxy::didFailLoadForFrame):
1969         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
1970         (WebKit::WebPageProxy::didReceiveTitleForFrame):
1971         (WebKit::WebPageProxy::didFirstLayoutForFrame):
1972         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
1973         (WebKit::WebPageProxy::didLayout):
1974         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
1975         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
1976         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
1977         (WebKit::WebPageProxy::didDetectXSSForFrame):
1978         (WebKit::WebPageProxy::webGLPolicyForURL):
1979         (WebKit::WebPageProxy::processDidBecomeUnresponsive):
1980         (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
1981         (WebKit::WebPageProxy::processDidBecomeResponsive):
1982         (WebKit::WebPageProxy::processDidCrash):
1983         (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
1984         (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
1985         (WebKit::WebPageProxy::didFailToInitializePlugin):
1986         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
1987         * UIProcess/WebPageProxy.h:
1988         (WebKit::WebPageProxy::loaderClient):
1989         * WebKit2.xcodeproj/project.pbxproj:
1990
1991 2014-01-23  Ryuan Choi  <ryuan.choi@samsung.com>
1992
1993         Build break after r162650
1994         https://bugs.webkit.org/show_bug.cgi?id=127525
1995
1996         Reviewed by Anders Carlsson.
1997
1998         WKPreferences.h was renamed to WKPreferencesRef.
1999
2000         * UIProcess/API/C/WKPreferences.cpp:
2001
2002 2014-01-23  Anders Carlsson  <andersca@apple.com>
2003
2004         Fix a refactoring bug that crept in and is causing the inspector to crash.
2005
2006         * UIProcess/WebPolicyClient.cpp:
2007         (WebKit::WebPolicyClient::decidePolicyForResponse):
2008
2009 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
2010
2011         Make visibleContentRect() return actualVisibleContentRect() on iOS most of the time
2012         https://bugs.webkit.org/show_bug.cgi?id=127456
2013         
2014         Reviewed by Antti Koivisto.
2015         
2016         On iOS, visibleContentRect() returns the entire document rect for historical
2017         reasons, and actualVisibleContentRect() returns what visibleContentRect()
2018         returns on other platforms.
2019         
2020         In addition, actualVisibleContentRect() was returning an empty rect in WK2.
2021         
2022         Reduce the confusion of #ifdefs by making visibleContentRect() behave like
2023         actualVisibleContentRect() by default on iOS. Where it needs the old behavior,
2024         an optional parameter, LegacyIOSDocumentVisibleRect, provides this.
2025         
2026         Achieve this by having the virtual ScrollableArea::visibleContentRectInternal(),
2027         which is called by non-virtual visibleContentRect() and visibleContentRectIncludingScrollbars().
2028         
2029         Similarly clean up visibleHeight/visibleWidth functions by having visibleSize() be virtual,
2030         with non-virtual visibleHeight() and visibleWidth().
2031         
2032         ScrollableArea subclasses override visibleContentRectInternal() and visibleSize() where necessary.
2033         
2034         Mechanically change all the call sites of actualVisibleContentRect() to
2035         use visibleContentRect(), and the call sites of visibleContentRect()
2036         to visibleContentRect(..., LegacyIOSDocumentVisibleRect), adding comments
2037         where this may not be appropriate.
2038         
2039         Change callers of visibleContentRect(IncludeScrollbars...) to visibleContentRectIncludingScrollbars().
2040         
2041         Also add actualScrollPosition(), and clean up some actualScroll* call sites.
2042         
2043         No behavior change.
2044
2045         * WebProcess/Plugins/PDF/PDFPlugin.h:
2046         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
2047         (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
2048         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
2049         * WebProcess/WebPage/WebFrame.cpp:
2050         (WebKit::WebFrame::visibleContentBounds):
2051         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2052         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
2053         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
2054
2055 2014-01-23  Tim Horton  <timothy_horton@apple.com>
2056
2057         [wk2] Page Overlays: Add API to clear the page overlay (and get rid of its backing store)
2058         https://bugs.webkit.org/show_bug.cgi?id=127518
2059
2060         Reviewed by Anders Carlsson.
2061
2062         Add WKBundlePageOverlayClear, to allow clients of the page overlay API to
2063         manually clear the page overlay's backing store, for memory, power, and performance gains.
2064
2065         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2066         (WKBundlePageOverlayClear):
2067         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
2068         * WebProcess/WebPage/DrawingArea.h:
2069         (WebKit::DrawingArea::clearPageOverlay):
2070         * WebProcess/WebPage/PageOverlay.cpp:
2071         (WebKit::PageOverlay::clear):
2072         * WebProcess/WebPage/PageOverlay.h:
2073         Add WKBundlePageOverlayClear and plumb it through PageOverlay to the DrawingArea.
2074
2075         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2076         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2077         (WebKit::RemoteLayerTreeDrawingArea::clearPageOverlay):
2078         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2079         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2080         (WebKit::TiledCoreAnimationDrawingArea::clearPageOverlay):
2081         Set the layer to drawsContent=false and give it 0x0 size, effectively
2082         removing its backing store.
2083
2084 2014-01-23  Anders Carlsson  <andersca@apple.com>
2085
2086         Explicitly link XPC services with AppKit
2087         https://bugs.webkit.org/show_bug.cgi?id=127520
2088         <rdar://problem/15759718>
2089
2090         Reviewed by Mark Rowe.
2091
2092         Explicitly link XPC services that use the _NSApplicationMain run loop type with AppKit.
2093
2094         * Configurations/PluginService.32.xcconfig:
2095         * Configurations/PluginService.64.xcconfig:
2096         * Configurations/PluginService.Development.xcconfig:
2097         * Configurations/WebContentService.Development.xcconfig:
2098         * Configurations/WebContentService.xcconfig:
2099
2100 2014-01-23  Anders Carlsson  <andersca@apple.com>
2101
2102         Fix build again.
2103
2104         * UIProcess/API/mac/WKView.mm:
2105         (-[WKView _windowDidChangeBackingProperties:]):
2106
2107 2014-01-23  Anders Carlsson  <andersca@apple.com>
2108
2109         Another 32-bit build fix.
2110
2111         * UIProcess/API/mac/WKView.mm:
2112         (-[WKView _windowDidChangeBackingProperties:]):
2113
2114 2014-01-23  Anders Carlsson  <andersca@apple.com>
2115
2116         Clean up WKView.mm a little
2117         https://bugs.webkit.org/show_bug.cgi?id=127517
2118
2119         Reviewed by Tim Horton.
2120
2121         Remove an unused ivar and migrate to API constants that were added in Lion.
2122
2123         * UIProcess/API/mac/WKView.mm:
2124         (-[WKView setFrameSize:]):
2125         (-[WKView addWindowObserversForWindow:]):
2126         (-[WKView removeWindowObservers]):
2127         (-[WKView viewDidMoveToWindow]):
2128         (-[WKView _windowDidMiniaturize:]):
2129         (-[WKView _windowDidResize:]):
2130         (-[WKView _windowDidChangeBackingProperties:]):
2131
2132 2014-01-23  Anders Carlsson  <andersca@apple.com>
2133
2134         Try to fix the 32-bit build.
2135
2136         * UIProcess/API/Cocoa/WKPreferences.mm:
2137
2138 2014-01-23  Anders Carlsson  <andersca@apple.com>
2139
2140         Remove an unneeded synchronous back/forward message
2141         https://bugs.webkit.org/show_bug.cgi?id=127516
2142
2143         Reviewed by Tim Horton.
2144
2145         * UIProcess/WebLoaderClient.cpp:
2146         * UIProcess/WebLoaderClient.h:
2147         * UIProcess/WebPageProxy.cpp:
2148         (WebKit::WebPageProxy::initializeLoaderClient):
2149         * UIProcess/WebPageProxy.h:
2150         * UIProcess/WebPageProxy.messages.in:
2151         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2152         (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
2153         * WebProcess/WebPage/WebPage.cpp:
2154         (WebKit::WebPage::WebPage):
2155         * WebProcess/WebPage/WebPage.h:
2156         * WebProcess/WebPage/WebPage.messages.in:
2157
2158 2014-01-23  Anders Carlsson  <andersca@apple.com>
2159
2160         Rename WKPreferences.h to WKPreferencesRef.h and add a stubbed out WKPreferences class
2161         https://bugs.webkit.org/show_bug.cgi?id=127512
2162
2163         Reviewed by Dan Bernstein.
2164
2165         * UIProcess/API/C/WKAPICast.h:
2166         * UIProcess/API/C/WKPreferencesRef.h: Renamed from Source/WebKit2/UIProcess/API/C/WKPreferences.h.
2167         * UIProcess/API/C/WebKit2_C.h:
2168         * UIProcess/API/Cocoa/WKPreferences.h: Added.
2169         * UIProcess/API/Cocoa/WKPreferences.mm: Added.
2170         * WebKit2.xcodeproj/project.pbxproj:
2171
2172 2014-01-23  Max Vujovic  <mvujovic@adobe.com>
2173
2174         Remove CSS Custom Filters code and tests
2175         https://bugs.webkit.org/show_bug.cgi?id=127382
2176
2177         Reviewed by Simon Fraser.
2178
2179         * CMakeLists.txt:
2180         * Configurations/FeatureDefines.xcconfig:
2181         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2182         (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
2183         (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
2184         (IPC::ArgumentCoder<CoordinatedGraphicsState>::encode):
2185         (IPC::ArgumentCoder<CoordinatedGraphicsState>::decode):
2186         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
2187         * Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.cpp: Removed.
2188         * Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.h: Removed.
2189         * Shared/WebCoreArgumentCoders.cpp:
2190         (IPC::encodeFilterOperation):
2191         (IPC::decodeFilterOperation):
2192         * Shared/WebPreferencesStore.h:
2193         * Shared/mac/RemoteLayerTreeTransaction.mm:
2194         (WebKit::RemoteLayerTreeTextStream::operator<<):
2195         * UIProcess/API/C/WKPreferences.cpp:
2196         * UIProcess/API/C/WKPreferencesPrivate.h:
2197         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2198         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2199         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2200         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
2201         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2202         * WebProcess/WebPage/WebPage.cpp:
2203         (WebKit::WebPage::updatePreferences):
2204         * mac/WebKit2.order:
2205
2206 2014-01-23  Anders Carlsson  <andersca@apple.com>
2207
2208         Add API::PolicyClient base class
2209         https://bugs.webkit.org/show_bug.cgi?id=127509
2210
2211         Reviewed by Tim Horton.
2212
2213         * UIProcess/API/APIPolicyClient.h: Copied from Source/WebKit2/UIProcess/WebPolicyClient.h.
2214         (API::PolicyClient::~PolicyClient):
2215         * UIProcess/API/C/WKPage.cpp:
2216         (WKPageSetPagePolicyClient):
2217         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2218         (setUpPagePolicyClient):
2219         (-[WKBrowsingContextController setPolicyDelegate:]):
2220         * UIProcess/WebInspectorProxy.cpp:
2221         (WebKit::WebInspectorProxy::createInspectorPage):
2222         * UIProcess/WebPageProxy.cpp:
2223         (WebKit::WebPageProxy::setPolicyClient):
2224         (WebKit::WebPageProxy::close):
2225         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2226         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2227         (WebKit::WebPageProxy::decidePolicyForResponse):
2228         (WebKit::WebPageProxy::unableToImplementPolicy):
2229         * UIProcess/WebPageProxy.h:
2230         * UIProcess/WebPolicyClient.cpp:
2231         (WebKit::WebPolicyClient::WebPolicyClient):
2232         (WebKit::WebPolicyClient::decidePolicyForNavigationAction):
2233         (WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
2234         (WebKit::WebPolicyClient::decidePolicyForResponse):
2235         * UIProcess/WebPolicyClient.h:
2236         * WebKit2.xcodeproj/project.pbxproj:
2237
2238 2014-01-23  Anders Carlsson  <andersca@apple.com>
2239
2240         Add init methods that create default configurations
2241         https://bugs.webkit.org/show_bug.cgi?id=127503
2242
2243         Reviewed by Dan Bernstein.
2244
2245         * UIProcess/API/Cocoa/WKProcessClass.mm:
2246         (-[WKProcessClass init]):
2247         * UIProcess/API/Cocoa/WKWebView.mm:
2248         (-[WKWebView initWithFrame:]):
2249
2250 2014-01-23  Brady Eidson  <beidson@apple.com>
2251
2252         IDB: Implement cross-thread and IPC plumbing for 'get' support
2253         https://bugs.webkit.org/show_bug.cgi?id=127501
2254
2255         Reviewed by Anders Carlsson.
2256
2257         Make the WebProcess call out to the DatabaseProcess with a get request, and handle the
2258         response from the DatabaseProcess:
2259         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2260         (WebKit::WebIDBServerConnection::get):
2261         (WebKit::WebIDBServerConnection::didGetRecord):
2262         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2263         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
2264
2265         Get the request from the WebProcess and forward it to the appropriate unique IDB database:
2266         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
2267         (WebKit::DatabaseProcessIDBConnection::getRecord):
2268         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
2269         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
2270
2271         Forward the request to the database thread, and response to the result from that thread:
2272         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2273         (WebKit::UniqueIDBDatabase::getRecord):
2274         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
2275         (WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore):
2276         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2277
2278         IPC and asynchronous request infrastructure:
2279         * Scripts/webkit2/messages.py:
2280         (struct_or_class):
2281
2282         * Shared/AsyncTask.h:
2283         (WebKit::createAsyncTask):
2284
2285         * Shared/WebCoreArgumentCoders.cpp:
2286         (IPC::ArgumentCoder<IDBGetResult>::encode):
2287         (IPC::ArgumentCoder<IDBGetResult>::decode):
2288         (IPC::ArgumentCoder<IDBKeyRangeData>::encode):
2289         (IPC::ArgumentCoder<IDBKeyRangeData>::decode):
2290         * Shared/WebCoreArgumentCoders.h:
2291
2292 2014-01-23  Tim Horton  <timothy_horton@apple.com>
2293
2294         PDFPlugin: Use PDFPlugin even if there's an external plugin installed, if it's blocked
2295         https://bugs.webkit.org/show_bug.cgi?id=127415
2296         <rdar://problem/12482452>
2297
2298         Reviewed by Sam Weinig.
2299
2300         Allow use of PDFPlugin even if an external plugin is installed but blocked.
2301         If an external plugin is installed and not blocked, we will continue to use that.
2302
2303         Inject a context menu item into the PDFPlugin context menu that allows the client
2304         to unblock the plugin and reload the page (via the same mechanism that the
2305         unavailable plugin button uses).
2306
2307         * UIProcess/API/C/WKPageLoaderClient.h:
2308         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2309         (setUpPageLoaderClient):
2310         * UIProcess/WebLoaderClient.cpp:
2311         (WebKit::WebLoaderClient::pluginLoadPolicy):
2312         * UIProcess/WebLoaderClient.h:
2313         * UIProcess/WebPageProxy.cpp:
2314         (WebKit::WebPageProxy::findPlugin):
2315         * UIProcess/WebPageProxy.h:
2316         * UIProcess/WebPageProxy.messages.in:
2317         Add a new PluginLoadPolicy callback for the V4 client with
2318         yet another string out-argument, to allow clients to customize the string
2319         that will appear in the PDFPlugin context menu when it is used in place
2320         of a blocked plugin.
2321
2322         * WebProcess/Plugins/PDF/PDFPlugin.h:
2323         Add setUsedInPlaceOfBlockedPlugin(), which determines whether or not
2324         we should include an item in the PDFPlugin context menu that acts identically
2325         to the unavailable plugin button, allowing the client to potentially unblock
2326         the plugin.
2327
2328         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2329         (-[WKPDFPluginContextMenuTarget initWithPDFPlugin:WebKit::]):
2330         (-[WKPDFPluginContextMenuTarget useBlockedPlugin:]):
2331         Added WKPDFPluginContextMenuTarget, which is the Objective-C object that the
2332         aforementioned context menu item targets.
2333
2334         (WebKit::PDFPlugin::PDFPlugin):
2335         By default, we won't show the extra context menu item.
2336
2337         (WebKit::PDFPlugin::handleContextMenuEvent):
2338         If we were used in place of a blocked plugin, inject our additional context
2339         menu item into the menu. If we were handed a custom string via setUsedInPlaceOfBlockedPlugin,
2340         use that. Otherwise, use the generic string from WebCore's localized strings.
2341
2342         (WebKit::PDFPlugin::openWithPlugin):
2343         Pretend that the user clicked the unavailable plugin button when they click
2344         the injected context menu item.
2345
2346         (WebKit::PDFPlugin::setUsedInPlaceOfBlockedPlugin):
2347
2348         * WebProcess/WebPage/WebPage.cpp:
2349         (WebKit::WebPage::createPlugin):
2350         If we end up with a blocked plugin, but could have used PDFPlugin to display
2351         the content, do so instead of showing the unavailable plugin indicator.
2352
2353         Pass PDFPlugin the custom context menu item title acquired from the client.
2354
2355         (WebKit::WebPage::canPluginHandleResponse):
2356
2357 2014-01-23  Tim Horton  <timothy_horton@apple.com>
2358
2359         [iOS] [WK2] WKContentView has a black background
2360         https://bugs.webkit.org/show_bug.cgi?id=127471
2361         <rdar://problem/12287363>
2362
2363         Reviewed by Sam Weinig.
2364
2365         * UIProcess/API/ios/WKContentView.mm:
2366         (-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
2367         Instead of giving it a (black!) background to make hit-testing work, use CALayer SPI
2368         to tell CA that the whole layer should be treated as opaque when it comes to hit-testing.
2369
2370 2014-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2371
2372         [GLIB] Use GUniquePtr instead of GOwnPtr
2373         https://bugs.webkit.org/show_bug.cgi?id=127431
2374
2375         Reviewed by Martin Robinson.
2376
2377         GUniquePtr is a template alias of std::unique_ptr with a custom
2378         deleter that replaces GOwnPtr. GOwnPtr is still used for the cases
2379         where the output pointer is needed, but it will also be replaced soon.
2380
2381         * Shared/Downloads/soup/DownloadSoup.cpp:
2382         (WebKit::DownloadClient::didReceiveResponse):
2383         * Shared/NativeWebKeyboardEvent.h:
2384         * Shared/NativeWebMouseEvent.h:
2385         * Shared/NativeWebWheelEvent.h:
2386         * Shared/gtk/ArgumentCodersGtk.cpp:
2387         (IPC::encodeGKeyFile):
2388         (IPC::decodeGKeyFile):
2389         (IPC::encode):
2390         (IPC::decode):
2391         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
2392         (webkitContextMenuItemSetSubMenuFromGtkMenu):
2393         * UIProcess/API/gtk/WebKitDownload.cpp:
2394         (webkitDownloadDecideDestination):
2395         (webkitDownloadNotifyProgress):
2396         (webkitDownloadFailed):
2397         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
2398         (webkit_file_chooser_request_select_files):
2399         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
2400         (didReceiveWebViewMessageFromInjectedBundle):
2401         (getInjectedBundleInitializationUserData):
2402         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
2403         (didFailProvisionalLoadWithErrorForFrame):
2404         (didFailLoadWithErrorForFrame):
2405         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2406         (drawPagesForPrintingCompleted):
2407         * UIProcess/API/gtk/WebKitURIRequest.cpp:
2408         (webkit_uri_request_get_http_headers):
2409         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
2410         (webkit_uri_scheme_request_get_scheme):
2411         (webkit_uri_scheme_request_get_path):
2412         * UIProcess/API/gtk/WebKitWebContext.cpp:
2413         (injectedBundleFilename):
2414         (webkit_web_context_set_favicon_database_directory):
2415         * UIProcess/API/gtk/WebKitWebView.cpp:
2416         (webkitWebViewLoadFail):
2417         (webkitWebViewCreateJavaScriptDialog):
2418         (fileChooserDialogResponseCallback):
2419         (webkitWebViewLoadChanged):
2420         (webkitWebViewLoadFailedWithTLSErrors):
2421         (webkitWebViewPopulateContextMenu):
2422         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2423         (webkitWebViewBaseButtonPressEvent):
2424         (webkitWebViewBaseStartDrag):
2425         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
2426         (WebKit::WebInspectorServer::platformResourceForPath):
2427         * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
2428         (WebKit::connectionCallback):
2429         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2430         (WebKit::ProcessLauncher::launchProcess):
2431         * UIProcess/gtk/WebContextGtk.cpp:
2432         (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
2433         (WebKit::WebContext::platformDefaultDatabaseDirectory):
2434         (WebKit::WebContext::platformDefaultIconDatabasePath):
2435         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
2436         (WebKit::WebContext::platformDefaultDiskCacheDirectory):
2437         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2438         (WebKit::contextMenuItemVisibilityChanged):
2439         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2440         (WebKit::WebInspectorProxy::platformInspectedURLChanged):
2441         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
2442         (WebKit::WebPopupMenuProxyGtk::createGtkActionForMenuItem):
2443         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
2444         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2445         (WebKit::WebPage::platformInitialize):
2446         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2447         * WebProcess/gtk/WebProcessMainGtk.cpp:
2448         * WebProcess/soup/WebSoupRequestManager.cpp:
2449         (WebKit::WebSoupRequestManager::send):
2450
2451 2014-01-22  Simon Fraser  <simon.fraser@apple.com>
2452
2453         Surround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
2454         https://bugs.webkit.org/show_bug.cgi?id=127461
2455
2456         Reviewed by Andreas Kling.
2457         
2458         The "fixedVisibleContentRect" code path is only used by platforms
2459         which enabled TILED_BACKING_STORE, so to reduce confusion, surround
2460         this code with #if USE(TILED_BACKING_STORE).
2461
2462         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2463         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2464
2465 2014-01-22  Benjamin Poulain  <bpoulain@apple.com>
2466
2467         Add a minimalistic SPI to control the layout size outside of WKView
2468         https://bugs.webkit.org/show_bug.cgi?id=127403
2469
2470         Reviewed by Sam Weinig.
2471
2472         The API lets a client of WKView force the layout size. Once the size
2473         is set this way, default update is disabled and the client needs to
2474         update the size systematically as needed. This is done to avoid double
2475         layout or flickering.
2476
2477         * UIProcess/API/Cocoa/WKViewPrivate.h:
2478         * UIProcess/API/ios/WKViewIOS.mm:
2479         (-[WKView _frameOrBoundsChanged]):
2480         (-[WKView overrideMinimumLayoutSize:]):
2481
2482 2014-01-22  Jinwoo Song  <jinwoo7.song@samsung.com>
2483
2484         [EFL][WK2] defaultTextEncodingName should be stored as a member variable of EwkSettings
2485         https://bugs.webkit.org/show_bug.cgi?id=127420
2486
2487         Reviewed by Gyuyoung Kim.
2488
2489         As the defaultTextEncodingName is returned as a local WKEinaSharedString variable, 
2490         the stringshared data is de-refed by eina_stringshare_del().
2491         To maintain the reference counter, the defaultTextEncodingName should be stored 
2492         as a member variable of EwkSettings class.
2493
2494         * UIProcess/API/efl/ewk_settings.cpp:
2495         (ewk_settings_encoding_detector_enabled_get): Reordering.
2496         (ewk_settings_default_text_encoding_name_set):
2497         (ewk_settings_default_text_encoding_name_get):
2498         (EwkSettings::setDefaultTextEncodingName):
2499         (EwkSettings::defaultTextEncodingName):
2500         * UIProcess/API/efl/ewk_settings_private.h:
2501         (EwkSettings::EwkSettings): Add m_defaultTextEncodingName and setter/getter methods.
2502
2503 2014-01-22  Enrica Casucci  <enrica@apple.com>
2504
2505         Support WebSelections in WK2 on iOS.
2506         https://bugs.webkit.org/show_bug.cgi?id=127015
2507         <rdar://problem/15211964>
2508
2509         Reviewed by Benjamin Poulain.
2510
2511         This change adds support for text only (non block mode)
2512         selections in non editable content.
2513         The main changes consist in hooking up the new gesture type
2514         and touches to handle selection creation and interaction.
2515         It also includes changes to the way first responder is handled
2516         which includes the implementation of the isEditable method
2517         to allow iOS to know when to show the keyboard.
2518
2519         * Shared/ios/WKGestureTypes.h:
2520         * UIProcess/API/ios/WKInteractionView.mm:
2521         (-[WKInteractionView isEditable]):
2522         (-[WKInteractionView canBecomeFirstResponder]):
2523         (-[WKInteractionView webSelectionRects]):
2524         (-[WKInteractionView _highlightLongPressRecognized:]):
2525         (-[WKInteractionView _singleTapRecognized:]):
2526         (-[WKInteractionView inputAccessoryView]):
2527         (-[WKInteractionView canPerformAction:withSender:]):
2528         (-[WKInteractionView _showDictionary:]):
2529         (toWKGestureType):
2530         (toUIWKGestureType):
2531         (selectionChangedWithGesture):
2532         (selectionChangedWithTouch):
2533         (-[WKInteractionView selectedTextRange]):
2534         (-[WKInteractionView webSelectionAssistant]):
2535         (-[WKInteractionView _startAssistingNode]):
2536         (-[WKInteractionView _stopAssistingNode]):
2537         (-[WKInteractionView _selectionChanged]):
2538         * WebProcess/WebPage/ios/WebPageIOS.mm:
2539         (WebKit::WebPage::selectWithGesture):
2540         (WebKit::WebPage::updateSelectionWithTouches):
2541
2542 2014-01-22  Anders Carlsson  <andersca@apple.com>
2543
2544         WKBrowsingContextController should not be an API wrapper around WebPageProxy
2545         https://bugs.webkit.org/show_bug.cgi?id=127454
2546
2547         Reviewed by Dan Bernstein.
2548
2549         * Shared/Cocoa/APIObject.mm:
2550         (API::Object::newObject):
2551         * Shared/mac/ObjCObjectGraphCoders.mm:
2552         (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
2553         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2554         (-[WKBrowsingContextController _initWithPageRef:]):
2555         (+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
2556         * UIProcess/API/Cocoa/WKBrowsingContextControllerInternal.h:
2557         * UIProcess/API/Cocoa/WKProcessGroup.mm:
2558         (didNavigateWithNavigationData):
2559         (didPerformClientRedirect):
2560         (didPerformServerRedirect):
2561         (didUpdateHistoryTitle):
2562         * UIProcess/API/ios/WKContentView.mm:
2563         (-[WKContentView browsingContextController]):
2564         * UIProcess/API/mac/WKView.mm:
2565         (-[WKView browsingContextController]):
2566         * UIProcess/ios/WebPageProxyIOS.mm:
2567         (WebKit::WebPageProxy::platformInitialize):
2568         * UIProcess/mac/WebPageProxyMac.mm:
2569         (WebKit::WebPageProxy::platformInitialize):
2570
2571 2014-01-22  Myles C. Maxfield  <mmaxfield@apple.com>
2572
2573         Remove CSS3_TEXT_DECORATION define
2574         https://bugs.webkit.org/show_bug.cgi?id=127333
2575
2576         Reviewed by Simon Fraser.
2577
2578         This is required for unprefixing the text-decoration-* CSS properties.
2579
2580         * Configurations/FeatureDefines.xcconfig:
2581
2582 2014-01-22  Gavin Barraclough  <barraclough@apple.com>
2583
2584         Debug mechanism to override process QoS on Mac
2585         https://bugs.webkit.org/show_bug.cgi?id=127455
2586
2587         Reviewed by Anders Carlsson.
2588
2589         * NetworkProcess/NetworkProcess.messages.in:
2590             - added message.
2591         * PluginProcess/PluginProcess.messages.in:
2592             - added message.
2593         * Shared/ChildProcess.h:
2594         * Shared/mac/ChildProcessMac.mm:
2595         (WebKit::ChildProcess::setQOS):
2596             - Added implementation of new message.
2597         * UIProcess/Plugins/PluginProcessProxy.cpp:
2598         (WebKit::PluginProcessProxy::didFinishLaunching):
2599             - SetQOS for the PluginProcess.
2600         * UIProcess/Plugins/PluginProcessProxy.h:
2601         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2602         (WebKit::pluginProcessLatencyQOS):
2603         (WebKit::pluginProcessThroughputQOS):
2604             - read NSUserDefaults.
2605         * UIProcess/WebContext.cpp:
2606         (WebKit::WebContext::ensureNetworkProcess):
2607             - SetQOS for the NetworkProcess.
2608         (WebKit::WebContext::createNewWebProcess):
2609             - SetQOS for the WebProcess.
2610         * UIProcess/WebContext.h:
2611         * UIProcess/mac/WebContextMac.mm:
2612         (WebKit::networkProcessLatencyQOS):
2613         (WebKit::networkProcessThroughputQOS):
2614         (WebKit::webProcessLatencyQOS):
2615         (WebKit::webProcessThroughputQOS):
2616             - read NSUserDefaults.
2617         * WebProcess/WebProcess.messages.in:
2618             - added message.
2619
2620 2014-01-22  David Farler  <dfarler@apple.com>
2621
2622         ASAN builds are broken - missing flags
2623         https://bugs.webkit.org/show_bug.cgi?id=127231
2624
2625         Reviewed by Andy Estes.
2626
2627         Add missing $(ASAN_OTHER_LDFLAGS).
2628         * Configurations/PluginProcessShim.xcconfig:
2629         * Configurations/SecItemShim.xcconfig:
2630         * Configurations/WebKit2.xcconfig:
2631         * Configurations/WebProcessShim.xcconfig:
2632
2633 2014-01-22  Brady Eidson  <beidson@apple.com>
2634
2635         The IDB backing store get() method shouldn't call IDB callbacks directly
2636         https://bugs.webkit.org/show_bug.cgi?id=127453
2637         
2638         Reviewed by Beth Dakin.
2639
2640         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2641         (WebKit::WebIDBServerConnection::get):
2642         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2643
2644 2014-01-22  Martin Hock  <mhock@apple.com>
2645
2646         Enable Session API.
2647         https://bugs.webkit.org/show_bug.cgi?id=127255
2648
2649         Reviewed by Alexey Proskuryakov.
2650
2651         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2652         (WebKit::storageSession):
2653         * NetworkProcess/NetworkResourceLoader.cpp:
2654         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2655         (WebKit::NetworkResourceLoader::start):
2656         * NetworkProcess/NetworkResourceLoader.h:
2657         * NetworkProcess/RemoteNetworkingContext.h:
2658         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2659         (WebKit::RemoteNetworkingContext::storageSession):
2660         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
2661         * Shared/Network/NetworkResourceLoadParameters.cpp:
2662         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
2663         (WebKit::NetworkResourceLoadParameters::encode):
2664         (WebKit::NetworkResourceLoadParameters::decode):
2665         * Shared/Network/NetworkResourceLoadParameters.h:
2666         * Shared/SessionTracker.cpp:
2667         (WebKit::staticSessionMap):
2668         (WebKit::SessionTracker::sessionMap):
2669         (WebKit::SessionTracker::session):
2670         (WebKit::SessionTracker::setSession):
2671         (WebKit::SessionTracker::destroySession):
2672         * Shared/SessionTracker.h:
2673         * UIProcess/API/C/WKPage.cpp:
2674         (WKPageSetSession):
2675         * UIProcess/API/C/WKPage.h:
2676         * UIProcess/API/C/WKSessionRef.cpp:
2677         (WKSessionCreate):
2678         * UIProcess/API/C/WKSessionRef.h:
2679         * UIProcess/WebPageProxy.cpp:
2680         (WebKit::WebPageProxy::WebPageProxy):
2681         (WebKit::WebPageProxy::setSession):
2682         * UIProcess/WebPageProxy.h:
2683         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2684         (WebKit::WebResourceLoadScheduler::scheduleLoad):
2685         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2686         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
2687         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2688         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2689         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
2690         (WebKit::WebFrameNetworkingContext::storageSession):
2691         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2692         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2693         * WebProcess/WebPage/WebFrame.cpp:
2694         (WebKit::WebFrame::startDownload):
2695         * WebProcess/WebPage/WebPage.cpp:
2696         (WebKit::WebPage::WebPage):
2697         (WebKit::WebPage::sessionID):
2698         (WebKit::WebPage::updatePreferences):
2699         * WebProcess/WebPage/WebPage.h:
2700         (WebKit::WebPage::setSessionID):
2701         * WebProcess/WebPage/WebPage.messages.in:
2702
2703 2014-01-21  Brady Eidson  <beidson@apple.com>
2704
2705         IDB: "Put" support
2706         <rdar://problem/15779643> and https://bugs.webkit.org/show_bug.cgi?id=127401
2707
2708         Reviewed by Alexey Proskuryakov.
2709
2710         Ship putRecord requests over to the DatabaseProcess, and listen for completion from the DatabaseProcess:
2711         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2712         (WebKit::WebIDBServerConnection::put):
2713         (WebKit::WebIDBServerConnection::didPutRecord):
2714         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2715         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
2716
2717         Pass off the putRecord request to the Unique IDBDatabase:
2718         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
2719         (WebKit::DatabaseProcessIDBConnection::putRecord):
2720         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
2721         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
2722
2723         Pass off the putRecord request to the backing store:
2724         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2725         (WebKit::UniqueIDBDatabase::putRecord):
2726         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
2727         (WebKit::UniqueIDBDatabase::didPutRecordInBackingStore):
2728         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2729
2730         Add backing store methods related to putRecord, though only one is critical right now:
2731         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
2732         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2733         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
2734         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKey):
2735         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
2736         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
2737         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGenerator):
2738         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
2739
2740         Add the IDBKeyData type to IPC:
2741         * Scripts/webkit2/messages.py:
2742         (struct_or_class):
2743
2744         * Shared/WebCoreArgumentCoders.cpp:
2745         (IPC::ArgumentCoder<IDBKeyData>::encode):
2746         (IPC::ArgumentCoder<IDBKeyData>::decode):
2747         * Shared/WebCoreArgumentCoders.h:
2748
2749         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
2750         (WebKit::serializeIDBKey):
2751         * DatabaseProcess/IndexedDB/IDBSerialization.h:
2752
2753         Implement more cross-thread copying:
2754         * Shared/WebCrossThreadCopier.cpp:
2755         (WebCore::Vector<uint8_t>>::copy):
2756         (WebCore::Vector<Vector<IDBKeyData>>>::copy):
2757         (WebCore::ASCIILiteral>::copy):
2758         * Shared/WebCrossThreadCopier.h:
2759
2760         Implement more numbers of generic AsyncTask templates:
2761         * Shared/AsyncTask.h:
2762         (WebKit::createAsyncTask):
2763
2764 2014-01-22  Anders Carlsson  <andersca@apple.com>
2765
2766         WKProcessClass should create a WebContext
2767         https://bugs.webkit.org/show_bug.cgi?id=127449
2768         <rdar://problem/15885582>
2769
2770         Reviewed by Dan Bernstein.
2771
2772         * Shared/Cocoa/APIObject.mm:
2773         (API::Object::newObject):
2774         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
2775         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2776         * UIProcess/API/Cocoa/WKProcessClass.mm:
2777         (-[WKProcessClass initWithConfiguration:]):
2778         (-[WKProcessClass dealloc]):
2779         (-[WKProcessClass API::]):
2780         * UIProcess/API/Cocoa/WKProcessClassInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroupInternal.h.
2781         (WebKit::wrapper):
2782         * UIProcess/API/Cocoa/WKProcessGroup.mm:
2783         (-[WKProcessGroup initWithInjectedBundleURL:]):
2784         * UIProcess/API/ios/WKContentView.mm:
2785         (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
2786         * WebKit2.xcodeproj/project.pbxproj:
2787
2788 2014-01-22  Tim Horton  <timothy_horton@apple.com>
2789
2790         Crashes in DrawingAreaProxy::setExposedRect (null DrawingAreaProxy)
2791         https://bugs.webkit.org/show_bug.cgi?id=127445
2792
2793         Reviewed by Anders Carlsson.
2794
2795         * UIProcess/API/ios/WKContentView.mm:
2796         (-[WKContentView _updateViewExposedRect]):
2797         * UIProcess/API/mac/WKView.mm:
2798         (-[WKView _updateViewExposedRect]):
2799         Null-check.
2800
2801 2014-01-22  Anders Carlsson  <andersca@apple.com>
2802
2803         Add WKWebView class
2804         https://bugs.webkit.org/show_bug.cgi?id=127444
2805         <rdar://problem/15884418>
2806
2807         Reviewed by Dan Bernstein.
2808
2809         * UIProcess/API/Cocoa/WKWebView.h: Added.
2810         * UIProcess/API/Cocoa/WKWebView.mm: Added.
2811         (-[WKWebView initWithFrame:configuration:]):
2812         (-[WKWebView configuration]):
2813         * WebKit2.xcodeproj/project.pbxproj:
2814
2815 2014-01-22  Anders Carlsson  <andersca@apple.com>
2816
2817         Fix 32-bit build.
2818
2819         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2820
2821 2014-01-22  Tim Horton  <timothy_horton@apple.com>
2822
2823         [wk2] Scroll pinning state is wrong until the first scroll event
2824         https://bugs.webkit.org/show_bug.cgi?id=127437
2825
2826         Reviewed by Simon Fraser.
2827
2828         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2829         (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
2830         * WebProcess/WebPage/WebPage.cpp:
2831         (WebKit::WebPage::updateMainFrameScrollOffsetPinning):
2832         (WebKit::WebPage::didCommitLoad):
2833         * WebProcess/WebPage/WebPage.h:
2834         Rename WebPage::didChangeScrollOffsetForMainFrame to
2835         updateMainFrameScrollOffsetPinning, which better describes what it
2836         actually does. Call it when a load is committed, so that we have valid
2837         pinning state before the first scroll event comes in.
2838
2839 2014-01-22  Anders Carlsson  <andersca@apple.com>
2840
2841         Add WKWebViewConfiguration class
2842         https://bugs.webkit.org/show_bug.cgi?id=127436
2843         <rdar://problem/15882923>
2844
2845         Reviewed by Tim Horton.
2846
2847         * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Added.
2848         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Added.
2849         (-[WKWebViewConfiguration copyWithZone:]):
2850         * WebKit2.xcodeproj/project.pbxproj:
2851
2852 2014-01-22  Alice Barraclough  <alice.liu@apple.com>
2853
2854         [WK2] add cocoa API for private browsing setting
2855         https://bugs.webkit.org/show_bug.cgi?id=127391
2856
2857         Reviewed by Sam Weinig.
2858
2859         * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
2860         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
2861         (-[WKBrowsingContextGroup privateBrowsingEnabled]):
2862         (-[WKBrowsingContextGroup setPrivateBrowsingEnabled:]):
2863         Adding some API for the private Browsing setting. Reaches through
2864         to the WKPageGroup's preferences.
2865
2866 2014-01-22  Anders Carlsson  <andersca@apple.com>
2867
2868         Add WKProcessClass class
2869         https://bugs.webkit.org/show_bug.cgi?id=127433
2870         <rdar://problem/15882582>
2871
2872         Reviewed by Dan Bernstein.
2873
2874         Add a stubbed out WKProcessClass class.
2875
2876         * Shared/API/Cocoa/WKFoundation.h:
2877         * UIProcess/API/Cocoa/WKProcessClass.h: Added.
2878         * UIProcess/API/Cocoa/WKProcessClass.mm: Added.
2879         (-[WKProcessClass initWithConfiguration:]):
2880         (-[WKProcessClass configuration]):
2881         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
2882         * WebKit2.xcodeproj/project.pbxproj:
2883
2884 2014-01-22  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2885
2886         [EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled
2887         https://bugs.webkit.org/show_bug.cgi?id=127119
2888
2889         Reviewed by Mario Sanchez Prada.
2890
2891         Guarding ACCESSIBILITY code with HAVE(ACCESSIBILITY).
2892
2893         * WebProcess/WebPage/WebPage.cpp:
2894         (WebKit::WebPage::WebPage):
2895         * WebProcess/WebPage/WebPage.h:
2896         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2897         (WebKit::WebPage::platformInitialize):
2898
2899 2014-01-22  Martin Robinson  <mrobinson@igalia.com>
2900
2901         [GTK][CMake] Add support for building the NetworkProcess
2902         https://bugs.webkit.org/show_bug.cgi?id=127195
2903
2904         Reviewed by Daniel Bates.
2905
2906         * CMakeLists.txt: Add shared network process build instructions.
2907         * PlatformEfl.cmake: Move build instructions to the platform-independent file.
2908         * PlatformGTK.cmake: Add some files to the source lists.
2909
2910 2014-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2911
2912         REGRESSION(r162441): [GTK] ResourceLoader is broken when there aren't user extensions
2913         https://bugs.webkit.org/show_bug.cgi?id=127422
2914
2915         Reviewed by Anders Carlsson.
2916
2917         * WebProcess/gtk/WebGtkExtensionManager.cpp:
2918         (WebKit::WebGtkExtensionManager::initialize): Always create the
2919         WebKitWebExtension object since it's used internally to implement
2920         the ResourceLoader client.
2921
2922 2014-01-22  Jer Noble  <jer.noble@apple.com>
2923
2924         [Mac][WK2] Unable to play video protected by session cookies
2925         https://bugs.webkit.org/show_bug.cgi?id=127207
2926
2927         Reviewed by Sam Weinig.
2928
2929         Recent changes in our underlying media frameworks caused our shimmed methods
2930         in CookieStorageShim to stop being called. Insert an objective-c shim in addition
2931         to our original shim to intercept pulling cookies out of cookie storage.
2932
2933         * Shared/mac/CookieStorageShim.mm: Renamed from Source/WebKit2/Shared/mac/CookieStorageShim.cpp.
2934         (WebKit::CookieStorageShim::initialize): Insert the shim.
2935         (-[WKNSURLSessionLocal _copyCookiesForRequestUsingAllAppropriateStorageSemantics:]):
2936             Pass through to webKitCookieStorageCopyRequestHeaderFieldsForURL().
2937         * WebKit2.xcodeproj/project.pbxproj: Rename CookieStorageShim.cpp -> .mm.
2938
2939 2014-01-22  Yongjun Zhang  <yongjun_zhang@apple.com>
2940
2941         https://bugs.webkit.org/show_bug.cgi?id=127380
2942         Add more methods to WKWebProcessPlugInNodeHandle.
2943
2944         Reviewed by Sam Weinig.
2945
2946         Add a static method that creates a WKWebProcessPlugInNodeHandle from a JSValue* and a JSContext*.  Also
2947         add a method to return the iframe's content frame from a WKWebProcessPlugInNodeHandle.
2948  
2949         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
2950         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
2951         (+[WKWebProcessPlugInNodeHandle nodeHandleWithJSValue:inContext:]):
2952         (-[WKWebProcessPlugInNodeHandle htmlIFrameElementContentFrame]):
2953
2954 2014-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2955
2956         Unreviewed. Fix GTK+ build with CUSTOM_PROTOCOL enabled after r162449.
2957
2958         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h:
2959         Use override instead of OVERRIDE.
2960
2961 2014-01-22  Koop Mast <kwm@FreeBSD.org>
2962
2963         Build fixes for FreeBSD.
2964         https://bugs.webkit.org/show_bug.cgi?id=126779
2965
2966         Reviewed by Csaba Osztrogonác.
2967
2968         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
2969         (WebKit::PluginProcessProxy::scanPlugin):
2970
2971 2014-01-22  Jinwoo Song  <jinwoo7.song@samsung.com>
2972
2973         [EFL][WK2] Use std::function in the rest of EFL's WorkQueue implementation
2974         https://bugs.webkit.org/show_bug.cgi?id=127397
2975
2976         Reviewed by Anders Carlsson.
2977
2978         Move to using std::function and move semantics in WorkQueue::registerSocketEventHandler
2979         and DispatchQueue::setSocketEventHandler.
2980
2981         * Platform/IPC/unix/ConnectionUnix.cpp:
2982         (IPC::Connection::open):
2983         * Platform/WorkQueue.h:
2984         * Platform/efl/DispatchQueueEfl.cpp:
2985         (DispatchQueue::setSocketEventHandler):
2986         * Platform/efl/DispatchQueueEfl.h:
2987         * Platform/efl/WorkQueueEfl.cpp:
2988         (WorkQueue::registerSocketEventHandler):
2989
2990 2014-01-21  Tim Horton  <timothy_horton@apple.com>
2991
2992         [wk2] De-.get()ify receivers of Objective-C messages
2993         https://bugs.webkit.org/show_bug.cgi?id=127398
2994
2995         Reviewed by Sam Weinig.
2996
2997         RetainPtr does the right thing when you use it as the
2998         receiver of an Obj-C message, so we don't need .get().
2999
3000         Long and useless file list elided.
3001
3002 2014-01-21  Brady Eidson  <beidson@apple.com>
3003
3004         The IDB backing store put() method shouldn't call IDB callbacks directly
3005         https://bugs.webkit.org/show_bug.cgi?id=127399
3006
3007         Reviewed by Beth Dakin.
3008
3009         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3010         (WebKit::WebIDBServerConnection::put):
3011         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
3012
3013 2014-01-21  Anders Carlsson  <andersca@apple.com>
3014
3015         Fix 32-bit build.
3016
3017         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
3018
3019 2014-01-21  Jinwoo Song  <jinwoo7.song@samsung.com>
3020
3021         [EFL][WK2] Use nanoseconds in TimerWorkItem class consistently
3022         https://bugs.webkit.org/show_bug.cgi?id=127263
3023
3024         Reviewed by Gyuyoung Kim.
3025
3026         After r162276 and r162300, TimerWorkItem is getting nanoseconds as parameter.
3027         So it would be better to use nanoseconds in TimerWorkItem for consistency.
3028
3029         * Platform/efl/DispatchQueueEfl.cpp:
3030         (DispatchQueue::performTimerWork):
3031         (DispatchQueue::insertTimerWorkItem):
3032         (DispatchQueue::getNextTimeOut):
3033         * Platform/efl/DispatchQueueWorkItemEfl.h:
3034         (TimerWorkItem::create):
3035         (TimerWorkItem::expirationTimeNanoSeconds):
3036         (TimerWorkItem::hasExpired):
3037         (TimerWorkItem::TimerWorkItem):
3038
3039 2014-01-21  Tim Horton  <timothy_horton@apple.com>
3040
3041         Don't copy ViewGestureGeometryCollector.messages.in into the WebProcess bundle.
3042
3043         Reviewed by Simon Fraser.
3044
3045         * WebKit2.xcodeproj/project.pbxproj:
3046
3047 2014-01-21  Anders Carlsson  <andersca@apple.com>
3048
3049         Add a WKProcessClassConfiguration class
3050         https://bugs.webkit.org/show_bug.cgi?id=127378
3051         <rdar://problem/15875413>
3052
3053         Reviewed by Dan Bernstein.
3054
3055         * UIProcess/API/Cocoa/WKProcessClassConfiguration.h: Added.
3056         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm: Added.
3057         (-[WKProcessClassConfiguration copyWithZone:]):
3058         * UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h: Added.
3059         * WebKit2.xcodeproj/project.pbxproj:
3060
3061 2014-01-21  Tim Horton  <timothy_horton@apple.com>
3062
3063         Make ViewGestureController Obj-C++
3064         https://bugs.webkit.org/show_bug.cgi?id=127385
3065
3066         Reviewed by Dean Jackson.
3067
3068         * UIProcess/mac/ViewGestureController.mm: Renamed from Source/WebKit2/UIProcess/mac/ViewGestureController.cpp.
3069         * WebKit2.xcodeproj/project.pbxproj:
3070
3071 2014-01-21  Anders Carlsson  <andersca@apple.com>
3072
3073         Make all the WebKit2 headers private and move Cocoa UIProcess API headers to a Deprecated group
3074         https://bugs.webkit.org/show_bug.cgi?id=127374
3075
3076         Reviewed by Dan Bernstein.
3077
3078         * WebKit2.xcodeproj/project.pbxproj:
3079
3080 2014-01-21  Commit Queue  <commit-queue@webkit.org>
3081
3082         Unreviewed, rolling out r162452.
3083         http://trac.webkit.org/changeset/162452
3084         https://bugs.webkit.org/show_bug.cgi?id=127366
3085
3086         broke a few tests on all Mac WebKit1 bots (Requested by
3087         thorton on #webkit).
3088
3089         * WebProcess/WebPage/WebPage.cpp:
3090         (WebKit::WebPage::WebPage):
3091         (WebKit::WebPage::setActive):
3092         (WebKit::WebPage::setViewIsVisible):
3093         (WebKit::WebPage::setFocused):
3094         (WebKit::WebPage::setIsInWindow):
3095         (WebKit::WebPage::setViewStateInternal):
3096         (WebKit::WebPage::setIsVisuallyIdle):
3097         * WebProcess/WebPage/WebPage.h:
3098
3099 2014-01-21  Martin Hock  <mhock@apple.com>
3100
3101         Trivial Session API cleanup.
3102         https://bugs.webkit.org/show_bug.cgi?id=127356
3103
3104         Reviewed by Alexey Proskuryakov.
3105
3106         * UIProcess/API/C/WKSessionRef.cpp:
3107         (WKSessionIsEphemeral):
3108         * UIProcess/API/C/WKSessionRef.h:
3109
3110 2014-01-16  Simon Fraser  <simon.fraser@apple.com>
3111
3112         Log an error for a common cause of WebProcess early launch crashing in misconfigured development builds
3113         https://bugs.webkit.org/show_bug.cgi?id=127121
3114
3115         Reviewed by Anders Carlsson.
3116         
3117         A common cause of early WebProcess crashes during development is a null return
3118         from CFBundleGetValueForInfoDictionaryKey(), so log and return an error in
3119         this case rather than passing a null C string to dlsym().
3120
3121         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
3122         (WebKit::BootstrapMain):
3123
3124 2014-01-21  Tim Horton  <timothy_horton@apple.com>
3125
3126         Sort headers after the rename that happened in r162454.
3127
3128         * UIProcess/mac/RemoteLayerTreeHost.mm:
3129         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
3130
3131 2014-01-21  Tim Horton  <timothy_horton@apple.com>
3132
3133         Address late review naming comments after r162453.
3134
3135         * UIProcess/API/mac/WKView.mm:
3136         And, fix the build by adding an include I accidentally missed.
3137
3138         * UIProcess/mac/RemoteLayerTreeHost.mm:
3139         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
3140
3141 2014-01-21  Tim Horton  <timothy_horton@apple.com>
3142
3143         Keep CALayer implicit animation disabling code in a single place
3144         https://bugs.webkit.org/show_bug.cgi?id=127355
3145
3146         Reviewed by Simon Fraser.
3147
3148         * Shared/mac/RemoteLayerTreePropertyApplier.h:
3149         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
3150         Remove disableActionsForLayer.
3151
3152         * UIProcess/API/mac/WKView.mm:
3153         (-[WKView _rootLayer]):
3154         Disable actions on the root layer. It doesn't need them, and currently
3155         isn't affected by implicit animations, but future patches which animate
3156         the root layer will benefit from this.
3157
3158         * UIProcess/mac/RemoteLayerTreeHost.mm:
3159         (WebKit::RemoteLayerTreeHost::createLayer):
3160         Use web_disableAllActions instead of disableActionsForLayer.
3161
3162         * WebKit2.xcodeproj/project.pbxproj:
3163         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp.
3164         (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
3165         (PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom):
3166         (PlatformCALayerRemoteCustom::hostingContextID):
3167         Use web_disableAllActions instead of disableActionsForLayer.
3168         This requires making this file Obj-C++ but that's OK since it's Mac/iOS only.
3169
3170 2014-01-21  Gavin Barraclough  <barraclough@apple.com>
3171
3172         Change Page, FocusController to use ViewState
3173         https://bugs.webkit.org/show_bug.cgi?id=126533
3174
3175         Reviewed by Tim Horton.
3176
3177         These classes currently maintain a set of separate fields to represent the view state;
3178         combine these into a single field, and allow WebPage to send the combined update rather
3179         than individual changes.
3180
3181         Maintain existing interface for WebKit1 clients.
3182
3183         * WebProcess/WebPage/WebPage.cpp:
3184         (WebKit::WebPage::WebPage):
3185             - Combined separate calls to Page::setViewState.
3186         (WebKit::WebPage::updateIsInWindow):
3187             - Simplied from setIsInWindow.
3188         (WebKit::WebPage::setViewState):
3189             - Combined separate calls to Page::setViewState.
3190         * WebProcess/WebPage/WebPage.h:
3191             - Declare updateIsInWindow.
3192
3193 2014-01-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3194
3195         [SOUP] Implement CUSTOM PROTOCOLS
3196         https://bugs.webkit.org/show_bug.cgi?id=125583
3197
3198         Reviewed by Anders Carlsson.
3199
3200         Add new classes to implement CustomProtocols for soup. The
3201         implementation is the same, but using the CustomProtocol API and
3202         messages. The current implementation can be removed once all ports
3203         using soup switch to using CustomProtocols.
3204
3205         * GNUmakefile.am: Add new include paths.
3206         * GNUmakefile.list.am: Add new files to compilation.
3207         * PlatformGTK.cmake: Add new files to compilation.
3208         * Shared/API/c/soup/WKBaseSoup.h:
3209         * Shared/APIObject.h:
3210         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
3211         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp: Added.
3212         (WebKit::generateCustomProtocolID):
3213         (WebKit::WebSoupRequestAsyncData::WebSoupRequestAsyncData):
3214         (WebKit::WebSoupRequestAsyncData::~WebSoupRequestAsyncData):
3215         (WebKit::WebSoupRequestAsyncData::requestFailed):
3216         (WebKit::WebSoupRequestAsyncData::releaseTask):
3217         (WebKit::CustomProtocolManagerImpl::CustomProtocolManagerImpl):
3218         (WebKit::CustomProtocolManagerImpl::~CustomProtocolManagerImpl):
3219         (WebKit::CustomProtocolManagerImpl::registerScheme):
3220         (WebKit::CustomProtocolManagerImpl::supportsScheme):
3221         (WebKit::CustomProtocolManagerImpl::didFailWithError):
3222         (WebKit::CustomProtocolManagerImpl::didLoadData):
3223         (WebKit::CustomProtocolManagerImpl::didReceiveResponse):
3224         (WebKit::CustomProtocolManagerImpl::didFinishLoading):
3225         (WebKit::CustomProtocolManagerImpl::send):
3226         (WebKit::CustomProtocolManagerImpl::finish):
3227         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h: Added.
3228         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
3229         (WebKit::CustomProtocolManager::CustomProtocolManager):
3230         (WebKit::CustomProtocolManager::initialize):
3231         (WebKit::CustomProtocolManager::registerScheme):
3232         (WebKit::CustomProtocolManager::supportsScheme):
3233         (WebKit::CustomProtocolManager::didFailWithError):
3234         (WebKit::CustomProtocolManager::didLoadData):
3235         (WebKit::CustomProtocolManager::didReceiveResponse):
3236         (WebKit::CustomProtocolManager::didFinishLoading):
3237         * Shared/WebProcessCreationParameters.cpp:
3238         (WebKit::WebProcessCreationParameters::encode):
3239         (WebKit::WebProcessCreationParameters::decode):
3240         * Shared/WebProcessCreationParameters.h:
3241         * UIProcess/API/C/soup/WKAPICastSoup.h:
3242         * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp: Copied from Source/WebKit2/UIProcess/soup/WebContextSoup.cpp.
3243         (WKSoupCustomProtocolRequestManagerGetTypeID):
3244         (WKSoupCustomProtocolRequestManagerSetClient):
3245         * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: Added.
3246         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
3247         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
3248         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
3249         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
3250         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
3251         (WebKit::CustomProtocolManagerProxy::startLoading):
3252         (WebKit::CustomProtocolManagerProxy::stopLoading):
3253         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp: Added.
3254         (WebKit::WebSoupCustomProtocolRequestManager::supplementName):
3255         (WebKit::WebSoupCustomProtocolRequestManager::create):
3256         (WebKit::WebSoupCustomProtocolRequestManager::WebSoupCustomProtocolRequestManager):
3257         (WebKit::WebSoupCustomProtocolRequestManager::~WebSoupCustomProtocolRequestManager):
3258         (WebKit::WebSoupCustomProtocolRequestManager::initializeClient):
3259         (WebKit::WebSoupCustomProtocolRequestManager::contextDestroyed):
3260         (WebKit::WebSoupCustomProtocolRequestManager::processDidClose):
3261         (WebKit::WebSoupCustomProtocolRequestManager::refWebContextSupplement):
3262         (WebKit::WebSoupCustomProtocolRequestManager::derefWebContextSupplement):
3263         (WebKit::WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol):
3264         (WebKit::WebSoupCustomProtocolRequestManager::unregisterSchemeForCustomProtocol):
3265         (WebKit::WebSoupCustomProtocolRequestManager::startLoading):
3266         (WebKit::WebSoupCustomProtocolRequestManager::stopLoading):
3267         (WebKit::WebSoupCustomProtocolRequestManager::didReceiveResponse):
3268         (WebKit::WebSoupCustomProtocolRequestManager::didLoadData):
3269         (WebKit::WebSoupCustomProtocolRequestManager::didFailWithError):
3270         (WebKit::WebSoupCustomProtocolRequestManager::didFinishLoading):
3271         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h: Added.
3272         (WebKit::WebSoupCustomProtocolRequestManager::registeredSchemesForCustomProtocols):
3273         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp: Added.
3274         (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
3275         (WebKit::WebSoupCustomProtocolRequestManagerClient::stopLoading):
3276         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h: Added.
3277         * UIProcess/Network/NetworkProcessProxy.cpp:
3278         (WebKit::NetworkProcessProxy::NetworkProcessProxy):
3279         * UIProcess/WebContext.cpp:
3280         (WebKit::WebContext::WebContext):
3281         * UIProcess/WebPageProxy.cpp:
3282         * UIProcess/WebPageProxy.h:
3283         * UIProcess/WebPageProxy.messages.in:
3284         * UIProcess/WebProcessProxy.cpp:
3285         (WebKit::WebProcessProxy::WebProcessProxy):
3286         * UIProcess/gtk/WebContextGtk.cpp:
3287         (WebKit::WebContext::platformInitializeWebProcess):
3288         * UIProcess/soup/WebContextSoup.cpp:
3289         (WebKit::WebContext::platformInitializeNetworkProcess):
3290         * WebProcess/WebProcess.cpp:
3291         (WebKit::WebProcess::WebProcess):
3292         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
3293         (webkitSoupRequestGenericSendAsync):
3294         (webkitSoupRequestGenericSendFinish):
3295         * WebProcess/soup/WebKitSoupRequestGeneric.h:
3296         * WebProcess/soup/WebProcessSoup.cpp:
3297         (WebKit::WebProcess::platformInitializeWebProcess):
3298
3299 2014-01-21  Adrian Perez de Castro  <aperez@igalia.com>
3300
3301         [GTK] Allow passing extra data to web extensions
3302         https://bugs.webkit.org/show_bug.cgi?id=125990
3303
3304         Reviewed by Carlos Garcia Campos.
3305
3306         Allow passing additional information to the injected bundle. On top
3307         of the string containing the path to the web extensions directory,
3308         a GVariant can be set with additional data using
3309         webkit_web_context_set_web_extensions_initialization_user_data().
3310         Also, a new initialize-web-extensions signal is emitted before
3311         launching a new WebProcess to allow setting different user data
3312         for each process. The GVariant is serialized as a string, passed
3313         to the injected bundle, and the injected bundle deserializes back
3314         the data, which is passed to web extensions which define the
3315         webkit_web_extension_initialize_with_user_data() function (for
3316         backwards compatibility, webkit_web_extension_initialize() is
3317         used as a fallback.)
3318
3319         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
3320         (getInjectedBundleInitializationUserData): Define new callback
3321         function which causes emission of the initialize-web-extensions
3322         signal, and serializes the data to be passed to the web process.
3323         (attachInjectedBundleClientToContext): Set the
3324         getInjectedBundleInitializationUserData() callback.
3325         * UIProcess/API/gtk/WebKitWebContext.cpp:
3326         (webkit_web_context_class_init): Define the
3327         initialize-web-extensions signal.
3328         (webkit_web_context_set_web_extensions_directory):
3329         Web extensions directory as now member of WebKitWebContextPrivate,
3330         to be able to retrieve it later.
3331         (webkit_web_context_set_web_extensions_initialization_user_data):
3332         New API method to set the user data passed to the web extensions
3333         when initialized.
3334         (webkitWebContextInitializeWebExtensions): Private function used
3335         to trigger emission of the initialize-web-extensions signal.
3336         * UIProcess/API/gtk/WebKitWebContext.h:
3337         Added prototype for new API method
3338         webkit_web_context_set_web_extensions_initialization_user_data().
3339         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
3340         Prototype of the new private function.
3341         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3342         Add new public API bits to the documentation.
3343         * WebProcess/gtk/WebGtkExtensionManager.cpp:
3344         (WebKit::WebGtkExtensionManager::initialize):
3345         Deserialize the data received from the UI process and pass it to
3346         webkit_web_extension_initialize_with_user_data() if available,
3347         keeping webkit_web_extension_initialize() as fallback.
3348
3349 2014-01-20  Ryuan Choi  <ryuan.choi@samsung.com>
3350
3351         [EFL][WK2] Move isEwkViewEvasObject back to ewk_view.cpp
3352         https://bugs.webkit.org/show_bug.cgi?id=127261
3353
3354         Reviewed by Gyuyoung Kim.
3355
3356         isEwkViewEvasObject is general check routine of EFL and mainly used in
3357         ewk_view.cpp but it was in EwkView.cpp since separated EwkView.cpp from ewk_view.cpp
3358
3359         This patch moves it to EwkView.h as inline function with small refactoring.
3360         In addition, this patch added EINA_UNLIKELY keyword in cold paths.
3361
3362         * UIProcess/API/efl/EwkView.cpp:
3363         (defaultSmartClassInstance):
3364         (toSmartData):
3365         (toEwkView): Moved it from bottom not to expose it to header file.
3366         * UIProcess/API/efl/EwkView.h:
3367         * UIProcess/API/efl/ewk_view.cpp:
3368         (isEwkViewEvasObject):
3369         (toEwkViewChecked):
3370
3371 2014-01-20  Eunmi Lee  <eunmi15.lee@samsung.com>
3372
3373         [EFL][WK2] Amount of scrolling is different from movement of touch when device pixel ratio is not 1.
3374         https://bugs.webkit.org/show_bug.cgi?id=127268
3375
3376         Reviewed by Gyuyoung Kim.
3377
3378         Amount of scrolling should be same with movement of touch even though
3379         device pixel ratio is not 1, so apply device pixel ratio to the new
3380         position of scrollBy().
3381
3382         * UIProcess/API/efl/EwkView.cpp:
3383         (EwkView::scrollBy):
3384
3385 2014-01-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3386
3387         [WK2] Setting m_pageScaleFactor directly in WebPageProxy::scalePage
3388         https://bugs.webkit.org/show_bug.cgi?id=127090
3389
3390         Reviewed by Simon Fraser.
3391
3392         When the client side sets the scale factor, the UIProcess will send the message to WebProcess and only after
3393         WebPageProxy::pageScaleFactorDidChange is called the desired scale factor is returned correctly by
3394         WebPageProxy::pageScaleFactor.
3395         This will avoid the client side retrieve a wrong scale factor while UIProcess and WebProcess gets synchronized.
3396
3397         * UIProcess/WebPageProxy.cpp:
3398         (WebKit::WebPageProxy::scalePage):
3399
3400 2014-01-20  Zan Dobersek  <zdobersek@igalia.com>
3401
3402         [GTK][WK2] Move the rest of GTK's WorkQueue implementation to std::function
3403         https://bugs.webkit.org/show_bug.cgi?id=127273
3404
3405         Reviewed by Anders Carlsson.
3406
3407         Move to using std::function and move semantics in WorkQueue::registerSocketEventHandler
3408         and WorkQueue::SocketEventSource.
3409
3410         * Platform/IPC/unix/ConnectionUnix.cpp:
3411         (IPC::Connection::open):
3412         * Platform/WorkQueue.h:
3413         * Platform/gtk/WorkQueueGtk.cpp:
3414         (WorkQueue::SocketEventSource::SocketEventSource):
3415         (WorkQueue::registerSocketEventHandler):
3416         (WorkQueue::dispatchOnSource): Use std::move instead of std::forward<T>.
3417         (WorkQueue::dispatch): Ditto.
3418         (WorkQueue::dispatchAfter): Ditto.
3419
3420 2014-01-20  Zan Dobersek  <zdobersek@igalia.com>
3421
3422         Unreviewed. Additional build fixes after r162276 and r163304.
3423
3424         * Platform/WorkQueue.h:
3425         * Platform/gtk/WorkQueueGtk.cpp:
3426         (WorkQueue::EventSource::EventSource):
3427         (WorkQueue::dispatchOnSource):
3428         (WorkQueue::dispatch):
3429         (WorkQueue::dispatchAfter):
3430
3431 2014-01-19  Zan Dobersek  <zdobersek@igalia.com>
3432
3433         Unreviewed GTK build fix after r162276.
3434
3435         Updating the WorkQueue implementation to use std::function and std::chrono.
3436
3437         * Platform/WorkQueue.h:
3438         * Platform/gtk/WorkQueueGtk.cpp:
3439         (WorkQueue::dispatchOnSource):
3440         (WorkQueue::dispatch):
3441         (WorkQueue::dispatchAfter):
3442
3443 2014-01-19  Jinwoo Song  <jinwoo7.song@samsung.com>
3444
3445         Unreviewed debug build fix on EFL port after r162300.
3446
3447         * Platform/efl/DispatchQueueWorkItemEfl.h:
3448         (TimerWorkItem::create):
3449
3450 2014-01-19  Jinwoo Song  <jinwoo7.song@samsung.com>
3451
3452         [EFL][WK2] build fix after r162276
3453         https://bugs.webkit.org/show_bug.cgi?id=127259
3454
3455         Reviewed by Anders Carlsson.
3456
3457         * Platform/efl/DispatchQueueEfl.cpp:
3458         (DispatchQueue::performTimerWork):
3459         (DispatchQueue::getNextTimeOut):
3460         * Platform/efl/DispatchQueueWorkItemEfl.h:
3461         (WorkItem::create):
3462         (WorkItem::WorkItem):
3463         (TimerWorkItem::create):
3464         (TimerWorkItem::TimerWorkItem):
3465         * Platform/efl/WorkQueueEfl.cpp:
3466         (WorkQueue::dispatch):
3467         (WorkQueue::dispatchAfter):
3468
3469 2014-01-18  Anders Carlsson  <andersca@apple.com>
3470
3471         Replace a couple of uses of WTF::Function with std::function
3472         https://bugs.webkit.org/show_bug.cgi?id=127218
3473
3474         Reviewed by Andreas Kling.
3475
3476         * Platform/IPC/mac/ConnectionMac.cpp:
3477         (IPC::createDataAvailableSource):
3478         * Platform/WorkQueue.h:
3479         * Platform/mac/WorkQueueMac.cpp:
3480         (WorkQueue::dispatch):
3481         (WorkQueue::dispatchAfter):
3482         * Shared/ChildProcess.cpp:
3483         (WebKit::didCloseOnConnectionWorkQueue):
3484         * UIProcess/Storage/LocalStorageDatabase.cpp:
3485         (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
3486         * WebProcess/WebPage/DrawingArea.cpp:
3487         (WebKit::DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
3488         * WebProcess/WebPage/DrawingArea.h:
3489         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3490         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3491         (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
3492
3493 2014-01-18  Martin Hock  <mhock@apple.com>
3494
3495         Flesh out session APIs (still not enabled at API level).
3496         https://bugs.webkit.org/show_bug.cgi?id=126918
3497
3498         Reviewed by Alexey Proskuryakov.
3499
3500         * CMakeLists.txt:
3501         * GNUmakefile.list.am:
3502         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3503         (WebKit::storageSession):
3504         (WebKit::NetworkConnectionToWebProcess::startDownload):
3505         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
3506         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
3507         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
3508         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
3509         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
3510         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
3511         * NetworkProcess/NetworkConnectionToWebProcess.h:
3512         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3513         * NetworkProcess/NetworkProcess.cpp:
3514         (WebKit::NetworkProcess::initializeNetworkProcess):
3515         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
3516         (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
3517         * NetworkProcess/NetworkProcess.h:
3518         * NetworkProcess/NetworkProcess.messages.in:
3519         * NetworkProcess/RemoteNetworkingContext.h:
3520         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3521         (WebKit::RemoteNetworkingContext::storageSession):
3522         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3523         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
3524         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3525         * Shared/SessionTracker.cpp: Copied from Source/WebKit2/UIProcess/APISession.cpp.
3526         (WebKit::sessionMap):
3527         (WebKit::identifierBase):
3528         (WebKit::SessionTracker::getSessionMap):
3529         (WebKit::SessionTracker::getIdentifierBase):
3530         (WebKit::SessionTracker::session):
3531         (WebKit::SessionTracker::destroySession):
3532         (WebKit::SessionTracker::setIdentifierBase):
3533         * Shared/SessionTracker.h: Copied from Source/WebKit2/UIProcess/APISession.h.
3534         (WebKit::SessionTracker::isEphemeralID):
3535         * Shared/mac/CookieStorageShim.cpp:
3536         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
3537         * UIProcess/APISession.cpp:
3538         (API::generateID):
3539         (API::Session::defaultSession):
3540         (API::Session::legacyPrivateSession):
3541         (API::Session::Session):
3542         (API::Session::create):
3543         (API::Session::isEphemeral):
3544         (API::Session::getID):
3545         * UIProcess/APISession.h:
3546         * UIProcess/WebContext.cpp:
3547         (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
3548         (WebKit::WebContext::createNewWebProcess):
3549         (WebKit::WebContext::createWebPage):
3550         * UIProcess/WebContext.h:
3551         * UIProcess/WebPageProxy.cpp:
3552         (WebKit::WebPageProxy::create):
3553         (WebKit::WebPageProxy::WebPageProxy):
3554         * UIProcess/WebPageProxy.h:
3555         (WebKit::WebPageProxy::sessionID):
3556         * UIProcess/WebProcessProxy.cpp:
3557         (WebKit::WebProcessProxy::createWebPage):
3558         * UIProcess/WebProcessProxy.h:
3559         * WebKit2.xcodeproj/project.pbxproj:
3560         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3561         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
3562         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3563         (WebKit::legacySessionID):
3564         (WebKit::WebPlatformStrategies::cookiesForDOM):
3565         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
3566         (WebKit::WebPlatformStrategies::cookiesEnabled):
3567         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
3568         (WebKit::WebPlatformStrategies::getRawCookies):
3569         (WebKit::WebPlatformStrategies::deleteCookie):
3570         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3571         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3572         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3573         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
3574         (WebKit::WebFrameNetworkingContext::storageSession):
3575         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
3576         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3577         (WebKit::WebFrameNetworkingContext::storageSession):
3578         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
3579         * WebProcess/WebProcess.cpp:
3580         (WebKit::WebProcess::initializeWebProcess):
3581         (WebKit::WebProcess::ensurePrivateBrowsingSession):
3582         (WebKit::WebProcess::destroyPrivateBrowsingSession):
3583         * WebProcess/WebProcess.h:
3584         * WebProcess/WebProcess.messages.in:
3585
3586 2014-01-18  Brian Burg  <bburg@apple.com>
3587
3588         Web Inspector: Page should use std::unique_ptr for InspectorController
3589         https://bugs.webkit.org/show_bug.cgi?id=127068
3590
3591         Reviewed by Joseph Pecoraro.
3592
3593         Convert call sites to use a InspectorController reference.
3594
3595         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3596         (WebKit::WebInspectorClient::drawRect):
3597         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3598         (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient):
3599         (WebKit::WebInspectorFrontendClient::closeWindow):
3600         * WebProcess/WebPage/WebInspector.cpp:
3601         (WebKit::WebInspector::createInspectorPage):
3602         (WebKit::WebInspector::show):
3603         (WebKit::WebInspector::close):
3604         (WebKit::WebInspector::evaluateScriptForTest):
3605         (WebKit::WebInspector::showConsole):
3606         (WebKit::WebInspector::showResources):
3607         (WebKit::WebInspector::showMainResourceForFrame):
3608         (WebKit::WebInspector::startJavaScriptDebugging):
3609         (WebKit::WebInspector::stopJavaScriptDebugging):
3610         (WebKit::WebInspector::setJavaScriptProfilingEnabled):
3611         (WebKit::WebInspector::startJavaScriptProfiling):
3612         (WebKit::WebInspector::stopJavaScriptProfiling):
3613         (WebKit::WebInspector::startPageProfiling):
3614         (WebKit::WebInspector::stopPageProfiling):
3615         (WebKit::WebInspector::dispatchMessageFromRemoteFrontend):
3616         (WebKit::WebInspector::remoteFrontendConnected):
3617         (WebKit::WebInspector::remoteFrontendDisconnected):
3618
3619 2014-01-18  Anders Carlsson  <andersca@apple.com>
3620
3621         Remove ENABLE_THREADED_HTML_PARSER defines everywhere
3622         https://bugs.webkit.org/show_bug.cgi?id=127225
3623
3624         Reviewed by Andreas Kling.
3625
3626         This concludes the removal of over 8.8 million lines of threaded parser code.
3627
3628         * Configurations/FeatureDefines.xcconfig:
3629
3630 2014-01-18  Yongjun Zhang  <yongjun_zhang@apple.com>
3631
3632         Make WKRenderingProgressEvents a shareable API.
3633         https://bugs.webkit.org/show_bug.cgi?id=127213
3634
3635         Reviewed by Dan Bernstein.
3636
3637         Move WKRenderingProgressEvents from UIProcess to Shared, so that an inject bundle
3638         could also use this enum when listening to layout milestones.
3639
3640         * Shared/API/Cocoa/WKRenderingProgressEvents.h: Added.
3641         (NS_OPTIONS):
3642         * Shared/API/Cocoa/WKRenderingProgressEventsInternal.h: Added.
3643         (renderingProgressEvents):
3644         * UIProcess/API/Cocoa/WKBrowsingContextController.h: Move WKRenderingProgressEvents to Shared/API/Cocoa/WKRenderingProgressEvents.h.
3645         * UIProcess/API/Cocoa/WKBrowsingContextController.mm: Move renderingProgressEvents() to WKRenderingProgressEventsInternal.h.
3646         * WebKit2.xcodeproj/project.pbxproj:
3647         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Add
3648             webProcessPlugInBrowserContextController:renderingProgressDidChange: to load delegate.
3649         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3650         (didLayout):
3651         (setUpPageLoaderClient): Also listen to didLayout callback for layout milestones.
3652
3653 2014-01-17  Commit Queue  <commit-queue@webkit.org>
3654
3655         Unreviewed, rolling out r162237 and r162241.
3656         http://trac.webkit.org/changeset/162237
3657         http://trac.webkit.org/changeset/162241
3658         https://bugs.webkit.org/show_bug.cgi?id=127216
3659
3660         Broke lots of API tests (Requested by ap on #webkit).
3661
3662         * CMakeLists.txt:
3663         * GNUmakefile.list.am:
3664         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3665         (WebKit::storageSession):
3666         (WebKit::NetworkConnectionToWebProcess::startDownload):
3667         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
3668         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
3669         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
3670         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
3671         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
3672         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
3673         * NetworkProcess/NetworkConnectionToWebProcess.h:
3674         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3675         * NetworkProcess/NetworkProcess.cpp:
3676         (WebKit::NetworkProcess::initializeNetworkProcess):
3677         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
3678         (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
3679         * NetworkProcess/NetworkProcess.h:
3680         * NetworkProcess/NetworkProcess.messages.in:
3681         * NetworkProcess/RemoteNetworkingContext.h:
3682         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3683         (WebKit::privateBrowsingStorageSession):
3684         (WebKit::RemoteNetworkingContext::storageSession):
3685         (WebKit::RemoteNetworkingContext::privateBrowsingSession):
3686         (WebKit::privateBrowsingStorageSessionIdentifierBase):
3687         (WebKit::RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase):
3688         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3689         (WebKit::RemoteNetworkingContext::destroyPrivateBrowsingSession):
3690         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
3691         (WebKit::RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase):
3692         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3693         (WebKit::RemoteNetworkingContext::destroyPrivateBrowsingSession):
3694         (WebKit::RemoteNetworkingContext::privateBrowsingSession):
3695         * Shared/SessionTracker.cpp: Removed.
3696         * Shared/SessionTracker.h: Removed.
3697         * UIProcess/APISession.cpp:
3698         (API::Session::Session):
3699         (API::Session::create):
3700         (API::Session::isEphemeral):
3701         * UIProcess/APISession.h:
3702         * UIProcess/WebContext.cpp:
3703         (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
3704         (WebKit::WebContext::createNewWebProcess):
3705         (WebKit::WebContext::createWebPage):
3706         * UIProcess/WebContext.h:
3707         * UIProcess/WebPageProxy.cpp:
3708         (WebKit::WebPageProxy::create):
3709         (WebKit::WebPageProxy::WebPageProxy):
3710         * UIProcess/WebPageProxy.h:
3711         * UIProcess/WebProcessProxy.cpp:
3712         (WebKit::WebProcessProxy::createWebPage):
3713         * UIProcess/WebProcessProxy.h:
3714         * WebKit2.xcodeproj/project.pbxproj:
3715         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3716         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
3717         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3718         (WebKit::WebPlatformStrategies::cookiesForDOM):
3719         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
3720         (WebKit::WebPlatformStrategies::cookiesEnabled):
3721         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
3722         (WebKit::WebPlatformStrategies::getRawCookies):
3723         (WebKit::WebPlatformStrategies::deleteCookie):
3724         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3725         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3726         (WebKit::privateSession):
3727         (WebKit::identifierBase):
3728         (WebKit::WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase):
3729         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3730         (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession):
3731         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
3732         (WebKit::WebFrameNetworkingContext::storageSession):
3733         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
3734         (WebKit::privateSession):
3735         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3736         (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession):
3737         (WebKit::WebFrameNetworkingContext::storageSession):
3738         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
3739         * WebProcess/WebProcess.cpp:
3740         (WebKit::WebProcess::initializeWebProcess):
3741         (WebKit::WebProcess::ensurePrivateBrowsingSession):
3742         (WebKit::WebProcess::destroyPrivateBrowsingSession):
3743         * WebProcess/WebProcess.h:
3744         * WebProcess/WebProcess.messages.in:
3745
3746 2014-01-17  Ryuan Choi  <ryuan.choi@samsung.com>
3747
3748         Unreviewed build fix on EFL port after r162237
3749
3750         The EFL port disabled NETWORK_PROCESS yet and use -Werror=unused-function.
3751
3752         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3753         Guarded legacySessionID with ENABLE(NETWORK_PROCESS)
3754
3755 2014-01-17  Martin Hock  <mhock@apple.com>
3756
3757         Flesh out session APIs (still not enabled at API level).
3758         https://bugs.webkit.org/show_bug.cgi?id=126918
3759
3760         Reviewed by Alexey Proskuryakov.
3761
3762         * CMakeLists.txt:
3763         * GNUmakefile.list.am:
3764         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3765         (WebKit::storageSession):
3766         (WebKit::NetworkConnectionToWebProcess::startDownload):
3767         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
3768         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
3769         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
3770         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
3771         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
3772         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
3773         * NetworkProcess/NetworkConnectionToWebProcess.h:
3774         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3775         * NetworkProcess/NetworkProcess.cpp:
3776         (WebKit::NetworkProcess::initializeNetworkProcess):
3777         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
3778         (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
3779         * NetworkProcess/NetworkProcess.h:
3780         * NetworkProcess/NetworkProcess.messages.in:
3781         * NetworkProcess/RemoteNetworkingContext.h:
3782         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3783         (WebKit::RemoteNetworkingContext::storageSession):
3784         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3785         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
3786         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3787         * Shared/SessionTracker.cpp: Copied from Source/WebKit2/UIProcess/APISession.cpp.
3788         (WebKit::sessionMap):
3789         (WebKit::identifierBase):
3790         (WebKit::SessionTracker::getSessionMap):
3791         (WebKit::SessionTracker::getIdentifierBase):
3792         (WebKit::SessionTracker::session):
3793         (WebKit::SessionTracker::destroySession):
3794         (WebKit::SessionTracker::setIdentifierBase):
3795         * Shared/SessionTracker.h: Copied from Source/WebKit2/UIProcess/APISession.h.
3796         (WebKit::SessionTracker::isEphemeralID):
3797         * UIProcess/APISession.cpp:
3798         (API::generateID):
3799         (API::Session::defaultSession):
3800         (API::Session::legacyPrivateSession):
3801         (API::Session::Session):
3802         (API::Session::create):
3803         (API::Session::isEphemeral):
3804         (API::Session::getID):
3805         * UIProcess/APISession.h:
3806         * UIProcess/WebContext.cpp:
3807         (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
3808         (WebKit::WebContext::createNewWebProcess):
3809         (WebKit::WebContext::createWebPage):
3810         * UIProcess/WebContext.h:
3811         * UIProcess/WebPageProxy.cpp:
3812         (WebKit::WebPageProxy::create):
3813         (WebKit::WebPageProxy::WebPageProxy):
3814         * UIProcess/WebPageProxy.h:
3815         (WebKit::WebPageProxy::sessionID):
3816         * UIProcess/WebProcessProxy.cpp:
3817         (WebKit::WebProcessProxy::createWebPage):
3818         * UIProcess/WebProcessProxy.h:
3819         * WebKit2.xcodeproj/project.pbxproj:
3820         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3821         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
3822         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3823         (WebKit::legacySessionID):
3824         (WebKit::WebPlatformStrategies::cookiesForDOM):
3825         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
3826         (WebKit::WebPlatformStrategies::cookiesEnabled):
3827         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
3828         (WebKit::WebPlatformStrategies::getRawCookies):
3829         (WebKit::WebPlatformStrategies::deleteCookie):
3830         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3831         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3832         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3833         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
3834         (WebKit::WebFrameNetworkingContext::storageSession):
3835         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
3836         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3837         (WebKit::WebFrameNetworkingContext::storageSession):
3838         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
3839         * WebProcess/WebProcess.cpp:
3840         (WebKit::WebProcess::initializeWebProcess):
3841         (WebKit::WebProcess::ensurePrivateBrowsingSession):
3842         (WebKit::WebProcess::destroyPrivateBrowsingSession):
3843         * WebProcess/WebProcess.h:
3844         * WebProcess/WebProcess.messages.in:
3845
3846 2014-01-17  Andreas Kling  <akling@apple.com>
3847
3848         Remove unused TOUCH_ADJUSTMENT code.
3849         <https://webkit.org/b/127181>
3850
3851         Reviewed by Anders Carlsson.
3852
3853         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
3854         (WebKit::WebPage::findZoomableAreaForPoint):
3855
3856 2014-01-17  Anders Carlsson  <andersca@apple.com>
3857
3858         Fix build.
3859
3860         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3861         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3862
3863 2014-01-17  Anders Carlsson  <andersca@apple.com>
3864
3865         Remove FrameLoaderClient::didPerformFirstNavigation()
3866         https://bugs.webkit.org/show_bug.cgi?id=127191
3867
3868         Reviewed by Dan Bernstein.
3869
3870         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3871         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3872
3873 2014-01-17  Manuel Rego Casasnovas  <rego@igalia.com>
3874
3875         [GTK] Add CSS Grid Layout as experimental feature
3876         https://bugs.webkit.org/show_bug.cgi?id=127089
3877
3878         Reviewed by Martin Robinson.
3879
3880         Allow CSS Grid Layout to be enabled through the environment variable WEBKITGTK_EXPERIMENTAL_FEATURES.
3881
3882         Example: WEBKITGTK_EXPERIMENTAL_FEATURES="CSS_GRID_LAYOUT=1"
3883
3884         * UIProcess/API/gtk/WebKitSettings.cpp:
3885         (webKitSettingsConstructed): Use new experimental feature to enable or disable CSS Grid Layout.
3886         * UIProcess/gtk/ExperimentalFeatures.cpp: Add new experimental feature.
3887         * UIProcess/gtk/ExperimentalFeatures.h: Ditto.
3888
3889 2014-01-17  Enrica Casucci  <enrica@apple.com>
3890
3891         Support WebSelections in WK2 on iOS.
3892         https://bugs.webkit.org/show_bug.cgi?id=127015
3893         <rdar://problem/15843090>
3894
3895         Reviewed by Dan Bernstein.
3896
3897         Removing unused variable in selectWithGesture that
3898         causes Release build to fail after r162103.
3899
3900         * WebProcess/WebPage/ios/WebPageIOS.mm:
3901         (WebKit::WebPage::selectWithGesture):
3902
3903 2014-01-17  Yongjun Zhang  <yongjun_zhang@apple.com>
3904
3905         https://bugs.webkit.org/show_bug.cgi?id=127138
3906         Add more delegate callback methods to WKWebProcessPlugInLoadDelegate.
3907
3908         Reviewed by Sam Weinig.
3909
3910         Add more WKWebProcessPlugInLoadDelegate callback methods so that a injected
3911         bundle can listen/react to more frame loading events.
3912
3913         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Add more delegate callback methods for
3914             WKWebProcessPlugInLoadDelegate.
3915         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3916         (didCommitLoadForFrame):
3917         (didFinishDocumentLoadForFrame):
3918         (didFailLoadWithErrorForFrame):
3919         (didSameDocumentNavigationForFrame): 
3920         (didLayoutForFrame):
3921         (setUpPageLoaderClient):
3922
3923 2014-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3924
3925         [SOUP] Add stubs for CustomProtocol classes
3926         https://bugs.webkit.org/show_bug.cgi?id=126343
3927
3928         Reviewed by Gustavo Noronha Silva.
3929
3930         * CMakeLists.txt:
3931         * GNUmakefile.am:
3932         * GNUmakefile.list.am:
3933         * PlatformGTK.cmake:
3934         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp: Added.
3935         (WebKit::generateCustomProtocolID):
3936         (WebKit::WebSoupRequestAsyncData::WebSoupRequestAsyncData):
3937         (WebKit::WebSoupRequestAsyncData::~WebSoupRequestAsyncData):
3938         (WebKit::WebSoupRequestAsyncData::requestFailed):
3939         (WebKit::WebSoupRequestAsyncData::releaseTask):
3940         (WebKit::CustomProtocolManager::supplementName):
3941         (WebKit::CustomProtocolManager::CustomProtocolManager):
3942         (WebKit::CustomProtocolManager::initializeConnection):
3943         (WebKit::CustomProtocolManager::initialize):
3944         * Shared/Network/NetworkProcessCreationParameters.cpp:
3945         (WebKit::NetworkProcessCreationParameters::encode): Move
3946         urlSchemesRegisteredForCustomProtocols encoding out of platform
3947         ifdefs, since it's already guarded by ENABLE(CUSTOM_PROTOCOLS).
3948         (WebKit::NetworkProcessCreationParameters::decode): Ditto.
3949         * Shared/Network/NetworkProcessCreationParameters.h: Ditto.
3950         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp: Added.
3951         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
3952         (WebKit::CustomProtocolManagerProxy::startLoading):
3953         (WebKit::CustomProtocolManagerProxy::stopLoading):
3954
3955 2014-01-16  Tim Horton  <timothy_horton@apple.com>
3956
3957         On iOS, zooming in with a TileController-backed main frame makes hundreds of tiles
3958         https://bugs.webkit.org/show_bug.cgi?id=126531
3959         <rdar://problem/15745862>
3960
3961         Reviewed by Anders Carlsson.
3962
3963         * UIProcess/API/ios/WKContentView.mm:
3964         (-[WKContentView _updateViewExposedRect]):
3965         (-[WKContentView setViewportSize:]):
3966         (-[WKContentView didFinishScrollTo:]):
3967         (-[WKContentView didScrollTo:]):
3968         (-[WKContentView didZoomToScale:]):
3969         Because zooming is performed by the UIScrollView, we need to transform
3970         the exposedRect's offset in order to get it in FrameView-relative coordinates.
3971
3972         * UIProcess/ios/WebPageProxyIOS.mm:
3973         (WebKit::WebPageProxy::didFinishZooming):
3974         Save the pageScaleFactor when it changes.
3975
3976 2014-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3977
3978         [GTK] Remove the weak pointer added to the web view in WebKitPrintOperation
3979         https://bugs.webkit.org/show_bug.cgi?id=127098
3980
3981         Reviewed by Martin Robinson.
3982
3983         If the print operation finishes and the web view is still alive,
3984         the weak pointer added to the view should be removed.
3985
3986         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
3987         (_WebKitPrintOperationPrivate::~_WebKitPrintOperationPrivate):
3988
3989 2014-01-15  Sam Weinig  <sam@webkit.org>
3990
3991         TextBreakIterator's should support Latin-1 for all iterator types (Part 3)
3992         https://bugs.webkit.org/show_bug.cgi?id=126856
3993
3994         Reviewed by Ryosuke Niwa.
3995
3996         Change all the TextBreakIterator creation functions to take StringViews. Remove a few
3997         now unnecessary up-conversions to UTF-16 in the process.
3998
3999         * UIProcess/efl/TextCheckerEfl.cpp:
4000         (WebKit::nextWordOffset):
4001         (WebKit::TextChecker::checkTextOfParagraph):
4002
4003 2014-01-16  Eunmi Lee  <eunmi15.lee@samsung.com>
4004
4005         [EFL][WK2] EwkView can not be shown without re-sizing once it is hidden.
4006         https://bugs.webkit.org/show_bug.cgi?id=127084
4007
4008         Reviewed by Gyuyoung Kim.
4009
4010         Visibility of EwkView can not be controlled by evas_object_show/hide
4011         because EwkView can be shown only if re-sizing is requested, so modify
4012         codes to show EwkView directly if we do not wait for re-sizing.
4013         Additionally, we have to set default value of m_pendingSurfaceResize
4014         to true for accelerated mode to prevent to show black empty view for
4015         the first request to show.
4016
4017         * UIProcess/API/efl/EwkView.cpp:
4018         (EwkView::EwkView):
4019         (EwkView::handleEvasObjectShow):
4020
4021 2014-01-16  Andy Estes  <aestes@apple.com>
4022
4023         Build Fix: Use standard architectures when building for iOS
4024
4025         Even though we don't use the plug-in services on iOS, we still need
4026         them to build (we won't install them). Be sure we specify valid iOS
4027         architectures when doing so.
4028
4029         * Configurations/PluginService.32.xcconfig:
4030         * Configurations/PluginService.64.xcconfig:
4031
4032 2014-01-16  Enrica Casucci  <enrica@apple.com>
4033
4034         Crash when destroying WKInteractionView.
4035         https://bugs.webkit.org/show_bug.cgi?id=127153
4036         <rdar://problem/15840761>
4037
4038         Reviewed by Anders Carlsson.
4039
4040         UIWKSelectionAssistant is a RetainPtr and it is being 
4041         deallocated after the view and its gesture recognizers
4042         have been destroyed.
4043         The parent class UIWebSelectionAssistant assumes to be
4044         deallocated before the view is gone.
4045         We deallocate the interaction assistants explicitly to
4046         fix the problem.
4047
4048         * UIProcess/API/ios/WKInteractionView.mm:
4049         (-[WKInteractionView dealloc]):
4050
4051 2014-01-16  Brady Eidson  <beidson@apple.com>
4052
4053         IDB: delete object store support
4054         <rdar://problem/15779641> and https://bugs.webkit.org/show_bug.cgi?id=127123
4055
4056         Reviewed by Alexey Proskuryakov.
4057
4058         Pipe through Web -> Database -> Web process messaging for delete object store.
4059         Perform dropping the object store in the backing store.
4060
4061         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
4062         (WebKit::DatabaseProcessIDBConnection::deleteObjectStore):
4063         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
4064         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
4065
4066         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
4067         (WebKit::UniqueIDBDatabase::didDeleteObjectStore):
4068         (WebKit::UniqueIDBDatabase::deleteObjectStore):
4069         (WebKit::UniqueIDBDatabase::deleteObjectStoreInBackingStore):
4070         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
4071
4072         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
4073         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
4074         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
4075         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
4076         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
4077
4078         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
4079         (WebKit::WebIDBServerConnection::deleteObjectStore):
4080         (WebKit::WebIDBServerConnection::didDeleteObjectStore):
4081         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
4082         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
4083
4084 2014-01-16  Alexey Proskuryakov  <ap@apple.com>
4085
4086         [Mac] [iOS] Add support for CFHTTPCookieStorageAcceptPolicyExclusivelyFromMainDocumentDomain
4087         https://bugs.webkit.org/show_bug.cgi?id=127139
4088
4089         Reviewed by Brady Eidson.
4090
4091         * Shared/HTTPCookieAcceptPolicy.h:
4092         * UIProcess/API/C/WKAPICast.h:
4093         (WebKit::toHTTPCookieAcceptPolicy):
4094         (WebKit::toAPI):
4095         * UIProcess/API/C/WKCookieManager.h:
4096         Added the policy to appropriate switches and enums.
4097
4098 2014-01-16  Jeffrey Pfau  <jpfau@apple.com>
4099
4100         Fix build after r162161. One FINAL was still present.
4101
4102         * Shared/cf/KeyedDecoder.h:
4103
4104 2014-01-16  Anders Carlsson  <andersca@apple.com>
4105
4106         Change all uses of FINAL to final now that all our compilers support it
4107         https://bugs.webkit.org/show_bug.cgi?id=127142
4108
4109         Reviewed by Benjamin Poulain.
4110
4111         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
4112         * NetworkProcess/RemoteNetworkingContext.h:
4113         * Shared/API/Cocoa/RemoteObjectRegistry.h:
4114         * Shared/APIArray.h:
4115         * Shared/APIString.h:
4116         * Shared/AsyncRequest.h:
4117         * Shared/AsyncTask.h:
4118         * Shared/cf/KeyedEncoder.h:
4119         * UIProcess/API/gtk/PageClientImpl.h:
4120         * UIProcess/API/mac/PageClientImpl.h:
4121         * UIProcess/efl/WebViewEfl.h:
4122         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
4123         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
4124         * WebProcess/Plugins/PDF/PDFPlugin.h:
4125         * WebProcess/Storage/StorageAreaImpl.h:
4126         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
4127         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
4128         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h: