IDB: indexeddb/mozilla/add-twice-failure.html fails
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-02-04  Brady Eidson  <beidson@apple.com>
2
3         IDB: indexeddb/mozilla/add-twice-failure.html fails
4         <rdar://problem/15982569> and https://bugs.webkit.org/show_bug.cgi?id=128208
5
6         Reviewed by Tim Horton.
7
8         Note that besides making indexeddb/mozilla/add-twice-failure.html pass this also makes some other tests
9         pass and also improves the failure modes of others.
10
11         A full accounting of which tests pass is coming soon.
12
13         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
14         (WebKit::UniqueIDBDatabase::putRecordInBackingStore): After checking for existence of the key and before
15           adding the record, remove any previous record. (Defined by the spec, found exploring this test).
16
17         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
18         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
19         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore): Implement this.
20         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord): Add a form to be used as mentioned above in
21           UniqueIDBDatabase::putRecordInBackingStore.
22         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore): CAST the key argument properly.
23         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore): Ditto.
24         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
25
26 2014-02-04  Dan Bernstein  <mitz@apple.com>
27
28         [Cocoa] Expose more WKWebProcessPlugInNodeHandle properties
29         https://bugs.webkit.org/show_bug.cgi?id=128219
30
31         Reviewed by Anders Carlsson.
32
33         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new
34         properties.
35         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
36         (-[WKWebProcessPlugInNodeHandle elementBounds]): Added.
37         (-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilled]): Added.
38         (-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilled:]): Added.
39         (-[WKWebProcessPlugInNodeHandle HTMLInputELementIsUserEdited]): Added.
40         (-[WKWebProcessPlugInNodeHandle HTMLTextAreaELementIsUserEdited]): Added.
41         (-[WKWebProcessPlugInNodeHandle HTMLTableCellElementCellAbove]): Added.
42         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandleInternal.h: Rolled
43         Internal category into the class extension.
44
45         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h: Declared
46         -clearWrappers.
47         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
48         (-[WKWebProcessPlugInScriptWorld clearWrappers]): Added. Calls through to clearWrappers().
49         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorldInternal.h: Rolled
50         Internal category into the class extension.
51
52 2014-02-04  Alexey Proskuryakov  <ap@apple.com>
53
54         webKitCookieStorageCopyRequestHeaderFieldsForURL builds an empty Cookie header when there are no cookies
55         https://bugs.webkit.org/show_bug.cgi?id=128201
56
57         Reviewed by Sam Weinig.
58
59         * Shared/mac/CookieStorageShim.mm: (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
60         Return null when NetworkProcess provided a null string, don't build a header dictionary
61         with an empty Cookie value.
62
63 2014-02-04  Anders Carlsson  <andersca@apple.com>
64
65         Add a WKNavigationAction object
66         https://bugs.webkit.org/show_bug.cgi?id=128212
67
68         Reviewed by Dan Bernstein.
69
70         * UIProcess/API/Cocoa/WKNavigationAction.h: Added.
71         (NS_ENUM):
72         * UIProcess/API/Cocoa/WKNavigationAction.mm: Added.
73         * UIProcess/API/Cocoa/WKNavigationActionInternal.h: Added.
74         * UIProcess/Cocoa/NavigationState.mm:
75         (WebKit::toWKNavigationType):
76         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
77         * WebKit2.xcodeproj/project.pbxproj:
78
79 2014-02-04  Anders Carlsson  <andersca@apple.com>
80
81         Add back/forward related methods to WKWebView
82         https://bugs.webkit.org/show_bug.cgi?id=128209
83
84         Reviewed by Dan Bernstein.
85
86         * UIProcess/API/Cocoa/WKWebView.h:
87         * UIProcess/API/Cocoa/WKWebView.mm:
88         (-[WKWebView canGoBack]):
89         (-[WKWebView canGoForward]):
90         (-[WKWebView goBack]):
91         (-[WKWebView goForward]):
92
93 2014-02-04  Enrica Casucci  <enrica@apple.com>
94
95         WK: Cannot select text inside clickable containers.
96         https://bugs.webkit.org/show_bug.cgi?id=128197
97         <rdar://problem/15970890>
98
99         Reviewed by Simon Fraser.
100
101         When retrieving position information, we first try to
102         find the node responding to click events because we want
103         to know whether we are on a link or an image to show
104         the appropriate action sheet.
105         We could still have a node responding to click events if
106         for example we have a DIV with a click handler but that
107         doesn't require any special handling and we still need to
108         perform regular hit testing.
109
110         * WebProcess/WebPage/ios/WebPageIOS.mm:
111         (WebKit::WebPage::getPositionInformation):
112
113 2014-02-04  Enrica Casucci  <enrica@apple.com>
114
115         WK2: Selection callout bar does not scroll with the selection.
116         https://bugs.webkit.org/show_bug.cgi?id=128142
117         <rdar://problem/15970812>
118
119         Reviewed by Benjamin Poulain.
120
121         Adding notifications to WKContentView to all the delegates
122         for scrolling and zooming to let WKInteractionView about it.
123         This allows the interaction assistants to hide the callout
124         while scrolling or zooming and to fade it in again at the end.
125
126         * UIProcess/API/Cocoa/WKWebView.mm:
127         (-[WKWebView scrollViewWillBeginZooming:withView:]):
128         (-[WKWebView scrollViewWillBeginDragging:]):
129         * UIProcess/API/ios/WKContentView.h:
130         * UIProcess/API/ios/WKContentView.mm:
131         (-[WKContentView didFinishScrollTo:]):
132         (-[WKContentView willStartZoomOrScroll]):
133         (-[WKContentView didZoomToScale:]):
134         * UIProcess/API/ios/WKInteractionView.h:
135         * UIProcess/API/ios/WKInteractionView.mm:
136         (-[WKInteractionView _willStartScrollingOrZooming]):
137         (-[WKInteractionView _didEndScrollingOrZooming]):
138         * UIProcess/API/ios/WKViewIOS.mm:
139         (-[WKView scrollViewWillBeginZooming:withView:]):
140         (-[WKView scrollViewWillBeginDragging:]):
141
142 2014-02-04  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
143
144         Code cleanup: remove leftover occurrence of ENABLE(GESTURE_EVENTS)
145         https://bugs.webkit.org/show_bug.cgi?id=128180
146
147         Reviewed by Csaba Osztrogonác.
148
149         Removed last occurrence of ENABLE(GESTURE_EVENTS).
150
151         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
152         (WebKit::NetscapePlugin::platformHandleMouseEvent):
153
154 2014-02-04  Eunmi Lee  <eunmi15.lee@samsung.com>
155
156         [EFL][WK2] ewk_context needs to route InjectedBundle messages correctly.
157         https://bugs.webkit.org/show_bug.cgi?id=90772
158
159         Reviewed by Gyuyoung Kim.
160
161         Add APIs to post message to injected bundle and register callback to
162         get message from injected bundle. When callback is registered,
163         WKContextInjectedBundleClient is set to get messages from injected bundle.
164
165         * UIProcess/API/efl/ewk_context.cpp:
166         (EwkContext::EwkContext):
167         (toEwkContext):
168         (EwkContext::didReceiveMessageFromInjectedBundle):
169         (EwkContext::didReceiveSynchronousMessageFromInjectedBundle):
170         (EwkContext::setMessageFromInjectedBundleCallback): register callback to get message from injected bundle.
171         (EwkContext::processReceivedMessageFromInjectedBundle): process message from injected bundle.
172         (ewk_context_message_post_to_injected_bundle):
173         (ewk_context_message_from_injected_bundle_callback_set):
174         * UIProcess/API/efl/ewk_context.h:
175         * UIProcess/API/efl/ewk_context_private.h:
176
177 2014-02-04  Jinwoo Song  <jinwoo7.song@samsung.com>
178
179         [EFL][WK2] Stop using COMPILE_ASSERT_MATCHING_ENUM macros in EFL WebKit2
180         https://bugs.webkit.org/show_bug.cgi?id=128156
181
182         Reviewed by Anders Carlsson.
183
184         * UIProcess/API/efl/EwkView.cpp:
185         (EwkView::requestPopupMenu):
186         * UIProcess/API/efl/ewk_context.cpp:
187         (toWKCacheModel):
188         (EwkContext::setCacheModel):
189         * UIProcess/API/efl/ewk_cookie_manager.cpp:
190         (ewk_cookie_manager_persistent_storage_set):
191         (ewk_cookie_manager_accept_policy_set):
192         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
193         (toEwkNavigationType):
194         (toEventMouseButton):
195         (toEventModifierKeys):
196         (EwkNavigationPolicyDecision::EwkNavigationPolicyDecision):
197         (EwkNavigationPolicyDecision::navigationType):
198         (EwkNavigationPolicyDecision::mouseButton):
199         (EwkNavigationPolicyDecision::modifiers):
200         (ewk_navigation_policy_decision_download):
201         * UIProcess/API/efl/ewk_navigation_policy_decision_private.h:
202         (EwkNavigationPolicyDecision::create):
203         * UIProcess/API/efl/ewk_popup_menu_item.cpp:
204         (EwkPopupMenuItem::type):
205         (EwkPopupMenuItem::textDirection):
206         * UIProcess/API/efl/ewk_private.h:
207         * UIProcess/API/efl/ewk_view.cpp:
208         (toWKFindOptions):
209         (ewk_view_text_find):
210         (toWKPaginationMode):
211         (toEwkPaginationMode):
212         (ewk_view_pagination_mode_set):
213         (ewk_view_pagination_mode_get):
214
215 2014-02-03  Brady Eidson  <beidson@apple.com>
216
217         Unreviewed build fix after http://trac.webkit.org/changeset/163364
218
219         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
220         (WebKit::getObjectStoreStatement): Args need the new names, and I need to save the file before committing.  :(
221
222 2014-02-03  Brady Eidson  <beidson@apple.com>
223
224         IDB: HTML5 Rocks Indexed Database demo fails
225         https://bugs.webkit.org/show_bug.cgi?id=128157
226
227         Reviewed by Anders Carlsson (Provisional review by Jon Lee)
228
229         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
230         (WebKit::getIndexStatement): Only increment the open/closed counters if those keys exist.
231           Fix order of statements for no lower key.
232         (WebKit::getObjectStoreStatement): Only increment the open/closed counters if those keys exist.
233
234 2014-02-03  Jae Hyun Park  <jae.park@company100.net>
235
236         Use nullptr in ShareableBitmap
237         https://bugs.webkit.org/show_bug.cgi?id=128153
238
239         Reviewed by Gyuyoung Kim.
240
241         * Shared/ShareableBitmap.cpp:
242         (WebKit::ShareableBitmap::create):
243         (WebKit::ShareableBitmap::createShareable):
244
245 2014-02-03  Anders Carlsson  <andersca@apple.com>
246
247         Add title and hasOnlySecureContent properties to WKWebView
248         https://bugs.webkit.org/show_bug.cgi?id=128152
249
250         Reviewed by Dan Bernstein.
251
252         * UIProcess/API/Cocoa/WKWebView.h:
253         * UIProcess/API/Cocoa/WKWebView.mm:
254         (-[WKWebView title]):
255         (-[WKWebView hasOnlySecureContent]):
256         * UIProcess/Cocoa/NavigationState.mm:
257         (WebKit::NavigationState::didChangeIsLoading):
258         (WebKit::NavigationState::willChangeTitle):
259         (WebKit::NavigationState::didChangeTitle):
260         (WebKit::NavigationState::willChangeHasOnlySecureContent):
261         (WebKit::NavigationState::didChangeHasOnlySecureContent):
262
263 2014-02-03  Sam Weinig  <sam@webkit.org>
264
265         Fix spelling.
266
267         * Shared/WebPreferencesStore.h:
268
269 2014-02-03  Sam Weinig  <sam@webkit.org>
270
271         [WebKit2, iOS] Enable frame flattening by default on iOS
272         <rdar://problem/15975983>
273         https://bugs.webkit.org/show_bug.cgi?id=128151
274
275         Reviewed by Tim Horton.
276
277         * Shared/WebPreferencesStore.h:
278
279 2014-02-03  Tim Horton  <timothy_horton@apple.com>
280
281         [iOS][wk2] Temporarily disable accelerated drawing for canvas
282         https://bugs.webkit.org/show_bug.cgi?id=128147
283
284         Reviewed by Simon Fraser.
285
286         * Shared/WebPreferencesStore.h:
287         Temporarily disable accelerated canvas for WebKit2 on iOS.
288
289 2014-02-03  Anders Carlsson  <andersca@apple.com>
290
291         Add loading property to WKWebView
292         https://bugs.webkit.org/show_bug.cgi?id=128144
293
294         Reviewed by Dan Bernstein.
295
296         * UIProcess/API/Cocoa/WKWebView.h:
297         * UIProcess/API/Cocoa/WKWebView.mm:
298         (-[WKWebView isLoading]):
299         * UIProcess/Cocoa/NavigationState.mm:
300         (WebKit::NavigationState::willChangeIsLoading):
301         (WebKit::NavigationState::didChangeIsLoading):
302
303 2014-02-03  Simon Fraser  <simon.fraser@apple.com>
304
305         Allow WK2 to read from NSUserDefaults when it has no prefs identifier
306         https://bugs.webkit.org/show_bug.cgi?id=128124
307
308         Reviewed by Sam Weinig.
309         
310         WebPreferences would never read from NSUserDefaults if no identifier
311         had been set, but this prevents us from reading useful debugging prefs.
312         
313         Fix to read pref names using a "WebKit2" prefix when no identifier
314         is set.
315
316         * UIProcess/mac/WebPreferencesMac.mm:
317         (WebKit::makeKey):
318         (WebKit::WebPreferences::platformInitializeStore):
319
320 2014-02-03  Jer Noble  <jer.noble@apple.com>
321
322         [WK2] Remove the VideoPluginProxyEnabled preference in WK2
323         https://bugs.webkit.org/show_bug.cgi?id=128128
324
325         Reviewed by Brady Eidson.
326
327         The plugin proxy is iOS WK1 only, and has no meaning in WebKit2. Just set the preference to false.
328
329         * Shared/WebPreferencesStore.h:
330         * UIProcess/API/C/WKPreferences.cpp:
331         * UIProcess/API/C/WKPreferencesRef.h:
332         * WebProcess/WebPage/WebPage.cpp:
333         (WebKit::WebPage::updatePreferences):
334
335 2014-02-03  Dean Jackson  <dino@apple.com>
336
337         Feature flag for shape-inside
338         https://bugs.webkit.org/show_bug.cgi?id=128001
339
340         Reviewed by Simon Fraser.
341
342         Add CSS_SHAPE_INSIDE flag.
343
344         * Configurations/FeatureDefines.xcconfig:
345
346 2014-02-03  Anders Carlsson  <andersca@apple.com>
347
348         NavigationState should be a PageLoadState::Observer
349         https://bugs.webkit.org/show_bug.cgi?id=128130
350
351         Reviewed by Darin Adler.
352
353         This will make it easier to provide load related KVO properties on WKWebView.
354
355         * UIProcess/API/Cocoa/WKWebView.mm:
356         (-[WKWebView initWithFrame:configuration:]):
357         * UIProcess/API/Cocoa/WKWebViewInternal.h: Added.
358         * UIProcess/Cocoa/NavigationState.h:
359         * UIProcess/Cocoa/NavigationState.mm:
360         (WebKit::NavigationState::NavigationState):
361         (WebKit::NavigationState::~NavigationState):
362         (WebKit::NavigationState::willChangeIsLoading):
363         (WebKit::NavigationState::didChangeIsLoading):
364         (WebKit::NavigationState::willChangeTitle):
365         (WebKit::NavigationState::didChangeTitle):
366         (WebKit::NavigationState::willChangeActiveURL):
367         (WebKit::NavigationState::didChangeActiveURL):
368         (WebKit::NavigationState::willChangeHasOnlySecureContent):
369         (WebKit::NavigationState::didChangeHasOnlySecureContent):
370         (WebKit::NavigationState::willChangeEstimatedProgress):
371         (WebKit::NavigationState::didChangeEstimatedProgress):
372         * WebKit2.xcodeproj/project.pbxproj:
373
374 2014-02-03  Tim Horton  <timothy_horton@apple.com>
375
376         WebKit2 View Gestures: Two smart magnifications in a row without moving the mouse should zoom out
377         https://bugs.webkit.org/show_bug.cgi?id=128108
378         <rdar://problem/15914539>
379
380         Reviewed by Darin Adler.
381
382         * UIProcess/mac/ViewGestureController.h:
383         * UIProcess/mac/ViewGestureController.mm:
384         (WebKit::ViewGestureController::ViewGestureController):
385         (WebKit::ViewGestureController::handleMagnificationGesture):
386         Clear the bit that tells us that we should do "smart" things (because the
387         last gesture was also a smart magnification gesture) when the user manually pinch-magnifies.
388
389         (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
390         Zoom out if the mouse hasn't moved since the last pinch-magnification gesture.
391
392
393 2014-02-03  Darin Adler  <darin@apple.com>
394
395         Try to fix 32-bit Mac build.
396
397         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
398         (WebKit::convertStringToKeyCodes): Use deprecatedCharacters.
399
400 2014-02-03  Krzysztof Czech  <k.czech@samsung.com>
401
402         Build fix after r163289.
403
404         Unreviewed EFL build fix.
405
406         Use deprecatedCharacters.
407
408         * UIProcess/efl/TextCheckerEfl.cpp:
409         (WebKit::TextChecker::requestCheckingOfString):
410
411 2014-02-03  Dan Bernstein  <mitz@apple.com>
412
413         Build fix.
414
415         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
416         (WebKit::convertStringToKeyCodes):
417
418 2014-02-03  Alberto Garcia  <berto@igalia.com>
419
420         Fix wrong mix of fcntl commands and flags
421         https://bugs.webkit.org/show_bug.cgi?id=127842
422
423         Reviewed by Darin Adler.
424
425         We are mixing the commands to set file descriptor and file status
426         flags in a couple of fcntl() calls. FD_CLOEXEC must be set using
427         F_SETFD, and the access mode flags (O_RDONLY, O_WRONLY, O_RDWR)
428         with F_SETFL.
429
430         This combines patches by Guillem Jover and Sergio Correia.
431
432         * Platform/IPC/unix/ConnectionUnix.cpp:
433         (IPC::readBytesFromSocket):
434         * Platform/unix/SharedMemoryUnix.cpp:
435         (WebKit::SharedMemory::createHandle):
436
437 2014-02-02  Brady Eidson  <beidson@apple.com>
438
439         IDB: Cannot open new databases with the default version
440         https://bugs.webkit.org/show_bug.cgi?id=128096
441
442         Reviewed by Tim Horton.
443
444         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
445         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): New databases should
446           have the magic "no version set" version.
447
448 2014-02-02  Sanghyup Lee  <sh53.lee@samsung.com>
449
450         [EFL][WK2] Add a logic for checking multi touch in GestureRecognizer::noGesture
451         https://bugs.webkit.org/show_bug.cgi?id=127675
452
453         Reviewed by Gyuyoung Kim.
454
455         When processing TouchStart event in GestureRecognizer::noGesture(), we should
456         check the number of touch points to distinguish if the gesture is single tap
457         or pinch zoom. Current logic only considers the event as single tap.
458
459         * UIProcess/API/efl/GestureRecognizer.cpp:
460         (WebKit::GestureRecognizer::noGesture):
461
462 2014-02-02  Enrica Casucci  <enrica@apple.com>
463
464         WK2: Selection is non editable content is not cleared when navigating to a different page.
465         https://bugs.webkit.org/show_bug.cgi?id=128084
466         <rdar://problem/15966166>
467
468         Reviewed by Dan Bernstein.
469
470         When resigning first responder, we need to cleanup the selection.
471
472         * UIProcess/API/ios/WKInteractionView.mm:
473         (-[WKInteractionView resignFirstResponder]):
474
475 2014-02-02  Enrica Casucci  <enrica@apple.com>
476
477         WK2: Cannot focus a second field in a page after the first has been focused.
478         https://bugs.webkit.org/show_bug.cgi?id=128055
479         <rdar://problem/15943652>
480
481         Reviewed by Simon Fraser.
482
483         When handling singleTap, we always need to send
484         a click to WebKit when we are already interacting with text.
485         Also, when we stop assisting the node, we should not call
486         resign responder, since that will trigger another unwanted blur.
487
488         * UIProcess/API/ios/WKInteractionView.mm:
489         (-[WKInteractionView _singleTapRecognized:]):
490         (-[WKInteractionView _stopAssistingNode]):
491
492 2014-02-02  Brady Eidson  <beidson@apple.com>
493
494         IDB: Support IDBFactory.deleteDatabase()
495         https://bugs.webkit.org/show_bug.cgi?id=128060
496
497         Reviewed by Filip Pizlo and Maciej Stachowiak (filesystem parts also Tim Hatcher and Simon Fraser)
498
499         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
500         (WebKit::DatabaseProcessIDBConnection::deleteDatabase):
501
502         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
503         (WebKit::UniqueIDBDatabase::calculateAbsoluteDatabaseFilename): Central place to
504           calculate the database filename.
505         (WebKit::UniqueIDBDatabase::unregisterConnection):
506         (WebKit::UniqueIDBDatabase::shutdown): Pass shutdown type along. 
507         (WebKit::UniqueIDBDatabase::shutdownBackingStore): If this is a delete shutdown, delete the DB.
508         (WebKit::UniqueIDBDatabase::didShutdownBackingStore): 
509         (WebKit::UniqueIDBDatabase::deleteDatabase):
510         (WebKit::UniqueIDBDatabase::postMainThreadTask): All some tasks to bypass the no-more-request restriction.
511         (WebKit::UniqueIDBDatabase::postDatabaseTask): Ditto.
512         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
513
514         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
515         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
516         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata): Use 
517           calculateAbsoluteDatabaseFilename from UniqueIDBDatabase.
518
519         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
520         (WebKit::WebIDBFactoryBackend::open): Update logging channel.
521         (WebKit::WebIDBFactoryBackend::deleteDatabase): Implement.
522         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
523
524         * Shared/WebCrossThreadCopier.h:
525
526 2014-02-01  Darin Adler  <darin@apple.com>
527
528         More characters -> deprecatedCharacters (based on more EWS complaints)
529         https://bugs.webkit.org/show_bug.cgi?id=128063
530
531         Reviewed by Anders Carlsson.
532
533         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
534         (WebKit::truncateToSingleLine): Use deprecatedCharacters.
535
536 2014-02-01  Enrica Casucci  <enrica@apple.com>
537
538         Speculative OSX build fix.
539
540         Excluding WKActionSheet.mm and WKActionSheetAssistant.mm.
541
542         * Configurations/WebKit2.xcconfig:
543
544 2014-02-01  Enrica Casucci  <enrica@apple.com>
545
546         Add support for ActionSheets in WK2 for iOS.
547         https://bugs.webkit.org/show_bug.cgi?id=127586
548         <rdar://problem/15283667>
549
550         Reviewed by Benjamin Poulain.
551
552         This patch adds the default support for Action Sheets
553         in WK2 for iOS. WKActionSheet is the implementation of the
554         sheet itself that inherits from UIActionSheet and handles
555         the repositioning of the sheet after rotation for iPad.
556         WKActionSheetAssistant is the controller class that implements
557         the delegate methods, controls the lifetime of the action sheet
558         object and performs the actions.
559         We have 3 different types of sheets:
560            - link sheet, displayed when the target element is a link
561            - image sheet, when the target element is an image
562            - data detector sheet when the target is an element
563              recognized by the data detectors library.
564         Both link and image sheet have a set of default buttons, whereas
565         datadetector sheet in only populated by custom actions provided
566         by data detectors.
567         The link sheet provides the following default actions:
568             - open, navigates to the URL
569             - copy, copies the URL to the pasteboard
570             - add to reading list
571         The image sheet provides the following actions depending on whether
572         the image is contained inside an anchor element or not.
573         If the image is NOT inside a link the following actions are provided:
574            - copy, copies the image to the pasteboard
575            - save image, saves the image in the photo library
576         Instead, if the image is inside an link:
577            - open, navigates to the URL spcified by the link
578            - copy, copies the link URL to the pasteboard
579             - save image, saves the image in the photo library
580             - add to reading list, adds the link URL to reading list.
581
582         * Shared/InteractionInformationAtPosition.cpp:
583         (WebKit::InteractionInformationAtPosition::encode):
584         (WebKit::InteractionInformationAtPosition::decode):
585         * Shared/InteractionInformationAtPosition.h:
586         * Shared/ios/WKGestureTypes.h:
587         * UIProcess/API/ios/PageClientImplIOS.h:
588         * UIProcess/API/ios/PageClientImplIOS.mm:
589         (WebKit::PageClientImpl::saveImageToLibrary):
590         * UIProcess/API/ios/WKActionSheet.h: Added.
591         * UIProcess/API/ios/WKActionSheet.mm: Added.
592         (-[WKActionSheet initWithView:]):
593         (-[WKActionSheet dealloc]):
594         (-[WKActionSheet presentSheet]):
595         (-[WKActionSheet presentSheetFromRect:]):
596         (-[WKActionSheet doneWithSheet]):
597         (-[WKActionSheet willRotate]):
598         (-[WKActionSheet updateSheetPosition]):
599         (-[WKActionSheet didRotate]):
600         (-[WKElementActionInfo initWithInfo:location:title:rect:]):
601         (-[WKElementActionInfo dealloc]):
602         (-[WKElementAction initWithTitle:actionHandler:type:]):
603         (-[WKElementAction dealloc]):
604         (+[WKElementAction customElementActionWithTitle:actionHandler:]):
605         (copyElement):
606         (saveImage):
607         (addToReadingList):
608         (+[WKElementAction standardElementActionWithType:customTitle:]):
609         (+[WKElementAction standardElementActionWithType:]):
610         (-[WKElementAction runActionWithElementInfo:view:]):
611         * UIProcess/API/ios/WKActionSheetAssistant.h: Added.
612         * UIProcess/API/ios/WKActionSheetAssistant.mm: Added.
613         (-[WKActionSheetAssistant initWithView:]):
614         (-[WKActionSheetAssistant dealloc]):
615         (-[WKActionSheetAssistant setPage:WebKit::]):
616         (-[WKActionSheetAssistant superviewForSheet]):
617         (-[WKActionSheetAssistant _presentationRectForSheetGivenPoint:inHostView:]):
618         (-[WKActionSheetAssistant hostViewForSheet]):
619         (-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
620         (-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
621         (-[WKActionSheetAssistant presentSheet]):
622         (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
623         (-[WKActionSheetAssistant updateSheetPosition]):
624         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
625         (-[WKActionSheetAssistant showImageSheet]):
626         (-[WKActionSheetAssistant showLinkSheet]):
627         (-[WKActionSheetAssistant showDataDetectorsSheet]):
628         (-[WKActionSheetAssistant cleanupSheet]):
629         * UIProcess/API/ios/WKInteractionView.h:
630         * UIProcess/API/ios/WKInteractionView.mm:
631         (-[WKInteractionView initWithFrame:]):
632         (-[WKInteractionView dealloc]):
633         (-[WKInteractionView setPage:WebKit::]):
634         (-[WKInteractionView _showImageSheet]):
635         (-[WKInteractionView _showLinkSheet]):
636         (-[WKInteractionView _showDataDetectorsSheet]):
637         (-[WKInteractionView _actionForLongPress]):
638         (-[WKInteractionView _updatePositionInformation]):
639         (-[WKInteractionView _longPressRecognized:]):
640         (-[WKInteractionView _positionInformationDidChange:]):
641         (-[WKInteractionView _performAction:]):
642         (-[WKInteractionView _updateAccessory]):
643         * UIProcess/PageClient.h:
644         * UIProcess/WebPageProxy.h:
645         * UIProcess/WebPageProxy.messages.in:
646         * UIProcess/ios/WebPageProxyIOS.mm:
647         (WebKit::WebPageProxy::startInteractionWithElementAtPosition):
648         (WebKit::WebPageProxy::stopInteraction):
649         (WebKit::WebPageProxy::performActionOnElement):
650         (WebKit::WebPageProxy::saveImageToLibrary):
651         * WebKit2.xcodeproj/project.pbxproj:
652         * WebProcess/WebPage/WebPage.h:
653         * WebProcess/WebPage/WebPage.messages.in:
654         * WebProcess/WebPage/ios/WebPageIOS.mm:
655         (WebKit::containingLinkElement):
656         (WebKit::WebPage::getPositionInformation):
657         (WebKit::WebPage::startInteractionWithElementAtPosition):
658         (WebKit::WebPage::stopInteraction):
659         (WebKit::WebPage::performActionOnElement):
660
661 2014-02-01  Brady Eidson  <beidson@apple.com>
662
663         IDB: Implement IDBCursor.delete()
664         <rdar://problem/15944203> and https://bugs.webkit.org/show_bug.cgi?id=127882
665
666         Reviewed by Sam Weinig.
667
668         IDBCursor.delete() actually relies on deleteRange(), which was implemented earlier.
669         So the only thing keeping it from working was a "Cursors iterate past their end" bug,
670         causing the delete transaction to be aborted.
671
672         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
673         (WebKit::SQLiteIDBCursor::advanceOnce): When the cursor does the final iteration,
674           clear the previous values to indicate completion.
675
676         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
677         (WebKit::SQLiteIDBTransaction::clearCursors): Noticed this opportunistic cleanup to
678           iterate over unique_ptr<>s with an auto& instead of an auto.
679
680 2014-01-31  Enrica Casucci  <enrica@apple.com>
681
682         Text interaction assistant is not deleted when dismissing the keyboard on iPad.
683         https://bugs.webkit.org/show_bug.cgi?id=128034
684         <rdar://problem/15915695>
685
686         Reviewed by Dan Bernstein.
687
688         In iPhone mode, tapping on 'Done' in the accessory view
689         calls the delegate accessoryDone where we correctly blur
690         the assisted node and tear down the text interaction assistant.
691         The code path for the keyboard in iPad mode is different,
692         all we get is resignFirstResponder.
693         The fix is just to move the blurring in resignFirstResponder
694         and it works for both iPhone and iPad.
695
696         * UIProcess/API/ios/WKInteractionView.mm:
697         (-[WKInteractionView resignFirstResponder]):
698         (-[WKInteractionView accessoryDone]):
699
700 2014-02-01  Brady Eidson  <beidson@apple.com>
701
702         IDB: Implement IDBObjectStore.delete()
703         https://bugs.webkit.org/show_bug.cgi?id=127880
704
705         Reviewed by Sam Weinig.
706
707         Implementing IDBObjectStore.delete() involves filling in the already-stubbed deleteRange() method.
708
709         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
710         (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore): Call through to the backing store.
711
712         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
713         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
714         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRange): Call deleteRecord on each key represented
715           by the passed-in keyRange. This involves collecting each key using a cursor.
716         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord): Delete an individual record from the
717           object store and all associated indexes.
718         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
719
720         Teach the SQLiteIDBCursor to remember if it ended in an error condition:
721         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
722         (WebKit::SQLiteIDBCursor::SQLiteIDBCursor):
723         (WebKit::SQLiteIDBCursor::advanceOnce):
724         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:
725         (WebKit::SQLiteIDBCursor::didError):
726
727 2014-02-01  Brady Eidson  <beidson@apple.com>
728
729         IDB: Index reading
730         <rdar://problem/15899973> and https://bugs.webkit.org/show_bug.cgi?id=127868
731
732         Reviewed by Jer Noble.
733
734         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
735         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
736
737         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
738         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
739         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord): Using an index cursor, read a value.
740         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
741
742 2014-02-01  Brady Eidson  <beidson@apple.com>
743
744         IDB: Index cursor complete advance() and iterate() support
745         <rdar://problem/15941916> and https://bugs.webkit.org/show_bug.cgi?id=127870
746
747         Reviewed by Dan Bernstein.
748
749         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
750         (WebKit::SQLiteIDBCursor::advanceOnce): Look up the found record value from the
751           object store records based on the key we found from the index.
752
753 2014-01-31  Anders Carlsson  <andersca@apple.com>
754
755         Add webView:didFailNavigation:withError: delegate method
756         https://bugs.webkit.org/show_bug.cgi?id=128022
757
758         Reviewed by Darin Adler.
759
760         * UIProcess/API/APILoaderClient.h:
761         (API::LoaderClient::didFailLoadWithErrorForFrame):
762         * UIProcess/API/C/WKPage.cpp:
763         (WKPageSetPageLoaderClient):
764         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
765         * UIProcess/Cocoa/NavigationState.h:
766         * UIProcess/Cocoa/NavigationState.mm:
767         (WebKit::NavigationState::setNavigationDelegate):
768         (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
769         * UIProcess/WebPageProxy.cpp:
770         (WebKit::WebPageProxy::didFailLoadForFrame):
771         * UIProcess/WebPageProxy.h:
772         * UIProcess/WebPageProxy.messages.in:
773         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
774         (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
775
776 2014-01-31  Brady Eidson  <beidson@apple.com>
777
778         IDB: Handle "nextunique" and "prevunique" cursors, and handle "advance()" correctly
779         https://bugs.webkit.org/show_bug.cgi?id=128040
780
781         Reviewed by Jer Noble.
782
783         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
784         (WebKit::SQLiteIDBCursor::advance): Entry point for advancing by a number of steps,
785           calls either advanceUnique or advanceOnce the appropriate number of times.
786         (WebKit::SQLiteIDBCursor::advanceUnique): Call advanceOnce until the key has changed.
787         (WebKit::SQLiteIDBCursor::advanceOnce):
788         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:
789
790 2014-01-31  Brady Eidson  <beidson@apple.com>
791
792         IDB: Index cursors use wrong deserialization for the retrieved value
793         https://bugs.webkit.org/show_bug.cgi?id=128035
794
795         Reviewed by Dan Bernstein.
796
797         Most of this is updating everything related to the cursor operation callbacks 
798         to support returning an IDBKey value in addition to a SharedBuffer value.
799
800         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
801         (WebKit::DatabaseProcessIDBConnection::openCursor):
802         (WebKit::DatabaseProcessIDBConnection::cursorAdvance):
803         (WebKit::DatabaseProcessIDBConnection::cursorIterate):
804
805         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
806         (WebKit::UniqueIDBDatabase::openCursor):
807         (WebKit::UniqueIDBDatabase::cursorAdvance):
808         (WebKit::UniqueIDBDatabase::cursorIterate):
809         (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
810         (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore):
811         (WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
812         (WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore):
813         (WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
814         (WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore):
815         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
816
817         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
818         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
819         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor):
820         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor):
821         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::iterateCursor):
822         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
823
824         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
825         (WebKit::SQLiteIDBCursor::advance):
826         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:
827         (WebKit::SQLiteIDBCursor::currentValueBuffer):
828         (WebKit::SQLiteIDBCursor::currentValueKey):
829
830         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
831         (WebKit::WebIDBServerConnection::didOpenCursor):
832         (WebKit::WebIDBServerConnection::didAdvanceCursor):
833         (WebKit::WebIDBServerConnection::didIterateCursor):
834         (WebKit::WebIDBServerConnection::openCursor):
835         (WebKit::WebIDBServerConnection::cursorAdvance):
836         (WebKit::WebIDBServerConnection::cursorIterate):
837         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
838         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
839
840 2014-01-31  Ryosuke Niwa  <rniwa@webkit.org>
841
842         Remove inline member functions of FrameSelection that access m_selection
843         https://bugs.webkit.org/show_bug.cgi?id=127986
844
845         Reviewed by Enrica Casucci.
846
847         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
848         (WebKit::collapseSelection):
849         * WebProcess/WebPage/WebPage.cpp:
850         (WebKit::WebPage::editorState):
851         (WebKit::WebPage::confirmComposition):
852         (WebKit::WebPage::setComposition):
853         * WebProcess/WebPage/ios/WebPageIOS.mm:
854         (WebKit::WebPage::setComposition):
855         (WebKit::WebPage::updateSelectionWithTouches):
856         * WebProcess/WebPage/mac/WebPageMac.mm:
857         (WebKit::WebPage::setComposition):
858         (WebKit::WebPage::getAttributedSubstringFromRange):
859
860 2014-01-31  Simon Fraser  <simon.fraser@apple.com>
861
862         Pass the viewport rect and scroll origin independently into the scrolling tree, and make things floats
863         https://bugs.webkit.org/show_bug.cgi?id=128032
864
865         Reviewed by Tim Horton.
866
867         Pass the viewport rect and scroll offset independently into the ScrollingTree
868         via the ScrollingStateScrollingNode, since on iOS the scroll offset doesn't
869         always correspond to the viewport rect.
870         
871         Make the viewport rect and the scroll origin be float-based, since on
872         Retina screens and with zooming these can both be non-integral.
873
874         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
875         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
876         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
877         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
878         (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
879         * UIProcess/Scrolling/RemoteScrollingTree.h:
880
881 2014-01-31  Tim Horton  <timothy_horton@apple.com>
882
883         WebKit2 View Gestures: Crash when pinch-zooming on a page that is just a frameset
884         https://bugs.webkit.org/show_bug.cgi?id=127591
885         <rdar://problem/15898349>
886
887         Reviewed by Simon Fraser.
888
889         When we have no shadow layer, we crash in TiledCoreAnimationDrawingArea::adjustTransientZoom.
890         Fix this null deref; also, we always want a shadow layer, even if the page cannot be scrolled,
891         because it can be revealed by pinching out.
892
893         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
894         (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
895         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
896         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
897
898 2014-01-31  Oliver Hunt  <oliver@apple.com>
899
900         Rollout r163195 and related patches
901
902         * CMakeLists.txt:
903
904 2014-01-31  Tim Horton  <timothy_horton@apple.com>
905
906         [wk2] PlatformCALayerRemoteCustom doesn't work on iOS
907         https://bugs.webkit.org/show_bug.cgi?id=128025
908         <rdar://problem/15950271>
909
910         Reviewed by Simon Fraser.
911
912         * Platform/mac/LayerHostingContext.h:
913         * Platform/mac/LayerHostingContext.mm:
914         (WebKit::LayerHostingContext::createForPort):
915         (WebKit::LayerHostingContext::createForExternalHostingProcess):
916         Use the new macro name (in a lot of places).
917         Rename LayerHostingContext::createForWindowServer() to createForExternalHostingProcess().
918         Don't use WKCAContextMakeRemoteForWindowServer on iOS, just use the CAContext
919         SPI directly. We don't want our CAContext to be hit tested because it's purely
920         presentational.
921
922         * UIProcess/API/ios/PageClientImplIOS.h:
923         iOS always hosts layers in an external process.
924
925         * PluginProcess/mac/PluginControllerProxyMac.mm:
926         (WebKit::PluginControllerProxy::updateLayerHostingContext):
927         * Shared/LayerTreeContext.h:
928         * UIProcess/API/mac/PageClientImpl.mm:
929         (WebKit::PageClientImpl::viewLayerHostingMode):
930         * UIProcess/PageClient.h:
931         (WebKit::PageClient::viewLayerHostingMode):
932         * UIProcess/WebPageProxy.cpp:
933         (WebKit::WebPageProxy::WebPageProxy):
934         (WebKit::WebPageProxy::viewStateDidChange):
935         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
936         (WebKit::NetscapePlugin::NetscapePlugin):
937         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
938         (WebKit::NetscapePlugin::compositingRenderServerPort):
939         * WebProcess/Plugins/PluginView.cpp:
940         (WebKit::PluginView::setLayerHostingMode):
941         * WebProcess/WebPage/WebPage.cpp:
942         (WebKit::WebPage::reinitializeWebPage):
943         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
944         (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
945         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
946         (WebKit::TiledCoreAnimationDrawingArea::updateLayerHostingContext):
947         Use enum class for LayerHostingMode and rename the members to InProcess and OutOfProcess.
948
949 2014-01-31  Martin Hock  <mhock@apple.com>
950
951         Add session support to WebPlatformStrategies
952         https://bugs.webkit.org/show_bug.cgi?id=127926
953
954         Reviewed by Alexey Proskuryakov.
955
956         * NetworkProcess/mac/RemoteNetworkingContext.mm:
957         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
958         * Shared/SessionTracker.cpp:
959         (WebKit::storageSessionToID):
960         (WebKit::SessionTracker::session):
961         (WebKit::SessionTracker::sessionID):
962         (WebKit::SessionTracker::setSession):
963         (WebKit::SessionTracker::destroySession):
964         * Shared/SessionTracker.h:
965         * UIProcess/WebPageProxy.cpp:
966         (WebKit::WebPageProxy::setSession):
967         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
968         (WebKit::WebPlatformStrategies::cookiesForDOM):
969         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
970         (WebKit::WebPlatformStrategies::cookiesEnabled):
971         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
972         (WebKit::WebPlatformStrategies::getRawCookies):
973         (WebKit::WebPlatformStrategies::deleteCookie):
974         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
975         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
976         * WebProcess/WebPage/WebPage.cpp:
977         (WebKit::WebPage::setSessionID): Ensure the storage session exists.
978         * WebProcess/WebPage/WebPage.h:
979
980 2014-01-31  Alexey Proskuryakov  <ap@apple.com>
981
982         Expose creation and modification times for LocalStorage
983         https://bugs.webkit.org/show_bug.cgi?id=128018
984
985         Reviewed by Anders Carlsson.
986
987         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
988         (WKKeyValueStorageManagerGetOriginKey):
989         (WKKeyValueStorageManagerGetCreationTimeKey):
990         (WKKeyValueStorageManagerGetModificationTimeKey):
991         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
992         * UIProcess/API/C/WKKeyValueStorageManager.h:
993         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
994         (WebKit::LocalStorageDatabaseTracker::origins):
995         (WebKit::LocalStorageDatabaseTracker::details):
996         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
997         * UIProcess/Storage/StorageManager.cpp:
998         (WebKit::StorageManager::getStorageDetailsByOrigin):
999         (WebKit::StorageManager::getStorageDetailsByOriginInternal):
1000         * UIProcess/Storage/StorageManager.h:
1001         * UIProcess/WebKeyValueStorageManager.cpp:
1002         (WebKit::WebKeyValueStorageManager::originKey):
1003         (WebKit::WebKeyValueStorageManager::creationTimeKey):
1004         (WebKit::WebKeyValueStorageManager::modificationTimeKey):
1005         (WebKit::didGetKeyValueStorageOrigins):
1006         (WebKit::didGetStorageDetailsByOrigin):
1007         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1008         * UIProcess/WebKeyValueStorageManager.h:
1009         * WebKit2.xcodeproj/project.pbxproj:
1010
1011 2014-01-31  Anders Carlsson  <andersca@apple.com>
1012
1013         Add webView:didReceiveServerRedirectForProvisionalNavigation:
1014         https://bugs.webkit.org/show_bug.cgi?id=128016
1015
1016         Reviewed by Dan Bernstein.
1017
1018         * UIProcess/API/APILoaderClient.h:
1019         (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
1020         * UIProcess/API/C/WKPage.cpp:
1021         (WKPageSetPageLoaderClient):
1022         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1023         * UIProcess/Cocoa/NavigationState.h:
1024         * UIProcess/Cocoa/NavigationState.mm:
1025         (WebKit::NavigationState::setNavigationDelegate):
1026         (WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
1027         * UIProcess/WebPageProxy.cpp:
1028         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
1029         * UIProcess/WebPageProxy.h:
1030         * UIProcess/WebPageProxy.messages.in:
1031         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1032         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
1033         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1034         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1035
1036 2014-01-31  Brady Eidson  <beidson@apple.com>
1037
1038         IDB: Index cursor preliminary support
1039         https://bugs.webkit.org/show_bug.cgi?id=127869
1040
1041         Reviewed by Sam Weinig.
1042
1043         This gets index cursors running and - for some situations - returning results.
1044
1045         Bug 127870 will make them fully functional.
1046
1047         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
1048         (WebKit::getIndexStatement): Using the key and sorting parameters, find the appropriate SQL
1049           statement to run an index cursor.
1050         (WebKit::getObjectStoreStatement): Same, but for object store cursors.
1051         (WebKit::SQLiteIDBCursor::establishStatement): Depending on the type of cursor, choose the
1052           correct SQL query and id to use.
1053         (WebKit::SQLiteIDBCursor::createSQLiteStatement): With the passed in SQL and id, handle both
1054           index and object store cursors.
1055         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:
1056
1057 2014-01-29  Oliver Hunt  <oliver@apple.com>
1058
1059         Make it possible to implement JS builtins in JS
1060         https://bugs.webkit.org/show_bug.cgi?id=127887
1061
1062         Reviewed by Michael Saboff.
1063
1064         CMake updates
1065
1066         * CMakeLists.txt:
1067
1068 2014-01-31  Tim Horton  <timothy_horton@apple.com>
1069
1070         WebKit2 View Gestures (Swipe): Crashes swiping around a Google Docs spreadsheet
1071         https://bugs.webkit.org/show_bug.cgi?id=128013
1072         <rdar://problem/15959481>
1073
1074         Reviewed by Anders Carlsson.
1075
1076         * UIProcess/mac/ViewGestureController.mm:
1077         (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
1078         We should never (currently) start a swipe from a non-begin-phase wheel event.
1079         We already check this in handleScrollWheelEvent, but can still get
1080         non-begin-phase events in wheelEventWasNotHandled.
1081
1082         We only start "pending" swipes with Begin events, so we should never make them
1083         non-pending with anything but a Begin event (we'll get it when it bubbles back up,
1084         unhandled, from WebCore). In addition, AppKit throws an exception when we try
1085         to start a swipe from end-phase events.
1086
1087 2014-01-31  Brady Eidson  <beidson@apple.com>
1088
1089         IDB: openCursor() needs to prime the cursor with first position values
1090         https://bugs.webkit.org/show_bug.cgi?id=128008
1091
1092         Reviewed by Alexey Proskuryakov.
1093
1094         Change openCursor() messaging to pass back the initial keys/values
1095         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1096         (WebKit::WebIDBServerConnection::didOpenCursor):
1097         (WebKit::WebIDBServerConnection::openCursor):
1098         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1099         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
1100
1101         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1102         (WebKit::DatabaseProcessIDBConnection::openCursor):
1103
1104         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1105         (WebKit::UniqueIDBDatabase::openCursor):
1106         (WebKit::UniqueIDBDatabase::cursorAdvance): Const and reference updates.
1107         (WebKit::UniqueIDBDatabase::cursorIterate): Ditto.
1108         (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
1109         (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore):
1110         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1111
1112         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1113         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1114         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor):
1115         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1116
1117         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
1118         (WebKit::SQLiteIDBCursor::maybeCreate): After creating the cursor, advance(1) it.
1119
1120         * Shared/AsyncTask.h:
1121         (WebKit::createAsyncTask):
1122
1123 2014-01-31  Beth Dakin  <bdakin@apple.com>
1124
1125         Sideways 'wobble' when scrolling with trackpad on Mavericks
1126         https://bugs.webkit.org/show_bug.cgi?id=127521
1127         -and corresponding-
1128         <rdar://problem/14137306>
1129
1130         Reviewed by Simon Fraser.
1131
1132         Start using WebCore::WheelEventDeltaTracker to filter events.
1133         * WebProcess/WebPage/EventDispatcher.cpp:
1134         (WebKit::EventDispatcher::EventDispatcher):
1135         (WebKit::EventDispatcher::wheelEvent):
1136         * WebProcess/WebPage/EventDispatcher.h:
1137
1138 2014-01-31  Zan Dobersek  <zdobersek@igalia.com>
1139
1140         Fix the forward declaration of RawPluginMetaData in NetscapePluginModule.h
1141         https://bugs.webkit.org/show_bug.cgi?id=127992
1142
1143         Reviewed by Martin Robinson.
1144
1145         * Shared/Plugins/Netscape/NetscapePluginModule.h: RawPluginMetaData is a struct, so it should
1146         be declared as such. The current forward declaration is throwing a warning when using Clang.
1147
1148 2014-01-31  Anders Carlsson  <andersca@apple.com>
1149
1150         REGRESSION: WebKit2.PageLoadBasic API test is failing
1151         https://bugs.webkit.org/show_bug.cgi?id=127892
1152
1153         Reviewed by Dan Bernstein.
1154
1155         On Mountain Lion, URLs returned by -[NSBundle URLForResource:withExtension:subdirectory] include
1156         localhost as the hostname, but WebCore::URL normalizes those URLs and removes the host name.
1157         
1158         Because of this, URLs created by WKURLCreateWithCFURL won't be equal to urls passed through 
1159         the WebCore::URL constructor. Change WKURLIsEqual to compare the normalized URLs.
1160
1161         * Shared/API/c/WKURL.cpp:
1162         (WKURLIsEqual):
1163         * Shared/APIURL.h:
1164         (API::URL::equals):
1165         (API::URL::url):
1166
1167 2014-01-31  Brady Eidson  <beidson@apple.com>
1168
1169         IDB: When deleting object stores/indexes, also delete associated records
1170         https://bugs.webkit.org/show_bug.cgi?id=127872
1171
1172         Reviewed by Anders Carlsson.
1173
1174         This was mostly done via other patches, but clearObjectStore was the last remaining case:
1175         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1176         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore): Also delete Index records.
1177
1178 2014-01-31  Brady Eidson  <beidson@apple.com>
1179
1180         IDB: Index writing
1181         <rdar://problem/15899973> and https://bugs.webkit.org/show_bug.cgi?id=127868
1182
1183         Reviewed by Anders Carlsson.
1184
1185         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1186         (WebKit::UniqueIDBDatabase::putRecordInBackingStore): Handle writing index records, as well.
1187
1188         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1189         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1190         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Create a table
1191           for index records
1192         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata): Extract IDBIndexMetadata
1193         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
1194         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
1195         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putIndexRecord): Store in the IndexRecords table.
1196         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1197
1198 2014-01-30  Jinwoo Song  <jinwoo7.song@samsung.com>
1199
1200         [EFL][WK2] Unreviewed EFL WebKit2 build fix after r163116.
1201         https://bugs.webkit.org/show_bug.cgi?id=127985
1202
1203         Unreviewed EFL WebKit2 build fix.
1204
1205         * UIProcess/CoordinatedGraphics/WebView.cpp:
1206         (WebKit::WebView::processDidExit):
1207         * UIProcess/CoordinatedGraphics/WebView.h:
1208
1209 2014-01-30  Simon Fraser  <simon.fraser@apple.com>
1210
1211         Fix iOS WK2 build after r163156.
1212
1213         Need to convert to IntSizes.
1214
1215         * WebProcess/WebPage/ios/WebPageIOS.mm:
1216         (WebKit::WebPage::tapHighlightAtPosition):
1217
1218 2014-01-30  Martin Robinson  <mrobinson@igalia.com>
1219
1220         [GTK] [CMake] Add support for building against GTK+ 2
1221         https://bugs.webkit.org/show_bug.cgi?id=127959
1222
1223         Reviewed by Anders Carlsson.
1224
1225         * PlatformGTK.cmake: Use the new API version variable and don't use GTK3 directly.
1226
1227 2014-01-30  Commit Queue  <commit-queue@webkit.org>
1228
1229         Unreviewed, rolling out r163125.
1230         http://trac.webkit.org/changeset/163125
1231         https://bugs.webkit.org/show_bug.cgi?id=127980
1232
1233         caused 9 layout tests to assert and crash (Requested by estes
1234         on #webkit).
1235
1236         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1237         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
1238         * Shared/SessionTracker.cpp:
1239         (WebKit::SessionTracker::session):
1240         (WebKit::SessionTracker::setSession):
1241         (WebKit::SessionTracker::destroySession):
1242         * Shared/SessionTracker.h:
1243         * UIProcess/WebPageProxy.cpp:
1244         (WebKit::WebPageProxy::setSession):
1245         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1246         (WebKit::legacySessionID):
1247         (WebKit::WebPlatformStrategies::cookiesForDOM):
1248         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
1249         (WebKit::WebPlatformStrategies::cookiesEnabled):
1250         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
1251         (WebKit::WebPlatformStrategies::getRawCookies):
1252         (WebKit::WebPlatformStrategies::deleteCookie):
1253         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1254         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
1255         * WebProcess/WebPage/WebPage.cpp:
1256         * WebProcess/WebPage/WebPage.h:
1257         (WebKit::WebPage::setSessionID):
1258
1259 2014-01-30  Anders Carlsson  <andersca@apple.com>
1260
1261         Add webView:didFinishLoadingNavigation: delegate method
1262         https://bugs.webkit.org/show_bug.cgi?id=127976
1263
1264         Reviewed by Dan Bernstein.
1265
1266         * UIProcess/API/APILoaderClient.h:
1267         (API::LoaderClient::didFinishLoadForFrame):
1268         * UIProcess/API/C/WKPage.cpp:
1269         (WKPageSetPageLoaderClient):
1270         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1271         * UIProcess/Cocoa/NavigationState.h:
1272         * UIProcess/Cocoa/NavigationState.mm:
1273         (WebKit::NavigationState::setNavigationDelegate):
1274         (WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
1275         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
1276         (WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
1277         (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
1278         * UIProcess/WebPageProxy.cpp:
1279         (WebKit::WebPageProxy::didFinishLoadForFrame):
1280         * UIProcess/WebPageProxy.h:
1281         * UIProcess/WebPageProxy.messages.in:
1282         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1283         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
1284
1285 2014-01-30  Tim Horton  <timothy_horton@apple.com>
1286
1287         Crashes after 163116 in [WKView takeViewSnapshot]
1288         https://bugs.webkit.org/show_bug.cgi?id=127973
1289
1290         Reviewed by Alexey Proskuryakov.
1291
1292         * UIProcess/API/mac/WKView.mm:
1293         (-[WKView _takeViewSnapshot]):
1294         Make the ViewGestureController before using it, if we need one.
1295
1296 2014-01-30  Anders Carlsson  <andersca@apple.com>
1297
1298         Add a webView:didCommitNavigation: delegate method
1299         https://bugs.webkit.org/show_bug.cgi?id=127972
1300
1301         Reviewed by Dan Bernstein.
1302
1303         * UIProcess/API/APILoaderClient.h:
1304         (API::LoaderClient::didCommitLoadForFrame):
1305         * UIProcess/API/C/WKPage.cpp:
1306         (WKPageSetPageLoaderClient):
1307         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1308         * UIProcess/Cocoa/NavigationState.h:
1309         * UIProcess/Cocoa/NavigationState.mm:
1310         (WebKit::NavigationState::setNavigationDelegate):
1311         (WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
1312         * UIProcess/WebPageProxy.cpp:
1313         (WebKit::WebPageProxy::didCommitLoadForFrame):
1314         * UIProcess/WebPageProxy.h:
1315         * UIProcess/WebPageProxy.messages.in:
1316         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1317         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1318
1319 2014-01-30  Anders Carlsson  <andersca@apple.com>
1320
1321         Add a webView:didFailProvisionalNavigation:withError: delegate method
1322         https://bugs.webkit.org/show_bug.cgi?id=127968
1323
1324         Reviewed by Dan Bernstein.
1325
1326         * UIProcess/API/APILoaderClient.h:
1327         (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
1328         * UIProcess/API/C/WKPage.cpp:
1329         (WKPageSetPageLoaderClient):
1330         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1331         * UIProcess/Cocoa/NavigationState.h:
1332         * UIProcess/Cocoa/NavigationState.mm:
1333         (WebKit::NavigationState::setNavigationDelegate):
1334         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
1335         * UIProcess/WebPageProxy.cpp:
1336         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
1337         * UIProcess/WebPageProxy.h:
1338         * UIProcess/WebPageProxy.messages.in:
1339         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1340         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
1341
1342 2014-01-30  Anders Carlsson  <andersca@apple.com>
1343
1344         Add a webView:didStartProvisionalNavigation: delegate method
1345         https://bugs.webkit.org/show_bug.cgi?id=127965
1346
1347         Reviewed by Dan Bernstein.
1348
1349         * UIProcess/API/APILoaderClient.h:
1350         (API::LoaderClient::didStartProvisionalLoadForFrame):
1351         * UIProcess/API/C/WKPage.cpp:
1352         (WKPageSetPageLoaderClient):
1353         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1354         * UIProcess/API/Cocoa/WKWebView.mm:
1355         (-[WKWebView initWithFrame:configuration:]):
1356         * UIProcess/Cocoa/NavigationState.h:
1357         * UIProcess/Cocoa/NavigationState.mm:
1358         (WebKit::NavigationState::createLoaderClient):
1359         (WebKit::NavigationState::createPolicyClient):
1360         (WebKit::NavigationState::setNavigationDelegate):
1361         (WebKit::NavigationState::LoaderClient::LoaderClient):
1362         (WebKit::NavigationState::LoaderClient::~LoaderClient):
1363         (WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
1364         * UIProcess/WebPageProxy.cpp:
1365         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
1366         * UIProcess/WebPageProxy.h:
1367         * UIProcess/WebPageProxy.messages.in:
1368         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1369         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
1370
1371 2014-01-30  Brady Eidson  <beidson@apple.com>
1372
1373         IDB: Implement IDBObjectStore.count()
1374         https://bugs.webkit.org/show_bug.cgi?id=127888
1375
1376         Reviewed by Tim Horton.
1377
1378         Now count() actually works.
1379
1380         Forward the count() request to the backing store”
1381         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1382         (WebKit::UniqueIDBDatabase::countInBackingStore):
1383
1384         Using a cursor, get a count:
1385         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1386         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1387         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::count):
1388         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1389
1390         Give a direct accessor to allow the backing store to close a cursor it opened
1391         for its own use:
1392         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
1393         (WebKit::SQLiteIDBTransaction::closeCursor):
1394         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
1395
1396         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1397         (WebKit::WebIDBServerConnection::didCount): Update the logging to show the count.
1398
1399 2014-01-30  Anders Carlsson  <andersca@apple.com>
1400
1401         Implement NavigationState::PolicyClient::decidePolicyForNewWindowAction
1402         https://bugs.webkit.org/show_bug.cgi?id=127962
1403
1404         Reviewed by Andreas Kling.
1405
1406         Have decidePolicyForNewWindowAction call decidePolicyForNavigationAction with a null destination frame.
1407
1408         * UIProcess/Cocoa/NavigationState.h:
1409         * UIProcess/Cocoa/NavigationState.mm:
1410         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
1411         (WebKit::NavigationState::PolicyClient::decidePolicyForNewWindowAction):
1412
1413 2014-01-30  Martin Hock  <mhock@apple.com>
1414
1415         Add session support to WebPlatformStrategies
1416         https://bugs.webkit.org/show_bug.cgi?id=127926
1417
1418         Reviewed by Alexey Proskuryakov.
1419
1420         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1421         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
1422         * Shared/SessionTracker.cpp:
1423         (WebKit::storageSessionToID):
1424         (WebKit::SessionTracker::session):
1425         (WebKit::SessionTracker::sessionID):
1426         (WebKit::SessionTracker::setSession):
1427         (WebKit::SessionTracker::destroySession):
1428         * Shared/SessionTracker.h:
1429         * UIProcess/WebPageProxy.cpp:
1430         (WebKit::WebPageProxy::setSession):
1431         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1432         (WebKit::WebPlatformStrategies::cookiesForDOM):
1433         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
1434         (WebKit::WebPlatformStrategies::cookiesEnabled):
1435         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
1436         (WebKit::WebPlatformStrategies::getRawCookies):
1437         (WebKit::WebPlatformStrategies::deleteCookie):
1438         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1439         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
1440         * WebProcess/WebPage/WebPage.cpp:
1441         (WebKit::WebPage::setSessionID): Ensure the storage session exists.
1442         * WebProcess/WebPage/WebPage.h:
1443
1444 2014-01-30  Brady Eidson  <beidson@apple.com>
1445
1446         IDB: ObjectStore cursor iterate() support
1447         <rdar://problem/15941914> and https://bugs.webkit.org/show_bug.cgi?id=127867
1448
1449         Reviewed by Tim Horton.
1450
1451         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
1452         (WebKit::SQLiteIDBCursor::iterate): Implement iterate() using advance()
1453
1454 2014-01-30  Anders Carlsson  <andersca@apple.com>
1455
1456         decidePolicyForNewWindowAction should take a NavigationActionData object
1457         https://bugs.webkit.org/show_bug.cgi?id=127952
1458
1459         Reviewed by Dan Bernstein.
1460
1461         * UIProcess/API/APIPolicyClient.h:
1462         (API::PolicyClient::decidePolicyForNewWindowAction):
1463         * UIProcess/API/C/WKPage.cpp:
1464         (WKPageSetPagePolicyClient):
1465         * UIProcess/WebPageProxy.cpp:
1466         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1467
1468 2014-01-27  Jeffrey Pfau  <jpfau@apple.com>
1469
1470         Add a method for schemes to be registered as supporting cache partitioning
1471         https://bugs.webkit.org/show_bug.cgi?id=127739
1472
1473         Reviewed by Darin Adler.
1474
1475         Pipe information about cache partitioned scheme through WebKit2.
1476
1477         * Shared/WebProcessCreationParameters.cpp:
1478         (WebKit::WebProcessCreationParameters::encode):
1479         (WebKit::WebProcessCreationParameters::decode):
1480         * Shared/WebProcessCreationParameters.h:
1481         * UIProcess/API/C/WKContext.cpp:
1482         (WKContextRegisterURLSchemeAsCachePartitioned):
1483         * UIProcess/API/C/WKContextPrivate.h:
1484         * UIProcess/WebContext.cpp:
1485         (WebKit::WebContext::createNewWebProcess):
1486         (WebKit::WebContext::registerURLSchemeAsCachePartitioned):
1487         * UIProcess/WebContext.h:
1488         * WebProcess/WebProcess.cpp:
1489         (WebKit::WebProcess::initializeWebProcess):
1490         (WebKit::WebProcess::registerURLSchemeAsCachePartitioned):
1491         * WebProcess/WebProcess.h:
1492         * WebProcess/WebProcess.messages.in:
1493
1494 2014-01-30  Tim Horton  <timothy_horton@apple.com>
1495
1496         Lots of API test assertion failures after r163093
1497         https://bugs.webkit.org/show_bug.cgi?id=127948
1498
1499         Reviewed by Alexey Proskuryakov.
1500
1501         * UIProcess/API/ios/PageClientImplIOS.mm:
1502         (WebKit::PageClientImpl::processDidExit):
1503         * UIProcess/API/ios/WKContentView.mm:
1504         (-[WKContentView _processDidExit]):
1505         * UIProcess/API/ios/WKContentViewInternal.h:
1506         * UIProcess/API/mac/PageClientImpl.h:
1507         * UIProcess/API/mac/PageClientImpl.mm:
1508         (WebKit::PageClientImpl::processDidExit):
1509         * UIProcess/API/mac/WKView.mm:
1510         (-[WKView _processDidExit]):
1511         * UIProcess/PageClient.h:
1512         * UIProcess/WebPageProxy.cpp:
1513         (WebKit::WebPageProxy::processDidCrash):
1514         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1515         * UIProcess/API/mac/WKViewInternal.h:
1516         Rename _processDidCrash to _processDidExit, since it containes cleanup we
1517         should do in both cases. Also, call it whenever a process terminates instead
1518         of just upon a crash. Also clear the ViewGestureController, because its
1519         state doesn't make sense between WebProcesses.
1520
1521         (-[WKView _setCustomSwipeViews:]):
1522         Don't make a ViewGestureController if we don't have one and would be
1523         only creating one to set an empty list of custom swipe views.
1524
1525 2014-01-30  Brady Eidson  <beidson@apple.com>
1526
1527         IDB: ObjectStore cursor advance() support
1528         <rdar://problem/15779645> and https://bugs.webkit.org/show_bug.cgi?id=127866
1529
1530         Reviewed by Sam Weinig.
1531
1532         Plumb calls through to the backing store:
1533         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1534         (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
1535         (WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
1536         (WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
1537
1538         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1539         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1540         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Update schema
1541           for Records table.
1542         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
1543         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
1544         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::resetTransaction):
1545         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
1546         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor): Create a SQLiteIDBCursor object.
1547         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor): Call through to that object.
1548         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::iterateCursor): Ditto.
1549         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::idbKeyCollate): Renamed for clarity.
1550         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::unregisterCursor): Cleanup open cursors.
1551         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1552
1553         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp: Added.
1554         (WebKit::SQLiteIDBCursor::maybeCreate):
1555         (WebKit::SQLiteIDBCursor::SQLiteIDBCursor):
1556         (WebKit::SQLiteIDBCursor::establishStatement):
1557         (WebKit::SQLiteIDBCursor::createIndexCursorStatement): Stubbed for now.
1558         (WebKit::SQLiteIDBCursor::createObjectStoreCursorStatement): Create the appropriate query for
1559           the passed in IDBKeyRange.
1560         (WebKit::SQLiteIDBCursor::advance): Step through that query.
1561         (WebKit::SQLiteIDBCursor::iterate): Stubbed for now.
1562         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h: Added.
1563         (WebKit::SQLiteIDBCursor::identifier):
1564         (WebKit::SQLiteIDBCursor::transaction):
1565         (WebKit::SQLiteIDBCursor::currentKey):
1566         (WebKit::SQLiteIDBCursor::currentPrimaryKey):
1567         (WebKit::SQLiteIDBCursor::currentValue):
1568
1569         Add infrastructure for a SQLiteIDBTransaction to keep track of (and clean up) its open cursors:
1570         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
1571         (WebKit::SQLiteIDBTransaction::SQLiteIDBTransaction):
1572         (WebKit::SQLiteIDBTransaction::~SQLiteIDBTransaction):
1573         (WebKit::SQLiteIDBTransaction::reset):
1574         (WebKit::SQLiteIDBTransaction::openCursor):
1575         (WebKit::SQLiteIDBTransaction::clearCursors):
1576         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
1577         (WebKit::SQLiteIDBTransaction::create):
1578         (WebKit::SQLiteIDBTransaction::sqliteTransaction):
1579
1580         Add accessors for the two fields:
1581         * DatabaseProcess/IndexedDB/IDBIdentifier.h:
1582         (WebKit::IDBIdentifier::connection):
1583         (WebKit::IDBIdentifier::id):
1584
1585         * WebKit2.xcodeproj/project.pbxproj:
1586
1587 2014-01-30  Anders Carlsson  <andersca@apple.com>
1588
1589         Implement policy response delegate handling
1590         https://bugs.webkit.org/show_bug.cgi?id=127945
1591
1592         Reviewed by Dan Bernstein.
1593
1594         * UIProcess/API/APIPolicyClient.h:
1595         (API::PolicyClient::decidePolicyForResponse):
1596         * UIProcess/API/C/WKPage.cpp:
1597         (WKPageSetPagePolicyClient):
1598         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1599         (NS_ENUM):
1600         * UIProcess/Cocoa/NavigationState.h:
1601         * UIProcess/Cocoa/NavigationState.mm:
1602         (WebKit::NavigationState::setNavigationDelegate):
1603         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
1604         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
1605         * UIProcess/WebPageProxy.cpp:
1606         (WebKit::WebPageProxy::decidePolicyForResponse):
1607
1608 2014-01-29  Dean Jackson  <dino@apple.com>
1609
1610         Allow the OpenGL Profiler to get through the sandbox
1611         https://bugs.webkit.org/show_bug.cgi?id=127877
1612         <rdar://problem/14817250>
1613         <rdar://problem/14271180>
1614
1615         Reviewed by Alexey Proskuryakov.
1616
1617         Open up the sandbox for WebProcess and PluginProcess so
1618         that OpenGL.framework can create a mach port for communication
1619         with the OpenGL Profiler.
1620
1621         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1622         * WebProcess/com.apple.WebProcess.sb.in:
1623
1624 2014-01-30  Anders Carlsson  <andersca@apple.com>
1625
1626         Begin fleshing out the navigation delegate
1627         https://bugs.webkit.org/show_bug.cgi?id=127939
1628
1629         Reviewed by Dan Bernstein.
1630
1631         * UIProcess/API/APIPolicyClient.h:
1632         (API::PolicyClient::decidePolicyForNavigationAction):
1633         Pass the listener as a RefPtr.
1634
1635         * UIProcess/API/C/WKPage.cpp:
1636         (WKPageSetPagePolicyClient):
1637         Update for API::PolicyClient changes.
1638
1639         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1640         Add new delegate.
1641
1642         * UIProcess/API/Cocoa/WKWebView.mm:
1643         (-[WKWebView initWithFrame:configuration:]):
1644         Set a policy client on the page.
1645
1646         * UIProcess/Cocoa/NavigationState.h:
1647         Add a new PolicyClient class.
1648
1649         * UIProcess/Cocoa/NavigationState.mm:
1650         (WebKit::NavigationState::NavigationState):
1651         Initialize m_navigationDelegateMethods.
1652
1653         (WebKit::NavigationState::navigationDelegate):
1654         m_delegate was renamed to m_navigationDelegate.
1655
1656         (WebKit::NavigationState::setNavigationDelegate):
1657         Update m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionDecisionHandler.
1658         
1659         (WebKit::NavigationState::createPolicyClient):
1660         New helper function for creating a new policy client.
1661
1662         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
1663         Call the navigation delegate method.
1664
1665         * UIProcess/WebPageProxy.cpp:
1666         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1667         Use std::move to hand off the listener to the client.
1668
1669 2014-01-30  Jeremy Jones  <jeremyj@apple.com>
1670
1671         Crash in RemoteLayerBackingStore::encode when m_frontBuffer is nullptr.
1672         https://bugs.webkit.org/show_bug.cgi?id=127756
1673
1674         Reviewed by Jer Noble.
1675
1676         Don't encode RemoteLayerBackingStore when it has no front buffer.
1677
1678         * Shared/mac/RemoteLayerBackingStore.h:
1679         (WebKit::RemoteLayerBackingStore::hasFrontBuffer):
1680         * Shared/mac/RemoteLayerTreeTransaction.mm:
1681         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1682         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1683
1684 2014-01-30  Mark Rowe  <mrowe@apple.com>
1685
1686         Host plug-ins in XPC services
1687         <https://webkit.org/b/127897> / <rdar://problem/13675955>
1688
1689         We disabled use of XPC services for plug-ins back in r143829 as the per-architecture services
1690         were not being built for the appropriate architectures. Fixing that allows us to reenable them.
1691
1692         Reviewed by Anders Carlsson.
1693
1694         * Configurations/PluginService.32.xcconfig: Use VALID_ARCHS to restrict the service
1695         to building for i386-only in production builds. Non-production builds allow building
1696         for all standard architectures to ensure that Xcode will be able to build this target.
1697         The exact architecture used isn't a concern for non-production builds since we'll use
1698         the development version of the service anyway.
1699         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1700         (WebKit::shouldUseXPC): Remove the workaround that disables use of the XPC services.
1701
1702 2014-01-30  Anders Carlsson  <andersca@apple.com>
1703
1704         Add WKNavigationDelegate class
1705         https://bugs.webkit.org/show_bug.cgi?id=127927
1706
1707         Reviewed by Dan Bernstein.
1708
1709         * UIProcess/API/Cocoa/WKNavigationDelegate.h: Copied from Source/WebKit2/UIProcess/Cocoa/NavigationState.h.
1710         * UIProcess/API/Cocoa/WKWebView.h:
1711         * UIProcess/API/Cocoa/WKWebView.mm:
1712         (-[WKWebView navigationDelegate]):
1713         (-[WKWebView setNavigationDelegate:]):
1714         * UIProcess/Cocoa/NavigationState.h:
1715         * UIProcess/Cocoa/NavigationState.mm:
1716         (WebKit::NavigationState::navigationDelegate):
1717         (WebKit::NavigationState::setNavigationDelegate):
1718         * WebKit2.xcodeproj/project.pbxproj:
1719
1720 2014-01-30  Tim Horton  <timothy_horton@apple.com>
1721
1722         WebKit2 View Gestures (Swipe): Provide a way for clients to provide views to swipe
1723         https://bugs.webkit.org/show_bug.cgi?id=127891
1724         <rdar://problem/15931413>
1725
1726         Reviewed by Anders Carlsson.
1727
1728         * UIProcess/API/Cocoa/WKViewPrivate.h: Add the SPI.
1729
1730         * UIProcess/API/ios/PageClientImplIOS.h:
1731         * UIProcess/API/ios/PageClientImplIOS.mm:
1732         (WebKit::PageClientImpl::clearCustomSwipeViews):
1733         * UIProcess/API/mac/PageClientImpl.h:
1734         * UIProcess/API/mac/PageClientImpl.mm:
1735         (WebKit::PageClientImpl::clearCustomSwipeViews):
1736         * UIProcess/PageClient.h:
1737         Plumb clearCustomSwipeViews() so that WebPageProxy can clear
1738         ViewGestureController's list of custom views when the current
1739         back-forward item changes.
1740
1741         * UIProcess/API/mac/WKView.mm:
1742         (-[WKView _takeViewSnapshot]):
1743         If we have custom swipe views, use the union of their bounds as the snapshot region.
1744
1745         (-[WKView _setCustomSwipeViews:]):
1746         Forward along to ViewGestureController.
1747
1748         * UIProcess/WebPageProxy.cpp:
1749         (WebKit::WebPageProxy::didChangeBackForwardList):
1750         When the current back forward list item changes, clear the custom swipe views.
1751
1752         * UIProcess/mac/ViewGestureController.h:
1753         (WebKit::ViewGestureController::setCustomSwipeViews):
1754         (WebKit::ViewGestureController::customSwipeViews):
1755         * UIProcess/mac/ViewGestureController.mm:
1756         (WebKit::ViewGestureController::windowRelativeBoundsForCustomSwipeViews):
1757         Compute the union of the custom swipe view bounds in the window's coordinate space.
1758
1759         (WebKit::ViewGestureController::beginSwipeGesture):
1760         Store the layers we'll be swiping as the "live" layers in m_currentSwipeLiveLayers.
1761         Don't set a shadow (yet) if we have custom swipe views, because it's not clear where to put it.
1762
1763         (WebKit::ViewGestureController::handleSwipeGesture):
1764         Compute the swipe distance ('width') based on the union of the custom views bounds if needed.
1765         Update the transform of all of the live layers. We use transform instead of position now
1766         so that clients can set the position (having an identity transform is one of the SPI caveats).
1767
1768         (WebKit::ViewGestureController::removeSwipeSnapshot):
1769         Reset the transform on all of the live layers.
1770         Clear the list of live layers.
1771
1772 2014-01-30  Brady Eidson  <beidson@apple.com>
1773
1774         IDB: Add no-op plumbing for deleteDatabase and deleteRange
1775         https://bugs.webkit.org/show_bug.cgi?id=127912
1776
1777         Reviewed by Alexey Proskuryakov.
1778
1779         Forward the calls to the DatabaseProcess, and handle completion from the DatabaseProcess:
1780         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1781         (WebKit::WebIDBServerConnection::deleteDatabase):
1782         (WebKit::WebIDBServerConnection::didDeleteDatabase):
1783         (WebKit::WebIDBServerConnection::deleteRange):
1784         (WebKit::WebIDBServerConnection::didDeleteRange):
1785         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1786         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
1787
1788         Stub out deleteDatabase, and forward deleteRange to the appropriate UniqueIDBDatabase:
1789         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1790         (WebKit::DatabaseProcessIDBConnection::deleteDatabase):
1791         (WebKit::DatabaseProcessIDBConnection::deleteRange):
1792         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1793         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1794
1795         Forward the request to the backing store thread, and handle the response from that thread:
1796         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1797         (WebKit::UniqueIDBDatabase::deleteRange):
1798         (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore):
1799         (WebKit::UniqueIDBDatabase::didDeleteRangeInBackingStore):
1800         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1801
1802 2014-01-30  Antti Koivisto  <antti@apple.com>
1803
1804         WebPage::determinePrimarySnapshottedPlugIn is slow
1805         https://bugs.webkit.org/show_bug.cgi?id=127905
1806
1807         Reviewed by Anders Carlsson.
1808         
1809         PLT before:
1810         132.0ms  0.8% 0,0   WebKit::WebPage::determinePrimarySnapshottedPlugIn()
1811         130.0ms  0.8% 0,0    WebCore::RenderView::hitTest(WebCore::HitTestRequest const&, WebCore::HitTestResult&)
1812         
1813         After:
1814         7.0ms    0.0% 0,0   WebKit::WebPage::determinePrimarySnapshottedPlugIn()
1815         3.0ms    0.0% 0,0    WebCore::RenderView::hitTest(WebCore::HitTestRequest const&, WebCore::HitTestResult&)
1816
1817         * WebProcess/WebPage/WebPage.cpp:
1818         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
1819         
1820             Instead of shotgunning the page with hit tests, do a DOM crawl for plugins
1821             and hit test the centers.
1822
1823 2014-01-30  Andrei Bucur  <abucur@adobe.com>
1824
1825         Remove the ACCELERATED_COMPOSITING flag
1826         https://bugs.webkit.org/show_bug.cgi?id=127833
1827
1828         Reviewed by Antti Koivisto.
1829
1830         Remove the USE(ACCELERATED_COMPOSITING) conditionals from the code base and make AC
1831         mandatory.
1832
1833         * PluginProcess/PluginControllerProxy.cpp:
1834         (WebKit::PluginControllerProxy::PluginControllerProxy):
1835         * PluginProcess/PluginCreationParameters.cpp:
1836         (WebKit::PluginCreationParameters::PluginCreationParameters):
1837         (WebKit::PluginCreationParameters::encode):
1838         (WebKit::PluginCreationParameters::decode):
1839         * PluginProcess/PluginCreationParameters.h:
1840         * PluginProcess/PluginProcess.h:
1841         * Shared/WebRenderLayer.cpp:
1842         (WebKit::WebRenderLayer::WebRenderLayer):
1843         * Shared/mac/RemoteLayerBackingStore.h:
1844         * Shared/mac/RemoteLayerBackingStore.mm:
1845         (RemoteLayerBackingStore::enumerateRectsBeingDrawn):
1846         * UIProcess/API/efl/EvasGLContext.cpp:
1847         * UIProcess/API/efl/EvasGLContext.h:
1848         * UIProcess/API/efl/EvasGLSurface.cpp:
1849         * UIProcess/API/efl/EvasGLSurface.h:
1850         * UIProcess/API/efl/EwkView.cpp:
1851         (EwkView::EwkView):
1852         (EwkView::displayTimerFired):
1853         (EwkView::createGLSurface):
1854         (EwkView::handleEvasObjectCalculate):
1855         (EwkView::handleEvasObjectShow):
1856         (EwkView::takeSnapshot):
1857         * UIProcess/API/efl/EwkView.h:
1858         * UIProcess/API/efl/SnapshotImageGL.cpp:
1859         (getImageSurfaceFromFrameBuffer):
1860         * UIProcess/API/efl/SnapshotImageGL.h:
1861         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
1862         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
1863         * UIProcess/API/gtk/PageClientImpl.cpp:
1864         (WebKit::PageClientImpl::updateAcceleratedCompositingMode):
1865         * UIProcess/API/gtk/PageClientImpl.h:
1866         * UIProcess/API/ios/PageClientImplIOS.h:
1867         * UIProcess/API/ios/PageClientImplIOS.mm:
1868         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
1869         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
1870         (WebKit::CoordinatedDrawingAreaProxy::~CoordinatedDrawingAreaProxy):
1871         (WebKit::CoordinatedDrawingAreaProxy::visibilityDidChange):
1872         (WebKit::CoordinatedDrawingAreaProxy::didUpdateBackingStoreState):
1873         (WebKit::CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode):
1874         (WebKit::CoordinatedDrawingAreaProxy::exitAcceleratedCompositingMode):
1875         (WebKit::CoordinatedDrawingAreaProxy::updateAcceleratedCompositingMode):
1876         (WebKit::CoordinatedDrawingAreaProxy::sendUpdateBackingStoreState):
1877         (WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
1878         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h:
1879         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
1880         * UIProcess/CoordinatedGraphics/PageViewportController.h:
1881         * UIProcess/CoordinatedGraphics/WebView.cpp:
1882         (WebKit::WebView::setVisible):
1883         * UIProcess/DrawingAreaProxy.h:
1884         * UIProcess/DrawingAreaProxy.messages.in:
1885         * UIProcess/DrawingAreaProxyImpl.cpp:
1886         (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
1887         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
1888         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
1889         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
1890         (WebKit::DrawingAreaProxyImpl::updateAcceleratedCompositingMode):
1891         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
1892         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState):
1893         * UIProcess/DrawingAreaProxyImpl.h:
1894         * UIProcess/PageClient.h:
1895         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1896         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
1897         * UIProcess/WebPageProxy.cpp:
1898         (WebKit::WebPageProxy::updateAcceleratedCompositingMode):
1899         * UIProcess/WebPageProxy.h:
1900         * UIProcess/efl/PageLoadClientEfl.cpp:
1901         (WebKit::PageLoadClientEfl::didCommitLoadForFrame):
1902         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
1903         * UIProcess/efl/ViewClientEfl.cpp:
1904         (WebKit::ViewClientEfl::didChangeContentsSize):
1905         (WebKit::ViewClientEfl::didChangeContentsPosition):
1906         (WebKit::ViewClientEfl::didRenderFrame):
1907         (WebKit::ViewClientEfl::didCompletePageTransition):
1908         (WebKit::ViewClientEfl::didChangeViewportAttributes):
1909         * UIProcess/mac/WebContextMac.mm:
1910         (WebKit::WebContext::platformInitializeWebProcess):
1911         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1912         (WebKit::screenRectOfContents):
1913         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1914         (WebKit::NetscapePlugin::isAcceleratedCompositingEnabled):
1915         * WebProcess/Plugins/PluginController.h:
1916         * WebProcess/Plugins/PluginProxy.cpp:
1917         (WebKit::PluginProxy::initialize):
1918         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1919         (WebKit::WebChromeClient::layerTreeStateIsFrozen):
1920         * WebProcess/WebCoreSupport/WebChromeClient.h:
1921         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
1922         (WebKit::CoordinatedDrawingArea::layerHostDidFlushLayers):
1923         (WebKit::CoordinatedDrawingArea::scheduleCompositingLayerFlush):
1924         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
1925         * WebProcess/WebPage/DrawingArea.h:
1926         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1927         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
1928         (WebKit::DrawingAreaImpl::scheduleCompositingLayerFlush):
1929         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
1930         * WebProcess/WebPage/DrawingAreaImpl.h:
1931         * WebProcess/WebPage/WebPage.cpp:
1932         (WebKit::WebPage::exitAcceleratedCompositingMode):
1933         (WebKit::WebPage::mainFrameDidLayout):
1934         (WebKit::WebPage::didReceiveMessage):
1935         * WebProcess/WebPage/WebPage.h:
1936         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
1937         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1938         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1939         (PlatformCALayerRemote::hostingContextID):
1940         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1941         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
1942         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
1943         (PlatformCALayerRemoteCustom::hostingContextID):
1944         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
1945         (PlatformCALayerRemoteTiledBacking::setBorderColor):
1946         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
1947         * WebProcess/WebProcess.cpp:
1948         (WebKit::WebProcess::WebProcess):
1949         * WebProcess/WebProcess.h:
1950
1951 2014-01-30  Brady Eidson  <beidson@apple.com>
1952
1953         IDB: Key generator support
1954         https://bugs.webkit.org/show_bug.cgi?id=127871
1955
1956         Reviewed by Tim Horton.
1957
1958         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1959         (WebKit::UniqueIDBDatabase::putRecordInBackingStore): Update for storing/retrieving integers instead of IDBKeys.
1960         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1961
1962         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1963         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Create a keygen table.
1964         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore): Put a record in the keygen table for
1965           this object store if necessary.
1966         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore): Delete the entry in the keygen table.
1967         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber): Pull the current number from the table.
1968         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGeneratorNumber): Update the number in the table.
1969         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1970
1971         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1972         (WebKit::WebIDBServerConnection::put): Null keys are acceptable for autoIncrement object stores.
1973
1974 2014-01-30  Brady Eidson  <beidson@apple.com>
1975
1976         IDB: Implement IDBObjectStore.count()
1977         https://bugs.webkit.org/show_bug.cgi?id=127888
1978
1979         Reviewed by Tim Horton.
1980
1981         Forward request to the DatabaseProcess, and handle its completion:
1982         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1983         (WebKit::WebIDBServerConnection::count):
1984         (WebKit::WebIDBServerConnection::didCount):
1985         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1986         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
1987
1988         Pass request along to the appropriate UniqueIDBDatabase:
1989         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1990         (WebKit::DatabaseProcessIDBConnection::count):
1991         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1992         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1993
1994         Pass request to backing store thread, then pass it back to the WebProcess:
1995         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1996         (WebKit::UniqueIDBDatabase::count):
1997         (WebKit::UniqueIDBDatabase::countInBackingStore):
1998         (WebKit::UniqueIDBDatabase::didCountInBackingStore):
1999         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2000
2001         * Shared/AsyncTask.h:
2002         (WebKit::createAsyncTask):
2003
2004 2014-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2005
2006         Unreviewed. Fix the GTK+ build after r163037.
2007
2008         * UIProcess/API/gtk/WebKitWebView.cpp:
2009         (webkit_web_view_load_uri):
2010         (webkit_web_view_load_request):
2011
2012 2014-01-29  Csaba Osztrogonác  <ossy@webkit.org>
2013
2014         Remove ENABLE(JAVASCRIPT_DEBUGGER) leftovers
2015         https://bugs.webkit.org/show_bug.cgi?id=127845
2016
2017         Reviewed by Joseph Pecoraro.
2018
2019         * Configurations/FeatureDefines.xcconfig:
2020
2021 2014-01-29  Dan Bernstein  <mitz@apple.com>
2022
2023         Moved linking against common frameworks and a library from the .xcconfig file into the target.
2024
2025         Reviewed by Tim Horton.
2026
2027         * Configurations/WebKit2.xcconfig:
2028         * WebKit2.xcodeproj/project.pbxproj:
2029
2030 2014-01-29  Anders Carlsson  <andersca@apple.com>
2031
2032         Fix 32-bit build.
2033
2034         * UIProcess/Cocoa/NavigationState.h:
2035         * UIProcess/Cocoa/NavigationState.mm:
2036
2037 2014-01-29  Anders Carlsson  <andersca@apple.com>
2038
2039         Add a NavigationState object to keep track of the navigations for a given page
2040         https://bugs.webkit.org/show_bug.cgi?id=127884
2041
2042         Reviewed by Sam Weinig.
2043
2044         * UIProcess/API/Cocoa/WKNavigation.mm:
2045         (-[WKNavigation request]):
2046         (-[WKNavigation setRequest:]):
2047         * UIProcess/API/Cocoa/WKNavigationInternal.h:
2048         * UIProcess/API/Cocoa/WKWebView.mm:
2049         (-[WKWebView initWithFrame:configuration:]):
2050         (-[WKWebView loadRequest:]):
2051         * UIProcess/Cocoa/NavigationState.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigation.mm.
2052         * UIProcess/Cocoa/NavigationState.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigation.mm.
2053         (WebKit::NavigationState::NavigationState):
2054         (WebKit::NavigationState::~NavigationState):
2055         (WebKit::NavigationState::createLoadRequestNavigation):
2056         * UIProcess/WebPageProxy.cpp:
2057         (WebKit::WebPageProxy::loadRequest):
2058         * UIProcess/WebPageProxy.h:
2059         * WebKit2.xcodeproj/project.pbxproj:
2060
2061 2014-01-29  Gavin Barraclough  <barraclough@apple.com>
2062
2063         Add IsVisibleOrOccluded to ViewState
2064         https://bugs.webkit.org/show_bug.cgi?id=127875
2065
2066         Reviewed by Anders Carlsson.
2067
2068         When the WKView associated with a plugin becomes occluded
2069         we tell the plugin it is no longer visible. This is a problem
2070         if the plugin is being occluded by its own fullscreen window.
2071
2072         Instead, consider plugins to be visible any time they are in
2073         a visible window – i.e. when they are visible or occluded.
2074
2075         * UIProcess/API/mac/PageClientImpl.h:
2076         * UIProcess/API/mac/PageClientImpl.mm:
2077         (WebKit::PageClientImpl::isViewVisibleOrOccluded):
2078         * UIProcess/PageClient.h:
2079         (WebKit::PageClient::isViewVisibleOrOccluded):
2080             - added isViewVisibleOrOccluded.
2081         * UIProcess/WebPageProxy.cpp:
2082         (WebKit::WebPageProxy::updateViewState):
2083             - update IsVisibleOrOccluded.
2084         (WebKit::WebPageProxy::viewStateDidChange):
2085             - when updating IsVisible also update IsVisibleOrOccluded.
2086         * WebProcess/Plugins/PluginView.cpp:
2087         (WebKit::PluginView::platformViewStateDidChange):
2088             - use isVisibleOrOccluded to determine plugin visibility.
2089         * WebProcess/WebPage/WebPage.h:
2090         (WebKit::WebPage::isVisibleOrOccluded):
2091             - accessor.
2092
2093 2014-01-29  Anders Carlsson  <andersca@apple.com>
2094
2095         Pass navigation IDs along to LoadRequest and Reload
2096         https://bugs.webkit.org/show_bug.cgi?id=127883
2097
2098         Reviewed by Sam Weinig.
2099
2100         * UIProcess/WebPageProxy.cpp:
2101         (WebKit::WebPageProxy::WebPageProxy):
2102         (WebKit::WebPageProxy::loadRequest):
2103         (WebKit::WebPageProxy::loadFile):
2104         (WebKit::WebPageProxy::reload):
2105         (WebKit::WebPageProxy::generateNavigationID):
2106         * UIProcess/WebPageProxy.h:
2107         * WebProcess/WebPage/WebDocumentLoader.cpp:
2108         (WebKit::WebDocumentLoader::setNavigationID):
2109         * WebProcess/WebPage/WebPage.cpp:
2110         (WebKit::WebPage::WebPage):
2111         (WebKit::WebPage::loadRequest):
2112         (WebKit::WebPage::reload):
2113         (WebKit::WebPage::createDocumentLoader):
2114         * WebProcess/WebPage/WebPage.h:
2115         * WebProcess/WebPage/WebPage.messages.in:
2116
2117 2014-01-29  Anders Carlsson  <andersca@apple.com>
2118
2119         -[WKWebView loadRequest:] should return a WKNavigation
2120         https://bugs.webkit.org/show_bug.cgi?id=127873
2121
2122         Reviewed by Dan Bernstein.
2123
2124         For now this just returns a dummy navigation.
2125
2126         * UIProcess/API/Cocoa/WKNavigation.h:
2127         * UIProcess/API/Cocoa/WKNavigation.mm:
2128         (-[WKNavigation initWithRequest:]):
2129         (-[WKNavigation request]):
2130         * UIProcess/API/Cocoa/WKNavigationInternal.h: Added.
2131         * UIProcess/API/Cocoa/WKWebView.h:
2132         * UIProcess/API/Cocoa/WKWebView.mm:
2133         (-[WKWebView loadRequest:]):
2134         * WebKit2.xcodeproj/project.pbxproj:
2135
2136 2014-01-29  Anders Carlsson  <andersca@apple.com>
2137
2138         
2139
2140         * UIProcess/API/C/WKPage.cpp:
2141         (WKPageLoadURL):
2142         Don't use the resource request constructor that takes a String.
2143
2144 2014-01-29  Brady Eidson  <beidson@apple.com>
2145
2146         IDB: Fully implement IDBKeyData encoding/decoding
2147         https://bugs.webkit.org/show_bug.cgi?id=127863
2148
2149         Rubberstamped by Alexey Proskuryakov.
2150
2151         Handle invalid buffers, and pass IDBKeyData decoding along:
2152         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
2153         (WebKit::deserializeIDBKeyPath):
2154         (WebKit::serializeIDBKeyData):
2155         (WebKit::deserializeIDBKeyData):
2156         * DatabaseProcess/IndexedDB/IDBSerialization.h:
2157
2158         Implement decodeBool and decodeDouble:
2159         * Shared/cf/KeyedDecoder.cpp:
2160         (WebKit::KeyedDecoder::decodeBool):
2161         (WebKit::KeyedDecoder::decodeDouble):
2162         * Shared/cf/KeyedDecoder.h:
2163
2164 2014-01-29  Tim Horton  <timothy_horton@apple.com>
2165
2166         WebKit2 View Gestures (Swipe): Update rubberBandsAt{Left,Right} when WebKit swipe is enabled
2167         https://bugs.webkit.org/show_bug.cgi?id=127855
2168         <rdar://problem/15933878>
2169
2170         Reviewed by Anders Carlsson.
2171
2172         * UIProcess/API/mac/WKView.mm:
2173         (-[WKView setAllowsBackForwardNavigationGestures:]):
2174         Enable implicit control of rubberbanding when using WebKit2's swipe implementation.
2175
2176         * UIProcess/WebPageProxy.cpp:
2177         (WebKit::WebPageProxy::WebPageProxy):
2178         (WebKit::WebPageProxy::sendWheelEvent):
2179         * UIProcess/WebPageProxy.h:
2180         (WebKit::WebPageProxy::setShouldUseImplicitRubberBandControl):
2181         (WebKit::WebPageProxy::shouldUseImplicitRubberBandControl):
2182         Rename away from "legacy" name, since we're using it on purpose now.
2183
2184         * UIProcess/mac/WebPageProxyMac.mm:
2185         (WebKit::expectsLegacyImplicitRubberBandControl):
2186         (WebKit::WebPageProxy::platformInitialize):
2187         Since NSVersionOfLinkTimeLibrary doesn't work for applications that
2188         don't link directly against the library (like Safari), let's explicitly
2189         check if Safari is expecting the legacy behavior, otherwise using
2190         the linked version of WebKit2, but using the new behavior if we can't
2191         determine the linked version of WebKit2 and are not Safari.
2192
2193 2014-01-29  Anders Carlsson  <andersca@apple.com>
2194
2195         Make WKWebView limp along on OS X
2196         https://bugs.webkit.org/show_bug.cgi?id=127857
2197
2198         Reviewed by Tim Horton.
2199
2200         On Mac, create a WKView and add it as a subview of the WKWebVew so we'll actually get something
2201         on screen when creating a WKWebView.
2202
2203         * UIProcess/API/Cocoa/WKWebView.mm:
2204         (-[WKWebView initWithFrame:configuration:]):
2205         Create a WKView.
2206
2207         (-[WKWebView resizeSubviewsWithOldSize:]):
2208         Resize the WKView.
2209
2210         * UIProcess/API/mac/WKView.mm:
2211         (-[WKView initWithFrame:configuration:]):
2212         Add new initializer.
2213
2214         * UIProcess/API/mac/WKViewInternal.h:
2215         Use a class extension for internal methods and add the new initializer.
2216
2217 2014-01-29  Brady Eidson  <beidson@apple.com>
2218
2219         IDB: Opening an existing database is broken
2220         https://bugs.webkit.org/show_bug.cgi?id=127851
2221
2222         Reviewed by Tim Hatcher.
2223
2224         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2225         (WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata): Save the request to get metadata
2226           to the set before posting the task to the thread.
2227         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2228         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata): Actually save the retrieved
2229           object store metadata to the database metadata.
2230
2231 2014-01-29  Anders Carlsson  <andersca@apple.com>
2232
2233         Consolidate page loading functions
2234         https://bugs.webkit.org/show_bug.cgi?id=127847
2235
2236         Reviewed by Tim Horton.
2237
2238         Get rid of the loadURL functions (and the LoadURL message), rename
2239         loadURLRequest to loadRequest and change it to take a ResourceRequest instead
2240         of an API::URLRequest.
2241
2242         * UIProcess/API/C/WKPage.cpp:
2243         (WKPageLoadURL):
2244         (WKPageLoadURLWithUserData):
2245         (WKPageLoadURLRequest):
2246         (WKPageLoadURLRequestWithUserData):
2247         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2248         (-[WKBrowsingContextController loadRequest:userData:]):
2249         * UIProcess/API/Cocoa/WKWebView.mm:
2250         (-[WKWebView loadRequest:]):
2251         * UIProcess/WebInspectorProxy.cpp:
2252         (WebKit::decidePolicyForNavigationAction):
2253         (WebKit::WebInspectorProxy::createInspectorPage):
2254         * UIProcess/WebPageProxy.cpp:
2255         (WebKit::WebPageProxy::loadRequest):
2256         (WebKit::WebPageProxy::loadFile):
2257         * UIProcess/WebPageProxy.h:
2258         * UIProcess/cf/WebPageProxyCF.cpp:
2259         (WebKit::WebPageProxy::restoreFromSessionStateData):
2260         * WebProcess/WebPage/WebPage.cpp:
2261         (WebKit::WebPage::loadRequest):
2262         * WebProcess/WebPage/WebPage.h:
2263         * WebProcess/WebPage/WebPage.messages.in:
2264
2265 2014-01-29  Martin Robinson  <mrobinson@igalia.com>
2266
2267         [GTK] [CMake] Fix the build after r162835
2268         https://bugs.webkit.org/show_bug.cgi?id=127753
2269
2270         Reviewed by Gustavo Noronha Silva.
2271
2272         * CMakeLists.txt: Add support for using the prefix header (GCC / clang only for now)
2273         when WebKit2_USE_PREFIX_HEADER is set to true.
2274         * PlatformGTK.cmake: Set WebKit2_USE_PREFIX_HEADER support and no longer process some message.in files.
2275         * WebKit2Prefix.h: Add support for the CMake GTK+ build.
2276
2277 2014-01-29  Csaba Osztrogonác  <ossy@webkit.org>
2278
2279         Remove ENABLE(JAVASCRIPT_DEBUGGER) guards
2280         https://bugs.webkit.org/show_bug.cgi?id=127840
2281
2282         Reviewed by Mark Lam.
2283
2284         * WebProcess/WebPage/WebInspector.cpp:
2285         (WebKit::WebInspector::startJavaScriptDebugging):
2286         (WebKit::WebInspector::stopJavaScriptDebugging):
2287         (WebKit::WebInspector::setJavaScriptProfilingEnabled):
2288         (WebKit::WebInspector::startJavaScriptProfiling):
2289         (WebKit::WebInspector::stopJavaScriptProfiling):
2290
2291 2014-01-29  Brady Eidson  <beidson@apple.com>
2292
2293         IDB: Serialize IDBKeyDatas to disk, not IDBKeys
2294         https://bugs.webkit.org/show_bug.cgi?id=127829
2295
2296         Reviewed by Tim Horton.
2297
2298         Serialize IDBKeyDatas, not IDBKeys.
2299
2300         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
2301         (WebKit::deserializeIDBKeyPath):
2302         (WebKit::serializeIDBKeyData):
2303         * DatabaseProcess/IndexedDB/IDBSerialization.h:
2304
2305         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2306         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
2307         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
2308         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
2309         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
2310
2311 2014-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2312
2313         Unreviewed. Fix GTK+ build after r162981.
2314
2315         * GNUmakefile.list.am: Add WebProcess/WebPage/WebDocumentLoader to
2316         the compilation.
2317
2318 2014-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2319
2320         Unreviewed. Actually fix the GTK+ build after r162967.
2321
2322         * UIProcess/API/gtk/WebKitWebView.cpp:
2323         (webkit_web_view_can_go_back):
2324         (webkit_web_view_can_go_forward):
2325
2326 2014-01-28  Zan Dobersek  <zdobersek@igalia.com>
2327
2328         Unreviewed followup to r163006. That change incorrectly modified
2329         webkit_web_view_go_forward when webkit_web_view_can_go_forward needed fixing.
2330
2331         * UIProcess/API/gtk/WebKitWebView.cpp:
2332         (webkit_web_view_go_forward):
2333         (webkit_web_view_can_go_forward):
2334
2335 2014-01-28  Zan Dobersek  <zdobersek@igalia.com>
2336
2337         Unreviewed GTK build fix after r162967.
2338
2339         * UIProcess/API/gtk/WebKitWebView.cpp:
2340         (webkit_web_view_can_go_back):
2341         (webkit_web_view_go_forward):
2342
2343 2014-01-28  Tim Horton  <timothy_horton@apple.com>
2344
2345         Crashes in ViewGestureController::wheelEventWasNotHandledByWebCore
2346         https://bugs.webkit.org/show_bug.cgi?id=127828
2347         <rdar://problem/15932902>
2348
2349         Reviewed by Dan Bernstein.
2350
2351         * UIProcess/API/mac/WKView.mm:
2352         (-[WKView _wheelEventWasNotHandledByWebCore:]):
2353         Null check. ViewGestureController only needs unhandled wheel events after it has been created.
2354
2355 2014-01-28  Tim Horton  <timothy_horton@apple.com>
2356
2357         Fix the Mountain Lion build if you have private headers.
2358
2359         * UIProcess/mac/ViewGestureController.mm:
2360         (WebKit::ViewGestureController::beginSwipeGesture):
2361
2362 2014-01-28  Ian Henderson  <ianh@apple.com>
2363
2364         [iOS] UI process crashes whenever web process crashes
2365         https://bugs.webkit.org/show_bug.cgi?id=127826
2366
2367         Reviewed by Tim Horton.
2368
2369         * UIProcess/API/ios/WKContentView.mm:
2370         (-[WKContentView _updateFixedPositionRect]): Null-check the drawing
2371         area before calling size() on it.
2372
2373 2014-01-28  Ian Henderson  <ianh@apple.com>
2374
2375         WKRemoteObjectCoder should support more argument types
2376         https://bugs.webkit.org/show_bug.cgi?id=127824
2377
2378         Reviewed by Anders Carlsson.
2379
2380         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2381         (encodeInvocation): Support encoding char values.
2382         (decodeInvocationArguments): Support decoding char values.
2383
2384 2014-01-28  Ryuan Choi  <ryuan.choi@samsung.com>
2385
2386         Unreviewed build fix on the cmake based port after r162981
2387
2388         One more build fix.
2389
2390         * CMakeLists.txt: Added WebDocumentLoader.cpp
2391
2392 2014-01-28  Ryuan Choi  <ryuan.choi@samsung.com>
2393
2394         Unreviewed build fix on the EFL build after r162984
2395
2396         r162984 added wheelEventWasNotHandledByWebCore which is guarded to PLATFORM(MAC).
2397
2398         * UIProcess/WebPageProxy.cpp:
2399         (WebKit::WebPageProxy::didReceiveEvent):
2400
2401 2014-01-28  Anders Carlsson  <andersca@apple.com>
2402
2403         Fix a thinko.
2404
2405         * UIProcess/WebPageProxy.cpp:
2406         (WebKit::WebPageProxy::goBack):
2407         Remove early return if isValid() is true.
2408
2409 2014-01-28  Anders Carlsson  <andersca@apple.com>
2410
2411         WebPage should be in charge of creating document loaders
2412         https://bugs.webkit.org/show_bug.cgi?id=127818
2413
2414         Reviewed by Dan Bernstein.
2415
2416         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2417         (WebKit::WebFrameLoaderClient::createDocumentLoader):
2418         * WebProcess/WebPage/WebPage.cpp:
2419         (WebKit::WebPage::createDocumentLoader):
2420         * WebProcess/WebPage/WebPage.h:
2421
2422 2014-01-28  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2423
2424         Unreviewed GTK build fix after r162951.
2425         https://bugs.webkit.org/show_bug.cgi?id=127815
2426
2427         * GNUmakefile.list.am: Adding missing build targets.
2428
2429 2014-01-28  Tim Horton  <timothy_horton@apple.com>
2430
2431         WebKit2 View Gestures (Swipe): Give WebCore the first crack at scroll events if it needs it
2432         https://bugs.webkit.org/show_bug.cgi?id=127396
2433
2434         Reviewed by Anders Carlsson.
2435
2436         * UIProcess/API/ios/PageClientImplIOS.h:
2437         * UIProcess/API/ios/PageClientImplIOS.mm:
2438         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
2439         * UIProcess/API/mac/PageClientImpl.h:
2440         * UIProcess/API/mac/PageClientImpl.mm:
2441         (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
2442         * UIProcess/API/mac/WKView.mm:
2443         (-[WKView _wheelEventWasNotHandledByWebCore:]):
2444         * UIProcess/API/mac/WKViewInternal.h:
2445         * UIProcess/PageClient.h:
2446         * UIProcess/WebPageProxy.cpp:
2447         (WebKit::WebPageProxy::didReceiveEvent):
2448         In addition to informing the page client about un-handled wheel events,
2449         inform the ViewGestureController, in a roundabout way.
2450
2451         * UIProcess/mac/ViewGestureController.h:
2452         Add and use SwipeDirection enum instead of 'bool willSwipeLeft'.
2453
2454         * UIProcess/mac/ViewGestureController.mm:
2455         (WebKit::ViewGestureController::ViewGestureController):
2456         (WebKit::ViewGestureController::handleScrollWheelEvent):
2457         If we get a Begin scroll wheel event, any previously deferred
2458         swipes are invalid.
2459
2460         If the page has subframes or wheel handlers, defer starting the
2461         swipe until we get a wheelEventWasNotHandledByWebCore back from the WebProcess.
2462
2463         (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
2464         Start the swipe if the WebProcess didn't eat the event.
2465
2466         (WebKit::ViewGestureController::trackSwipeGesture):
2467         (WebKit::ViewGestureController::beginSwipeGesture):
2468         (WebKit::ViewGestureController::handleSwipeGesture):
2469         Use SwipeDirection.
2470
2471 2014-01-28  Anders Carlsson  <andersca@apple.com>
2472
2473         Fix build.
2474
2475         * WebProcess/WebPage/WebFrame.cpp:
2476
2477 2014-01-28  Anders Carlsson  <andersca@apple.com>
2478
2479         Add WebDocumentLoader, a WebCore::DocumentLoader subclass
2480         https://bugs.webkit.org/show_bug.cgi?id=127817
2481
2482         Reviewed by Tim Horton.
2483
2484         We need a place to store navigation IDs, and since they are per document loader, putting them
2485         in a DocumentLoader subclass seems like a good idea.
2486
2487         * WebKit2.xcodeproj/project.pbxproj:
2488         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2489         (WebKit::WebFrameLoaderClient::createDocumentLoader):
2490         * WebProcess/WebPage/WebDocumentLoader.cpp: Added.
2491         (WebKit::WebDocumentLoader::WebDocumentLoader):
2492         (WebKit::WebDocumentLoader::setNavigationID):
2493         * WebProcess/WebPage/WebDocumentLoader.h: Added.
2494         (WebKit::WebDocumentLoader::create):
2495         (WebKit::WebDocumentLoader::navigationID):
2496
2497 2014-01-28  Anders Carlsson  <andersca@apple.com>
2498
2499         Simplify WebFrame::isMainFrame
2500         https://bugs.webkit.org/show_bug.cgi?id=127812
2501
2502         Reviewed by Sam Weinig.
2503
2504         * WebProcess/WebPage/WebFrame.cpp:
2505         (WebKit::WebFrame::isMainFrame):
2506
2507 2014-01-28  Andy Estes  <aestes@apple.com>
2508
2509         [iOS] Set INSTALL_PATH_ACTUAL when building WebKit2 for the iOS Simulator
2510         https://bugs.webkit.org/show_bug.cgi?id=127811
2511
2512         Reviewed by Dan Bernstein.
2513
2514         * Configurations/WebKit2.xcconfig:
2515
2516 2014-01-28  Jinwoo Song  <jinwoo7.song@samsung.com>
2517
2518         Unreviewed EFL WebKit2 build fix.
2519
2520         * CMakeLists.txt: Added Shared/NavigationActionData.cpp
2521
2522 2014-01-28  Anders Carlsson  <andersca@apple.com>
2523
2524         Remove WebPageProxy::canGoBack and WebPageProxy::canGoForward
2525         https://bugs.webkit.org/show_bug.cgi?id=127803
2526
2527         Reviewed by Andreas Kling.
2528
2529         * UIProcess/API/C/WKPage.cpp:
2530         (WKPageCanGoForward):
2531         (WKPageCanGoBack):
2532         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2533         (-[WKBrowsingContextController canGoForward]):
2534         (-[WKBrowsingContextController canGoBack]):
2535         * UIProcess/WebPageProxy.cpp:
2536         (WebKit::WebPageProxy::goForward):
2537         (WebKit::WebPageProxy::goBack):
2538         (WebKit::WebPageProxy::sendWheelEvent):
2539         * UIProcess/WebPageProxy.h:
2540
2541 2014-01-28  Anders Carlsson  <andersca@apple.com>
2542
2543         API::PolicyClient::decidePolicyForNavigationAction should take a NavigationActionData object
2544         https://bugs.webkit.org/show_bug.cgi?id=127798
2545
2546         Reviewed by Tim Horton.
2547
2548         * UIProcess/API/APIPolicyClient.h:
2549         (API::PolicyClient::decidePolicyForNavigationAction):
2550         * UIProcess/API/C/WKPage.cpp:
2551         (WKPageSetPagePolicyClient):
2552         * UIProcess/WebPageProxy.cpp:
2553         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2554
2555 2014-01-28  Anders Carlsson  <andersca@apple.com>
2556
2557         Add an empty WKNavigation class
2558         https://bugs.webkit.org/show_bug.cgi?id=127796
2559
2560         Reviewed by Tim Horton.
2561
2562         * UIProcess/API/Cocoa/WKNavigation.h: Added.
2563         * UIProcess/API/Cocoa/WKNavigation.mm: Added.
2564         * WebKit2.xcodeproj/project.pbxproj:
2565
2566 2014-01-28  Anders Carlsson  <andersca@apple.com>
2567
2568         Add a NavigationActionData object for easy storage of navigation action data
2569         https://bugs.webkit.org/show_bug.cgi?id=127787
2570
2571         Reviewed by Tim Horton.
2572
2573         * Scripts/webkit2/messages.py:
2574         (struct_or_class):
2575         * Shared/NavigationActionData.cpp: Added.
2576         (WebKit::NavigationActionData::NavigationActionData):
2577         (WebKit::NavigationActionData::encode):
2578         (WebKit::NavigationActionData::decode):
2579         * Shared/NavigationActionData.h: Added.
2580         * UIProcess/WebPageProxy.cpp:
2581         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2582         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2583         * UIProcess/WebPageProxy.h:
2584         * UIProcess/WebPageProxy.messages.in:
2585         * WebKit2.xcodeproj/project.pbxproj:
2586         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2587         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2588         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2589
2590 2014-01-28  Tim Horton  <timothy_horton@apple.com>
2591
2592         Fix the Mountain Lion build.
2593
2594         * UIProcess/mac/ViewGestureController.mm:
2595         (WebKit::ViewGestureController::beginSwipeGesture):
2596         (WebKit::ViewGestureController::removeSwipeSnapshot):
2597         * UIProcess/mac/ViewSnapshotStore.mm:
2598         (WebKit::ViewSnapshotStore::recordSnapshot):
2599
2600 2014-01-28  Tim Horton  <timothy_horton@apple.com>
2601
2602         Fix the iOS build.
2603
2604         * UIProcess/WebPageProxy.cpp:
2605         (WebKit::WebPageProxy::recordNavigationSnapshot):
2606         * UIProcess/mac/ViewSnapshotStore.h:
2607         * UIProcess/mac/ViewSnapshotStore.mm:
2608
2609 2014-01-28  Brady Eidson  <beidson@apple.com>
2610
2611         Remove unneeded “WebCore::” prefixing in two .cpp files.
2612
2613         Rubberstamped by Alexey Proskuryakov.
2614
2615         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2616         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2617
2618 2014-01-28  Tim Horton  <timothy_horton@apple.com>
2619
2620         WebKit2 View Gestures (Swipe): Snapshots should be purgeable
2621         https://bugs.webkit.org/show_bug.cgi?id=127390
2622         <rdar://problem/15876775>
2623
2624         Reviewed by Anders Carlsson.
2625
2626         Make snapshots be purgeable, and implement a straightforward
2627         (if perhaps expensive, for now) cache eviction strategy to limit the
2628         number of snapshots to 20.
2629
2630         * UIProcess/mac/ViewGestureController.mm:
2631         (WebKit::ViewGestureController::beginSwipeGesture):
2632         When beginning a gesture, attempt to make the retrieved snapshot
2633         non-volatile. If it was purged while volatile, we won't use it, but if it
2634         is still valid, we'll go ahead and use it as the swipe layer's contents.
2635
2636         (WebKit::ViewGestureController::removeSwipeSnapshot):
2637         When removing the swipe snapshot, make it volatile once again.
2638
2639         * UIProcess/mac/ViewSnapshotStore.h:
2640         Store a creation time along with the image.
2641         Store and return IOSurfaces instead of CGImages.
2642         Store snapshots and render tree sizes separately, so that we can
2643         throw away snapshots but keep the render tree sizes indefinitely.
2644
2645         * UIProcess/mac/ViewSnapshotStore.mm:
2646         (WebKit::ViewSnapshotStore::pruneSnapshots):
2647         Cap the number of snapshots we'll ever have live at 20.
2648         Enforce this cap by first trying to remove snapshots farthest
2649         from the current back-forward list's current item, falling back
2650         to removing the least recently created snapshot if there are no
2651         snapshots owned by the current back-forward list.
2652
2653         (WebKit::createIOSurfaceFromImage):
2654         Build an IOSurface from the CGImage snapshot we took, for ease of
2655         use of its purgeability API.
2656
2657         (WebKit::ViewSnapshotStore::recordSnapshot):
2658         Bail from taking the snapshot if the image is empty; this can happen
2659         if the view is out of the window when the snapshot is taken.
2660
2661         Mark snapshots as purgeable as soon as they go into the cache.
2662
2663         (WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize):
2664         Return the target render tree size even if there is no snapshot image.
2665         Take care not to look up an empty UUID.
2666
2667 2014-01-27  Alexey Proskuryakov  <ap@apple.com>
2668
2669         Expose SQL database creation and modification times
2670         https://bugs.webkit.org/show_bug.cgi?id=127728
2671
2672         Reviewed by Brady Eidson.
2673
2674         * Shared/WebCoreArgumentCoders.cpp:
2675         (IPC::ArgumentCoder<DatabaseDetails>::encode):
2676         (IPC::ArgumentCoder<DatabaseDetails>::decode):
2677         Encode and decode new DatabaseDetails member variables.
2678
2679         * UIProcess/API/C/WKDatabaseManager.cpp:
2680         (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
2681         (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
2682         * UIProcess/API/C/WKDatabaseManager.h:
2683         Added new keys for database details.
2684
2685         * UIProcess/WebDatabaseManagerProxy.cpp:
2686         (WebKit::WebDatabaseManagerProxy::databaseDetailsCreationTimeKey):
2687         (WebKit::WebDatabaseManagerProxy::databaseDetailsModificationTimeKey):
2688         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
2689         * UIProcess/WebDatabaseManagerProxy.h:
2690         Set the new keys if times are valid.
2691
2692 2014-01-28  Tim Horton  <timothy_horton@apple.com>
2693
2694         WebKit2 View Gestures (Swipe): Use CGSCaptureWindowsContentsToRect for now
2695         https://bugs.webkit.org/show_bug.cgi?id=127768
2696         <rdar://problem/15923662>
2697
2698         Reviewed by Simon Fraser.
2699
2700         * UIProcess/API/mac/WKView.mm:
2701         (-[WKView _takeViewSnapshot]):
2702         Until <rdar://problem/15709646> is resolved, we'll use
2703         CGSCaptureWindowsContentsToRect instead of CGWindowListCreateImage.
2704
2705 2014-01-28  Mark Rowe  <mrowe@apple.com>
2706
2707         <https://webkit.org/b/127767> Disable some deprecation warnings to fix the build.
2708
2709         Reviewed by Ryosuke Niwa.
2710
2711         * UIProcess/API/mac/WKView.mm:
2712         (-[WKView _updateWindowAndViewFrames]):
2713         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
2714
2715 2014-01-28  Adrian Perez de Castro  <aperez@igalia.com>
2716
2717         [GTK] Add API to allow setting the process model in WebKitWebContext
2718         https://bugs.webkit.org/show_bug.cgi?id=125463
2719
2720         Reviewed by Carlos Garcia Campos.
2721
2722         Implements accessors in WebKitWebContext for the process model.
2723         The default behavior is unchanged, and a single web process is
2724         used. Using WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW
2725         as the process model will make use one web process for each
2726         WebKitWebView. This also enables the network process. Setting
2727         the process model must be done as early as possible, before the
2728         very first web process is spawned.
2729
2730         * UIProcess/API/gtk/WebKitWebContext.cpp:
2731         Add accessors in the API to get/set the process model.
2732         (webkit_web_context_set_process_model):
2733         (webkit_web_context_get_process_model):
2734         * UIProcess/API/gtk/WebKitWebContext.h:
2735         Define the WebKitProcessModel enum.
2736         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2737         Add new public API bits to the documentation.
2738
2739 2014-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2740
2741         [GTK] Make webkit_uri_scheme_request_get_web_view() work with CustomProtocols
2742         https://bugs.webkit.org/show_bug.cgi?id=127614
2743
2744         Reviewed by Gustavo Noronha Silva.
2745
2746         * NetworkProcess/RemoteNetworkingContext.h: Remove
2747         initiatingPageID() method.
2748         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp: Ditto.
2749         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
2750         (WebKit::CustomProtocolManagerImpl::send): Create the request with
2751         the ResourceRequest constructor that receives a SoupRequest.
2752         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2753         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData): Encode initiatingPageID.
2754         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): Decode initiatingPageID.
2755         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
2756         (webkitURISchemeRequestCreate): Remove initiatingPageID parameter
2757         and get it from the given ResourceRequest.
2758         * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
2759         * UIProcess/API/gtk/WebKitWebContext.cpp:
2760         (webkitWebContextStartLoadingCustomProtocol): Update to
2761         webkitURISchemeRequestCreate API change.
2762         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2763         (willSendRequestForFrame): Set the initiatingPageID to the ResourceRequest.
2764         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2765         (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
2766         Remove initiatingPageID() method.
2767         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
2768         * WebProcess/soup/WebSoupRequestManager.cpp:
2769         (WebKit::WebSoupRequestManager::send): Get the initiatingPageID
2770         from the SoupRequest using the ResourceRequest API.
2771
2772 2014-01-27  Roger Fong  <roger_fong@apple.com>
2773
2774         WebGLLoadPolicy::WebGLAsk is an unnecessary value.
2775         https://bugs.webkit.org/show_bug.cgi?id=127755
2776
2777         Reviewed by Anders Carlsson.
2778
2779         * UIProcess/API/C/WKAPICast.h:
2780         (WebKit::toWebGLLoadPolicy):
2781         * UIProcess/API/C/WKPageLoaderClient.h:
2782
2783 2014-01-27  Brady Eidson  <beidson@apple.com>
2784
2785         IDB: Cursor support - Messaging, IPC, Threading plumbing
2786         https://bugs.webkit.org/show_bug.cgi?id=127736
2787
2788         Reviewed by Sam Weinig.
2789
2790         Pipe three cursor-related calls to the DatabaseProcess, and handle messages
2791         from the database process when it is done handling them:
2792         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2793         (WebKit::WebIDBServerConnection::didOpenCursor):
2794         (WebKit::WebIDBServerConnection::didAdvanceCursor):
2795         (WebKit::WebIDBServerConnection::didIterateCursor):
2796         (WebKit::WebIDBServerConnection::openCursor):
2797         (WebKit::WebIDBServerConnection::cursorAdvance):
2798         (WebKit::WebIDBServerConnection::cursorIterate):
2799         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2800         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
2801
2802         Pipe the calls through to the appropriate UniqueIDBDatabase:
2803         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
2804         (WebKit::DatabaseProcessIDBConnection::openCursor):
2805         (WebKit::DatabaseProcessIDBConnection::cursorAdvance):
2806         (WebKit::DatabaseProcessIDBConnection::cursorIterate):
2807         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
2808         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
2809
2810         Pass the calls to the backing store thread, then message back to the WebProcess
2811         when the requests are complete.
2812         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2813         (WebKit::UniqueIDBDatabase::openCursor):
2814         (WebKit::UniqueIDBDatabase::cursorAdvance):
2815         (WebKit::UniqueIDBDatabase::cursorIterate):
2816         (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
2817         (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore):
2818         (WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
2819         (WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore):
2820         (WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
2821         (WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore):
2822         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2823
2824         * Shared/WebCrossThreadCopier.cpp:
2825         (WebCore::Vector<char>>::copy):
2826         * Shared/WebCrossThreadCopier.h:
2827
2828 2014-01-27  Joseph Pecoraro  <pecoraro@apple.com>
2829
2830         WebKit2: Enable -Wimplicit-fallthrough and add FALLTHROUGH annotation where needed
2831         https://bugs.webkit.org/show_bug.cgi?id=127665
2832
2833         Reviewed by Anders Carlsson.
2834
2835         * Shared/UserData.cpp:
2836         (WebKit::UserData::encode):
2837         These look like they should not have fallen through!
2838
2839         * Configurations/Base.xcconfig:
2840         * Shared/mac/ObjCObjectGraphCoders.mm:
2841         (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode):
2842
2843 2014-01-27  Andy Estes  <aestes@apple.com>
2844
2845         [WebKit2] Add SPI to disable the WebCore memory cache
2846         https://bugs.webkit.org/show_bug.cgi?id=127747
2847
2848         Reviewed by Tim Horton.
2849
2850         * Shared/WebProcessCreationParameters.cpp:
2851         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2852         Initialized memoryCacheDisabled to false.
2853         (WebKit::WebProcessCreationParameters::encode):
2854         Encoded memoryCacheDisabled.
2855         (WebKit::WebProcessCreationParameters::decode):
2856         Decoded memoryCacheDisabled.
2857         * Shared/WebProcessCreationParameters.h:
2858         * UIProcess/API/C/WKContext.cpp:
2859         (WKContextSetMemoryCacheDisabled):
2860         Called WebContext::setMemoryCacheDisabled().
2861         * UIProcess/API/C/WKContextPrivate.h: Declared new SPI.
2862         * UIProcess/WebContext.cpp:
2863         (WebKit::WebContext::WebContext): Initialized m_memoryCacheDisabled to false.
2864         (WebKit::WebContext::createNewWebProcess):
2865         Set WebProcessCreationParameters::memoryCacheDisabled to m_memoryCacheDisabled.
2866         (WebKit::WebContext::setMemoryCacheDisabled): Set m_memoryCacheDisabled
2867         and sent new value to all existing processes.
2868         * UIProcess/WebContext.h:
2869         * WebProcess/WebProcess.cpp:
2870         (WebKit::WebProcess::initializeWebProcess):
2871         Called WebProcess::setMemoryCacheDisabled().
2872         (WebKit::WebProcess::setMemoryCacheDisabled):
2873         Called MemoryCache::setDisabled() if the disabled state changed.
2874         * WebProcess/WebProcess.h:
2875         * WebProcess/WebProcess.messages.in:
2876
2877 2014-01-27  Anders Carlsson  <andersca@apple.com>
2878
2879         Add -[WKWebView loadRequest:] API
2880         https://bugs.webkit.org/show_bug.cgi?id=127727
2881
2882         Reviewed by Dan Bernstein.
2883
2884         * UIProcess/API/Cocoa/WKWebView.h:
2885         * UIProcess/API/Cocoa/WKWebView.mm:
2886         (-[WKWebView initWithFrame:configuration:]):
2887         (-[WKWebView loadRequest:]):
2888
2889 2014-01-27  Brady Eidson  <beidson@apple.com>
2890
2891         IDB: Rename "IDBTransactionIdentifier" to be more general purpose (take 2)
2892         https://bugs.webkit.org/show_bug.cgi?id=127717
2893
2894         Reviewed by Tim Horton.
2895
2896         Update all related variable names since the type no longer contains the relevant info.
2897
2898         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2899         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2900         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
2901         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
2902         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
2903         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2904         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
2905         * Shared/WebCrossThreadCopier.cpp:
2906
2907 2014-01-27  Anders Carlsson  <andersca@apple.com>
2908
2909         Copy relevant code from the iOS version of WKView to WKWebView
2910         https://bugs.webkit.org/show_bug.cgi?id=127721
2911
2912         Reviewed by Dan Bernstein.
2913
2914         * UIProcess/API/Cocoa/WKWebView.mm:
2915         (-[WKWebView initWithFrame:configuration:]):
2916         (-[WKWebView setFrame:]):
2917         (-[WKWebView setBounds:]):
2918         (-[WKWebView scrollView]):
2919         (-[WKWebView browsingContextController]):
2920         (-[WKWebView contentView:contentsSizeDidChange:]):
2921         (-[WKWebView contentViewDidCommitLoadForMainFrame:]):
2922         (-[WKWebView contentViewDidReceiveMobileDocType:]):
2923         (-[WKWebView contentView:didChangeViewportArgumentsSize:initialScale:minimumScale:maximumScale:allowsUserScaling:]):
2924         (-[WKWebView viewportHandlerDidChangeScales:]):
2925         (-[WKWebView viewportHandler:didChangeViewportSize:]):
2926         (-[WKWebView viewForZoomingInScrollView:]):
2927         (-[WKWebView scrollViewWillBeginZooming:withView:]):
2928         (-[WKWebView _didFinishScroll]):
2929         (-[WKWebView scrollViewDidEndDragging:willDecelerate:]):
2930         (-[WKWebView scrollViewDidEndDecelerating:]):
2931         (-[WKWebView scrollViewDidScrollToTop:]):
2932         (-[WKWebView scrollViewDidScroll:]):
2933         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
2934         (-[WKWebView _frameOrBoundsChanged]):
2935         (-[WKWebView _setDocumentScale:]):
2936
2937 2014-01-27  Tim Horton  <timothy_horton@apple.com>
2938
2939         Revert the parts of r162629 that add a new pluginLoadPolicy and the context menu item.
2940
2941         We're leaving the parts that make us use PDFPlugin instead of showing the blocked
2942         plugin indicator intact, though.
2943
2944         * UIProcess/API/APILoaderClient.h:
2945         (API::LoaderClient::pluginLoadPolicy):
2946         * UIProcess/API/C/WKPage.cpp:
2947         (WKPageSetPageLoaderClient):
2948         * UIProcess/API/C/WKPageLoaderClient.h:
2949         * UIProcess/WebPageProxy.cpp:
2950         (WebKit::WebPageProxy::findPlugin):
2951         * UIProcess/WebPageProxy.h:
2952         * UIProcess/WebPageProxy.messages.in:
2953         * WebProcess/Plugins/PDF/PDFPlugin.h:
2954         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2955         (WebKit::PDFPlugin::PDFPlugin):
2956         (WebKit::PDFPlugin::handleContextMenuEvent):
2957         * WebProcess/WebPage/WebPage.cpp:
2958         (WebKit::WebPage::createPlugin):
2959         (WebKit::WebPage::canPluginHandleResponse):
2960
2961 2014-01-27  Anders Carlsson  <andersca@apple.com>
2962
2963         Add a WKContentView initializer that takes a WKWebViewConfiguration
2964         https://bugs.webkit.org/show_bug.cgi?id=127718
2965
2966         Reviewed by Tim Horton.
2967
2968         This initializer will be used by WKWebView.
2969
2970         * UIProcess/API/ios/WKContentView.h:
2971         * UIProcess/API/ios/WKContentView.mm:
2972         (-[WKContentView initWithFrame:configuration:]):
2973
2974 2014-01-27  Andy Estes  <aestes@apple.com>
2975
2976         Scrub WebKit API headers of WTF macros
2977         https://bugs.webkit.org/show_bug.cgi?id=127706
2978
2979         Reviewed by David Kilzer.
2980
2981         * Configurations/FeatureDefines.xcconfig: Added ENABLE_INSPECTOR.
2982
2983 2014-01-27  Tim Horton  <timothy_horton@apple.com>
2984
2985         Crashes in RemoteScrollingCoordinatorProxy::rootScrollingNodeID
2986
2987         Reviewed by Simon Fraser.
2988
2989         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2990         (WebKit::RemoteScrollingCoordinatorProxy::rootScrollingNodeID):
2991         Null-check the root scrolling node, in case something scrolls before
2992         we've made the first remote layer/scrolling tree commit.
2993
2994 2014-01-27  Brady Eidson  <beidson@apple.com>
2995
2996         IDB: Rename "IDBTransactionIdentifier" to be more general purpose
2997         https://bugs.webkit.org/show_bug.cgi?id=127717
2998
2999         Reviewed by Tim Horton.
3000
3001         Global rename of IDBTransactionIdentifier to IDBIdentifier.
3002
3003         * DatabaseProcess/IndexedDB/IDBIdentifier.h: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/IDBTransactionIdentifier.h.
3004
3005         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
3006
3007         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
3008         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
3009
3010         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
3011         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
3012
3013         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
3014         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
3015         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
3016
3017         * Shared/WebCrossThreadCopier.cpp:
3018         * Shared/WebCrossThreadCopier.h:
3019
3020         * WebKit2.xcodeproj/project.pbxproj:
3021
3022 2014-01-27  Anders Carlsson  <andersca@apple.com>
3023
3024         Move underlying C++ objects to class extensions
3025         https://bugs.webkit.org/show_bug.cgi?id=127716
3026
3027         Reviewed by Tim Horton.
3028
3029         This allows us to get at the internals without calling any Obj-C methods.
3030
3031         * UIProcess/API/Cocoa/WKProcessClass.mm:
3032         * UIProcess/API/Cocoa/WKProcessClassInternal.h:
3033         * UIProcess/API/ios/WKContentView.mm:
3034         * UIProcess/API/ios/WKContentViewInternal.h:
3035
3036 2014-01-27  Anders Carlsson  <andersca@apple.com>
3037
3038         Implement the _injectedBundleURL property
3039         https://bugs.webkit.org/show_bug.cgi?id=127714
3040
3041         Reviewed by Tim Horton.
3042
3043         Properties declared in class categories need to be implemented. Do this
3044         for the _injectedBundleURL property.
3045
3046         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
3047         (-[WKProcessClassConfiguration _injectedBundleURL]):
3048         (-[WKProcessClassConfiguration _setInjectedBundleURL:]):
3049
3050 2014-01-27  Brady Eidson  <beidson@apple.com>
3051
3052         IDB: LevelDB backing store shouldn't know about IDBCursor or IDBCallbacks
3053         https://bugs.webkit.org/show_bug.cgi?id=127708
3054
3055         Reviewed by Tim Horton.
3056
3057         Update to new callback signatures:
3058         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3059         (WebKit::WebIDBServerConnection::cursorAdvance):
3060         (WebKit::WebIDBServerConnection::cursorIterate):
3061         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
3062
3063 2014-01-27  Anders Carlsson  <andersca@apple.com>
3064
3065         Tweak the WKWebView and WKWebViewConfiguration headers
3066         https://bugs.webkit.org/show_bug.cgi?id=127705
3067
3068         Reviewed by Dan Bernstein.
3069
3070         Add WK_API_CLASS to WKWebView and make WKWebView.h and WKWebViewConfiguration.h public.
3071
3072         * UIProcess/API/Cocoa/WKWebView.h:
3073         * WebKit2.xcodeproj/project.pbxproj:
3074
3075 2014-01-27  Brady Eidson  <beidson@apple.com>
3076
3077         IDB: Remove unused concept of "cursor prefetch"
3078         https://bugs.webkit.org/show_bug.cgi?id=127700
3079
3080         Reviewed by Tim Horton.
3081
3082         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3083         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
3084
3085 2014-01-27  Tim Horton  <timothy_horton@apple.com>
3086
3087         Fix the build on case-sensitive filesystems
3088
3089         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
3090
3091 2014-01-27  Brady Eidson  <beidson@apple.com>
3092
3093         IDB: Refactor out the last of the operation callbacks that are called by the LevelDB backing store
3094         https://bugs.webkit.org/show_bug.cgi?id=127592
3095
3096         Reviewed by Tim Horton.
3097
3098         Update the WebIDBServerConnection to the new callback signatures:
3099         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3100         (WebKit::WebIDBServerConnection::openCursor):
3101         (WebKit::WebIDBServerConnection::count):
3102         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
3103
3104 2014-01-27  Tim Horton  <timothy_horton@apple.com>
3105
3106         WebKit2 View Gestures: Fluid back-forward swipe
3107         https://bugs.webkit.org/show_bug.cgi?id=127363
3108
3109         Reviewed by Anders Carlsson.
3110
3111         Add support for a "back-forward swipe", which allows fluid swiping between
3112         items in the back-forward list. Currently disabled by default.
3113
3114         * Shared/WebPreferencesStore.h:
3115         * UIProcess/API/C/WKPreferences.cpp:
3116         (WKPreferencesSetViewGestureDebuggingEnabled):
3117         (WKPreferencesGetViewGestureDebuggingEnabled):
3118         * UIProcess/API/C/WKPreferencesPrivate.h:
3119         Add a ViewGestureDebuggingEnabled preference, which currently causes snapshots to be blurred.
3120         Additional view gesture debugging features could come in the future.
3121
3122         * UIProcess/API/Cocoa/WKViewPrivate.h:
3123         * UIProcess/API/mac/WKView.mm:
3124         (-[WKView _ensureGestureController]):
3125         (-[WKView scrollWheel:]):
3126         If back-forward navigation gestures are enabled, intercept scrollWheel events
3127         on the WKView and let the ViewGestureController take the first crack at them.
3128
3129         (-[WKView setAllowsBackForwardNavigationGestures:]):
3130         (-[WKView allowsBackForwardNavigationGestures]):
3131         * UIProcess/API/mac/WKViewInternal.h:
3132         Add allowsBackForwardNavigationGesture property, which enables the gesture.
3133
3134         * UIProcess/mac/ViewGestureController.h:
3135         Add swipe-related methods, which will be described below.
3136
3137         Add an enum for the swipe transition style. Currently only Overlap is accessible,
3138         but in the future one could see having API to choose the style.
3139         'Overlap' has the outgoing page swipe out to the right (when swiping right)
3140         or the incoming page swipe in from the right (when swiping left).
3141         'Push' has the pages push each other along in sync, as if all the pages in the
3142         back-forward list were oriented from left to right.
3143
3144         * UIProcess/mac/ViewGestureController.messages.in:
3145         * UIProcess/mac/ViewGestureController.mm: Renamed from Source/WebKit2/UIProcess/mac/ViewGestureController.cpp.
3146         Use some CAFilter SPI to blur the snapshot if ViewGestureDebuggingEnabled is on.
3147
3148         (WebKit::ViewGestureController::ViewGestureController):
3149         (WebKit::ViewGestureController::~ViewGestureController):
3150         (WebKit::ViewGestureController::endMagnificationGesture):
3151         Move m_activeGestureType clearing to each end* function instead of one global place,
3152         so that each gesture can handle when it ends separately.
3153
3154         (WebKit::ViewGestureController::handleScrollWheelEvent):
3155         If we receive a scroll wheel event which is appropriate for starting a
3156         fluid swipe, in a direction where the main frame is pinned to the appropriate
3157         edge of the view, start tracking a swipe.
3158
3159         This should eventually have some hysterisis to avoid stealing scrolls that
3160         venture into the wrong direction, but for now it starts tracking immediately.
3161
3162         Forward events from the tracking loop to {begin, handle, end}SwipeGesture.
3163
3164         (WebKit::ViewGestureController::beginSwipeGesture):
3165         Create a layer with the destination page's snapshot, and set it up.
3166
3167         (WebKit::ViewGestureController::handleSwipeGesture):
3168         Appropriately adjust the position of the root layer and snapshot layer,
3169         given the transition style and swipe direction.
3170
3171         (WebKit::ViewGestureController::endSwipeGesture):
3172         When the gesture ends, do the navigation, and tell the WebProcess to
3173         inform us when the render tree hits half the size it was when the
3174         snapshot was taken (when that happens, we will remove the snapshot
3175         and the gesture will be truly complete). Also, start a watchdog timer
3176         in case the render tree never hits that size, after which we will
3177         also remove the snapshot.
3178
3179         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
3180         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
3181         (WebKit::ViewGestureController::removeSwipeSnapshot):
3182         Tear down the swipe snapshot layer, and mark our current gesture as complete.
3183
3184         (WebKit::ViewGestureController::endActiveGesture):
3185         Simplify endActiveGesture; it only has work to do for a pinch-zoom gesture,
3186         as those are the only gestures where the user is directly in control of when they end.
3187
3188         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
3189         (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
3190         (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
3191         (WebKit::ViewGestureGeometryCollector::renderTreeSizeNotificationTimerFired):
3192         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
3193         (WebKit::ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold):
3194         * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
3195         ViewGestureController pushes a render-tree size threshold to the WebProcess;
3196         ViewGestureGeometryCollector (whose name is now more unfortunate than before)
3197         monitors render-tree size changes and informs ViewGestureController when
3198         it reaches that threshold via the 'DidHitRenderTreeSizeThreshold' message.
3199
3200         * UIProcess/API/Cocoa/WKViewPrivate.h:
3201         * UIProcess/API/ios/PageClientImplIOS.h:
3202         * UIProcess/API/ios/PageClientImplIOS.mm:
3203         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
3204         * UIProcess/API/mac/PageClientImpl.h:
3205         * UIProcess/API/mac/PageClientImpl.mm:
3206         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
3207         * UIProcess/API/mac/WKView.mm:
3208         (-[WKView _acceleratedCompositingModeRootLayer]):
3209         * UIProcess/API/mac/WKViewInternal.h:
3210         * UIProcess/PageClient.h:
3211         * UIProcess/WebPageProxy.h:
3212         * UIProcess/mac/WebPageProxyMac.mm:
3213         (WebKit::WebPageProxy::acceleratedCompositingRootLayer):
3214         Add a getter for the accelerated compositing root layer.
3215
3216         * UIProcess/mac/ViewSnapshotStore.mm:
3217         (WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize):
3218         Don't extract the CGImageRef from a RetainPtr just to put it back in one.
3219
3220 2014-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
3221
3222         [GTK] Implement custom URI schemes with CustomProtocols
3223         https://bugs.webkit.org/show_bug.cgi?id=127091
3224
3225         Reviewed by Gustavo Noronha Silva.
3226
3227         The old classes are no longer built for GTK+ and should be removed once
3228         other ports using soup backend switch to custom protocols implementation.
3229
3230         * GNUmakefile.am: Remove include path.
3231         * GNUmakefile.list.am: Remove files from compilation.
3232         * PlatformGTK.cmake: Ditto.
3233         * UIProcess/API/gtk/WebKitPrivate.h:
3234         * UIProcess/API/gtk/WebKitRequestManagerClient.cpp:
3235         (startLoading):
3236         (stopLoading):
3237         (attachRequestManagerClientToContext):
3238         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
3239         (webkitURISchemeRequestCreate):
3240         (webkit_uri_scheme_request_get_web_view):
3241         (webkitURISchemeRequestReadCallback):
3242         (webkit_uri_scheme_request_finish):
3243         (webkit_uri_scheme_request_finish_error):
3244         * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
3245         * UIProcess/API/gtk/WebKitWebContext.cpp:
3246         (createDefaultWebContext):
3247         (webkit_web_context_register_uri_scheme):
3248         (webkitWebContextGetRequestManager):
3249         (webkitWebContextStartLoadingCustomProtocol):
3250         (webkitWebContextStopLoadingCustomProtocol):
3251         (webkitWebContextDidFinishLoadingCustomProtocol):
3252         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
3253         * UIProcess/gtk/WebContextGtk.cpp:
3254         (WebKit::WebContext::platformInitializeWebProcess):
3255         * WebKit2Prefix.h: Enable CustomProtocols unconditionally for the
3256         GTK+ port.
3257
3258 2014-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
3259
3260         [SOUP] WebProcess sometimes crashes when a download is cancelled
3261         https://bugs.webkit.org/show_bug.cgi?id=127650
3262
3263         Reviewed by Martin Robinson.
3264
3265         The problem is that when the download is cancelled, the download
3266         manager removes the download from the map and it's deleted. The
3267         Download destructor calls platformInvalidate() that cancels the
3268         resource handle if there's still one. We set to nullptr the
3269         ResourceHandle when the download is cancelled to avoid cancelling
3270         it twice, but it's done after calling Download::didCancel(). It
3271         should be done before, because at that moment, when the download
3272         is deleted, the resource handle pointer is still valid.
3273
3274         * Shared/Downloads/soup/DownloadSoup.cpp:
3275         (WebKit::Download::cancel):
3276
3277 2014-01-25  Sam Weinig  <sam@webkit.org>
3278
3279         Remove unused support for DRAGGABLE_REGION
3280         https://bugs.webkit.org/show_bug.cgi?id=127642
3281
3282         Reviewed by Simon Fraser.
3283
3284         * Configurations/FeatureDefines.xcconfig:
3285
3286 2014-01-25  Anders Carlsson  <andersca@apple.com>
3287
3288         Remove an unused FrameLoaderClient function
3289         https://bugs.webkit.org/show_bug.cgi?id=127628
3290
3291         Reviewed by Andreas Kling.
3292
3293         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3294         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3295
3296 2014-01-25  Anders Carlsson  <andersca@apple.com>
3297
3298         Remove atomicIncrement/atomicDecrement
3299         https://bugs.webkit.org/show_bug.cgi?id=127625
3300
3301         Reviewed by Andreas Kling.
3302
3303         Replace atomicIncrement/atomicDecrement with std::atomic.
3304
3305         * Platform/IPC/Connection.cpp:
3306         (IPC::Connection::createSyncMessageEncoder):
3307         * Shared/mac/SecItemShim.cpp:
3308         (WebKit::generateSecItemRequestID):
3309         * UIProcess/StatisticsRequest.cpp:
3310         (WebKit::StatisticsRequest::addOutstandingRequest):
3311
3312 2014-01-25  Anders Carlsson  <andersca@apple.com>
3313
3314         Modernize HashTable threading code
3315         https://bugs.webkit.org/show_bug.cgi?id=127621
3316
3317         Reviewed by Darin Adler.
3318
3319         Explicitly include headers that used to be brought in by HashTable.h
3320
3321         * Shared/BlockingResponseMap.h:
3322
3323 2014-01-25  Zan Dobersek  <zdobersek@igalia.com>
3324
3325         [GTK] Remove null check for WebPopupMenuProxy::Client in WebPopupMenuProxyGtk::showPopupMenu
3326         https://bugs.webkit.org/show_bug.cgi?id=107036
3327
3328         Reviewed by Andreas Kling.
3329
3330         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
3331         (WebKit::WebPopupMenuProxyGtk::showPopupMenu): Don't perform an early return
3332         if the client is not available - it always should be. The client is set to null
3333         only when the proxy is invalidated. This happens immediately after this function
3334         returns, either with the popup being forced to close or being closed by the user
3335         with possibly an item being chosen. Rather than the early return, use an ASSERT.
3336
3337 2014-01-24  Tim Horton  <timothy_horton@apple.com>
3338
3339         WebKit2 View Gestures (Smart Zoom): Can't double-tap zoom-out on the body
3340         https://bugs.webkit.org/show_bug.cgi?id=127602
3341
3342         Reviewed by Anders Carlsson.
3343
3344         * UIProcess/mac/ViewGestureController.h:
3345         * UIProcess/mac/ViewGestureController.mm:
3346         (WebKit::ViewGestureController::ViewGestureController):
3347         (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
3348         Use an explicit boolean instead of the emptiness of the renderRect() to determine
3349         whether or not the user has already smart-zoomed. renderRect() can be 0x0
3350         if our hit-test hits the body element.
3351
3352 2014-01-24  Jinwoo Song  <jinwoo7.song@samsung.com>
3353
3354         Fix EFL WebKit2 build.
3355
3356         * WebProcess/WebPage/efl/WebPageEfl.cpp:
3357         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
3358
3359 2014-01-24  Anders Carlsson  <andersca@apple.com>
3360
3361         Fix GTK+ WebKit2 build.
3362
3363         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
3364         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
3365
3366 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
3367
3368         Start using the RemoteScrollingCoordinatorProxy on iOS
3369         https://bugs.webkit.org/show_bug.cgi?id=127598
3370
3371         Reviewed by Tim Horton.
3372
3373         Add a scrollPositionChangedViaDelegatedScrolling() function to
3374         ScrollingTree, allowing the ScrollingTree to be informed about
3375         external sources of scrolling.
3376         
3377         Call it from -[WKContentView didScrollTo:] for the root node.
3378
3379         * UIProcess/API/ios/WKContentView.mm:
3380         (-[WKContentView didScrollTo:]):
3381         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
3382         (WebKit::RemoteScrollingCoordinatorProxy::rootScrollingNodeID):
3383         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChangedViaDelegatedScrolling):
3384         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
3385
3386 2014-01-24  Anders Carlsson  <andersca@apple.com>
3387
3388         Try to fix the GTK+ build.
3389
3390         * GNUmakefile.list.am:
3391
3392 2014-01-24  Anders Carlsson  <andersca@apple.com>
3393
3394         Remove back/forward list related functions from Page
3395         https://bugs.webkit.org/show_bug.cgi?id=127596
3396
3397         Reviewed by Andreas Kling.
3398
3399         * WebProcess/WebPage/mac/WebPageMac.mm:
3400         (WebKit::WebPage::performNonEditingBehaviorForSelector):
3401
3402 2014-01-24  Jinwoo Song  <jinwoo7.song@samsung.com>
3403
3404         Unreviewed build fix attemp on the EFL after r162728.
3405
3406         * CMakeLists.txt: Removed WebLoaderClient.cpp
3407
3408 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
3409
3410         Prepare scrolling tree to handle > 1 scrolling node
3411         https://bugs.webkit.org/show_bug.cgi?id=127590
3412
3413         Reviewed by Tim Horton.
3414         
3415         Clean up the code path called after the ScrollingTree has scrolled a node,
3416         to prepare for multiple scrolling nodes.
3417         
3418         Change "updateMainFrameScrollPosition" terminology to "updateScrollPositionAfterAsyncScroll",
3419         and pass along the ScrollingNodeID that scrolled.
3420
3421         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
3422         (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
3423         * UIProcess/Scrolling/RemoteScrollingTree.h:
3424         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
3425         (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
3426
3427 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
3428
3429         #ifdef out handleWheelEventPhase for iOS
3430         https://bugs.webkit.org/show_bug.cgi?id=127583
3431
3432         Reviewed by Tim Horton.
3433
3434         handleWheelEventPhase() doesn't make any sense for iOS, which
3435         has no wheel events.
3436
3437         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
3438         * UIProcess/Scrolling/RemoteScrollingTree.h:
3439
3440 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
3441
3442         Push a custom fixed position rect down to the WebProcess in iOS WK2
3443         https://bugs.webkit.org/show_bug.cgi?id=127573
3444
3445         Reviewed by Tim Horton.
3446         
3447         Make it possible for WKContentView to specify a custom rect
3448         used to layout fixed position elements on iOS.
3449         
3450         This is computed in WKContentView, and pushed down
3451         through the RemoteLayerTreeDrawingArea, and eventually
3452         pushed onto FrameView.
3453
3454         * UIProcess/API/ios/WKContentView.mm:
3455         (-[WKContentView fixedPositionRectFromExposedRect:scale:]):
3456         (-[WKContentView _updateFixedPositionRect]):
3457         (-[WKContentView didFinishScrollTo:]):
3458         (-[WKContentView didZoomToScale:]):
3459         * UIProcess/DrawingAreaProxy.cpp:
3460         (WebKit::DrawingAreaProxy::setCustomFixedPositionRect):
3461         * UIProcess/DrawingAreaProxy.h:
3462         * WebProcess/WebPage/DrawingArea.h:
3463         * WebProcess/WebPage/DrawingArea.messages.in:
3464         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3465         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3466         (WebKit::RemoteLayerTreeDrawingArea::setCustomFixedPositionRect):
3467
3468 2014-01-24  Anders Carlsson  <andersca@apple.com>
3469
3470         Get rid of WebLoaderClient
3471         https://bugs.webkit.org/show_bug.cgi?id=127587
3472
3473         Reviewed by Andreas Kling.
3474
3475         Move WebLoaderClient into WKPage.cpp.
3476
3477         * UIProcess/API/C/WKPage.cpp:
3478         (WKPageSetPageLoaderClient):
3479         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3480         (-[WKBrowsingContextController setLoadDelegate:]):
3481         * UIProcess/WebLoaderClient.cpp: Removed.
3482         * UIProcess/WebLoaderClient.h: Removed.
3483         * UIProcess/WebPageProxy.h:
3484         * WebKit2.xcodeproj/project.pbxproj:
3485
3486 2014-01-24  Brady Eidson  <beidson@apple.com>
3487
3488         IDB: Support createIndex/deleteIndex
3489         <rdar://problem/15779642> and https://bugs.webkit.org/show_bug.cgi?id=127585
3490
3491         Reviewed by Tim Horton.
3492
3493         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
3494         (WebKit::UniqueIDBDatabase::createIndex):
3495         (WebKit::UniqueIDBDatabase::deleteIndex):
3496         (WebKit::UniqueIDBDatabase::createIndexInBackingStore):
3497         (WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
3498
3499         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
3500         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
3501         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore): Also drop all associated indexes.
3502         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
3503         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
3504         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
3505
3506 2014-01-24  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3507
3508         [GTK] youtube HTML5 videos in fullscreen, after <Esc>, can't go fullscreen again
3509         https://bugs.webkit.org/show_bug.cgi?id=127064
3510
3511         When pressing <Esc> or <f> at fu