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