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