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