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