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